Bug 147922 - Web Inspector: Disabling attribute styles should not be possible
Summary: Web Inspector: Disabling attribute styles should not be possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 22:05 PDT by Devin Rousso
Modified: 2015-08-11 22:46 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2015-08-11 22:07 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (1.66 KB, patch)
2015-08-11 22:17 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2015-08-11 22:05:36 PDT
Currently, clicking a style icon in the Rules panel adds comments around every line in that style to "disable" that rule.  This should not be possible for any type of style other than inline, author, user, inspector, and inherited rules.  Currently, it allows toggling of everything other than UserAgent, but this needs to be changed to the list above.
Comment 1 Devin Rousso 2015-08-11 22:07:24 PDT
Created attachment 258803 [details]
Patch
Comment 2 Timothy Hatcher 2015-08-11 22:10:20 PDT
Comment on attachment 258803 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=258803&action=review

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:103
> +        if (style.editable && (style.type === WebInspector.CSSStyleDeclaration.Type.Rule || style.type === WebInspector.CSSStyleDeclaration.Type.Inline)

Would style.editable be enough?
Comment 3 Devin Rousso 2015-08-11 22:16:13 PDT
(In reply to comment #2)
> Comment on attachment 258803 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=258803&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:103
> > +        if (style.editable && (style.type === WebInspector.CSSStyleDeclaration.Type.Rule || style.type === WebInspector.CSSStyleDeclaration.Type.Inline)
> 
> Would style.editable be enough?

Ha I can't believe I didn't think of that.  It works exactly as described.
Comment 4 Devin Rousso 2015-08-11 22:17:43 PDT
Created attachment 258805 [details]
Patch
Comment 5 WebKit Commit Bot 2015-08-11 22:46:10 PDT
Comment on attachment 258805 [details]
Patch

Clearing flags on attachment: 258805

Committed r188326: <http://trac.webkit.org/changeset/188326>
Comment 6 WebKit Commit Bot 2015-08-11 22:46:13 PDT
All reviewed patches have been landed.  Closing bug.