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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 236083003: Use document's contentSize when the HTML element is selected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 3864f1e434b710a86a5094e2334c9fbe2d909701..28d8ea5a7f6d50f18a66661d476a5e1c521c6f7a 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -867,7 +867,10 @@ void WebViewImpl::getSelectionRootBounds(WebRect& bounds) const
&& toHTMLInputElement(*shadowHost).isText())))
root = shadowHost;
- IntRect boundingBox = root->pixelSnappedBoundingBox();
+ IntRect boundingBox = isHTMLHtmlElement(root)
+ ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize())
+ : root->pixelSnappedBoundingBox();
+
boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox);
boundingBox.scale(pageScaleFactor());
bounds = boundingBox;
« no previous file with comments | « no previous file | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698