diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-06 09:16:15 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-01-13 16:12:06 +0100 |
commit | c9d902ca6ca3b1aa2e2762329d18c226d26520af (patch) | |
tree | 199fdd7b3f0d0ad21597fafa086729dc2e75d4e1 /src/core/web_contents_delegate_qt.cpp | |
parent | 7869ec5823da36a3ce33b379d3d664204756cad5 (diff) |
Adaptations for Chromium 87
Change-Id: Ic4ffd98e02f986dbaf986405360e727c813e696e
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 6fc94a8a8..875870e40 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -65,7 +65,7 @@ #include "components/error_page/common/error.h" #include "components/error_page/common/localized_error.h" #include "components/web_cache/browser/web_cache_manager.h" -#include "content/browser/frame_host/render_frame_host_impl.h" +#include "content/browser/renderer_host/render_frame_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/browser_context.h" @@ -79,7 +79,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/frame_navigate_params.h" #include "content/public/common/url_constants.h" -#include "content/public/common/web_preferences.h" #include "net/base/data_url.h" #include "net/base/url_util.h" @@ -372,6 +371,9 @@ void WebContentsDelegateQt::EmitLoadStarted(const QUrl &url, bool isErrorPage) void WebContentsDelegateQt::DidStartNavigation(content::NavigationHandle *navigation_handle) { + if (!webEngineSettings()->testAttribute(WebEngineSettings::ErrorPageEnabled)) + navigation_handle->SetSilentlyIgnoreErrors(); + if (!navigation_handle->IsInMainFrame()) return; @@ -694,7 +696,7 @@ void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_content m_viewClient->runMouseLockPermissionRequest(toQt(web_contents->GetLastCommittedURL().GetOrigin())); } -void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *webContents, content::WebPreferences *webPreferences) +void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *webContents, blink::web_pref::WebPreferences *webPreferences) { m_viewClient->webEngineSettings()->overrideWebPreferences(webContents, webPreferences); } |