Bug 78482

Summary: Web Inspector: wrap settings selector text and adding a rule with undoable actions.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, tony, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 78502    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
[Patch] with no fireStyleSheetChanged part.
none
[Patch] review comments addressed. yurys: review+

Description Pavel Feldman 2012-02-13 03:51:58 PST
Current set of actions is incomplete, adding missing ones.
Comment 1 Pavel Feldman 2012-02-13 03:57:23 PST
Created attachment 126748 [details]
Patch
Comment 2 Pavel Feldman 2012-02-13 04:15:31 PST
Created attachment 126750 [details]
[Patch] with no fireStyleSheetChanged part.
Comment 3 Alexander Pavlov (apavlov) 2012-02-13 04:41:41 PST
Comment on attachment 126750 [details]
[Patch] with no fireStyleSheetChanged part.

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

> Source/WebCore/inspector/InspectorCSSAgent.cpp:709
> +        *errorString = "No stylesheet to add rule to found";

Hard to parse. Perhaps, a simpler "No target stylesheet found"?

> Source/WebCore/inspector/InspectorStyleSheet.cpp:798
> +    sheetText.remove(sourceData->selectorListRange.start, sourceData->styleSourceData->styleBodyRange.end - sourceData->selectorListRange.start);

Please check that this removes the rule body trailing '}' (add the full stylesheet text retrieval to your test.)
Comment 4 Pavel Feldman 2012-02-13 05:07:29 PST
Created attachment 126758 [details]
[Patch] review comments addressed.
Comment 5 Pavel Feldman 2012-02-13 05:09:09 PST
(In reply to comment #3)
> (From update of attachment 126750 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=126750&action=review
> 
> > Source/WebCore/inspector/InspectorCSSAgent.cpp:709
> > +        *errorString = "No stylesheet to add rule to found";
> 
> Hard to parse. Perhaps, a simpler "No target stylesheet found"?
> 

Done.

> > Source/WebCore/inspector/InspectorStyleSheet.cpp:798
> > +    sheetText.remove(sourceData->selectorListRange.start, sourceData->styleSourceData->styleBodyRange.end - sourceData->selectorListRange.start);
> 
> Please check that this removes the rule body trailing '}' (add the full stylesheet text retrieval to your test.)

Done. You actually caught a bug.
Comment 6 Pavel Feldman 2012-02-13 05:12:37 PST
Committed r107561: <http://trac.webkit.org/changeset/107561>