Changeset 196739 in webkit


Ignore:
Timestamp:
Feb 17, 2016 7:57:23 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add Context menu separators to Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154360

Patch by Devin Rousso <Devin Rousso> on 2016-02-17
Reviewed by Joseph Pecoraro.

In the Styles sidebar, there are three main sections for the context menu:

  • Copy and Duplicate/Show-source
  • Add pseudo-class rules
  • Add/Select pseudo-element rules

These three sections were all put together in the same context menu, which
was very crowded as a result. Separators have been added to make it so that
these three sections are now separated and clearly show their different uses.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):

  • UserInterface/Views/VisualStyleSelectorTreeItem.js:

(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r196713 r196739  
     12016-02-17  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: Add Context menu separators to Styles sidebar
     4        https://bugs.webkit.org/show_bug.cgi?id=154360
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        In the Styles sidebar, there are three main sections for the context menu:
     9        - Copy and Duplicate/Show-source
     10        - Add pseudo-class rules
     11        - Add/Select pseudo-element rules
     12        These three sections were all put together in the same context menu, which
     13        was very crowded as a result. Separators have been added to make it so that
     14        these three sections are now separated and clearly show their different uses.
     15
     16        * UserInterface/Views/CSSStyleDeclarationSection.js:
     17        (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
     18
     19        * UserInterface/Views/VisualStyleSelectorTreeItem.js:
     20        (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
     21
    1222016-02-17  Matt Baker  <mattbaker@apple.com>
    223
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js

    r196184 r196739  
    464464
    465465        if (WebInspector.CSSStyleManager.ForceablePseudoClasses.every((className) => !this._style.selectorText.includes(":" + className))) {
     466            contextMenu.appendSeparator();
     467
    466468            for (let pseudoClass of WebInspector.CSSStyleManager.ForceablePseudoClasses) {
    467469                if (pseudoClass === "visited" && this._style.node.nodeName() !== "A")
     
    486488            }
    487489        }
     490
     491        contextMenu.appendSeparator();
    488492
    489493        for (let pseudoElement of WebInspector.CSSStyleManager.PseudoElementNames) {
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js

    r196184 r196739  
    165165
    166166        if (WebInspector.CSSStyleManager.ForceablePseudoClasses.every((className) => !this.representedObject.selectorText.includes(":" + className))) {
     167            contextMenu.appendSeparator();
     168
    167169            for (let pseudoClass of WebInspector.CSSStyleManager.ForceablePseudoClasses) {
    168170                if (pseudoClass === "visited" && this.representedObject.node.nodeName() !== "A")
     
    178180            }
    179181        }
     182
     183        contextMenu.appendSeparator();
    180184
    181185        for (let pseudoElement of WebInspector.CSSStyleManager.PseudoElementNames) {
Note: See TracChangeset for help on using the changeset viewer.