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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2883083003: Prune ComputeVisibleSelectionInDOMTreeDeprecated from WebFrameWidgetImpl::SelectionBounds (Closed)
Patch Set: Created 3 years, 7 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/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 =
« 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