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

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

Issue 2039113003: Make removeChild faster with active ranges (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-06T16:21:06 Created 4 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 | « third_party/WebKit/Source/core/dom/Range.h ('k') | third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Range.cpp
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index cd584d417eac1d984e47fb3e70216029cbc41651..700a2da329297c17ff977c39b43e9de33b8b470a 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -1337,24 +1337,6 @@ bool areRangesEqual(const Range* a, const Range* b)
return a->startPosition() == b->startPosition() && a->endPosition() == b->endPosition();
}
-static inline void boundaryNodeChildrenChanged(RangeBoundaryPoint& boundary, ContainerNode* container)
-{
- boundary.markValid();
- if (!boundary.childBefore())
- return;
- if (boundary.container() != container)
- return;
- boundary.invalidateOffset();
-}
-
-void Range::nodeChildrenChanged(ContainerNode* container)
-{
- DCHECK(container);
- DCHECK_EQ(container->document(), m_ownerDocument);
- boundaryNodeChildrenChanged(m_start, container);
- boundaryNodeChildrenChanged(m_end, container);
-}
-
static inline void boundaryNodeChildrenWillBeRemoved(RangeBoundaryPoint& boundary, ContainerNode& container)
{
for (Node* nodeToBeRemoved = container.firstChild(); nodeToBeRemoved; nodeToBeRemoved = nodeToBeRemoved->nextSibling()) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Range.h ('k') | third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698