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

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 testcase 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 45134f9de9d78959dbf1e6d710c414dcf91105de..fc43f7861cc9ef34e027521c054921efb4b65eac 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -766,6 +766,15 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return isFirstOfType(element, element.tagQName()) && isLastOfType(element, element.tagQName());
}
break;
+ case CSSSelector::PseudoPlaceholderShown:
+ if (isHTMLTextFormControlElement(element)) {
+ if (m_mode == ResolvingStyle) {
+ if (ComputedStyle* style = context.elementStyle ? context.elementStyle : element.mutableComputedStyle())
+ style->setUnique();
esprehn 2015/08/21 10:18:10 This should not make you unique, change SharedStyl
ramya.v 2015/08/25 10:24:45 Done.
+ }
+ 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