fix: add support for title change with window history navigation (#27724)

This commit is contained in:
Michaela Laurencin 2021-02-17 10:23:45 -08:00 committed by GitHub
parent c99c4117c8
commit b0a6eb6a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1704,6 +1704,15 @@ void WebContents::DidFinishNavigation(
frame_process_id, frame_routing_id);
}
}
content::NavigationEntry* entry = navigation_handle->GetNavigationEntry();
// This check is needed due to an issue in Chromium
// Check the Chromium issue to keep updated:
// https://bugs.chromium.org/p/chromium/issues/detail?id=1178663
// If a history entry has been made and the forward/back call has been made,
// proceed with setting the new title
if (entry && (entry->GetTransitionType() & ui::PAGE_TRANSITION_FORWARD_BACK))
WebContents::TitleWasSet(entry);
}
void WebContents::TitleWasSet(content::NavigationEntry* entry) {