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

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: Fixed Created 6 years, 6 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/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index 4589e71bf6fdefbf4994106432cec0dcfe0eb9b5..ad6c69a457f041325f5b27e1ee975c9bfa69cf35 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -241,6 +241,10 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
if (isControl && !canShareStyleWithControl(candidate))
return false;
+ if (isHTMLOptionElement(candidate) && isHTMLOptionElement(element())
keishi 2014/07/01 05:06:35 This makes fast/forms/select-initial-position.html
+ && toHTMLOptionElement(candidate).selected() != toHTMLOptionElement(element()).selected())
+ return false;
+
// FIXME: This line is surprisingly hot, we may wish to inline hasDirectionAuto into StyleResolver.
if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto())
return false;

Powered by Google App Engine
This is Rietveld 408576698