From e2b3b40f6a3350c5f922d3f06a9ef43673df5641 Mon Sep 17 00:00:00 2001 From: oshima Date: Thu, 3 Dec 2015 20:27:24 -0800 Subject: Use the window coordinate for the autofill bounds. Viewport and Window coordinates will differ when Zoom is used to implement DSF behavior. BUG=485650 TEST=RenderViewImplScaleFactorTest.*, plus manually tested. Review URL: https://codereview.chromium.org/1455143004 Cr-Commit-Position: refs/heads/master@{#363134} --- content/public/renderer/render_view.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'content/public/renderer') diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index dcf1de4..1f0a235 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -24,6 +24,7 @@ class WebString; class WebURLRequest; class WebView; struct WebContextMenuData; +struct WebRect; } namespace gfx { @@ -123,6 +124,13 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { bool animate) = 0; #endif + // Converts the |rect| from Blink's Viewport coordinates to the + // coordinates in the native window used to display the content, in + // DIP. They're identical in tradional world, but will differ when + // use-zoom-for-dsf feature is eanbled, and Viewport coordinates + // becomes DSF times larger than window coordinates. + virtual void convertViewportToWindow(blink::WebRect* rect) = 0; + protected: ~RenderView() override {} -- cgit v1.1