Bug 72881 - JSC/CSSOM: Merge root() for style declaration objects.
Summary: JSC/CSSOM: Merge root() for style declaration objects.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-21 07:15 PST by Andreas Kling
Modified: 2011-11-29 12:05 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2011-11-21 07:18 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

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