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

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

Issue 1280423002: CSS4: Implement :placeholder-shown pseudo class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 4 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: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 3dff0a3c6d52688f3f4a8310b1ce0c1dbf2cc49a..cb62e6e6218ca4872351fac80cb2714d2b9cd90a 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -777,6 +777,10 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return isFirstOfType(element, element.tagQName()) && isLastOfType(element, element.tagQName());
}
break;
+ case CSSSelector::PseudoPlaceholderShown:
+ if (isHTMLTextFormControlElement(element))
+ return toHTMLTextFormControlElement(element).isPlaceholderVisible();
+ break;
case CSSSelector::PseudoNthChild:
if (ContainerNode* parent = element.parentElementOrDocumentFragment()) {
if (m_mode == ResolvingStyle)

Powered by Google App Engine
This is Rietveld 408576698