Issue metadata
Sign in to add a comment
|
Unable to scroll content loaded on webview using document.write()
Reported by
vivekjos...@gmail.com,
Oct 13 2017
|
||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: 1. Create a sample app with a webview 2. Create a sample html, say sample.html, with a javascript method, say replaceContent(), which takes a String as input and loads it to webview using document.write 3. Load sample.html to webview created in Step1 4. Invoke replaceContent() on webview created in Step1 with some new html content 5. Zoom in the content of webview and try scrolling What is the expected behavior? Scrolling should work in webview What went wrong? Content is not scrolling Did this work before? Yes Not sure of the version Chrome version: 61.0.3163.98 Channel: stable OS Version: 8.0 Flash Version: Attaching both sample apk with issue and corresponding code. Ensure latest version of Android System WebView/Chrome app is installed to ensure that issue is reproducible
,
Oct 13 2017
I have attached sample.html file. I invoke replaceContent() from Android code to replace content of the webview Also attached are two screenshots: 1. Screenshot_2017-10-13-19-21-24.png: This is the content originally loaded in WebView using loadData() method. Here scroll works fine 2. Screenshot_2017-10-13-19-21-18.png: This is the content loaded in WebView by replaceContent() method. Here scroll stops working after zoom. I have already attached complete source code of sample app i built for this and the apk too if that helps. Let me know if you need any additional data.
,
Oct 13 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 13 2017
,
Oct 16 2017
Able to reproduce the issue in WebView. Unable to scroll the page. Steps Followed: 1. Enabled WebView #61.0.3163.98 2. Installed Sample WebView .apk 3. Observed Unable to scroll the page. Chrome versions tested: 61.0.3163.98 OS Android 8.0.0 Android Devices 8.0.0 Pixel Build/OPR1 170623.027 Below is the Manual bisect info ======================= WebView Good Build -- 61.0.3141.0 WebView Bad Build -- 61.0.3142.0 https://chromium.googlesource.com/chromium/src/+log/61.0.3141.0..61.0.3142.0?pretty=fuller&n=10000 Requesting WebView team and adding appropriate labels for Per-cl bisect of this issue Please navigate to below link for log's and video-- go/chrome-androidlogs/774406 Thanks!!
,
Oct 16 2017
Per-CL bisect information: Good commit:482415 Bad commit:482416 Suspect CL: https://chromium.googlesource.com/chromium/src/+/60b41cdfe22237cb667050017349375ca9272ccf sahel@, if this issue is not related to your change please reassign it to me. Thanks!
,
Oct 16 2017
,
Oct 23 2017
,
Nov 3 2017
The issue is reproducible on chrome as well. The suspected cl changes scroll handling logic in input_handler_proxy so that if the GSB event of a scroll sequence is ignored, GSU events of that sequence will get ignored as well. Before applying this change the GSB would get ignored but the GSU events would still get sent to the main thread. The root cause of this bug is that when you pinch zoom after using document.write, LayerTreeHostImpl::FindScrollNodeForDeviceViewportPoint (https://cs.chromium.org/chromium/src/cc/trees/layer_tree_host_impl.cc?type=cs&q=layer_tree_host_impl&sq=package:chromium&l=2860) fails to find the scrolling node and LayerTreeHostImpl::ScrollBeginImpl returns SCROLL_IGNORED as scroll_status, and with the change in r482416, GSU events are ignored as well. There are two possible fixes: 1-change LayerTreeHostImpl::FindScrollNodeForDeviceViewportPoint to be able to find the scrolling node after using document.write and pinchzoom. 2- Change LayerTreeHostImpl::ScrollBeginImpl not to return Scroll_Ignored when no scrolling node is found. bokan@ could you please take a look and see if you have a preference? (for the first solution I'll probably need to file a bug so that someone more familiar with this part of the code could fix it)
,
Nov 6 2017
Sahel, in the problematic case, does the page call document.close()? Is it the case that maybe we don't commit the changes to the compositor until the document is closed? Or does the problem occur even after document.close()? Also, I'm surprised pinch-zoom should be special here, does the issue reproduce without pinch-zooming? i.e. is scroll prevented if you don't pinch zoom?
,
Nov 10 2017
The page doesn't call document.close, but it only happens after pinch-zoom: if you use document.write to have a scrollable content scrolling works without any problem. However, if you use document.write to add the new content that is not scrollable and then do a pinch zoom, scrolling doesn't work anymore even though it should.
,
Dec 14 2017
,
Jan 3
Sahel, are you still working on this issue? Any update about it?
,
Jan 3
I stopped working on this, I will get back to this once I have fixed some of the iframe scrolling bugs. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by sandeepkumars@chromium.org
, Oct 13 2017Labels: Needs-triage-Mobile Needs-Feedback Triaged-Mobile