Bug 70598 - Web Inspector: Unchecking a style rule should comment it out
Summary: Web Inspector: Unchecking a style rule should comment it out
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-10-21 04:29 PDT by Nikita Vasilyev
Modified: 2013-06-17 06:53 PDT (History)
14 users (show)

See Also:


Attachments
Comment out unchecked CSS rule (76.50 KB, image/png)
2011-10-21 04:29 PDT, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2011-10-21 04:29:02 PDT
Created attachment 111939 [details]
Comment out unchecked CSS rule

See attached image.

Currently, disabling style rule does not modify CSS content. Commenting it out would be nice.
Comment 1 Vivek Galatage 2012-04-02 05:12:22 PDT
Should this toggling of CSS property result in creating new revision of the stylesheet in the resource view?
Comment 2 Alexander Pavlov (apavlov) 2012-04-02 10:11:35 PDT
Vivek: no it shouldn't. If a designer were to play around with disabling really many properties during a session, they could get hundreds of stylesheet revisions per the Inspector session, thereby turning the revision tracking completely unusable (and potentially getting a severe memory impact (or even OOM crashes) with very big stylesheets.)
Comment 3 Nikita Vasilyev 2012-04-02 12:22:03 PDT
The idea is to save a stylesheet including commented out rules. Is it possible without creating a revision for every disabled style rule?
Comment 4 Rob Colburn 2012-05-10 12:29:24 PDT
@Alexander, @Vivek

Performing other small/incremental changes, like adjusting a color property 100 times, also creates a version for each change.  So, the change is not entirely inconceivable because we already create a ton of versions.  Right now, it's just inconsistent.

Theoretically, I think we could potentially solve the problem a different way.  It would deserve it's own ticket and discussion though.  Instead of creating a version of the style-sheet for each change performed in the Elements panel, what if we made those changes to a "TRUNK" version, that we save that version upon viewing the resource in the Resource panel.
Comment 5 Timothy Hatcher 2013-06-17 06:53:12 PDT
We agree. The new WebKit Web Inspector does this.
Comment 6 Radar WebKit Bug Importer 2013-06-17 06:53:29 PDT
<rdar://problem/14173879>