Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| index 3416c2386789fce0db221a12c9e35cd4d44c2431..581bee9feacab09d2ebf0f4b1bcb2d5423bdd978 100644 |
| --- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| +++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| @@ -917,6 +917,16 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M |
| return m_isUARule && matchesSpatialNavigationFocusPseudoClass(element); |
| case CSSSelector::PseudoListBox: |
| return m_isUARule && matchesListBoxPseudoClass(element); |
| + case CSSSelector::PseudoHostHasAppearance: |
| + if (!m_isUARule) |
| + return false; |
| + if (ShadowRoot* root = element.containingShadowRoot()) { |
| + if (root->type() != ShadowRootType::UserAgent || !root->host()) |
|
esprehn
2016/05/13 22:18:40
host() can't be null on a ShadowRoot
tkent
2016/05/16 00:21:25
Removed the null check.
|
| + return false; |
| + const ComputedStyle* style = root->host()->computedStyle(); |
| + return style && style->hasAppearance(); |
| + } |
| + return false; |
| case CSSSelector::PseudoWindowInactive: |
| if (!context.hasSelectionPseudo) |
| return false; |
| @@ -965,6 +975,12 @@ bool SelectorChecker::checkPseudoElement(const SelectorCheckingContext& context, |
| return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value(); |
| return false; |
| } |
| + case CSSSelector::PseudoBlinkInternalElement: |
| + if (!m_isUARule) |
| + return false; |
| + if (ShadowRoot* root = element.containingShadowRoot()) |
| + return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value(); |
| + return false; |
| case CSSSelector::PseudoSlotted: |
| { |
| SelectorCheckingContext subContext(context); |