[webkit-reviews] review denied: [Bug 84048] ShadowRoot needs resetStyleInheritance : [Attachment 137950] Patch

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


Ryosuke Niwa <rniwa at webkit.org> has denied Takashi Sakamoto
<tasak at google.com>'s request for review:
Bug 84048: ShadowRoot needs resetStyleInheritance
https://bugs.webkit.org/show_bug.cgi?id=84048

Attachment 137950: Patch
https://bugs.webkit.org/attachment.cgi?id=137950&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
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.


More information about the webkit-reviews mailing list