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

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

Issue 616443002: Implement :valid and :invalid pseudoclass for <form> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix the problem with shared element style Created 6 years, 3 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 62893d43a92f15282cf479f216de5df939c00bf9..0ce5f8b99c07507a8a1b1512b263ec15bd58897a 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -809,10 +809,10 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
return element.isRequiredFormControl();
case CSSSelector::PseudoValid:
element.document().setContainsValidityStyleRules();
- return element.willValidate() && element.isValidFormControlElement();
+ return element.willValidate() && element.isValidElement();
case CSSSelector::PseudoInvalid:
element.document().setContainsValidityStyleRules();
- return element.willValidate() && !element.isValidFormControlElement();
+ return element.willValidate() && !element.isValidElement();
case CSSSelector::PseudoChecked:
{
if (isHTMLInputElement(element)) {

Powered by Google App Engine
This is Rietveld 408576698