Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Unified Diff: third_party/WebKit/Source/core/css/SelectorChecker.cpp

Issue 2778983006: Make /deep/ as no-op and remove ::shadow in dynamic profile (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 049b269a99f5e363fadc20a39271793451ab11b5..20339e4018bc48d492006de8472ec94203540379 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -337,6 +337,10 @@ SelectorChecker::MatchStatus SelectorChecker::MatchForRelation(
next_context.pseudo_id = kPseudoIdNone;
switch (relation) {
+ case CSSSelector::kShadowDeepAsDescendant:
+ Deprecation::CountDeprecation(context.element->GetDocument(),
+ UseCounter::kCSSDeepCombinator);
+ // fall through
case CSSSelector::kDescendant:
if (context.selector->RelationIsAffectedByPseudoContent()) {
for (Element* element = context.element; element;
@@ -414,10 +418,6 @@ SelectorChecker::MatchStatus SelectorChecker::MatchForRelation(
return kSelectorFailsAllSiblings;
case CSSSelector::kShadowPseudo: {
- if (!is_ua_rule_ && mode_ != kQueryingRules &&
- context.selector->GetPseudoType() == CSSSelector::kPseudoShadow)
- Deprecation::CountDeprecation(context.element->GetDocument(),
- UseCounter::kCSSSelectorPseudoShadow);
// If we're in the same tree-scope as the scoping element, then following
// a shadow descendant combinator would escape that and thus the scope.
if (context.scope && context.scope->OwnerShadowHost() &&

Powered by Google App Engine
This is Rietveld 408576698