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..f50a13f3b07d5235481b1691ae159a071afb1895 100644 |
| --- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| +++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp |
| @@ -917,6 +917,14 @@ 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) |
|
esprehn
2016/05/09 19:39:50
this should check that containingShadowRoot()->typ
tkent
2016/05/10 04:29:29
Done.
|
| + return false; |
| + if (!element.shadowHost()) |
| + return false; |
| + if (!element.shadowHost()->computedStyle()) |
|
esprehn
2016/05/09 19:39:50
Don't call computedStyle repeatedly, save to a loc
tkent
2016/05/10 04:29:29
Done.
|
| + return false; |
| + return element.shadowHost()->computedStyle()->hasAppearance(); |
| case CSSSelector::PseudoWindowInactive: |
| if (!context.hasSelectionPseudo) |
| return false; |
| @@ -960,11 +968,12 @@ bool SelectorChecker::checkPseudoElement(const SelectorCheckingContext& context, |
| return false; |
| } |
| case CSSSelector::PseudoWebKitCustomElement: |
| - { |
| - if (ShadowRoot* root = element.containingShadowRoot()) |
| - return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value(); |
| - return false; |
| + if (ShadowRoot* root = element.containingShadowRoot()) { |
| + if (selector.value().startsWith("-webkit-internal-") && !m_isUARule) |
|
esprehn
2016/05/09 19:39:50
why do we need this? We should just make the pseud
tkent
2016/05/10 04:29:29
We should avoid to expose new vendor-specific pseu
|
| + return false; |
| + return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value(); |
| } |
| + return false; |
| case CSSSelector::PseudoSlotted: |
| { |
| SelectorCheckingContext subContext(context); |