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

Unified Diff: third_party/WebKit/Source/core/editing/DOMSelection.cpp

Issue 2715433002: Selection API: deleteFromDocument() should not call setBaseAndExtent(). (Closed)
Patch Set: Created 3 years, 10 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/LayoutTests/editing/selection/deletefromdocument-shadow-leak.html ('k') | 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/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index 9d5c79129f8a36f0c44ffb284c4f318fa609f68a..a4e99f63858d1afefef65013914b0e6c14518a8b 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -672,12 +672,8 @@ void DOMSelection::deleteFromDocument() {
if (!selectedRange)
return;
+ // |selectedRange| may point nodes in a different root.
selectedRange->deleteContents(ASSERT_NO_EXCEPTION);
-
- setBaseAndExtent(selectedRange->startContainer(),
- selectedRange->startOffset(),
- selectedRange->startContainer(),
- selectedRange->startOffset(), ASSERT_NO_EXCEPTION);
}
bool DOMSelection::containsNode(const Node* n, bool allowPartial) const {
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/deletefromdocument-shadow-leak.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698