We could fold root(CSSMutableStyleDeclaration) into root(CSSStyleDeclaration).
Created attachment 116080 [details] Patch
Comment on attachment 116080 [details] Patch r=me
Comment on attachment 116080 [details] Patch Clearing flags on attachment: 116080 Committed r100925: <http://trac.webkit.org/changeset/100925>
All reviewed patches have been landed. Closing bug.
Looks like this takes a compile time check and makes it a runtime check.
(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.