Index: Source/core/css/SelectorChecker.cpp |
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp |
index c0596e1d034a8691735f1f86b71a1ddc84fa1778..1e2b8ad9aa201ceb0c2b62999026add688dfa18b 100644 |
--- a/Source/core/css/SelectorChecker.cpp |
+++ b/Source/core/css/SelectorChecker.cpp |
@@ -615,9 +615,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib |
case CSSSelector::PseudoAutofill: |
if (!element || !element->isFormControlElement()) |
break; |
- if (element->hasTagName(inputTag)) |
- return toHTMLInputElement(element)->isAutofilled(); |
- break; |
+ return toHTMLFormControlElement(element)->isAutofilled(); |
case CSSSelector::PseudoAnyLink: |
case CSSSelector::PseudoLink: |
// :visited and :link matches are separated later when applying the style. Here both classes match all links... |