From 13416b2db167dc1849e4af94391d3c6ae602ec76 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 8 Jan 2014 14:37:40 +0100 Subject: Fix QWebEngineView to page reattachment. This fixes the crash in tst_QWebEngineView::reusePage. Also add a test to check the case where show() would react incorrectly. Change-Id: I40247c7c225d74b26675b6a7fa5ff1f06d3bb3e6 Reviewed-by: Pierre Rossi --- src/core/web_contents_adapter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/web_contents_adapter.cpp') diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index bb2ac36f4..ce9dccd90 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -218,6 +218,13 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient) contentsView->initialize(adapterClient); } +void WebContentsAdapter::reattachRWHV() +{ + Q_D(WebContentsAdapter); + if (content::RenderWidgetHostView *rwhv = d->webContents->GetRenderWidgetHostView()) + rwhv->InitAsChild(0); +} + bool WebContentsAdapter::canGoBack() const { Q_D(const WebContentsAdapter); -- cgit v1.2.3