0

Limit clearing failed favicons in WebView to primary main frame.

DidStartNavigation calls in other frame trees should not clear the
failed fav icon list. Only the primary main frame should clear the list.

BUG=1322158

Change-Id: Ide3139e32fc51c0058fb4a42e30b2f42764c2086
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3696313
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013482}
This commit is contained in:
Dave Tapuska
2022-06-13 15:33:01 +00:00
committed by Chromium LUCI CQ
parent e45cb1b34b
commit fb1ab17d97

@ -115,8 +115,10 @@ void IconHelper::DidUpdateFaviconURL(
}
void IconHelper::DidStartNavigation(content::NavigationHandle* navigation) {
if (navigation->GetReloadType() == content::ReloadType::BYPASSING_CACHE)
if (navigation->IsInPrimaryMainFrame() &&
navigation->GetReloadType() == content::ReloadType::BYPASSING_CACHE) {
ClearUnableToDownloadFavicons();
}
}
void IconHelper::MarkUnableToDownloadFavicon(const GURL& icon_url) {