Index: Source/core/css/StyleResolver.cpp |
diff --git a/Source/core/css/StyleResolver.cpp b/Source/core/css/StyleResolver.cpp |
index a812ad60aee8841dfa11719d000550f02b12d46f..a6d8599133f5ae6513df685bded9e36e58dedc8b 100644 |
--- a/Source/core/css/StyleResolver.cpp |
+++ b/Source/core/css/StyleResolver.cpp |
@@ -957,7 +957,10 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS |
if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoint()) { |
RenderStyle* sharedStyle = locateSharedStyle(); |
if (sharedStyle) |
+ { |
+ state.clear(); |
return sharedStyle; |
+ } |
} |
if (state.parentStyle()) { |