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

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

Issue 347773002: Implement select listbox using shadow DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: White background 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 fe60f5d0d0cad6026f83dfb66a1ac24b9717c335..3d6586f51a27d2834b63ceb20082e1d6cd0a588f 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -953,6 +953,8 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
}
}
break;
+ case CSSSelector::PseudoSpatialNavigationFocus:
+ return context.isUARule && matchesSpatialNavigationFocusPseudoClass(element);
case CSSSelector::PseudoHorizontal:
case CSSSelector::PseudoVertical:
@@ -1125,6 +1127,13 @@ bool SelectorChecker::matchesFocusPseudoClass(const Element& element)
return element.focused() && isFrameFocused(element);
}
+bool SelectorChecker::matchesSpatialNavigationFocusPseudoClass(const Element& element)
+{
+ if (!isHTMLOptionElement(element))
tkent 2014/07/08 02:20:59 nit: you can write: return isHTMLOptionElement(ele
keishi 2014/07/10 09:48:03 Done.
+ return false;
+ return toHTMLOptionElement(element).spatialNavigationFocused() && isFrameFocused(element);
+}
+
template
SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, const DOMSiblingTraversalStrategy&, MatchResult*) const;

Powered by Google App Engine
This is Rietveld 408576698