Enable plznavigate aka browser side navigation (#12535)
* enable plznavigate code path * AtomBrowserClient::GetGeolocationApiKey returns the right default * use IsLoadingToDifferentDocument to identify top level navigation in mainFrame * use candidate site instance when available * spec: don't test httpReferrer option for file origin * update libcc ref * affinity: only group same site in this mode * plznavigate: don't emit did-get-response-details event for blob scheme
This commit is contained in:
parent
f8b8dc1494
commit
65e8199a93
6 changed files with 61 additions and 59 deletions
|
@ -849,6 +849,14 @@ void WebContents::DidStopLoading() {
|
|||
|
||||
void WebContents::DidGetResourceResponseStart(
|
||||
const content::ResourceRequestDetails& details) {
|
||||
// Plznavigate is using blob URLs to deliver the body
|
||||
// of the main resource to the renderer process. This
|
||||
// gets better in the future with kNavigationMojoResponse
|
||||
// feature, which replaces this mechanism with Mojo Datapipe.
|
||||
if (details.url.SchemeIsBlob() &&
|
||||
(details.resource_type == content::RESOURCE_TYPE_MAIN_FRAME ||
|
||||
details.resource_type == content::RESOURCE_TYPE_SUB_FRAME))
|
||||
return;
|
||||
Emit("did-get-response-details",
|
||||
details.socket_address.IsEmpty(),
|
||||
details.url,
|
||||
|
@ -1155,11 +1163,7 @@ bool WebContents::IsLoading() const {
|
|||
}
|
||||
|
||||
bool WebContents::IsLoadingMainFrame() const {
|
||||
// Comparing site instances works because Electron always creates a new site
|
||||
// instance when navigating, regardless of origin. See AtomBrowserClient.
|
||||
return (web_contents()->GetLastCommittedURL().is_empty() ||
|
||||
web_contents()->GetSiteInstance() !=
|
||||
web_contents()->GetPendingSiteInstance()) && IsLoading();
|
||||
return web_contents()->IsLoadingToDifferentDocument();
|
||||
}
|
||||
|
||||
bool WebContents::IsWaitingForResponse() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue