Bug 61570

Summary: [debug feature] CSSStyleDeclaration should have a way to print cssText
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Blocker CC: eric, hyatt, jamesr, lars.knoll, leviw, mitz, simon.fraser, sullivan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch rniwa: review+

Description Ryosuke Niwa 2011-05-26 15:14:57 PDT
Seriously, I'm tried of gdb crashing on me whenever I call cssText.  We should just add a method or global function that prints out the CSS style declaration.
Comment 1 Simon Fraser (smfr) 2011-05-26 15:21:11 PDT
Sounds good, just like showTree().
Comment 2 Annie Sullivan 2011-05-26 16:12:27 PDT
Created attachment 95066 [details]
Patch
Comment 3 Ryosuke Niwa 2011-05-26 16:15:40 PDT
Comment on attachment 95066 [details]
Patch

maybe showStyle or showCssText to follow the convention?
Comment 4 Levi Weintraub 2011-05-26 16:19:28 PDT
(In reply to comment #3)
> (From update of attachment 95066 [details])
> maybe showStyle or showCssText to follow the convention?

Either show or showStyle have my vote :)
Comment 5 Ryosuke Niwa 2011-05-26 16:20:31 PDT
Comment on attachment 95066 [details]
Patch

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

> Source/WebCore/css/CSSStyleDeclaration.cpp:189
> +    fprintf(stderr, "%s", cssText().ascii().data());

Yu need \n after %s.
Comment 6 Annie Sullivan 2011-05-26 16:31:49 PDT
Created attachment 95069 [details]
Patch
Comment 7 Ryosuke Niwa 2011-05-26 17:08:13 PDT
Committed r87453: <http://trac.webkit.org/changeset/87453>