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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 17 19:15:50 PDT 2012


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





--- Comment #39 from Hajime Morrita <morrita at google.com>  2012-10-17 19:16:43 PST ---
(From update of attachment 169112)
View in context: https://bugs.webkit.org/attachment.cgi?id=169112&action=review

> Source/WebCore/css/RuleSet.cpp:360
> +            resolver->ensureScopeResolver()->addHostRule(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope);

If possible I'd keep StyleScopeResovler as a n implementation detail of StyleResolver.

> Source/WebCore/css/StyleResolver.cpp:795
> +    matchHostRules(result, includeEmptyRules);

Could you move this call int to matchScopedAuthorRules()? Then we can assume that we have m_scopedResolver

> Source/WebCore/css/StyleResolver.h:34
> +#include "StyleScopeResolver.h"

Can we eliminate this?

> Source/WebCore/css/StyleResolver.h:76
> +class ShadowRoot;

It looks we don't need this?

> Source/WebCore/css/StyleRule.cpp:393
> +StyleRuleHost::StyleRuleHost(Vector<RefPtr<StyleRuleBase> >& adoptRules)

it's fine to inline these in the header.

> Source/WebCore/css/StyleRule.cpp:398
> +StyleRuleHost::StyleRuleHost(const StyleRuleHost& o)

ditto.

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

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