Changeset 238649 in webkit
- Timestamp:
- Nov 28, 2018 5:11:10 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r238648 r238649 1 2018-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 1 36 2018-11-28 Devin Rousso <drousso@apple.com> 2 37 -
trunk/Source/WebInspectorUI/UserInterface/Base/Setting.js
r238589 r238649 130 130 131 131 // Experimental 132 experimentalEnableMultiplePropertiesSelection: new WI.Setting("experimental-enable-multiple-properties-selection", false),133 132 experimentalEnableComputedStyleCascades: new WI.Setting("experimental-enable-computed-style-cascades", false), 134 133 experimentalEnableLayersTab: new WI.Setting("experimental-enable-layers-tab", false), -
trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js
r238589 r238649 245 245 if (window.CSSAgent) { 246 246 let group = experimentalSettingsView.addGroup(WI.UIString("Styles Sidebar:")); 247 group.addSetting(WI.settings.experimentalEnableMultiplePropertiesSelection, WI.UIString("Enable Selection of Multiple Properties"));248 247 group.addSetting(WI.settings.experimentalEnableComputedStyleCascades, WI.UIString("Enable Computed Style Cascades")); 249 248 experimentalSettingsView.addSeparator(); … … 287 286 } 288 287 289 listenForChange(WI.settings.experimentalEnableMultiplePropertiesSelection);290 288 listenForChange(WI.settings.experimentalEnableComputedStyleCascades); 291 289 listenForChange(WI.settings.experimentalEnableLayersTab); -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css
r237659 r238649 39 39 padding-right: var(--css-declaration-horizontal-padding); 40 40 padding-left: calc(var(--css-declaration-horizontal-padding) + 17px); 41 }42 43 .multiple-properties-selection .spreadsheet-style-declaration-editor .property {44 41 border-left: 1px solid transparent; 45 42 outline: none; … … 54 51 } 55 52 56 . multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {53 .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) { 57 54 outline: none; 58 55 } … … 63 60 margin-bottom: 0 !important; 64 61 padding-bottom: 0 !important; 65 }66 67 .multiple-properties-selection .spreadsheet-style-declaration-editor :matches(.name, .value):not(.editing) {68 outline: none;69 62 } 70 63 … … 137 130 } 138 131 139 . multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected {132 .spreadsheet-style-declaration-editor .property.selected { 140 133 background-color: var(--background-color-selected); 141 134 } 142 135 143 . multiple-properties-selection .spreadsheet-style-declaration-editor .property.selected:focus {136 .spreadsheet-style-declaration-editor .property.selected:focus { 144 137 border-left-color: var(--border-color-selected); 145 138 } -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js
r238201 r238649 69 69 }, true); 70 70 71 if (WI.settings.experimentalEnableMultiplePropertiesSelection.value) 72 this.element.addEventListener("keydown", this._handleKeyDown.bind(this)); 71 this.element.addEventListener("keydown", this._handleKeyDown.bind(this)); 73 72 } 74 73 -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js
r238589 r238649 33 33 element.classList.add("spreadsheet-css-declaration"); 34 34 35 if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)36 element.classList.add("multiple-properties-selection");37 38 35 super(element); 39 40 if (WI.settings.experimentalEnableMultiplePropertiesSelection.value)41 element.classList.add("multiple-properties-selection");42 36 43 37 this._delegate = delegate || null; … … 391 385 this._wasEditing = this._propertiesEditor.editing || document.activeElement === this._selectorElement; 392 386 393 if (!WI.settings.experimentalEnableMultiplePropertiesSelection.value)394 return;395 396 387 let propertyElement = event.target.closest(".property"); 397 388 if (!propertyElement) -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js
r238589 r238649 56 56 property.addEventListener(WI.CSSProperty.Event.Changed, this.updateStatus, this); 57 57 58 if ( WI.settings.experimentalEnableMultiplePropertiesSelection.value &&this._isEditable()) {58 if (this._isEditable()) { 59 59 this._element.tabIndex = -1; 60 60 … … 473 473 474 474 // 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 }); 482 479 483 480 return tokenElement; -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js
r238120 r238649 41 41 this._element.classList.add("spreadsheet-text-field"); 42 42 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)); 49 45 this._element.addEventListener("blur", this._handleBlur.bind(this)); 50 46 this._element.addEventListener("keydown", this._handleKeyDown.bind(this)); … … 214 210 } 215 211 216 _handleFocus(event)217 {218 this.startEditing();219 }220 221 212 _handleBlur(event) 222 213 {
Note: See TracChangeset
for help on using the changeset viewer.