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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 19 04:07:17 PDT 2012


--- Comment #48 from Takashi Sakamoto <tasak at google.com>  2012-10-19 04:08:13 PST ---
(In reply to comment #45)
> (From update of attachment 169112 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=169112&action=review
> >>> Source/WebCore/css/StyleScopeResolver.cpp:195
> >>> +bool StyleScopeResolver::styleSharingCandidateMatchesHostRules(const Element* element)
> >> 
> >> How about to have a flag just for indicating existence of @host rules regardless that matches or not?
> >> This hidden side effect is adding complexity which we might not need. 
> >> We can assume that many host rule will match to the host in many cases. That's why the author put @host rule after all.
> > 
> > I would like to confirm this.
> > Currently, I added a flag to ElementShadow and the flag caches whether any @host @-rule is applied to shadow host or not.
> > So would you mean adding a flag to class Element or class RenderStyle and caching existence of @host @-rules instead of ElementShadow's flag?
> Having the flag on ElementShadow is fine. I though we could have a flag that just implies whether the styles in shadow have @host rule or not
> since we can set the flag in StyleScopeResolver::addHostRule(). If it's not so straightforward, we could keep current approach.
> I prefer a tri-state enum rather than two bool values with uninitialized one - uninitialized values better not be used if possible.

I filed a new bug, https://bugs.webkit.org/show_bug.cgi?id=99827 to add some flag which has information about whether any @host @-rules is applied or not.

Best regards,
Takashi Sakamoto

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