Webview is smaller than it should be |
||||||
Issue descriptionOn ToT, webviews take up a small part of the upper-left corner of its container. Touch input is offset, so a touch in the middle of the screen will display as a touch in the middle of the tiny webview. This happens in multiple apps. It's not broken in yesterday's build 64.0.3269.0.
,
Nov 16 2017
,
Nov 16 2017
Yea, looks like WebView always reports a DSF of 1.0 to Viz: https://cs.chromium.org/chromium/src/android_webview/browser/surfaces_instance.cc?type=cs&q=surfaces_instance.cc&sq=package:chromium&l=153 How do I plumb the view's device scale factor for Webview?
,
Nov 16 2017
Note to self: https://cs.chromium.org/chromium/src/android_webview/browser/hardware_renderer.cc?type=cs&q=AddChildId+file:%5Esrc/android_webview/browser/+package:%5Echromium$&l=164 It looks like surfaces_->DrawAndSwap likely should just get the device scale factor of the child CompositorFrame which should be getting the right device scale factor from the browser ultimately through WebContentsViewAndroid...I think. I'll try to fix this tomorrow. Thanks!
,
Nov 16 2017
,
Nov 16 2017
fsamuel@, do you think this can be fixed by today? If not, I think we need to revert your changes.
,
Nov 17 2017
fix is in cq: https://chromium-review.googlesource.com/776078
,
Nov 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/64d7ccec1afeaa0c4d11d1db5b74770440398ccf commit 64d7ccec1afeaa0c4d11d1db5b74770440398ccf Author: Fady Samuel <fsamuel@chromium.org> Date: Fri Nov 17 02:27:41 2017 Surface synchronization: Report correct DSF to Viz in android_webview SurfacesInstance's CompositorFrame always reported a device scale factor of 1. When surface scaling was moved to SurfaceAggregator, viz started scaling surfaces relative to their parent. The renderer's CompositorFrame correctly reported a DSF of 2. However, as the top level CF reported a DSF of 1, SurfaceAggregator scaled the renderer down. This CL fixes the problem by making surface the top level CompositorFrame reports the right device scale factor. Bug: 785596 , 672962 Change-Id: Ife0668ae3f7c531265119d2b37954918504444ae Reviewed-on: https://chromium-review.googlesource.com/776078 Commit-Queue: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#517253} [modify] https://crrev.com/64d7ccec1afeaa0c4d11d1db5b74770440398ccf/android_webview/browser/hardware_renderer.cc [modify] https://crrev.com/64d7ccec1afeaa0c4d11d1db5b74770440398ccf/android_webview/browser/surfaces_instance.cc [modify] https://crrev.com/64d7ccec1afeaa0c4d11d1db5b74770440398ccf/android_webview/browser/surfaces_instance.h
,
Nov 17 2017
,
Nov 17 2017
This should be fixed now.
,
Nov 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/267a787d9029e32d37359eb67905f6e327bb97f2 commit 267a787d9029e32d37359eb67905f6e327bb97f2 Author: Fady Samuel <fsamuel@chromium.org> Date: Fri Nov 17 19:57:58 2017 Surface synchronization: Report correct DSF to Viz in android_webview SurfacesInstance's CompositorFrame always reported a device scale factor of 1. When surface scaling was moved to SurfaceAggregator, viz started scaling surfaces relative to their parent. The renderer's CompositorFrame correctly reported a DSF of 2. However, as the top level CF reported a DSF of 1, SurfaceAggregator scaled the renderer down. This CL fixes the problem by making surface the top level CompositorFrame reports the right device scale factor. TBR=fsamuel@chromium.org (cherry picked from commit 64d7ccec1afeaa0c4d11d1db5b74770440398ccf) Bug: 785596 , 672962 Change-Id: Ife0668ae3f7c531265119d2b37954918504444ae Reviewed-on: https://chromium-review.googlesource.com/776078 Commit-Queue: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#517253} Reviewed-on: https://chromium-review.googlesource.com/777679 Reviewed-by: Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/branch-heads/3271@{#3} Cr-Branched-From: 71f07f2c6c77c9e67158a193516e2f0c6229ce64-refs/heads/master@{#517250} [modify] https://crrev.com/267a787d9029e32d37359eb67905f6e327bb97f2/android_webview/browser/hardware_renderer.cc [modify] https://crrev.com/267a787d9029e32d37359eb67905f6e327bb97f2/android_webview/browser/surfaces_instance.cc [modify] https://crrev.com/267a787d9029e32d37359eb67905f6e327bb97f2/android_webview/browser/surfaces_instance.h
,
Nov 20 2017
Issue 787013 has been merged into this issue.
,
Nov 30 2017
battun@ verified this on pixel XL /OPM1.171019.013 with latest webview version M64:64.0.3281.0. Thanks! |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by boliu@chromium.org
, Nov 16 2017Owner: fsam...@chromium.org