Changeset 238649 in webkit


Ignore:
Timestamp:
Nov 28, 2018 5:11:10 PM (5 years ago)
Author:
Nikita Vasilyev
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.

Location:
trunk/Source/WebInspectorUI
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r238648 r238649  
     12018-11-28  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Styles: enable selection of multiple properties by default
     4        https://bugs.webkit.org/show_bug.cgi?id=192109
     5        <rdar://problem/46323565>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * UserInterface/Base/Setting.js:
     10        * UserInterface/Views/SettingsTabContentView.js:
     11        (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
     12        Remove the checkbox.
     13
     14        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
     15        (.spreadsheet-style-declaration-editor .property):
     16        (.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)):
     17        (.spreadsheet-style-declaration-editor .property.selected):
     18        (.spreadsheet-style-declaration-editor .property.selected:focus):
     19        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property): Deleted.
     20        (.multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing)): Deleted.
     21        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected): Deleted.
     22        (.multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus): Deleted.
     23        Remove `.multiple-properties-selection` class.
     24
     25        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
     26        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
     27        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
     28        (WI.SpreadsheetCSSStyleDeclarationSection):
     29        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
     30        * UserInterface/Views/SpreadsheetStyleProperty.js:
     31        (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
     32        * UserInterface/Views/SpreadsheetTextField.js:
     33        (WI.SpreadsheetTextField):
     34        (WI.SpreadsheetTextField.prototype._handleFocus): Deleted.
     35
    1362018-11-28  Devin Rousso  <drousso@apple.com>
    237
  • trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js

    r238589 r238649  
    130130
    131131    // Experimental
    132     experimentalEnableMultiplePropertiesSelection: new WI.Setting("experimental-enable-multiple-properties-selection", false),
    133132    experimentalEnableComputedStyleCascades: new WI.Setting("experimental-enable-computed-style-cascades", false),
    134133    experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false),
  • trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

    r238589 r238649  
    245245        if (window.CSSAgent) {
    246246            let group = experimentalSettingsView.addGroup(WI.UIString("Styles Sidebar:"));
    247             group.addSetting(WI.settings.experimentalEnableMultiplePropertiesSelection, WI.UIString("Enable Selection of Multiple Properties"));
    248247            group.addSetting(WI.settings.experimentalEnableComputedStyleCascades, WI.UIString("Enable Computed Style Cascades"));
    249248            experimentalSettingsView.addSeparator();
     
    287286        }
    288287
    289         listenForChange(WI.settings.experimentalEnableMultiplePropertiesSelection);
    290288        listenForChange(WI.settings.experimentalEnableComputedStyleCascades);
    291289        listenForChange(WI.settings.experimentalEnableLayersTab);
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css

    r237659 r238649  
    3939    padding-right: var(--css-declaration-horizontal-padding);
    4040    padding-left: calc(var(--css-declaration-horizontal-padding) + 17px);
    41 }
    42 
    43 .multiple-properties-selection .spreadsheet-style-declaration-editor .property {
    4441    border-left: 1px solid transparent;
    4542    outline: none;
     
    5451}
    5552
    56 .multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
     53.spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
    5754    outline: none;
    5855}
     
    6360    margin-bottom: 0 !important;
    6461    padding-bottom: 0 !important;
    65 }
    66 
    67 .multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {
    68     outline: none;
    6962}
    7063
     
    137130}
    138131
    139 .multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected {
     132.spreadsheet-style-declaration-editor .property.selected {
    140133    background-color: var(--background-color-selected);
    141134}
    142135
    143 .multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus {
     136.spreadsheet-style-declaration-editor .property.selected:focus {
    144137    border-left-color: var(--border-color-selected);
    145138}
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js

    r238201 r238649  
    6969        }, true);
    7070
    71         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
    72             this.element.addEventListener("keydown", this._handleKeyDown.bind(this));
     71        this.element.addEventListener("keydown", this._handleKeyDown.bind(this));
    7372    }
    7473
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js

    r238589 r238649  
    3333        element.classList.add("spreadsheet-css-declaration");
    3434
    35         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
    36             element.classList.add("multiple-properties-selection");
    37 
    3835        super(element);
    39 
    40         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)
    41             element.classList.add("multiple-properties-selection");
    4236
    4337        this._delegate = delegate || null;
     
    391385        this._wasEditing = this._propertiesEditor.editing || document.activeElement === this._selectorElement;
    392386
    393         if (!WI.settings.experimentalEnableMultiplePropertiesSelection.value)
    394             return;
    395 
    396387        let propertyElement = event.target.closest(".property");
    397388        if (!propertyElement)
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

    r238589 r238649  
    5656        property.addEventListener(WI.CSSProperty.Event.Changed, this.updateStatus, this);
    5757
    58         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value && this._isEditable()) {
     58        if (this._isEditable()) {
    5959            this._element.tabIndex = -1;
    6060
     
    473473
    474474        // Prevent the value from editing when clicking on the swatch.
    475         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value) {
    476             swatch.element.addEventListener("click", (event) => {
    477                 if (this._swatchActive)
    478                     event.stop();
    479             });
    480         } else
    481             swatch.element.addEventListener("mousedown", (event) => { event.stop(); });
     475        swatch.element.addEventListener("click", (event) => {
     476            if (this._swatchActive)
     477                event.stop();
     478        });
    482479
    483480        return tokenElement;
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js

    r238120 r238649  
    4141        this._element.classList.add("spreadsheet-text-field");
    4242
    43         if (WI.settings.experimentalEnableMultiplePropertiesSelection.value) {
    44             this._element.addEventListener("mousedown", this._handleMouseDown.bind(this), true);
    45             this._element.addEventListener("click", this._handleClick.bind(this));
    46         } else
    47             this._element.addEventListener("focus", this._handleFocus.bind(this));
    48 
     43        this._element.addEventListener("mousedown", this._handleMouseDown.bind(this), true);
     44        this._element.addEventListener("click", this._handleClick.bind(this));
    4945        this._element.addEventListener("blur", this._handleBlur.bind(this));
    5046        this._element.addEventListener("keydown", this._handleKeyDown.bind(this));
     
    214210    }
    215211
    216     _handleFocus(event)
    217     {
    218         this.startEditing();
    219     }
    220 
    221212    _handleBlur(event)
    222213    {
Note: See TracChangeset for help on using the changeset viewer.