diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-02-05 15:19:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-12 15:12:14 +0100 |
commit | e599e1f018f23fcd3089a87fdbf09496724122ce (patch) | |
tree | 3575ee8574f61883eee22ad374be383ce65e89cc /src/core/web_contents_adapter.cpp | |
parent | e05871069a95af35889e8e8c63d8794a263e1f2a (diff) |
Fix resizing not working on new windows
We have to re-run initialize on attached WebContentsAdapter to update
the client. We currently however initialize the renderer
inconditionally at the end if the initialization, which in this case
would create an extra RenderWidgetHostView and keep the old one in
limbo.
Fix the issue by checking if the WebContents already has a live view
before forcing the creation of a new one.
Change-Id: Icfdbde016f9a49bfad643286881a6e409c958e94
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index ba458c80b..d67edbe7a 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -226,7 +226,8 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient) // Create a RenderView with the initial empty document content::RenderViewHost *rvh = d->webContents->GetRenderViewHost(); Q_ASSERT(rvh); - static_cast<content::WebContentsImpl*>(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE); + if (!rvh->IsRenderViewLive()) + static_cast<content::WebContentsImpl*>(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE); } |