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

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

Issue 1796573005: Do not show deprecation message for ::shadow and /deep/ on querySelector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix layout test expectation Created 4 years, 9 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 6f0ca6a2c8fc542f52eaa82e7f20f3fb1d4d228d..24a9987e8356bb2624b16529a5faa25b1cda8d6c 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -345,7 +345,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC
case CSSSelector::ShadowPseudo:
{
- if (!m_isUARule && context.selector->getPseudoType() == CSSSelector::PseudoShadow)
+ if (!m_isUARule && !m_isQuerySelector && context.selector->getPseudoType() == CSSSelector::PseudoShadow)
Deprecation::countDeprecation(context.element->document(), UseCounter::CSSSelectorPseudoShadow);
// 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->shadowHost() && context.scope->shadowHost()->treeScope() == context.element->treeScope())
@@ -360,7 +360,7 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC
case CSSSelector::ShadowDeep:
{
- if (!m_isUARule)
+ if (!m_isUARule && !m_isQuerySelector)
Deprecation::countDeprecation(context.element->document(), UseCounter::CSSDeepCombinator);
if (ShadowRoot* root = context.element->containingShadowRoot()) {
if (root->type() == ShadowRootType::UserAgent)
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.h ('k') | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698