Bug 61570 - [debug feature] CSSStyleDeclaration should have a way to print cssText
Summary: [debug feature] CSSStyleDeclaration should have a way to print cssText
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Blocker
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-26 15:14 PDT by Ryosuke Niwa
Modified: 2011-05-26 17:08 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.93 KB, patch)
2011-05-26 16:12 PDT, Annie Sullivan
no flags Details | Formatted Diff | Diff
Patch (1.95 KB, patch)
2011-05-26 16:31 PDT, Annie Sullivan
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>