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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 17 15:50:55 PDT 2012


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





--- Comment #9 from Takashi Sakamoto <tasak at google.com>  2012-04-17 15:50:55 PST ---
(In reply to comment #7)
> (From update of attachment 137421 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=137421&action=review
> 
> > Source/WebCore/css/CSSStyleSelector.cpp:3081
> >  void CSSStyleSelector::applyProperty(CSSPropertyID id, CSSValue *value)
> 
> This applyProperty() is an ultra host function and computing stuff here won't be a good idea in general.
> I guess we could precompute staff in CSSStyleSelector::initElement() or some per-element call path.

I see. Is it ok to modify CSSStyleSelector::styleForElement()? I modified the method to create recomputed matchedResult before applyMatchedResults.

> > Source/WebCore/css/CSSStyleSelector.cpp:3083
> > +    TreeScope* treeScope = m_element? m_element->treeScope() : 0;
> 
> Can treeScope be null?

I removed the code.
I think, treeScope cannot be null, but m_element can be null.

> > Source/WebCore/css/CSSStyleSelector.cpp:3088
> > +        || ((!m_parentNode || (treeScope && treeScope->resetStyleInheritance() && treeScope != m_parentNode->treeScope())) && value->isInheritedValue());
> 
> This condition looks complicated enough. Could we simplify this somehow?

I removed the condition, but I still use the following:
    if (element && element->treeScope()->resetStyleInheritance() && m_parentNode && element->treeScope() != m_parentNode->treeScope())

> > LayoutTests/fast/dom/shadow/shadow-root-resetStyleInheritance.html:1
> > + <!DOCTYPE html>
> 
> Could you use ref test if possible?

Sure.
Done.

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