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

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

Issue 450623002: Styling option should not override option:checked UA style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added to isSkippableComponentForInvalidation Created 6 years, 4 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
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | Source/core/css/html.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | Source/core/css/html.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698