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

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

Issue 2034023003: Make appendChild/insertBefore faster with active ranges (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-06T14:17:03 Adopt for review comments 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
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 7c47b01fa57265ec35fd980076810dac13dbd223..cd584d417eac1d984e47fb3e70216029cbc41651 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -1339,6 +1339,7 @@ bool areRangesEqual(const Range* a, const Range* b)
static inline void boundaryNodeChildrenChanged(RangeBoundaryPoint& boundary, ContainerNode* container)
{
+ boundary.markValid();
if (!boundary.childBefore())
return;
if (boundary.container() != container)
@@ -1408,6 +1409,7 @@ void Range::nodeWillBeRemoved(Node& node)
static inline void boundaryTextInserted(RangeBoundaryPoint& boundary, Node* text, unsigned offset, unsigned length)
{
+ boundary.markValid();
if (boundary.container() != text)
return;
unsigned boundaryOffset = boundary.offset();
@@ -1426,6 +1428,7 @@ void Range::didInsertText(Node* text, unsigned offset, unsigned length)
static inline void boundaryTextRemoved(RangeBoundaryPoint& boundary, Node* text, unsigned offset, unsigned length)
{
+ boundary.markValid();
if (boundary.container() != text)
return;
unsigned boundaryOffset = boundary.offset();
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698