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

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

Issue 17054002: Element::recalcStyle() overly reattach()-es InsertionPoints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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 | « Source/core/dom/Element.h ('k') | Source/core/dom/EventPathWalker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 65ae13bd3610fff548314311abcde5ad1d9eaef5..b8e6f77aaa3189a8402ebfbf350028745b13b083 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1404,6 +1404,10 @@ void Element::recalcStyle(StyleChange change)
// common, especially during lazy attach.
newStyle = styleForRenderer();
localChange = Node::diff(currentStyle.get(), newStyle.get(), document());
+ } else if (attached() && isActiveInsertionPoint(this)) {
+ // Active InsertionPoints will never have renderers so there's no reason to
+ // reattach them repeatedly once they're already attached.
+ localChange = change;
}
if (localChange == Detach) {
AttachContext reattachContext;
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/EventPathWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698