summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview_p_p.h
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-09-20 10:26:37 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-10-29 09:43:04 +0000
commit36d230c44c7e2f6fccf224b4a0ab5efe77117e0a (patch)
tree1a782829d2838908a461799bf4b8fd651dad6958 /src/webengine/api/qquickwebengineview_p_p.h
parent2a6193b00e1d756e9a7a6032640b413c184ae4f0 (diff)
Stop showing speculative frames
Chromium creates "speculative" frames (RenderFrameHost and company) for pending cross-process navigations (and maybe other navigations too). For example, a redirect from http://qt.io to https://qt.io will trigger this, as described in the bug report. These speculative frames are loading in the background and only shown once they are officially ready (as decided by the RenderFrameHostManager and signaled to WebContentsObserver::RenderViewHostChanged). At least, this is how it's supposed to work and how it works in Chrome. In WebEngine, however, we actually show these speculative frames as soon as they are created and before they are ready. This runs into the problem that the if the speculative frame is dropped (instead of committed), then Chromium will not ask us to re-show the old frame (since it hasn't actually asked to us to show the new frame, it naturally assumes we are still showing the old one). Fixes: QTBUG-68727 Change-Id: I9d53035ce60e3a002d5412d4473d940a32644b5d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebengineview_p_p.h')
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index d20bfca46..cbba9b568 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -63,8 +63,9 @@
#include <QtGui/qaccessibleobject.h>
namespace QtWebEngineCore {
-class WebContentsAdapter;
+class RenderWidgetHostViewQtDelegateQuick;
class UIDelegatesManager;
+class WebContentsAdapter;
}
QT_BEGIN_NAMESPACE
@@ -157,6 +158,7 @@ public:
QtWebEngineCore::ProfileAdapter *profileAdapter() override;
QtWebEngineCore::WebContentsAdapter *webContentsAdapter() override;
void printRequested() override;
+ void widgetChanged(QtWebEngineCore::RenderWidgetHostViewQtDelegate *newWidgetBase) override;
void updateAction(QQuickWebEngineView::WebAction) const;
void adoptWebContents(QtWebEngineCore::WebContentsAdapter *webContents);
@@ -165,6 +167,10 @@ public:
void ensureContentsAdapter();
void setFullScreenMode(bool);
+ static void bindViewAndWidget(QQuickWebEngineView *view, QtWebEngineCore::RenderWidgetHostViewQtDelegateQuick *widget);
+ void widgetChanged(QtWebEngineCore::RenderWidgetHostViewQtDelegateQuick *oldWidget,
+ QtWebEngineCore::RenderWidgetHostViewQtDelegateQuick *newWidget);
+
// QQmlListPropertyHelpers
static void userScripts_append(QQmlListProperty<QQuickWebEngineScript> *p, QQuickWebEngineScript *script);
static int userScripts_count(QQmlListProperty<QQuickWebEngineScript> *p);
@@ -198,6 +204,7 @@ public:
uint m_webChannelWorld;
bool m_isBeingAdopted;
mutable QQuickWebEngineAction *actions[QQuickWebEngineView::WebActionCount];
+ QtWebEngineCore::RenderWidgetHostViewQtDelegateQuick *widget = nullptr;
bool profileInitialized() const;