Description[Android WebView] Send WebChromeClient.onReceivedTitle when navigating back
This is a re-land of https://codereview.chromium.org/1126383005, fixed
not to cause a crash when 'WebView.loadUrl' is called from inside the
onReceivedTitle callback, added a regression test. Also, the document
title is now cached to minimize the amount of callback calls.
Original patch description:
The usual channel for delivering onReceivedTitle (via updating title for
a NavigationEntry) doesn't work in the case of history navigations, because
WebContentsImpl silences no-op updates of entries titles.
Chrome Browser uses another event for updating the title in this case --
via WebContentsDelegate::LoadingStateChanged. This patch enables WebView to
use it as well.
Note that WebChromeClient.onReceivedIcon doesn't need to be re-sent, as
nobody seems to bother checking whether the icon update is a "no-op", so
updates on history navigations just work.
BUG=481570, 495234
Committed: https://crrev.com/27cdc32e21149f7bc890ddd9347e4a963e4899ee
Cr-Commit-Position: refs/heads/master@{#333056}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Fixed notification sending when titles of two pages are the same #
Total comments: 1
Patch Set 3 : Fixed typo #Messages
Total messages: 11 (3 generated)
|