webview does not call onPageFinished for history.push/replaceState |
||||
Issue descriptionThis has been broken for awhile. This means these kind of navigations do not update the url bar of browsers that use webview. We've already handled this for fragment navigations by triggering an onPageFinished with no matching onPageStarted. We should do that for history.push/replaceState navigations too. The fix is to change this to isSameDocument: https://cs.chromium.org/chromium/src/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java?rcl=304f3ee41537a07c9f6d28b3ce6b31296b5cbe13&l=139 Should also add tests. How urgent should this be? I figure given how long this has been broken, we should just do it in m72 instead?
,
Nov 21
https://chromium-review.googlesource.com/c/chromium/src/+/1345812
,
Nov 21
So turns out we had a test specifically to test that history.push/replaceState do *not* trigger onPageFinished, because we broke that behavior before and people complained: https://codereview.chromium.org/68763012/ and associated bugs Then that fix broke onPageFinished for fragment navigations, which is then fixed here: https://codereview.chromium.org/139493008 And now we are trying to align history navigation to fragment navigation. I don't think it changes anything here, except maybe we should be careful and add a finch kill switch..
,
Nov 21
Actually, if we are going to use finch here, then I'd let someone else on the webview team do it, since that's quite a bit of commitment.. feel free to take that CL in #2, and follow similar steps in crbug.com/896022
,
Nov 21
Argh everything is terrible :| Longer term here we should add a new API specifically for updating visible URL displays that triggers during navigation commit (i.e. the right time), for all navigation commits, and just tell people to use that and stop relying on onPageStarted/onPageFinished for anything important...
,
Dec 14
Trying to roll this out via finch would be interesting, to see how that goes (both in terms of whether this breaks apps, and in terms of whether we can use finch successfully to get the feedback we need for a change like this), but I'm not sure who would have the bandwidth to do this. Dropping to P2 and removing releaseblock for now since as noted it's not a security risk (just a UI bug for some apps) and it may not be a compatible change. Also too late for 72. |
||||
►
Sign in to add a comment |
||||
Comment 1 by torne@chromium.org
, Nov 20