Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
index edc60fde6ed87a64f53b978bbdbb730220fc0116..bb8a41446ab1897057ddc0c12a51c4b4535450d1 100644 |
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
@@ -594,10 +594,6 @@ bool WebFrameWidgetImpl::SelectionBounds(WebRect& anchor, |
if (!local_frame) |
return false; |
- FrameSelection& selection = local_frame->Selection(); |
- if (selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsNone()) |
- return false; |
- |
// TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
// needs to be audited. See http://crbug.com/590369 for more details. |
local_frame->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); |
@@ -605,7 +601,11 @@ bool WebFrameWidgetImpl::SelectionBounds(WebRect& anchor, |
DocumentLifecycle::DisallowTransitionScope disallow_transition( |
local_frame->GetDocument()->Lifecycle()); |
- if (selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()) { |
+ FrameSelection& selection = local_frame->Selection(); |
+ if (selection.ComputeVisibleSelectionInDOMTree().IsNone()) |
+ return false; |
+ |
+ if (selection.ComputeVisibleSelectionInDOMTree().IsCaret()) { |
anchor = focus = selection.AbsoluteCaretBounds(); |
} else { |
const EphemeralRange selected_range = |