Implement :host pseudo class
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2015 19:59:32 +0000 (19:59 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2015 19:59:32 +0000 (19:59 +0000)
commit25aaa43169fe2860a723d7e9479dd338d056cdd3
treea867e27f6badec177779ea896f7a4ca53adaaaea
parentc502258eadcb36478f62bbca72ecd6e3b993bf00
Implement :host pseudo class
https://bugs.webkit.org/show_bug.cgi?id=149440
Source/WebCore:

rdar://problem/22731953

Reviewed by Ryosuke Niwa.

This implements the basic non-function :host syntax.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::ElementRuleCollector::matchUserRules):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::computeMatchBasedOnRuleHash):
(WebCore::RuleSet::addRule):
* css/RuleSet.h:
(WebCore::RuleSet::cuePseudoRules):
(WebCore::RuleSet::hostPseudoClassRules):
(WebCore::RuleSet::focusPseudoClassRules):
(WebCore::RuleSet::universalRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

Reviewed by Ryosuke Niwa.

* fast/shadow-dom/css-scoping-shadow-host-rule.html:

    Fix and expand the test case.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/shadow-dom/css-scoping-shadow-host-rule.html
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/css/ElementRuleCollector.h
Source/WebCore/css/RuleSet.cpp
Source/WebCore/css/RuleSet.h
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
Source/WebCore/cssjit/SelectorCompiler.cpp