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

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

Issue 2784243002: Get rid of computeVisibleSelectionInDOMTreeDeprecated() from WebViewImpl::selectionBounds() (Closed)
Patch Set: 2017-03-30T16:04:49 Created 3 years, 9 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/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 073fd94702d908912e0ea6bccc215fb88555156e..a382032e07755c937981c9626f178ced875e36f2 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2344,15 +2344,16 @@ bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const {
if (!localFrame)
return false;
FrameSelection& selection = localFrame->selection();
- if (!selection.isAvailable() ||
- selection.computeVisibleSelectionInDOMTreeDeprecated().isNone()) {
- // plugins/mouse-capture-inside-shadow.html reaches here.
+ if (!selection.isAvailable() || selection.selectionInDOMTree().isNone())
return false;
- }
// TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
// needs to be audited. See http://crbug.com/590369 for more details.
localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ if (selection.computeVisibleSelectionInDOMTree().isNone()) {
+ // plugins/mouse-capture-inside-shadow.html reaches here.
+ return false;
+ }
DocumentLifecycle::DisallowTransitionScope disallowTransition(
localFrame->document()->lifecycle());
« 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