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

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

Issue 2844983002: Prune ComputeVisibleSelectionInDOMTreeDeprecated from DOMSelection::deleteFromDocument (Closed)
Patch Set: Created 3 years, 8 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/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index 4d5544f5983a848612c5493f4501c0f247d469b4..6e31518bb2004b177ca3c5c2145cdedb939bb07f 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -671,6 +671,10 @@ void DOMSelection::deleteFromDocument() {
return;
}
+ // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
+
// The following code is necessary for
// editing/selection/deleteFromDocument-crash.html, which assumes
// deleteFromDocument() for text selection in a TEXTAREA deletes the TEXTAREA
@@ -678,16 +682,11 @@ void DOMSelection::deleteFromDocument() {
FrameSelection& selection = GetFrame()->Selection();
- if (selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsNone())
+ if (selection.ComputeVisibleSelectionInDOMTree().IsNone())
return;
- // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. See http://crbug.com/590369 for more details.
- // |VisibleSelection::toNormalizedEphemeralRange| requires clean layout.
- GetFrame()->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
-
Range* selected_range =
- CreateRange(selection.ComputeVisibleSelectionInDOMTreeDeprecated()
+ CreateRange(selection.ComputeVisibleSelectionInDOMTree()
.ToNormalizedEphemeralRange());
if (!selected_range)
return;
« 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