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

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

Issue 332173003: Update owner document of Range objects if start/end boundary points in different document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2014-06-18T06:46:10 Created 6 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/Document.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index a8a92c88fd49e58fd81d6a096f9c22cfb38f67fc..d8032993881c3a9596de7d63e1ddd71aea7c5dac 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3770,6 +3770,17 @@ void Document::updateRangesAfterChildrenChanged(ContainerNode* container)
}
}
+void Document::updateRangesAfterNodeMovedToAnotherDocument(const Node& node)
+{
+ ASSERT(node.document() != this);
+ if (m_ranges.isEmpty())
+ return;
+ AttachedRangeSet ranges = m_ranges;
+ AttachedRangeSet::const_iterator end = ranges.end();
+ for (AttachedRangeSet::const_iterator it = ranges.begin(); it != end; ++it)
+ (*it)->updateOwnerDocumentIfNeeded();
+}
+
void Document::nodeChildrenWillBeRemoved(ContainerNode& container)
{
NoEventDispatchAssertion assertNoEventDispatch;
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698