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

Unified Diff: Source/core/css/resolver/SharedStyleFinder.cpp

Issue 347773002: Implement select listbox using shadow DOM (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
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/css/themeMac.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index 4589e71bf6fdefbf4994106432cec0dcfe0eb9b5..84e9f94d8366d9aed6310287faaf1cdcfd3998f6 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -241,6 +241,11 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
if (isControl && !canShareStyleWithControl(candidate))
return false;
+ if (isHTMLOptionElement(candidate) && isHTMLOptionElement(element())
+ && (toHTMLOptionElement(candidate).selected() != toHTMLOptionElement(element()).selected()
+ || toHTMLOptionElement(candidate).spatialNavigationFocused() != toHTMLOptionElement(element()).spatialNavigationFocused()))
+ return false;
+
// FIXME: This line is surprisingly hot, we may wish to inline hasDirectionAuto into StyleResolver.
if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto())
return false;
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/css/themeMac.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698