Index: Source/core/css/SelectorChecker.cpp |
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp |
index 23f3acaf0412256026b41d82a76278b30d4ec907..2e79d90d6a2461d2ec825ee2bc516b395fe3c076 100644 |
--- a/Source/core/css/SelectorChecker.cpp |
+++ b/Source/core/css/SelectorChecker.cpp |
@@ -45,6 +45,7 @@ |
#include "core/html/HTMLFrameElementBase.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLOptionElement.h" |
+#include "core/html/HTMLSelectElement.h" |
#include "core/html/parser/HTMLParserIdioms.h" |
#include "core/html/track/vtt/VTTElement.h" |
#include "core/inspector/InspectorInstrumentation.h" |
@@ -952,6 +953,8 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib |
break; |
case CSSSelector::PseudoSpatialNavigationFocus: |
return context.isUARule && matchesSpatialNavigationFocusPseudoClass(element); |
+ case CSSSelector::PseudoListBox: |
+ return context.isUARule && matchesListBoxPseudoClass(element); |
case CSSSelector::PseudoHorizontal: |
case CSSSelector::PseudoVertical: |
@@ -1129,6 +1132,11 @@ bool SelectorChecker::matchesSpatialNavigationFocusPseudoClass(const Element& el |
return isHTMLOptionElement(element) && toHTMLOptionElement(element).spatialNavigationFocused() && isFrameFocused(element); |
} |
+bool SelectorChecker::matchesListBoxPseudoClass(const Element& element) |
+{ |
+ return isHTMLSelectElement(element) && !toHTMLSelectElement(element).usesMenuList(); |
+} |
+ |
template |
SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, const DOMSiblingTraversalStrategy&, MatchResult*) const; |