Bug 72881

Summary: JSC/CSSOM: Merge root() for style declaration objects.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2011-11-21 07:15:09 PST
We could fold root(CSSMutableStyleDeclaration) into root(CSSStyleDeclaration).
Comment 1 Andreas Kling 2011-11-21 07:18:22 PST
Created attachment 116080 [details]
Patch
Comment 2 Antti Koivisto 2011-11-21 07:19:27 PST
Comment on attachment 116080 [details]
Patch

r=me
Comment 3 WebKit Review Bot 2011-11-21 09:24:49 PST
Comment on attachment 116080 [details]
Patch

Clearing flags on attachment: 116080

Committed r100925: <http://trac.webkit.org/changeset/100925>
Comment 4 WebKit Review Bot 2011-11-21 09:24:54 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2011-11-29 11:43:50 PST
Looks like this takes a compile time check and makes it a runtime check.
Comment 6 Andreas Kling 2011-11-29 12:05:05 PST
(In reply to comment #5)
> Looks like this takes a compile time check and makes it a runtime check.

Thinking about it now, I believe root() might always be getting called with a CSSStyleDeclaration* argument (and never a CSSMutableStyleDeclaration*), hence we would never return the node() as the root for declarations with an associated element. If that's the case, I originally regressed it with <http://trac.webkit.org/changeset/97985> and fixed it with this change.

I'll take a closer look and see if we can add a layout test for it.