Changeset 128590 in webkit


Ignore:
Timestamp:
Sep 14, 2012 5:05:44 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Display Named Flows in the "CSS Named Flows" drawer
https://bugs.webkit.org/show_bug.cgi?id=90871

Patch by Andrei Poenaru <poenaru@adobe.com> on 2012-09-14
Reviewed by Alexander Pavlov.

Implemented CSS Regions support in WebInspector as a drawer. (feature is under an experimental flag)

  • English.lproj/localizedStrings.js:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/compile-front-end.py:
  • inspector/front-end/CSSNamedFlowCollectionsView.js: Added.

(WebInspector.CSSNamedFlowCollectionsView):
(WebInspector.CSSNamedFlowCollectionsView.prototype.showInDrawer):
(WebInspector.CSSNamedFlowCollectionsView.prototype.reset):
(WebInspector.CSSNamedFlowCollectionsView.prototype._setDocument):
(WebInspector.CSSNamedFlowCollectionsView.prototype._documentUpdated):
(WebInspector.CSSNamedFlowCollectionsView.prototype._setSidebarHasContent):
(WebInspector.CSSNamedFlowCollectionsView.prototype._appendNamedFlow):
(WebInspector.CSSNamedFlowCollectionsView.prototype._removeNamedFlow):
(WebInspector.CSSNamedFlowCollectionsView.prototype._updateNamedFlow):
(WebInspector.CSSNamedFlowCollectionsView.prototype._resetNamedFlows):
(WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowCreated):
(WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowRemoved):
(WebInspector.CSSNamedFlowCollectionsView.prototype._regionLayoutUpdated):
(WebInspector.CSSNamedFlowCollectionsView.prototype._hashNamedFlow):
(WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlow):
(WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowInSidebar):
(WebInspector.CSSNamedFlowCollectionsView.prototype._selectedNodeChanged):
(WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlowForNode):
(WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
(WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):

  • inspector/front-end/ElementsPanel.js:

(WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
(WebInspector.ElementsPanel.prototype._showNamedFlowCollections):

  • inspector/front-end/Images/namedFlowOverflow.png: Added.
  • inspector/front-end/Settings.js:

(WebInspector.ExperimentsSettings):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/cssNamedFlows.css: Added.

(.css-named-flow-collections-view .split-view-sidebar-left):
(.css-named-flow-collections-view .tabbed-pane-header):
(.css-named-flow-collections-view .info):
(.css-named-flow-collections-view .split-view-sidebar-left .sidebar-content):
(.css-named-flow-collections-view .split-view-sidebar-left .selection):
(.css-named-flow-collections-view .split-view-contents .title):
(.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before):

Location:
trunk/Source/WebCore
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r128589 r128590  
     12012-09-14  Andrei Poenaru  <poenaru@adobe.com>
     2
     3        Web Inspector: Display Named Flows in the "CSS Named Flows" drawer
     4        https://bugs.webkit.org/show_bug.cgi?id=90871
     5
     6        Reviewed by Alexander Pavlov.
     7
     8        Implemented CSS Regions support in WebInspector as a drawer. (feature is under an experimental flag)
     9
     10        * English.lproj/localizedStrings.js:
     11        * WebCore.gypi:
     12        * WebCore.vcproj/WebCore.vcproj:
     13        * inspector/compile-front-end.py:
     14        * inspector/front-end/CSSNamedFlowCollectionsView.js: Added.
     15        (WebInspector.CSSNamedFlowCollectionsView):
     16        (WebInspector.CSSNamedFlowCollectionsView.prototype.showInDrawer):
     17        (WebInspector.CSSNamedFlowCollectionsView.prototype.reset):
     18        (WebInspector.CSSNamedFlowCollectionsView.prototype._setDocument):
     19        (WebInspector.CSSNamedFlowCollectionsView.prototype._documentUpdated):
     20        (WebInspector.CSSNamedFlowCollectionsView.prototype._setSidebarHasContent):
     21        (WebInspector.CSSNamedFlowCollectionsView.prototype._appendNamedFlow):
     22        (WebInspector.CSSNamedFlowCollectionsView.prototype._removeNamedFlow):
     23        (WebInspector.CSSNamedFlowCollectionsView.prototype._updateNamedFlow):
     24        (WebInspector.CSSNamedFlowCollectionsView.prototype._resetNamedFlows):
     25        (WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowCreated):
     26        (WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowRemoved):
     27        (WebInspector.CSSNamedFlowCollectionsView.prototype._regionLayoutUpdated):
     28        (WebInspector.CSSNamedFlowCollectionsView.prototype._hashNamedFlow):
     29        (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlow):
     30        (WebInspector.CSSNamedFlowCollectionsView.prototype._selectNamedFlowInSidebar):
     31        (WebInspector.CSSNamedFlowCollectionsView.prototype._selectedNodeChanged):
     32        (WebInspector.CSSNamedFlowCollectionsView.prototype._showNamedFlowForNode):
     33        (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
     34        (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
     35        * inspector/front-end/ElementsPanel.js:
     36        (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
     37        (WebInspector.ElementsPanel.prototype._showNamedFlowCollections):
     38        * inspector/front-end/Images/namedFlowOverflow.png: Added.
     39        * inspector/front-end/Settings.js:
     40        (WebInspector.ExperimentsSettings):
     41        * inspector/front-end/WebKit.qrc:
     42        * inspector/front-end/cssNamedFlows.css: Added.
     43        (.css-named-flow-collections-view .split-view-sidebar-left):
     44        (.css-named-flow-collections-view .tabbed-pane-header):
     45        (.css-named-flow-collections-view .info):
     46        (.css-named-flow-collections-view .split-view-sidebar-left .sidebar-content):
     47        (.css-named-flow-collections-view .split-view-sidebar-left .selection):
     48        (.css-named-flow-collections-view .split-view-contents .title):
     49        (.css-named-flow-collections-view .split-view-sidebar-left .named-flow-overflow::before):
     50
    1512012-09-14  Yoshifumi Inoue  <yosin@chromium.org>
    252
  • trunk/Source/WebCore/English.lproj/localizedStrings.js

    r128184 r128590  
    9696localizedStrings["CPU PROFILES"] = "CPU PROFILES";
    9797localizedStrings["CPU profiles show where the execution time is spent in your page's JavaScript functions."] = "CPU profiles show where the execution time is spent in your page's JavaScript functions.";
     98localizedStrings["CSS Named Flows"] = "CSS Named Flows";
     99localizedStrings["CSS Named Flows..."] = "CSS Named Flows...";
    98100localizedStrings["CSS SELECTOR PROFILES"] = "CSS SELECTOR PROFILES";
    99101localizedStrings["CSS selector profiles show how long the selector matching has taken in total and how many times a certain selector has matched DOM elements (the results are approximate due to matching algorithm optimizations.)"] = "CSS selector profiles show how long the selector matching has taken in total and how many times a certain selector has matched DOM elements (the results are approximate due to matching algorithm optimizations.)";
     
    273275localizedStrings["No Application Cache information available."] = "No Application Cache information available.";
    274276localizedStrings["No Breakpoints"] = "No Breakpoints";
     277localizedStrings["No CSS Named Flows"] = "No CSS Named Flows";
    275278localizedStrings["No Event Listeners"] = "No Event Listeners";
    276279localizedStrings["No Properties"] = "No Properties";
     
    293296localizedStrings["Open link in Resources panel"] = "Open link in Resources panel";
    294297localizedStrings["Other"] = "Other";
     298localizedStrings["Overflows."] = "Overflows.";
    295299localizedStrings["Device metrics"] = "Device metrics";
    296300localizedStrings["Paint"] = "Paint";
  • trunk/Source/WebCore/WebCore.gypi

    r128575 r128590  
    64696469            'inspector/front-end/breadcrumbList.css',
    64706470            'inspector/front-end/cm/codemirror.css',
     6471            'inspector/front-end/cssNamedFlows.css',
    64716472            'inspector/front-end/cmdevtools.css',
    64726473            'inspector/front-end/dataGrid.css',
     
    64956496        ],
    64966497        'webinspector_elements_js_files': [
     6498            'inspector/front-end/CSSNamedFlowCollectionsView.js',
    64976499            'inspector/front-end/ElementsPanel.js',
    64986500            'inspector/front-end/EventListenersSidebarPane.js',
     
    66126614            'inspector/front-end/Images/closeButtons.png',
    66136615            'inspector/front-end/Images/cookie.png',
     6616            'inspector/front-end/Images/namedFlowOverflow.png',
    66146617            'inspector/front-end/Images/database.png',
    66156618            'inspector/front-end/Images/databaseTable.png',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r128588 r128590  
    7602376023                                </File>
    7602476024                                <File
     76025                                        RelativePath="..\inspector\front-end\CSSNamedFlowCollectionsView.js"
     76026                                        >
     76027                                </File>
     76028                                <File
     76029                                        RelativePath="..\inspector\front-end\cssNamedFlows.css"
     76030                                        >
     76031                                </File>
     76032                                <File
    7602576033                                        RelativePath="..\inspector\front-end\CSSSelectorProfileView.js"
    7602676034                                        >
  • trunk/Source/WebCore/inspector/compile-front-end.py

    r127454 r128590  
    180180        "dependencies": ["components"],
    181181        "sources": [
     182            "CSSNamedFlowCollectionsView.js",
    182183            "ElementsPanel.js",
    183184            "ElementsPanelDescriptor.js",
  • trunk/Source/WebCore/inspector/front-end/ElementsPanel.js

    r126706 r128590  
    2929 */
    3030
     31importScript("CSSNamedFlowCollectionsView.js");
    3132importScript("EventListenersSidebarPane.js");
    3233importScript("MetricsSidebarPane.js");
     
    337338        var contextMenu = new WebInspector.ContextMenu();
    338339        var populated = this.treeOutline.populateContextMenu(contextMenu, event);
     340
     341        if (WebInspector.experimentsSettings.cssRegions.isEnabled()) {
     342            contextMenu.appendSeparator();
     343            contextMenu.appendItem(WebInspector.UIString("CSS Named Flows..."), this._showNamedFlowCollections.bind(this));
     344        }
     345
    339346        contextMenu.appendSeparator();
    340347        contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebInspector.settings.domWordWrap.get());
    341348
    342349        contextMenu.show(event);
     350    },
     351
     352    _showNamedFlowCollections: function()
     353    {
     354        if (!WebInspector.cssNamedFlowCollectionsView)
     355            WebInspector.cssNamedFlowCollectionsView = new WebInspector.CSSNamedFlowCollectionsView();
     356        WebInspector.cssNamedFlowCollectionsView.showInDrawer();
    343357    },
    344358
  • trunk/Source/WebCore/inspector/front-end/Settings.js

    r126855 r128590  
    198198    this.sass = this._createExperiment("sass", "Support for SASS");
    199199    this.codemirror = this._createExperiment("codemirror", "Use CodeMirror editor");
     200    this.cssRegions = this._createExperiment("cssRegions", "CSS Regions Support");
    200201
    201202    this._cleanUpSetting();
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r127454 r128590  
    3232    <file>CSSCompletions.js</file>
    3333    <file>CSSKeywordCompletions.js</file>
     34    <file>CSSNamedFlowCollectionsView.js</file>
    3435    <file>CSSSelectorProfileView.js</file>
    3536    <file>CSSStyleModel.js</file>
     
    216217    <file>auditsPanel.css</file>
    217218    <file>breadcrumbList.css</file>
     219    <file>cssNamedFlows.css</file>
    218220    <file>dataGrid.css</file>
    219221    <file>cmdevtools.css</file>
     
    289291    <file>Images/localStorage.png</file>
    290292    <file>Images/navigatorShowHideButton.png</file>
     293    <file>Images/namedFlowOverflow.png</file>
    291294    <file>Images/paneAddButtons.png</file>
    292295    <file>Images/paneBottomGrow.png</file>
Note: See TracChangeset for help on using the changeset viewer.