Cherry-pick "[Android WebView] Provide user-initiated provisional load detection"
Original CL:
https://crrev.com/7a3234c9a19a38726a4a984ff12e2b406423c1d3
Original description:
[Android WebView] Provide user-initiated provisional load detection
Do not synthesize page loading events on DOM modification, if the provisional
load has been started from the API side.
It appears that a lot of apps tend to use the following scenario:
webView.loadUrl(...);
webView.loadUrl('javascript:...');
Which was triggering page loading events to be emitted. This scenario is
dubious, as no one guarantees that loading will actually finish prior to
executing javascript. But for compatibility reasons we must take it into
account and not emit page loading events for "about:blank", as it seems
that some apps do unexpected things when they receive it.
BUG=458569,469099
Note that this patch also contains bits from this commit required for changes
in AwWebContentsObserver to work:
https://crrev.com/5668d12d29ab659ad01dc0e0ffdf24f2eb5f187a
Bug: 19729876
Change-Id: I12c9610a13a382d725cc9a14fcb9879c92f1f461
8 files changed