Commit 3bc5b9d4 authored by Jüri Valdmann's avatar Jüri Valdmann Committed by Allan Sandfeld Jensen
Browse files

Avoid creating temporary blank WebContents


- Avoid creating a blank WebContents for new QWebEnginePages only to replace it
  with a different blank WebContents moments later. This problem is already
  solved in QQuickWebEngineView by lazy initialization, therefore the patch
  moves this lazy initialization into WebContentsAdapter itself so that it can
  be applied to both QQuickWebEngineView and QWebEnginePage.

- Try to delay WebContents creation until the first navigation so that we have
  enough information available to pick the right initial SiteInstance when
  calling WebContents::Create. This is done by triggering WebContents creation
  from the first call to a WebContentsAdapter::load* method.

- Use the SiteInstance from WebContentsDelegate::OpenURLFromTab. This method
  gets a SiteInstance pointer which we should give to WebContents::Create.

Task-number: QTBUG-65561
Task-number: QTBUG-67163
Change-Id: Id7b351998adefb810cf27c61a1447b61d7f4c606
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Showing with 395 additions and 231 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment