WebViewImpl::resize() currently updates the VisualViewport to the WebView's size. If the VisualViewport has a different size, the VisualViewport size is updated subsequently by the RenderWidget via WebViewImpl::resizeVisualViewport().
In cases where the VisualViewport is smaller than the WebView, the former update can clamp the current scroll position of the VisualViewport to a smaller-than-expected value (e.g. if the VisualViewport was scrolled to the maximum), thus the scroll position may not be preserved throughout a RenderWidget resize.
A solution to this problem would be to separate the two resizes, so that WebViewImpl::resize() does not update the VisualViewport any longer, and ensure that WebView::resize() users call both methods where necessary (analogous to RenderWidget's behavior).
Issue 2073533003 (https://codereview.chromium.org/2073533003) includes a test that demonstrates the issue and sketches the proposed change. As a result of this change, a number of unit tests break and require updating (some test output is attached).
|
Deleted:
webkit_unit_tests.out
821 KB
|
Comment 1 by dtapu...@chromium.org
, Jun 16 2016Owner: bokan@chromium.org
Status: Assigned (was: Untriaged)