Summary: | Web Inspector: Picking unchanged for font-size does not reset back to the unchanged value | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bburg, commit-queue, graouts, hi, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Local Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 147563 | ||||||||||
Attachments: |
|
Created attachment 261045 [details]
Patch
Comment on attachment 261045 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=261045&action=review r=me. Please change the flag setter's name, though. I would like us to work towards storing less state in the visual style editor's DOM elements. > Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js:115 > + if (value || this._updatedValues.placeholder) There are lots of places where we have fallback values, can these be extracted into well-named getters? > Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js:235 > + _markNumberInputEditable(flag) This should match the name of the flag, i.e., this._setNumberInputIsEditable(flag). There's no reason for it to differ, and it reads better. (In reply to comment #3) > Comment on attachment 261045 [details] > I would like us to work towards storing less state in the visual style > editor's DOM elements. I would agree, but I think that that should be its own bug. I can modify all the visual style classes to use this methodology and will do so soon (my homework sucks). > > Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js:115 > > + if (value || this._updatedValues.placeholder) > > There are lots of places where we have fallback values, can these be > extracted into well-named getters? I think that, for now, it is easier and clearer to use these fallbacks. I've thought a bit about how to move away from storing the state in the DOM and I think that that change would resolve many of these cases. Created attachment 261289 [details]
Patch
Comment on attachment 261289 [details] Patch Clearing flags on attachment: 261289 Committed r189845: <http://trac.webkit.org/changeset/189845> All reviewed patches have been landed. Closing bug. |
Created attachment 259704 [details] Video Steps: 1)Change font-size. 2)Pick unchanged from the menu Results: Stays at the edited value. Note the rule icons reverts to the unchanged icon. Expected: Reverts to the original computed value See video.