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

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

Issue 408293002: Support for :enabled selector on Anchor & Area elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 4ab0cf1615c59d4c0a71cf53cb7624bec8292016..11731bd5e5d3a11c9b8537c28d8f7612486fc917 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -788,6 +788,8 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
case CSSSelector::PseudoEnabled:
if (element.isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
return !element.isDisabledFormControl();
+ else if (isHTMLAnchorElement(element) || isHTMLAreaElement(element))
+ return element.isLink();
break;
case CSSSelector::PseudoFullPageMedia:
return element.document().isMediaDocument();

Powered by Google App Engine
This is Rietveld 408576698