WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
147361
Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147361
Summary
Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
Devin Rousso
Reported
2015-07-28 09:57:01 PDT
I often find that I want to duplicate a rule to be able to tweak the selector from that rule without messing up the applied properties. I think that the best place to put this would be as a context menu item that inserts the duplicated (same selector but no properties) rule immediately after the copied rule.
Attachments
Patch
(4.22 KB, patch)
2015-07-28 10:24 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(5.17 KB, patch)
2015-07-28 18:52 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(5.13 KB, patch)
2015-08-02 00:54 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(5.27 KB, patch)
2015-08-04 21:26 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-07-28 09:57:11 PDT
<
rdar://problem/22031990
>
Devin Rousso
Comment 2
2015-07-28 10:24:04 PDT
Created
attachment 257655
[details]
Patch
Timothy Hatcher
Comment 3
2015-07-28 12:13:50 PDT
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.
Devin Rousso
Comment 4
2015-07-28 12:56:51 PDT
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.
Devin Rousso
Comment 5
2015-07-28 18:52:29 PDT
Created
attachment 257720
[details]
Patch
Devin Rousso
Comment 6
2015-08-02 00:54:19 PDT
Created
attachment 258029
[details]
Patch
Timothy Hatcher
Comment 7
2015-08-04 14:49:23 PDT
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.
Devin Rousso
Comment 8
2015-08-04 21:26:56 PDT
Created
attachment 258264
[details]
Patch
WebKit Commit Bot
Comment 9
2015-08-05 07:08:05 PDT
Comment on
attachment 258264
[details]
Patch Clearing flags on attachment: 258264 Committed
r187960
: <
http://trac.webkit.org/changeset/187960
>
WebKit Commit Bot
Comment 10
2015-08-05 07:08:09 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug