diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-07-29 16:22:30 +0200 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-08-02 06:19:12 +0000 |
commit | 6b46b4503d3672852b4bf590dd276ff4003b26c8 (patch) | |
tree | 8b080a5bb2c426b863db5c0e7a3b5ee089705abd /src/core/web_contents_delegate_qt.cpp | |
parent | 5dd2670d66f568b3c688853df1dbc6f785ee9df4 (diff) |
Apply WebEngineSettings to guest views
Animated scrolling is always enabled in the PDF viewer and can't be
disabled by the settings of the embedding web view.
The guest view is still not present at the time when we normally apply
settings to the main WebContents, it is only possible after it was
properly attached.
Pick-to: 6.6
Change-Id: I6b2c99f67ad90bf028b7299280a9a8b0f31e9f65
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index f96b68b34..ab41483a9 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -815,6 +815,15 @@ void WebContentsDelegateQt::ResourceLoadComplete(content::RenderFrameHost* rende } } +void WebContentsDelegateQt::InnerWebContentsAttached(content::WebContents *inner_web_contents, + content::RenderFrameHost *render_frame_host, + bool is_full_page) +{ + blink::web_pref::WebPreferences guestPrefs = inner_web_contents->GetOrCreateWebPreferences(); + webEngineSettings()->overrideWebPreferences(inner_web_contents, &guestPrefs); + inner_web_contents->SetWebPreferences(guestPrefs); +} + FindTextHelper *WebContentsDelegateQt::findTextHelper() { return m_findTextHelper.data(); |