Changeset 242063 in webkit
- Timestamp:
- Feb 25, 2019 5:50:44 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r242061 r242063 1 2019-02-25 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Styles: Command-/ should toggle edited property 4 https://bugs.webkit.org/show_bug.cgi?id=194967 5 <rdar://problem/48329852> 6 7 Reviewed by Devin Rousso. 8 9 * UserInterface/Models/CSSProperty.js: 10 (WI.CSSProperty.prototype.commentOut): 11 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: 12 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect): 13 * UserInterface/Views/SpreadsheetStyleProperty.js: 14 (WI.SpreadsheetStyleProperty.prototype.update): 15 (WI.SpreadsheetStyleProperty.prototype._toggle): 16 (WI.SpreadsheetStyleProperty.prototype._select): 17 1 18 2019-02-25 Devin Rousso <drousso@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js
r241209 r242063 144 144 commentOut(disabled) 145 145 { 146 console.assert(this._enabled === disabled, "CSS property is already " + (disabled ? "disabled" : "enabled"));147 146 if (this._enabled === !disabled) 148 147 return; -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js
r240314 r242063 451 451 } 452 452 453 spreadsheetStylePropertySelect(index) 454 { 455 this.selectProperties(index, index); 456 } 457 453 458 spreadsheetStylePropertyAddBlankPropertySoon(propertyView, {index}) 454 459 { -
trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js
r241740 r242063 68 68 }); 69 69 70 new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl, WI.KeyboardShortcut.Key.Slash, () => { 71 this._toggle(); 72 this._select(); 73 }, this._element); 74 70 75 this._element.copyHandler = this; 71 76 } … … 157 162 this._checkboxElement.addEventListener("click", (event) => { 158 163 event.stopPropagation(); 159 let disabled = !this._checkboxElement.checked; 160 this._property.commentOut(disabled); 161 this.update(); 164 this._toggle(); 165 console.assert(this._checkboxElement.checked === this._property.enabled); 162 166 }); 163 167 } … … 408 412 409 413 // Private 414 415 _toggle() 416 { 417 this._property.commentOut(this.property.enabled); 418 this.update(); 419 } 420 421 _select() 422 { 423 if (this._delegate && this._delegate.spreadsheetStylePropertySelect) { 424 let index = parseInt(this._element.dataset.propertyIndex); 425 this._delegate.spreadsheetStylePropertySelect(index); 426 } 427 } 410 428 411 429 _isEditable()
Note: See TracChangeset
for help on using the changeset viewer.