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

Unified Diff: Source/core/dom/Element.cpp

Issue 188543002: Avoid reattachWhitespaceSiblings when renderer does not change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 9f85ee93bf3a2dc8e26e5ad49a0538bbbf05acbe..18be6c30110c7a777ea712efe9b4d62eac27b626 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1596,8 +1596,11 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
if (localChange == Reattach) {
AttachContext reattachContext;
reattachContext.resolvedStyle = newStyle.get();
+ bool rendererWillChange = needsAttach() || renderer();
reattach(reattachContext);
- return Reattach;
+ if (rendererWillChange || renderer())
esprehn 2014/03/06 19:40:24 You're going to reattach on the initial attach of
rune 2014/03/06 20:56:33 The problem is that !renderer() && needsAttach() a
+ return Reattach;
+ return ReattachNoRenderer;
}
ASSERT(oldStyle);
« no previous file with comments | « LayoutTests/fast/layout/display-none-no-relayout-expected.txt ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698