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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 28 03:29:39 PDT 2012


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





--- Comment #17 from Takashi Sakamoto <tasak at google.com>  2012-08-28 03:29:41 PST ---
(From update of attachment 159626)
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?

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