[webkit-reviews] review granted: [Bug 107111] CSS: Make tag sub-selectors standalone CSSSelectors. : [Attachment 183757] Proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 21 04:16:02 PST 2013
Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <akling at apple.com>'s
request for review:
Bug 107111: CSS: Make tag sub-selectors standalone CSSSelectors.
https://bugs.webkit.org/show_bug.cgi?id=107111
Attachment 183757: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=183757&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=183757&action=review
r=me, very nice
> Source/WebCore/css/CSSSelector.h:247
> + bool m_isNamespacePlaceholder : 1;
It is not really a "placeholder" since it is functionally important. Maybe
m_isTagForNamespaceRule or something?
> Source/WebCore/css/RuleSet.cpp:262
> + if (component->m_match == CSSSelector::Tag) {
> + if (component->tagQName().localName() != starAtom) {
> + // If this is part of a subselector chain, recurse ahead to find
a narrower set (ID/class.)
> + if (component->relation() == CSSSelector::SubSelector
> + && (component->tagHistory()->m_match == CSSSelector::Class
|| component->tagHistory()->m_match == CSSSelector::Id ||
SelectorChecker::isCommonPseudoClassSelector(component->tagHistory()))
> + && findBestRuleSetAndAdd(component->tagHistory(), ruleData))
> + return true;
> +
> + addToRuleSet(component->tagQName().localName().impl(),
m_tagRules, ruleData);
> + return true;
> + }
> + }
This is enough to avoid regression but we can do better later.
More information about the webkit-reviews
mailing list