Bug 61454

Summary: CSSStyleSelector should provide a way to obtain rules from non-author stylesheets
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: CSSAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin, dglazkov, enrica, eric, inferno, jamesr, koivisto, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 34564    
Attachments:
Description Flags
Patch jamesr: review+

Description Ryosuke Niwa 2011-05-25 11:44:09 PDT
When serializing DOM, we need to know the default styles of elements in order to avoid overriding them by computed style.
Comment 1 Ryosuke Niwa 2011-05-25 12:44:38 PDT
Created attachment 94840 [details]
Patch
Comment 2 James Robinson 2011-05-25 13:00:17 PDT
Comment on attachment 94840 [details]
Patch

R=me
Comment 3 Ryosuke Niwa 2011-05-25 13:32:42 PDT
Committed r87317: <http://trac.webkit.org/changeset/87317>
Comment 4 Eric Seidel (no email) 2011-05-25 15:34:57 PDT
The inspector must already know how to do this kind of thing. No?
Comment 5 Alexey Proskuryakov 2011-05-25 23:23:43 PDT
Does this change what rules JavaScript code can see, and thus re-introduce bug 46853?
Comment 6 Ryosuke Niwa 2011-05-25 23:32:55 PDT
(In reply to comment #5)
> Does this change what rules JavaScript code can see, and thus re-introduce bug 46853?

I don't think so.  This bug is about letting StylizedMarkupAccumulator know of the default UA + user stylesheets so that we don't override style rules from UA+user stylesheets when we're serializing DOM; e.g. when serializing pre, we shouldn't be overriding whitespace property unless it's specified in inline style declaration or some CSS rules.