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