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

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

Issue 21151005: Implement ::content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« Source/core/css/CSSParserValues.h ('K') | « Source/core/css/CSSSelector.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index fbdace1458721db258e347f61ef982408e6190ca..303e2ff5e0dfab6e92c89a54fcbc8689d602a736 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -93,6 +93,9 @@ SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext& con
return SelectorFailsLocally;
} else
return SelectorFailsLocally;
+ } else if (context.selector->isContentPseudoElement()) {
+ if (!context.element->isInShadowTree() || !context.element->isInsertionPoint())
+ return SelectorFailsLocally;
} else {
if ((!context.elementStyle && m_mode == ResolvingStyle) || m_mode == QueryingRules)
return SelectorFailsLocally;
« Source/core/css/CSSParserValues.h ('K') | « Source/core/css/CSSSelector.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698