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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 1 03:47:08 PDT 2012


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





--- Comment #17 from Takashi Sakamoto <tasak at google.com>  2012-05-01 03:47:08 PST ---
(In reply to comment #15)
> (From update of attachment 137950 [details])
> 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.

The treeScope() just returns m_treeScope, which is a member variable of NodeRareData.

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

I found that SVG element in shadow doesn't work well now. So I think, it is not possible to test SVG styles. I will try after SVG element in shadow work (and if needed, fix bugs).

> > Source/WebCore/dom/ShadowRoot.h:72
> > +    virtual bool resetStyleInheritance() const;
> 
> Who overrides this function? If you're overriding it, then please add OVERRIDE keyword.

Done.

> > 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.

I added more style properties, especially font properties.
I found that default RenderStyle doesn't have correct font description (c.f. StyleInheritedData.cpp. Its member variable: font is not initialized by using "initial")

-- 
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