Pressing Command-/ toggles *selected* CSS property. Bug 181145 - Web Inspector: Styles: Toggle selected properties by pressing Space or Command+/ It should also work when editing CSS property name or value. Steps: 1. Inspect <body> on webkit.org 2. Click on "font-size" (or it's value) 3. Press Command-/ (Ctrl-/ on non-Mac) Expected: "font-size" is commented out. font-size *property* is now selected - we need to select the property so consequent Command-/ would uncomment it. Actual: Nothing happens.
<rdar://problem/48329852>
Created attachment 362839 [details] Patch
Created attachment 362840 [details] [Video] With patch applied
Comment on attachment 362839 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=362839&action=review r=me Probably unrelated, but when I select multiple properties and press ⌘/, I hit an assertion failure. Models/CSSProperty.js:146:23: CONSOLE ERROR CSS property is already disabled We should probably just remove that assertion. > Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:164 > + this._toggle(); NIT: we should assert (or even just set it) that the checkbox's state matches the property's `enabled`. console.assert(this._checkboxElement.checked === this.property.enabled); > Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:423 > + const index = parseInt(this._element.dataset.propertyIndex); Style: this should be `let`.
Created attachment 362944 [details] Patch for landing
Comment on attachment 362944 [details] Patch for landing Clearing flags on attachment: 362944 Committed r242063: <https://trac.webkit.org/changeset/242063>
All reviewed patches have been landed. Closing bug.