diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-28 17:07:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-29 11:17:27 +0200 |
commit | 391a6322511bb189b7d7cc094e34a34ae6495820 (patch) | |
tree | 8eaedb5d053575e7f2eddd0a6cb0f0e6ae0d6cab /src/core/web_contents_adapter.cpp | |
parent | af313cb881610fedb04c9d486597462e6b3c8e12 (diff) | |
parent | 1b1411c589cb7ed29916762bcfedbbb68e657d2f (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I9b1f2a0317290f0855da03eca9d26878b7faeb0a
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 1c5eb2535..9a544cb0a 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -989,6 +989,15 @@ void WebContentsAdapter::updateWebPreferences(const content::WebPreferences & we { CHECK_INITIALIZED(); m_webContents->GetRenderViewHost()->UpdateWebkitPreferences(webPreferences); + + // In case of updating preferences during navigation, there might be a pending RVH what will + // be active on successful navigation. + content::RenderFrameHost *pendingRFH = (static_cast<content::WebContentsImpl*>(m_webContents.get()))->GetPendingMainFrame(); + if (pendingRFH) { + content::RenderViewHost *pendingRVH = pendingRFH->GetRenderViewHost(); + Q_ASSERT(pendingRVH); + pendingRVH->UpdateWebkitPreferences(webPreferences); + } } void WebContentsAdapter::download(const QUrl &url, const QString &suggestedFileName, |