Title: [238649] trunk/Source/WebInspectorUI
Revision
238649
Author
nvasil...@apple.com
Date
2018-11-28 17:11:10 -0800 (Wed, 28 Nov 2018)

Log Message

Web Inspector: Styles: enable selection of multiple properties by default
https://bugs.webkit.org/show_bug.cgi?id=192109
<rdar://problem/46323565>

Reviewed by Devin Rousso.

* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Remove the checkbox.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property):
(.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
(.spreadsheet-style-declaration-editor .property.selected):
(.spreadsheet-style-declaration-editor .property.selected:focus):
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
(.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
Remove `.multiple-properties-selection` class.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype._handleFocus): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (238648 => 238649)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-11-29 01:11:10 UTC (rev 238649)
@@ -1,3 +1,38 @@
+2018-11-28  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Styles: enable selection of multiple properties by default
+        https://bugs.webkit.org/show_bug.cgi?id=192109
+        <rdar://problem/46323565>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Base/Setting.js:
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
+        Remove the checkbox.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
+        (.spreadsheet-style-declaration-editor .property):
+        (.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
+        (.spreadsheet-style-declaration-editor .property.selected):
+        (.spreadsheet-style-declaration-editor .property.selected:focus):
+        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
+        (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
+        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
+        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
+        Remove `.multiple-properties-selection` class.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+        (WI.SpreadsheetCSSStyleDeclarationSection):
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
+        * UserInterface/Views/SpreadsheetTextField.js:
+        (WI.SpreadsheetTextField):
+        (WI.SpreadsheetTextField.prototype._handleFocus): Deleted.
+
 2018-11-28  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Audit: empty results folder is shown after clearing filters

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -129,7 +129,6 @@
     zoomFactor: new WI.Setting("zoom-factor", 1),
 
     // Experimental
-    experimentalEnableMultiplePropertiesSelection: new WI.Setting("experimental-enable-multiple-properties-selection", false),
     experimentalEnableComputedStyleCascades: new WI.Setting("experimental-enable-computed-style-cascades", false),
     experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false),
     experimentalEnableNewTabBar: new WI.Setting("experimental-enable-new-tab-bar", false),

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -244,7 +244,6 @@
 
         if (window.CSSAgent) {
             let group = experimentalSettingsView.addGroup(WI.UIString("Styles Sidebar:"));
-            group.addSetting(WI.settings.experimentalEnableMultiplePropertiesSelection, WI.UIString("Enable Selection of Multiple Properties"));
             group.addSetting(WI.settings.experimentalEnableComputedStyleCascades, WI.UIString("Enable Computed Style Cascades"));
             experimentalSettingsView.addSeparator();
         }
@@ -286,7 +285,6 @@
             });
         }
 
-        listenForChange(WI.settings.experimentalEnableMultiplePropertiesSelection);
         listenForChange(WI.settings.experimentalEnableComputedStyleCascades);
         listenForChange(WI.settings.experimentalEnableLayersTab);
         listenForChange(WI.settings.experimentalEnableAuditTab);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css	2018-11-29 01:11:10 UTC (rev 238649)
@@ -38,9 +38,6 @@
 .spreadsheet-style-declaration-editor .property {
     padding-right: var(--css-declaration-horizontal-padding);
     padding-left: calc(var(--css-declaration-horizontal-padding) + 17px);
-}
-
-.multiple-properties-selection .spreadsheet-style-declaration-editor .property {
     border-left: 1px solid transparent;
     outline: none;
 }
@@ -53,7 +50,7 @@
     color: var(--text-color);
 }
 
-.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
+.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
     outline: none;
 }
 
@@ -64,10 +61,6 @@
     padding-bottom: 0 !important;
 }
 
-.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
-    outline: none;
-}
-
 .spreadsheet-style-declaration-editor .value.editing {
     display: inline-block;
     position: relative;
@@ -136,11 +129,11 @@
     -webkit-clip-path: polygon(0% 50%, 6px 0%, 100% 0%, 100% 100%, 6px 100%);
 }
 
-.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected {
+.spreadsheet-style-declaration-editor .property.selected {
     background-color: var(--background-color-selected);
 }
 
-.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus {
+.spreadsheet-style-declaration-editor .property.selected:focus {
     border-left-color: var(--border-color-selected);
 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -68,8 +68,7 @@
             this.focused = false;
         }, true);
 
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
-            this.element.addEventListener("keydown", this._handleKeyDown.bind(this));
+        this.element.addEventListener("keydown", this._handleKeyDown.bind(this));
     }
 
     layout()

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -32,14 +32,8 @@
         let element = document.createElement("section");
         element.classList.add("spreadsheet-css-declaration");
 
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
-            element.classList.add("multiple-properties-selection");
-
         super(element);
 
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
-            element.classList.add("multiple-properties-selection");
-
         this._delegate = delegate || null;
         this._style = style;
         this._propertiesEditor = null;
@@ -390,9 +384,6 @@
     {
         this._wasEditing = this._propertiesEditor.editing || document.activeElement === this._selectorElement;
 
-        if (!WI.settings.experimentalEnableMultiplePropertiesSelection.value)
-            return;
-
         let propertyElement = event.target.closest(".property");
         if (!propertyElement)
             return;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -55,7 +55,7 @@
         property.addEventListener(WI.CSSProperty.Event.OverriddenStatusChanged, this.updateStatus, this);
         property.addEventListener(WI.CSSProperty.Event.Changed, this.updateStatus, this);
 
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value && this._isEditable()) {
+        if (this._isEditable()) {
             this._element.tabIndex = -1;
 
             this._element.addEventListener("blur", (event) => {
@@ -472,13 +472,10 @@
         tokenElement.append(swatch.element, innerElement);
 
         // Prevent the value from editing when clicking on the swatch.
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value) {
-            swatch.element.addEventListener("click", (event) => {
-                if (this._swatchActive)
-                    event.stop();
-            });
-        } else
-            swatch.element.addEventListener("mousedown", (event) => { event.stop(); });
+        swatch.element.addEventListener("click", (event) => {
+            if (this._swatchActive)
+                event.stop();
+        });
 
         return tokenElement;
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js (238648 => 238649)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js	2018-11-29 00:09:51 UTC (rev 238648)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js	2018-11-29 01:11:10 UTC (rev 238649)
@@ -40,12 +40,8 @@
 
         this._element.classList.add("spreadsheet-text-field");
 
-        if (WI.settings.experimentalEnableMultiplePropertiesSelection.value) {
-            this._element.addEventListener("mousedown", this._handleMouseDown.bind(this), true);
-            this._element.addEventListener("click", this._handleClick.bind(this));
-        } else
-            this._element.addEventListener("focus", this._handleFocus.bind(this));
-
+        this._element.addEventListener("mousedown", this._handleMouseDown.bind(this), true);
+        this._element.addEventListener("click", this._handleClick.bind(this));
         this._element.addEventListener("blur", this._handleBlur.bind(this));
         this._element.addEventListener("keydown", this._handleKeyDown.bind(this));
         this._element.addEventListener("input", this._handleInput.bind(this));
@@ -213,11 +209,6 @@
             event.stopPropagation();
     }
 
-    _handleFocus(event)
-    {
-        this.startEditing();
-    }
-
     _handleBlur(event)
     {
         if (!this._editing)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to