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

Unified Diff: Source/core/css/StyleResolver.cpp

Issue 14064008: Clear StyleResolver state before returning from styleForElement(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clear StyleResolver state before returning from styleForElement() Created 7 years, 8 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 | « LayoutTests/fast/css/reload-non-styled-element-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « LayoutTests/fast/css/reload-non-styled-element-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698