diff options
author | Tamas Zakor <ztamas@inf.u-szeged.hu> | 2020-11-09 16:28:04 +0100 |
---|---|---|
committer | Tamas Zakor <ztamas@inf.u-szeged.hu> | 2020-12-03 14:16:50 +0100 |
commit | b719da05c6429d72f4e0e0af44da0bf3f3e57984 (patch) | |
tree | 60b715db5557dfa60bd13c085e8284cab875005e /src/core/web_contents_delegate_qt.h | |
parent | 7adea5999b3eb1ac77adeb0580cb98ce35eb6ffd (diff) |
Stabilize load signals emitting
Make the WebContentsDelegateQt::EmitLoadStarted() and the
WebContentsDelegateQt::EmitLoadFinished() independent from
the WebContentsDelegateQt::LoadProgressChanged() by removing
m_lastLoadProgress.
Adapt the WebContentsDelegateQt::LoadProgressChanged() to send
signal only if load is in progress.
Add a new test based on the bugreport.
Fix qmltests::WebEngineViewSource::test_viewSourceURL() flaky tests.
Fixes: QTBUG-65223
Fixes: QTBUG-87089
Change-Id: I90af4d2e85105dba801beb8102991eb4ef14c6a3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.h')
-rw-r--r-- | src/core/web_contents_delegate_qt.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index e9ac3e7f4..5febd997b 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -223,7 +223,6 @@ private: SavePageInfo m_savePageInfo; QSharedPointer<FilePickerController> m_filePickerController; QUrl m_initialTargetUrl; - int m_lastLoadProgress; LoadingState m_loadingState; bool m_didStartLoadingSeen; FrameFocusedObserver m_frameFocusedObserver; @@ -235,6 +234,9 @@ private: int m_desktopStreamCount = 0; mutable bool m_pendingUrlUpdate = false; + QMap<QUrl, int> m_loadProgressMap; + QUrl m_lastLoadedUrl; + bool m_isNavigationCommitted = false; base::WeakPtrFactory<WebContentsDelegateQt> m_weakPtrFactory { this }; }; |