[Webkit-unassigned] [Bug 88606] [Shadow DOM] Needs @host rule for ShadowDOM styling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 00:16:45 PDT 2012


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





--- Comment #18 from Takashi Sakamoto <tasak at google.com>  2012-08-29 00:16:47 PST ---
(In reply to comment #17)
> (From update of attachment 159626 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=159626&action=review
> 
> Thank you for reviewing.
> I have not updated the patch yet, however I would like to confirm whether we should implement activeShadowRoots or not.
> 
> >> Source/WebCore/css/StyleResolver.cpp:1046
> >> +    }
> > 
> > Can we cache this value on ElementShadow?
> 
> I see. We hav e to cache the value. I will implement.
> 
> >> Source/WebCore/css/StyleResolver.cpp:1069
> >> +        return;
> > 
> > Ah, this could be on ElementShadow, just as I suggested above. Basically, maintain a list of activeShadowRoots (the interesting bit is that you only need to store one value, the last visible shadow root from the stack). This should allow you to make the patch neatly splittable into the section where we first expose the ElementShadow::activeShadowRoots along with window.internals tests for it, and then a trivial patch of adding the support @host rules. WDYT?
> 
> I think, we can add (or remove from)<style> which has some @host @-rules to any shadow dom subtree after adding the shadow dom subtree. So we have to update activeShadowRoots when childrenChanged in class ShadowRoot is invoked.
> And I think, by using the activeShadowRoots, we can only remove "if (!shadowRoot->hasShadowInsertionPoint())". ( I guess, it will take almost the same time to traverse activeShadowRoots as just to traverse shadow roots from the youngest one.)
> So I'm not sure whether we should implement activeShadowRoots. Do we need the list?

I'm sorry. Not <style>, I mean <shadow>. Since it is possible to add/remove <shadow>, probably we have to maintain an entire list of active shadow roots.

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