diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-01-14 15:56:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-28 15:38:22 +0100 |
commit | 7753f12a5449a3ec934e833619380e91f97a6db1 (patch) | |
tree | c70a1bc3b5c649afad1c5dc0d2f642a32b22174b /src/core/web_contents_adapter.cpp | |
parent | 14992ac7cf0754b8a97a8cedf40c2b63aa26d421 (diff) |
Pre-start the render process upon initialiazing the adapter
This should provide us with an initial empty document, which our
imported autotests tend to assume all over the place.
Initialization of the adapter is moved further down in
QQuickWebEngineView's constructor so that the value of
q_ptr is set and valid by the time we end up in
WebContentsViewQt::CreateViewForWidget.
Change-Id: I45d8d61e65caa3a690461b6da44adea9f8981e7e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 24da23016..4c197090c 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -52,9 +52,9 @@ #include "base/values.h" #include "content/browser/renderer_host/render_view_host_impl.h" +#include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/web_contents.h" #include "content/public/common/page_zoom.h" #include "content/public/common/renderer_preferences.h" #include "ui/shell_dialogs/selected_file_info.h" @@ -220,6 +220,12 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient) // Let the WebContent's view know about the WebContentsAdapterClient. WebContentsViewQt* contentsView = static_cast<WebContentsViewQt*>(d->webContents->GetView()); contentsView->initialize(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); + } void WebContentsAdapter::reattachRWHV() |