Summary: | Web Inspector: Allow users to duplicate rules in the Rules sidebar panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Devin Rousso
2015-07-28 09:57:01 PDT
Created attachment 257655 [details]
Patch
Comment on attachment 257655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257655&action=review > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:408 > + if (!(this._style.ownerRule && this._style.ownerRule.type === WebInspector.CSSRule.Type.UserAgent)) { Why exclude UserAgent? (Or am I failing at boolean logic.) I think it would be useful to duplicate a rule that you can't edit directly. Comment on attachment 257655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257655&action=review >> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:408 >> + if (!(this._style.ownerRule && this._style.ownerRule.type === WebInspector.CSSRule.Type.UserAgent)) { > > Why exclude UserAgent? (Or am I failing at boolean logic.) I think it would be useful to duplicate a rule that you can't edit directly. That was supposed to be Inherited, not UserAgent. Duplicated Inherited rules won't show up in the sidebar unless the node which the inherited rule comes from is selected, so its pointless to allow users to duplicate rules that are marked as inherited. Created attachment 257720 [details]
Patch
Created attachment 258029 [details]
Patch
Comment on attachment 258029 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258029&action=review > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:459 > + if (this._delegate && typeof this._delegate.focusNextNewInspectorRule === "function") > + this._delegate.focusNextNewInspectorRule(); Delegate methods should be prefixed with the class name. So cssStyleDeclarationSectionFocusNextNewInspectorRule. This is really just calling a public method as a delegate method currently. Created attachment 258264 [details]
Patch
Comment on attachment 258264 [details] Patch Clearing flags on attachment: 258264 Committed r187960: <http://trac.webkit.org/changeset/187960> All reviewed patches have been landed. Closing bug. |