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

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

Issue 646543004: Implement :valid and :invalid pseudoclass for <form> (resubmitting) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Stop using willValidate for :valid/:invalid pseudo-classes Created 6 years, 2 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 a79432c299c818969626fcd41b98b8947efd7c27..beffd9a93bd86f05d159cac5433deb6952fa3c71 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -838,10 +838,10 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, c
return element.isRequiredFormControl();
case CSSSelector::PseudoValid:
element.document().setContainsValidityStyleRules();
- return element.willValidate() && element.isValidFormControlElement();
+ return element.matchesValidityPseudoClasses() && element.isValidElement();
case CSSSelector::PseudoInvalid:
element.document().setContainsValidityStyleRules();
- return element.willValidate() && !element.isValidFormControlElement();
+ return element.matchesValidityPseudoClasses() && !element.isValidElement();
case CSSSelector::PseudoChecked:
{
if (isHTMLInputElement(element)) {

Powered by Google App Engine
This is Rietveld 408576698