summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2022-04-27 22:22:46 +0200
committerKirill Burtsev <kirill.burtsev@qt.io>2022-05-15 13:16:15 +0200
commit1e27d42a8071532b6cc30a9bcc5f700edc56952a (patch)
tree865f45aae08e2742cbc2e02d2acb8172d56bf5b6 /src/core/web_contents_delegate_qt.cpp
parent6fa8836d430d59f2350012b54f57bc246b2aa18a (diff)
Keep page's zoom level on loading new urls
Ammends d236c5a8a3. Zoom level was set as a temporal one, which is invalidated each time when a renderer process or widget are changed (on new navigation, for example), so it needs to be reapplied. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-101030 Change-Id: Iecff9686fbe2b79e99b46f67cab92f66127be085 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 53e45028c..97843315a 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -322,8 +322,10 @@ void WebContentsDelegateQt::RenderFrameHostChanged(content::RenderFrameHost *old
if (new_host->GetFrameOwnerElementType() == blink::FrameOwnerElementType::kNone) {
content::RenderProcessHost *renderProcessHost = new_host->GetProcess();
const base::Process &process = renderProcessHost->GetProcess();
- if (process.IsValid())
+ if (process.IsValid()) {
m_viewClient->renderProcessPidChanged(process.Pid());
+ m_viewClient->zoomUpdateIsNeeded();
+ }
}
}
}
@@ -334,6 +336,7 @@ void WebContentsDelegateQt::RenderViewHostChanged(content::RenderViewHost *, con
auto rwhv = static_cast<RenderWidgetHostViewQt *>(newHost->GetWidget()->GetView());
Q_ASSERT(rwhv->delegate());
rwhv->delegate()->adapterClientChanged(m_viewClient);
+ m_viewClient->zoomUpdateIsNeeded();
}
}