[Webkit-unassigned] [Bug 84048] ShadowRoot needs resetStyleInheritance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 21 18:43:02 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=84048


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #137950|review?                     |review-
               Flag|                            |




--- Comment #15 from Ryosuke Niwa <rniwa at webkit.org>  2012-04-21 18:43:01 PST ---
(From update of attachment 137950)
View in context: https://bugs.webkit.org/attachment.cgi?id=137950&action=review

> Source/WebCore/css/CSSStyleSelector.cpp:1599
> +    bool resetStyleInheritance = element && element->treeScope()->resetStyleInheritance();

Doesn't treeScope() have O(n) time complexity where n is the depth of shadow tree scopes?
I'm concerned that this may regress performance given CSSStyleSelector::styleForElement is a pretty hot function.

Also, don't we need to modify style selector for SVG as well?

> Source/WebCore/dom/ShadowRoot.h:72
> +    virtual bool resetStyleInheritance() const;

Who overrides this function? If you're overriding it, then please add OVERRIDE keyword.

> LayoutTests/fast/dom/shadow/shadow-root-resetStyleInheritance-expected.html:4
> +<head>
> +</head>

We don't need head element here.

> LayoutTests/fast/dom/shadow/shadow-root-resetStyleInheritance-expected.html:9
> +<div><div style="color: #fee"><div></div></div></div>
> +<div><div style="color: #fee"><div style="color: initial"></div></div>
> +<div><div style="color: #fee"><div></div></div></div>
> +<div><div style="color: #fee"><div style="color: initial"></div></div>

Please add more test cases as I mentioned on the other bug.
Sorry but r- due to lack of tests.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list