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

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

Issue 2509593002: Implement ::placeholder CSS selector. (Closed)
Patch Set: 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/CSSSelector.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 89d130750e122e0511d45c2ec8489e672408c01d..d8999b4951a500270aeb94715483829c836b62b6 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -357,6 +357,7 @@ const static NameToPseudoStruct pseudoTypeWithoutArgumentsMap[] = {
{"optional", CSSSelector::PseudoOptional},
{"out-of-range", CSSSelector::PseudoOutOfRange},
{"past", CSSSelector::PseudoPastCue},
+ {"placeholder", CSSSelector::PseudoWebKitCustomElement},
rune 2016/11/18 09:53:23 Making this a PseudoWebKitCustomElement means this
tkent 2016/11/21 05:36:02 Firefox and Safari don't accept user-action pseudo
{"placeholder-shown", CSSSelector::PseudoPlaceholderShown},
{"read-only", CSSSelector::PseudoReadOnly},
{"read-write", CSSSelector::PseudoReadWrite},
@@ -437,6 +438,12 @@ static CSSSelector::PseudoType nameToPseudoType(const AtomicString& name,
return static_cast<CSSSelector::PseudoType>(match->type);
}
+AtomicString CSSSelector::aliasForShadowPseudoId(const AtomicString& name) {
rune 2016/11/18 09:53:23 Using the term alias here could be confusing since
+ if (name == "-webkit-input-placeholder")
+ return "placeholder";
+ return nullAtom;
+}
+
#ifndef NDEBUG
void CSSSelector::show(int indent) const {
printf("%*sselectorText(): %s\n", indent, "", selectorText().ascii().data());
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | third_party/WebKit/Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698