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

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

Issue 2509593002: Implement ::placeholder CSS selector. (Closed)
Patch Set: <!DOCTYPE html> Created 4 years, 1 month 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 cf7962a053b4e02c078adcdb760aeab78b5574e9..adbdbc8dfa97cf42508c9ddcf315c30f7ee64eb8 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -1096,6 +1096,12 @@ bool SelectorChecker::checkPseudoElement(const SelectorCheckingContext& context,
}
return false;
}
+ case CSSSelector::PseudoPlaceholder:
+ if (ShadowRoot* root = element.containingShadowRoot()) {
+ return root->type() == ShadowRootType::UserAgent &&
+ element.shadowPseudoId() == "-webkit-input-placeholder";
+ }
+ return false;
case CSSSelector::PseudoWebKitCustomElement: {
if (ShadowRoot* root = element.containingShadowRoot())
return root->type() == ShadowRootType::UserAgent &&
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleSet.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698