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

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

Issue 1914933003: output should not match to :enabled or :disabled pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 8 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: third_party/WebKit/Source/core/css/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index c5d4b4d515eda624e7418022b8cb6f4f8eaf742e..5cc7f0fcfee067de6833d291f67f2f2dec7c83ea 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -823,11 +823,7 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return true;
return element.active();
case CSSSelector::PseudoEnabled:
- if (element.isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
- return !element.isDisabledFormControl();
- if (isHTMLAnchorElement(element) || isHTMLAreaElement(element))
- return element.isLink();
- break;
+ return element.matchesEnabledPseudoClass();
case CSSSelector::PseudoFullPageMedia:
return element.document().isMediaDocument();
case CSSSelector::PseudoDefault:

Powered by Google App Engine
This is Rietveld 408576698