[Webkit-unassigned] [Bug 90871] Web Inspector: Display Named Flows in the "CSS Named Flows" drawer
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 14 02:27:40 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=90871
Alexander Pavlov (apavlov) <apavlov at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #164069|review?, commit-queue? |
Flag| |
--- Comment #21 from Alexander Pavlov (apavlov) <apavlov at chromium.org> 2012-09-14 02:28:07 PST ---
(From update of attachment 164069)
Much better overall, a few more nits left. Feel free to ask questions online.
View in context: https://bugs.webkit.org/attachment.cgi?id=164069&action=review
> Source/WebCore/inspector/front-end/CSSNamedFlowCollectionsView.js:132
> + var overflowIcon = document.createElement("img");
Sorry for overlooking this earlier. We decorate tree elements simply by setting appropriate classes on them and using images in .class:before. I can help you write the related CSS if you wish.
So, in this case you will just do
flowTreeElement.title.addStyleClass("named-flow-overflow");
and have the respective CSS place the desired image in the :before pseudo-element for you.
> Source/WebCore/inspector/front-end/CSSNamedFlowCollectionsView.js:197
> + var overflowIcon = document.createElement("img");
Ditto
> Source/WebCore/inspector/front-end/CSSNamedFlowCollectionsView.js:223
> + this._showNamedFlowForNode(WebInspector.panels["elements"].treeOutline.selectedDOMNode());
This is not the correct way to address panels now, since panels are loaded lazily. Use
WebInspector.panel("elements").treeOutline....
> Source/WebCore/inspector/front-end/ElementsPanel.js:356
> + WebInspector.showViewInDrawer(WebInspector.cssNamedFlowCollectionsView._statusElement, WebInspector.cssNamedFlowCollectionsView);
Since CSSNamedFlowCollectionsView is defined in a different file, you cannot access its private field (_statusElement). Instead, you should have something like
showInDrawer: function()
{
WebInspector.showViewInDrawer(this._statusElement, this);
}
as a separate method on CSSNamedFlowCollectionsView.prototype, so that instead of this line you can call
WebInspector.cssNamedFlowCollectionsView.showInDrawer();
_showNamedFlowCollections() is only necessary to create the view instance as a field on the ElementsPanel lazily.
As an alternative, you can define showNamedFlowCollections() on WebInspector.CSSNamedFlowCollectionsView (as a "static" field), and create the view singleton as a field on WebInspector.CSSNamedFlowCollectionsView (e.g. WebInspector.CSSNamedFlowCollectionsView._instance). This way, you will not need the said showInDrawer() method at all.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list