Title: [196739] trunk/Source/WebInspectorUI
Revision
196739
Author
[email protected]
Date
2016-02-17 19:57:23 -0800 (Wed, 17 Feb 2016)

Log Message

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

Patch by Devin Rousso <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (196738 => 196739)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-02-18 02:13:37 UTC (rev 196738)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-02-18 03:57:23 UTC (rev 196739)
@@ -1,3 +1,24 @@
+2016-02-17  Devin Rousso  <[email protected]>
+
+        Web Inspector: Add Context menu separators to Styles sidebar
+        https://bugs.webkit.org/show_bug.cgi?id=154360
+
+        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):
+
 2016-02-17  Matt Baker  <[email protected]>
 
         Web Inspector: add CSS variables for common border/background colors

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (196738 => 196739)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2016-02-18 02:13:37 UTC (rev 196738)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2016-02-18 03:57:23 UTC (rev 196739)
@@ -463,6 +463,8 @@
             return;
 
         if (WebInspector.CSSStyleManager.ForceablePseudoClasses.every((className) => !this._style.selectorText.includes(":" + className))) {
+            contextMenu.appendSeparator();
+
             for (let pseudoClass of WebInspector.CSSStyleManager.ForceablePseudoClasses) {
                 if (pseudoClass === "visited" && this._style.node.nodeName() !== "A")
                     continue;
@@ -486,6 +488,8 @@
             }
         }
 
+        contextMenu.appendSeparator();
+
         for (let pseudoElement of WebInspector.CSSStyleManager.PseudoElementNames) {
             let pseudoElementSelector = "::" + pseudoElement;
             const styleText = "content: \"\";";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js (196738 => 196739)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js	2016-02-18 02:13:37 UTC (rev 196738)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js	2016-02-18 03:57:23 UTC (rev 196739)
@@ -164,6 +164,8 @@
             return;
 
         if (WebInspector.CSSStyleManager.ForceablePseudoClasses.every((className) => !this.representedObject.selectorText.includes(":" + className))) {
+            contextMenu.appendSeparator();
+
             for (let pseudoClass of WebInspector.CSSStyleManager.ForceablePseudoClasses) {
                 if (pseudoClass === "visited" && this.representedObject.node.nodeName() !== "A")
                     continue;
@@ -178,6 +180,8 @@
             }
         }
 
+        contextMenu.appendSeparator();
+
         for (let pseudoElement of WebInspector.CSSStyleManager.PseudoElementNames) {
             let pseudoElementSelector = "::" + pseudoElement;
             const styleText = "content: \"\";";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to