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

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

Issue 1590143002: removeBetween() -> detach() performance fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 832952dc10b03caca5e147001b3f0f4e2251245a..a95f105f903ec5b50c5f135e1d647e9341c7c68e 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -606,8 +606,10 @@ void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node& ol
AttachContext context;
context.clearInvalidation = true;
- if (!needsAttach() || !oldChild.needsAttach())
+ if (!oldChild.needsAttach())
oldChild.detach(context);
+ else if (oldChild.needsStyleInvalidation())
+ document().styleEngine().styleInvalidator().clearInvalidation(toElement(oldChild));
esprehn 2016/01/15 00:31:45 can Element::removedFrom do this? It seems like it
rune 2016/01/15 09:42:41 Yeah, I think so. It means it'll check needsStyleI
rune 2016/01/15 13:25:41 Done.
if (nextChild)
nextChild->setPreviousSibling(previousChild);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698