Index: Source/core/css/resolver/SharedStyleFinder.cpp |
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp |
index ce16c0df1f0d4b7ef17a08556a3e785caf1906c7..c1130eab7f6c39556b50302751b124eccbd4d27f 100644 |
--- a/Source/core/css/resolver/SharedStyleFinder.cpp |
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp |
@@ -84,7 +84,7 @@ bool SharedStyleFinder::canShareStyleWithControl(Element& candidate) const |
if (willValidate != element().willValidate()) |
return false; |
- if (willValidate && (candidate.isValidFormControlElement() != element().isValidFormControlElement())) |
+ if (willValidate && (candidate.isValidElement() != element().isValidElement())) |
return false; |
if (candidate.isInRange() != element().isInRange()) |
@@ -242,6 +242,9 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const |
|| toHTMLOptionElement(candidate).spatialNavigationFocused() != toHTMLOptionElement(element()).spatialNavigationFocused())) |
return false; |
+ if (candidate.isValidElement() != element().isValidElement()) |
keishi
2014/10/03 03:44:13
I think we should check document().containsValidit
Bartek Nowierski
2014/10/03 06:01:33
Done.
And I moved this check to the bottom
|
+ return false; |
+ |
// FIXME: This line is surprisingly hot, we may wish to inline hasDirectionAuto into StyleResolver. |
if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto()) |
return false; |