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; |