Index: third_party/WebKit/Source/core/css/CSSSelector.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp |
index 08775fd5dd5ee38179f64a4efd412d3848b712d2..9d6fd162cf74363d5de7bced5a4821e39793a73a 100644 |
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp |
@@ -31,6 +31,7 @@ |
#include "core/HTMLNames.h" |
#include "core/css/CSSMarkup.h" |
#include "core/css/CSSSelectorList.h" |
+#include "core/css/parser/CSSParserContext.h" |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/wtf/Assertions.h" |
#include "platform/wtf/HashMap.h" |
@@ -489,6 +490,7 @@ PseudoId CSSSelector::ParsePseudoId(const String& name) { |
} |
void CSSSelector::UpdatePseudoType(const AtomicString& value, |
+ const CSSParserContext& context, |
bool has_arguments) { |
DCHECK(match_ == kPseudoClass || match_ == kPseudoElement || |
match_ == kPagePseudoClass); |
@@ -521,11 +523,14 @@ void CSSSelector::UpdatePseudoType(const AtomicString& value, |
case kPseudoWebKitCustomElement: |
case kPseudoBlinkInternalElement: |
case kPseudoContent: |
- case kPseudoShadow: |
case kPseudoSlotted: |
if (match_ != kPseudoElement) |
pseudo_type_ = kPseudoUnknown; |
break; |
+ case kPseudoShadow: |
+ if (match_ != kPseudoElement || context.IsDynamicProfile()) |
+ pseudo_type_ = kPseudoUnknown; |
+ break; |
case kPseudoFirstPage: |
case kPseudoLeftPage: |
case kPseudoRightPage: |
@@ -769,6 +774,7 @@ String CSSSelector::SelectorText(const String& right_side) const { |
case kChild: |
return tag_history->SelectorText(" > " + str.ToString() + right_side); |
case kShadowDeep: |
+ case kShadowDeepAsDescendant: |
return tag_history->SelectorText(" /deep/ " + str.ToString() + |
right_side); |
case kShadowPiercingDescendant: |