From e599e1f018f23fcd3089a87fdbf09496724122ce Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 5 Feb 2014 15:19:30 +0100 Subject: 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 Reviewed-by: Adam Kallai --- src/core/web_contents_adapter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE); + if (!rvh->IsRenderViewLive()) + static_cast(d->webContents.get())->CreateRenderViewForRenderManager(rvh, MSG_ROUTING_NONE); } -- cgit v1.2.1