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

Unified Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 1533683002: Persist invalidation sets on detach root (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid detaching when in inactive state Created 5 years 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: third_party/WebKit/Source/core/dom/ContainerNode.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index bcc1d15d6ee48710ad925aa2daf4b702795cb456..7ed010a47ed73b972232965f01854230d85092e4 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -604,8 +604,10 @@ void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node& ol
ASSERT(oldChild.parentNode() == this);
- if (!oldChild.needsAttach())
- oldChild.detach();
+ AttachContext context;
+ context.clearInvalidation = true;
+ if (!needsAttach() || !oldChild.needsAttach())
+ oldChild.detach(context);
if (nextChild)
nextChild->setPreviousSibling(previousChild);
@@ -883,6 +885,7 @@ void ContainerNode::detach(const AttachContext& context)
{
AttachContext childrenContext(context);
childrenContext.resolvedStyle = nullptr;
+ childrenContext.clearInvalidation = true;
for (Node* child = firstChild(); child; child = child->nextSibling())
child->detach(childrenContext);
« no previous file with comments | « third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698