Chromium Code Reviews| Index: Source/core/css/resolver/SharedStyleFinder.cpp |
| diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp |
| index 198ac8fcf60f06ad1825b02a425d0bf71c7a8977..8bee74f26697bbc567fb0fe408b0f8666b558224 100644 |
| --- a/Source/core/css/resolver/SharedStyleFinder.cpp |
| +++ b/Source/core/css/resolver/SharedStyleFinder.cpp |
| @@ -266,6 +266,11 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const |
| return false; |
| } |
| + ShadowRoot* root1 = element().containingShadowRoot(); |
|
hayato
2015/08/19 05:45:24
Could you explain why we need this check briefly?
kochi
2015/08/19 07:33:54
Previously we assumed that when 2 nodes under pare
hayato
2015/08/20 03:47:11
Acknowledged.
|
| + ShadowRoot* root2 = candidate.containingShadowRoot(); |
| + if (root1 && root2 && root1->type() != root2->type()) |
| + return false; |
| + |
| if (document().containsValidityStyleRules()) { |
| if (candidate.isValidElement() != element().isValidElement()) |
| return false; |