summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--examples/webenginewidgets/demobrowser/browsermainwindow.cpp22
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp22
-rw-r--r--src/core/browser_context_adapter.cpp10
-rw-r--r--src/core/browser_context_adapter.h1
-rw-r--r--src/core/content_main_delegate_qt.cpp1
-rw-r--r--src/core/core.gyp12
-rw-r--r--src/core/core_gyp_generator.pro6
-rw-r--r--src/core/core_module.pro7
-rw-r--r--src/core/gyp_run.pro2
-rw-r--r--src/core/proxy_config_service_qt.cpp1
-rw-r--r--src/core/qtwebengine.gypi2
-rw-r--r--src/core/resources/resources.gyp14
-rw-r--r--src/core/url_request_context_getter_qt.cpp25
-rw-r--r--src/core/url_request_context_getter_qt.h1
-rw-r--r--src/core/web_contents_adapter.cpp9
-rw-r--r--src/core/web_contents_adapter.h6
-rw-r--r--src/core/web_contents_adapter_client.h2
-rw-r--r--src/core/web_contents_delegate_qt.cpp17
-rw-r--r--src/core/web_contents_delegate_qt.h2
-rw-r--r--src/core/web_engine_context.cpp46
-rw-r--r--src/core/web_engine_library_info.cpp29
-rw-r--r--src/core/web_engine_settings.h1
-rw-r--r--src/core/web_event_factory.cpp17
-rw-r--r--src/webengine/api/qquickwebenginenewviewrequest_p.h2
-rw-r--r--src/webengine/api/qquickwebengineview.cpp12
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h4
-rw-r--r--src/webengine/doc/images/qtwebengine-architecture.pngbin8098 -> 9890 bytes
-rw-r--r--src/webengine/doc/images/qtwebengine-model.qmodel626
-rw-r--r--src/webengine/doc/images/qtwebengine-modules-model.qmodel500
-rw-r--r--src/webengine/doc/images/qtwebenginewidgets-model.qmodel789
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc99
-rw-r--r--src/webengine/doc/src/webengineview.qdoc37
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp1
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp41
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h7
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection.cpp30
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection_p.h9
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc7
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp8
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h1
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/BLACKLIST2
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp6
-rw-r--r--tests/auto/quick/quick.pro9
-rw-r--r--tests/auto/widgets/qwebenginepage/BLACKLIST3
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp173
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp13
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine5
-rw-r--r--tools/qmake/mkspecs/features/gyp_generator.prf24
49 files changed, 2382 insertions, 282 deletions
diff --git a/.gitignore b/.gitignore
index 2a74d1302..21aab71d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,6 @@ src/core/Debug
src/core/Release
src/core/api/Release
src/core/api/Debug
-src/core/core_generated.gyp
src/core/gypfiles
examples/webengine/quicknanobrowser/quicknanobrowser
examples/webengine/quicknanobrowser/quicknanobrowser.app
diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
index 14ed10dfc..f044219ca 100644
--- a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
@@ -419,13 +419,31 @@ void BrowserMainWindow::setupMenu()
m_historyBack = new QAction(tr("Back"), this);
m_tabWidget->addWebAction(m_historyBack, QWebEnginePage::Back);
- m_historyBack->setShortcuts(QKeySequence::Back);
+ QList<QKeySequence> backShortcuts = QKeySequence::keyBindings(QKeySequence::Back);
+ for (auto it = backShortcuts.begin(); it != backShortcuts.end();) {
+ // Chromium already handles navigate on backspace when appropriate.
+ if ((*it)[0] == Qt::Key_Backspace)
+ it = backShortcuts.erase(it);
+ else
+ ++it;
+ }
+ // For some reason Qt doesn't bind the dedicated Back key to Back.
+ backShortcuts.append(QKeySequence(Qt::Key_Back));
+ m_historyBack->setShortcuts(backShortcuts);
m_historyBack->setIconVisibleInMenu(false);
historyActions.append(m_historyBack);
m_historyForward = new QAction(tr("Forward"), this);
m_tabWidget->addWebAction(m_historyForward, QWebEnginePage::Forward);
- m_historyForward->setShortcuts(QKeySequence::Forward);
+ QList<QKeySequence> fwdShortcuts = QKeySequence::keyBindings(QKeySequence::Forward);
+ for (auto it = fwdShortcuts.begin(); it != fwdShortcuts.end();) {
+ if (((*it)[0] & Qt::Key_unknown) == Qt::Key_Backspace)
+ it = fwdShortcuts.erase(it);
+ else
+ ++it;
+ }
+ fwdShortcuts.append(QKeySequence(Qt::Key_Forward));
+ m_historyForward->setShortcuts(fwdShortcuts);
m_historyForward->setIconVisibleInMenu(false);
historyActions.append(m_historyForward);
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
index e7d5fd129..c01f912d3 100644
--- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp
+++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
@@ -280,7 +280,17 @@ QToolBar *BrowserWindow::createToolBar()
navigationBar->toggleViewAction()->setEnabled(false);
m_historyBackAction = new QAction(this);
- m_historyBackAction->setShortcuts(QKeySequence::Back);
+ QList<QKeySequence> backShortcuts = QKeySequence::keyBindings(QKeySequence::Back);
+ for (auto it = backShortcuts.begin(); it != backShortcuts.end();) {
+ // Chromium already handles navigate on backspace when appropriate.
+ if ((*it)[0] == Qt::Key_Backspace)
+ it = backShortcuts.erase(it);
+ else
+ ++it;
+ }
+ // For some reason Qt doesn't bind the dedicated Back key to Back.
+ backShortcuts.append(QKeySequence(Qt::Key_Back));
+ m_historyBackAction->setShortcuts(backShortcuts);
m_historyBackAction->setIconVisibleInMenu(false);
m_historyBackAction->setIcon(QIcon(QStringLiteral(":go-previous.png")));
connect(m_historyBackAction, &QAction::triggered, [this]() {
@@ -289,7 +299,15 @@ QToolBar *BrowserWindow::createToolBar()
navigationBar->addAction(m_historyBackAction);
m_historyForwardAction = new QAction(this);
- m_historyForwardAction->setShortcuts(QKeySequence::Forward);
+ QList<QKeySequence> fwdShortcuts = QKeySequence::keyBindings(QKeySequence::Forward);
+ for (auto it = fwdShortcuts.begin(); it != fwdShortcuts.end();) {
+ if (((*it)[0] & Qt::Key_unknown) == Qt::Key_Backspace)
+ it = fwdShortcuts.erase(it);
+ else
+ ++it;
+ }
+ fwdShortcuts.append(QKeySequence(Qt::Key_Forward));
+ m_historyForwardAction->setShortcuts(fwdShortcuts);
m_historyForwardAction->setIconVisibleInMenu(false);
m_historyForwardAction->setIcon(QIcon(QStringLiteral(":go-next.png")));
connect(m_historyForwardAction, &QAction::triggered, [this]() {
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index e3b757587..24e2dc2c2 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -239,6 +239,16 @@ QString BrowserContextAdapter::cookiesPath() const
return QString();
}
+QString BrowserContextAdapter::channelIdPath() const
+{
+ if (m_offTheRecord)
+ return QString();
+ QString basePath = dataPath();
+ if (!basePath.isEmpty())
+ return basePath % QLatin1String("/Origin Bound Certs");
+ return QString();
+}
+
QString BrowserContextAdapter::httpCachePath() const
{
if (m_offTheRecord)
diff --git a/src/core/browser_context_adapter.h b/src/core/browser_context_adapter.h
index 94bc5fcde..a6e5a2a3e 100644
--- a/src/core/browser_context_adapter.h
+++ b/src/core/browser_context_adapter.h
@@ -103,6 +103,7 @@ public:
QString httpCachePath() const;
QString cookiesPath() const;
+ QString channelIdPath() const;
QString httpUserAgent() const;
void setHttpUserAgent(const QString &userAgent);
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 5933f873b..8bd07ef75 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -143,7 +143,6 @@ bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code)
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
PathService::Override(base::DIR_QT_LIBRARY_DATA, WebEngineLibraryInfo::getPath(base::DIR_QT_LIBRARY_DATA));
#endif
- PathService::Override(content::DIR_MEDIA_LIBS, WebEngineLibraryInfo::getPath(content::DIR_MEDIA_LIBS));
PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::getPath(ui::DIR_LOCALES));
#if defined(ENABLE_SPELLCHECK)
PathService::Override(base::DIR_APP_DICTIONARIES, WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES));
diff --git a/src/core/core.gyp b/src/core/core.gyp
deleted file mode 100644
index ea5478cf1..000000000
--- a/src/core/core.gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'qtwebengine',
- 'type': 'none',
- 'dependencies': [
- 'core_generated.gyp:*',
- 'resources/resources.gyp:*',
- ],
- },
- ]
-}
diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro
index cdff4ed64..7351b108c 100644
--- a/src/core/core_gyp_generator.pro
+++ b/src/core/core_gyp_generator.pro
@@ -2,8 +2,9 @@
# We want the gyp generation step to happen after all the other config steps. For that we need to prepend
# our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
CONFIG = gyp_generator $$CONFIG
-GYPFILE = $$PWD/core_generated.gyp
-GYPINCLUDES += qtwebengine.gypi
+GYPFILE = $$OUT_PWD/core_generated.gyp
+GYPINCLUDES += $$PWD/qtwebengine.gypi
+GYPSRCDIR = $$PWD
TEMPLATE = lib
@@ -18,6 +19,7 @@ DEFINES += QT_NO_KEYWORDS \
# Ensure that response files, generated by qtbase/mkspecs/features/moc.prf, are found by moc.
MOC_DIR = $$OUT_PWD/$$getConfigDir()/.moc
+RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc
# Assume that we want mobile touch and low-end hardware behaviors
# whenever we are cross compiling.
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 20b719547..3b9dab457 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -96,6 +96,13 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
}
}
+!win32:!build_pass:debug_and_release {
+ # Special GNU make target that ensures linking isn't done for both debug and release builds
+ # at the same time.
+ notParallel.target = .NOTPARALLEL
+ QMAKE_EXTRA_TARGETS += notParallel
+}
+
OTHER_FILES = \
$$files(../3rdparty/chromium/*.h, true) \
$$files(../3rdparty/chromium/*.cc, true) \
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 8c4aeb163..2264d9b70 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -133,7 +133,7 @@ contains(WEBENGINE_CONFIG, no_spellcheck): {
for (config, GYP_CONFIG): GYP_ARGS += "-D $$config"
!build_pass {
- message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}...")
+ message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}.")
!system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --")
}
diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp
index 7affd9045..bd5d0375d 100644
--- a/src/core/proxy_config_service_qt.cpp
+++ b/src/core/proxy_config_service_qt.cpp
@@ -134,6 +134,7 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy
qtRules.type = net::ProxyConfig::ProxyRules::TYPE_NO_RULES;
}
+ qtRules.bypass_rules.AddRuleToBypassLocal(); // don't use proxy for connections to localhost
m_qtProxyConfig.proxy_rules() = qtRules;
*config = m_qtProxyConfig;
return CONFIG_VALID;
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
index 4077431b1..816962d3d 100644
--- a/src/core/qtwebengine.gypi
+++ b/src/core/qtwebengine.gypi
@@ -38,7 +38,7 @@
'<(chromium_src_dir)/url/url.gyp:url_lib',
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- 'chrome_qt.gyp:chrome_qt',
+ '<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_qt',
],
'include_dirs': [
'<(chromium_src_dir)',
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 88c5bb4be..618b4d355 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -13,17 +13,17 @@
'qt_install_data%': '',
'qt_install_translations%': '',
},
- 'dependencies': [
- '<(chromium_src_dir)/content/app/strings/content_strings.gyp:content_strings',
- '<(chromium_src_dir)/blink/public/blink_resources.gyp:blink_resources',
- '<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
- '<(chromium_src_dir)/components/components_strings.gyp:components_strings',
- '../chrome_qt.gyp:chrome_resources',
- ],
'targets': [
{
'target_name': 'qtwebengine_resources',
'type': 'none',
+ 'dependencies': [
+ '<(chromium_src_dir)/content/app/strings/content_strings.gyp:content_strings',
+ '<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
+ '<(chromium_src_dir)/components/components_strings.gyp:components_strings',
+ '<(chromium_src_dir)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
+ '<(qtwebengine_root)/src/core/chrome_qt.gyp:chrome_resources',
+ ],
'actions' : [
{
'action_name': 'repack_resources',
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 579e33b66..bf32c75a4 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -51,6 +51,7 @@
#include "net/disk_cache/disk_cache.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mapped_host_resolver.h"
+#include "net/extras/sqlite/sqlite_channel_id_store.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
@@ -126,6 +127,7 @@ void URLRequestContextGetterQt::setFullConfiguration(QSharedPointer<BrowserConte
m_requestInterceptor = browserContext->requestInterceptor();
m_persistentCookiesPolicy = browserContext->persistentCookiesPolicy();
m_cookiesPath = browserContext->cookiesPath();
+ m_channelIdPath = browserContext->channelIdPath();
m_httpAcceptLanguage = browserContext->httpAcceptLanguage();
m_httpUserAgent = browserContext->httpUserAgent();
m_httpCacheType = browserContext->httpCacheType();
@@ -221,11 +223,6 @@ void URLRequestContextGetterQt::generateStorage()
net::ProxyConfigService *proxyConfigService = m_proxyConfigService.fetchAndStoreAcquire(0);
Q_ASSERT(proxyConfigService);
-
- m_storage->set_channel_id_service(scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
- new net::DefaultChannelIDStore(NULL),
- base::WorkerPool::GetTaskRunner(true))));
-
m_storage->set_cert_verifier(net::CertVerifier::CreateDefault());
scoped_ptr<net::HostResolver> host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
@@ -257,8 +254,9 @@ void URLRequestContextGetterQt::updateCookieStore()
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
QMutexLocker lock(&m_mutex);
- m_httpAcceptLanguage = m_browserContext.data()->httpAcceptLanguage();
- m_httpUserAgent = m_browserContext.data()->httpUserAgent();
+ m_persistentCookiesPolicy = m_browserContext.data()->persistentCookiesPolicy();
+ m_cookiesPath = m_browserContext.data()->cookiesPath();
+ m_channelIdPath = m_browserContext.data()->channelIdPath();
if (m_contextInitialized && !m_updateAllStorage && !m_updateCookieStore) {
m_updateCookieStore = true;
@@ -276,6 +274,19 @@ void URLRequestContextGetterQt::generateCookieStore()
QMutexLocker lock(&m_mutex);
m_updateCookieStore = false;
+ scoped_refptr<net::SQLiteChannelIDStore> channel_id_db;
+ if (!m_channelIdPath.isEmpty() && m_persistentCookiesPolicy != BrowserContextAdapter::NoPersistentCookies) {
+ channel_id_db = new net::SQLiteChannelIDStore(
+ toFilePath(m_channelIdPath),
+ BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
+ BrowserThread::GetBlockingPool()->GetSequenceToken()));
+ }
+
+ m_storage->set_channel_id_service(
+ scoped_ptr<net::ChannelIDService>(new net::ChannelIDService(
+ new net::DefaultChannelIDStore(channel_id_db.get()),
+ base::WorkerPool::GetTaskRunner(true))));
+
// Unset it first to get a chance to destroy and flush the old cookie store before opening a new on possibly the same file.
m_storage->set_cookie_store(0);
m_cookieDelegate->setCookieMonster(0);
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index eca956ea6..dd51fd72c 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -133,6 +133,7 @@ private:
// FIXME: Should later be moved to a separate ProfileIOData class.
BrowserContextAdapter::PersistentCookiesPolicy m_persistentCookiesPolicy;
QString m_cookiesPath;
+ QString m_channelIdPath;
QString m_httpAcceptLanguage;
QString m_httpUserAgent;
BrowserContextAdapter::HttpCacheType m_httpCacheType;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 260efc081..bfac6a5b2 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -348,14 +348,14 @@ WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
webContents.reset();
}
-QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
+QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient)
{
int currentIndex;
std::vector<scoped_ptr<content::NavigationEntry>> entries;
deserializeNavigationHistory(input, &currentIndex, &entries, adapterClient->browserContextAdapter()->browserContext());
if (currentIndex == -1)
- return QExplicitlySharedDataPointer<WebContentsAdapter>();
+ return QSharedPointer<WebContentsAdapter>();
// Unlike WebCore, Chromium only supports Restoring to a new WebContents instance.
content::WebContents* newWebContents = createBlankWebContents(adapterClient, adapterClient->browserContextAdapter()->browserContext());
@@ -373,7 +373,7 @@ QExplicitlySharedDataPointer<WebContentsAdapter> WebContentsAdapter::createFromS
content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id, *file);
}
- return QExplicitlySharedDataPointer<WebContentsAdapter>(new WebContentsAdapter(newWebContents));
+ return QSharedPointer<WebContentsAdapter>::create(newWebContents);
}
WebContentsAdapter::WebContentsAdapter(content::WebContents *webContents)
@@ -835,6 +835,9 @@ void WebContentsAdapter::stopFinding()
{
Q_D(WebContentsAdapter);
d->webContentsDelegate->setLastSearchedString(QString());
+ // Clear any previous selection,
+ // but keep the renderer blue rectangle selection just like Chromium does.
+ d->webContents->Unselect();
d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
}
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index 0de1fb1d5..ec8cd7914 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -44,7 +44,7 @@
#include "web_contents_adapter_client.h"
#include <QScopedPointer>
-#include <QSharedData>
+#include <QSharedPointer>
#include <QString>
#include <QUrl>
@@ -69,9 +69,9 @@ class MessagePassingInterface;
class WebContentsAdapterPrivate;
class FaviconManager;
-class QWEBENGINE_EXPORT WebContentsAdapter : public QSharedData {
+class QWEBENGINE_EXPORT WebContentsAdapter : public QEnableSharedFromThis<WebContentsAdapter> {
public:
- static QExplicitlySharedDataPointer<WebContentsAdapter> createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient);
+ static QSharedPointer<WebContentsAdapter> createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient);
// Takes ownership of the WebContents.
WebContentsAdapter(content::WebContents *webContents = 0);
~WebContentsAdapter();
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 7be9ca7b9..3952067a7 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -218,7 +218,7 @@ public:
virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString()) = 0;
virtual void focusContainer() = 0;
virtual void unhandledKeyEvent(QKeyEvent *event) = 0;
- virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect & initialGeometry) = 0;
+ virtual void adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect & initialGeometry) = 0;
virtual bool isBeingAdopted() = 0;
virtual void close() = 0;
virtual void windowCloseRejected() = 0;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 2dd75df83..b96452093 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -100,7 +100,7 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
{
content::WebContents *target = source;
if (params.disposition != CURRENT_TAB) {
- WebContentsAdapter *targetAdapter = createWindow(0, params.disposition, gfx::Rect(), params.user_gesture);
+ QSharedPointer<WebContentsAdapter> targetAdapter = createWindow(0, params.disposition, gfx::Rect(), params.user_gesture);
if (targetAdapter)
target = targetAdapter->webContents();
}
@@ -152,7 +152,7 @@ bool WebContentsDelegateQt::ShouldPreserveAbortedURLs(content::WebContents *sour
void WebContentsDelegateQt::AddNewContents(content::WebContents* source, content::WebContents* new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture, bool* was_blocked)
{
Q_UNUSED(source)
- WebContentsAdapter *newAdapter = createWindow(new_contents, disposition, initial_pos, user_gesture);
+ QWeakPointer<WebContentsAdapter> newAdapter = createWindow(new_contents, disposition, initial_pos, user_gesture);
if (was_blocked)
*was_blocked = !newAdapter;
}
@@ -389,20 +389,13 @@ void WebContentsDelegateQt::overrideWebPreferences(content::WebContents *, conte
m_viewClient->webEngineSettings()->overrideWebPreferences(webPreferences);
}
-WebContentsAdapter *WebContentsDelegateQt::createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture)
+QWeakPointer<WebContentsAdapter> WebContentsDelegateQt::createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture)
{
- WebContentsAdapter *newAdapter = new WebContentsAdapter(new_contents);
- // Do the first ref-count manually to be able to know if the application is handling adoptNewWindow through the public API.
- newAdapter->ref.ref();
+ QSharedPointer<WebContentsAdapter> newAdapter = QSharedPointer<WebContentsAdapter>::create(new_contents);
m_viewClient->adoptNewWindow(newAdapter, static_cast<WebContentsAdapterClient::WindowOpenDisposition>(disposition), user_gesture, toQt(initial_pos));
- if (!newAdapter->ref.deref()) {
- // adoptNewWindow didn't increase the ref-count, newAdapter and its new_contents (if non-null) need to be discarded.
- delete newAdapter;
- newAdapter = 0;
- }
-
+ // If the client didn't reference the adapter, it will be deleted now, and the weak pointer zeroed.
return newAdapter;
}
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index e6deaa409..d523aa16b 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -127,7 +127,7 @@ public:
FaviconManager *faviconManager();
private:
- WebContentsAdapter *createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
+ QWeakPointer<WebContentsAdapter> createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture);
WebContentsAdapterClient *m_viewClient;
QString m_lastSearchedString;
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 6da80e94d..98fba0897 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -86,8 +86,10 @@
#include "web_engine_library_info.h"
#include <QFileInfo>
#include <QGuiApplication>
+#include <QOffscreenSurface>
#include <QOpenGLContext>
#include <QStringList>
+#include <QSurfaceFormat>
#include <QVector>
#include <qpa/qplatformnativeinterface.h>
@@ -294,15 +296,40 @@ WebEngineContext::WebEngineContext()
GLContextHelper::initialize();
- if (usingANGLE() || usingSoftwareDynamicGL() || usingQtQuick2DRenderer()) {
- parsedCommandLine->AppendSwitch(switches::kDisableGpu);
- } else {
- const char *glType = 0;
+ const char *glType = 0;
+ if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
if (qt_gl_global_share_context()) {
- if (qt_gl_global_share_context()->isOpenGLES()) {
- glType = gfx::kGLImplementationEGLName;
+ if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) {
+ if (qt_gl_global_share_context()->isOpenGLES()) {
+ glType = gfx::kGLImplementationEGLName;
+ } else {
+ QOpenGLContext context;
+ QSurfaceFormat format;
+
+ format.setRenderableType(QSurfaceFormat::OpenGLES);
+ format.setVersion(2, 0);
+
+ context.setFormat(format);
+ context.setShareContext(qt_gl_global_share_context());
+ if (context.create()) {
+ QOffscreenSurface surface;
+
+ surface.setFormat(format);
+ surface.create();
+
+ if (context.makeCurrent(&surface)) {
+ if (context.hasExtension("GL_ARB_ES2_compatibility"))
+ glType = gfx::kGLImplementationEGLName;
+
+ context.doneCurrent();
+ }
+
+ surface.destroy();
+ }
+ }
} else {
- glType = gfx::kGLImplementationDesktopName;
+ if (!qt_gl_global_share_context()->isOpenGLES())
+ glType = gfx::kGLImplementationDesktopName;
}
} else {
qWarning("WebEngineContext used before QtWebEngine::initialize()");
@@ -316,9 +343,12 @@ WebEngineContext::WebEngineContext()
break;
}
}
+ }
+ if (glType)
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
- }
+ else
+ parsedCommandLine->AppendSwitch(switches::kDisableGpu);
content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 2de3d39ff..399e36765 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -154,33 +154,6 @@ QString subProcessPath()
return processPath;
}
-QString pluginsPath()
-{
-#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
- static QString pluginsPath = getPath(frameworkBundle()) % QLatin1String("/Libraries");
-#else
- static bool initialized = false;
- static QString pluginsPath;
-
- if (!initialized) {
- initialized = true;
- const QStringList directories = QCoreApplication::libraryPaths();
- Q_FOREACH (const QString &dir, directories) {
- const QString candidate = dir % "/" % QLatin1String("qtwebengine");
- if (QFileInfo::exists(candidate)) {
- pluginsPath = candidate;
- break;
- }
- }
-
- if (pluginsPath.isEmpty()) {
- pluginsPath = fallbackDir();
- }
- }
-#endif
- return pluginsPath;
-}
-
QString localesPath()
{
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
@@ -306,8 +279,6 @@ base::FilePath WebEngineLibraryInfo::getPath(int key)
break;
case base::DIR_QT_LIBRARY_DATA:
return toFilePath(icuDataPath());
- case content::DIR_MEDIA_LIBS:
- return toFilePath(pluginsPath());
case ui::DIR_LOCALES:
return toFilePath(localesPath());
#if defined(ENABLE_SPELLCHECK)
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index b623f1ec2..e21eee8a9 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -42,7 +42,6 @@
#include "qtwebenginecoreglobal.h"
-#include <QExplicitlySharedDataPointer>
#include <QScopedPointer>
#include <QHash>
#include <QUrl>
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 10809a764..80850af70 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -492,6 +492,19 @@ static WebMouseEvent::Button mouseButtonForEvent(QMouseEvent *event)
return WebMouseEvent::ButtonRight;
else if (event->button() == Qt::MidButton)
return WebMouseEvent::ButtonMiddle;
+
+ if (event->type() != QEvent::MouseMove)
+ return WebMouseEvent::ButtonNone;
+
+ // This is technically wrong, mouse move should always have ButtonNone,
+ // but it is consistent with aura and selection code depends on it:
+ if (event->buttons() & Qt::LeftButton)
+ return WebMouseEvent::ButtonLeft;
+ else if (event->buttons() & Qt::RightButton)
+ return WebMouseEvent::ButtonRight;
+ else if (event->buttons() & Qt::MidButton)
+ return WebMouseEvent::ButtonMiddle;
+
return WebMouseEvent::ButtonNone;
}
@@ -659,8 +672,8 @@ blink::WebMouseWheelEvent WebEventFactory::toWebWheelEvent(QWheelEvent *ev, doub
webEvent.modifiers = modifiersForEvent(ev);
webEvent.timeStampSeconds = currentTimeForEvent(ev);
- webEvent.wheelTicksX = ev->angleDelta().x() / QWheelEvent::DefaultDeltasPerStep;
- webEvent.wheelTicksY = ev->angleDelta().y() / QWheelEvent::DefaultDeltasPerStep;
+ webEvent.wheelTicksX = static_cast<float>(ev->angleDelta().x()) / QWheelEvent::DefaultDeltasPerStep;
+ webEvent.wheelTicksY = static_cast<float>(ev->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep;
// We can't use the device specific QWheelEvent::pixelDelta(), so we calculate
// a pixel delta based on ticks and scroll per line.
diff --git a/src/webengine/api/qquickwebenginenewviewrequest_p.h b/src/webengine/api/qquickwebenginenewviewrequest_p.h
index e8665ba45..fd7fc42f4 100644
--- a/src/webengine/api/qquickwebenginenewviewrequest_p.h
+++ b/src/webengine/api/qquickwebenginenewviewrequest_p.h
@@ -75,7 +75,7 @@ private:
QQuickWebEngineNewViewRequest();
QQuickWebEngineView::NewViewDestination m_destination;
bool m_isUserInitiated;
- QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> m_adapter;
+ QSharedPointer<QtWebEngineCore::WebContentsAdapter> m_adapter;
QUrl m_requestedUrl;
friend class QQuickWebEngineView;
friend class QQuickWebEngineViewPrivate;
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index ced8c1452..67a41f659 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -564,7 +564,7 @@ void QQuickWebEngineViewPrivate::unhandledKeyEvent(QKeyEvent *event)
q->window()->sendEvent(q->parentItem(), event);
}
-void QQuickWebEngineViewPrivate::adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &)
+void QQuickWebEngineViewPrivate::adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &)
{
Q_Q(QQuickWebEngineView);
QQuickWebEngineNewViewRequest request;
@@ -770,7 +770,7 @@ QAccessible::State QQuickWebEngineViewAccessible::state() const
class WebContentsAdapterOwner : public QObject
{
public:
- typedef QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> AdapterPtr;
+ typedef QSharedPointer<QtWebEngineCore::WebContentsAdapter> AdapterPtr;
WebContentsAdapterOwner(const AdapterPtr &ptr)
: adapter(ptr)
{}
@@ -797,9 +797,9 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent
// This throws away the WebContentsAdapter that has been used until now.
// All its states, particularly the loading URL, are replaced by the adopted WebContentsAdapter.
- WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter);
+ WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis());
adapterOwner->deleteLater();
- adapter = webContents;
+ adapter = webContents->sharedFromThis();
adapter->initialize(this);
// associate the webChannel with the new adapter
@@ -856,7 +856,7 @@ void QQuickWebEngineViewPrivate::ensureContentsAdapter()
{
Q_Q(QQuickWebEngineView);
if (!adapter) {
- adapter = new WebContentsAdapter();
+ adapter = QSharedPointer<WebContentsAdapter>::create();
adapter->initialize(this);
if (m_backgroundColor != Qt::white)
adapter->backgroundColorChanged();
@@ -1016,7 +1016,7 @@ void QQuickWebEngineViewPrivate::setProfile(QQuickWebEngineProfile *profile)
if (adapter && adapter->browserContext() != browserContextAdapter()->browserContext()) {
// When the profile changes we need to create a new WebContentAdapter and reload the active URL.
QUrl activeUrl = adapter->activeUrl();
- adapter = 0;
+ adapter.reset();
ensureContentsAdapter();
if (!explicitUrl.isValid() && activeUrl.isValid())
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index f13bfd09a..769e41a44 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -152,7 +152,7 @@ public:
virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
+ virtual void adoptNewWindow(QSharedPointer<QtWebEngineCore::WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
virtual bool isBeingAdopted() Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
virtual void windowCloseRejected() Q_DECL_OVERRIDE;
@@ -207,7 +207,7 @@ public:
static QQuickWebEngineScript *userScripts_at(QQmlListProperty<QQuickWebEngineScript> *p, int idx);
static void userScripts_clear(QQmlListProperty<QQuickWebEngineScript> *p);
- QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> adapter;
+ QSharedPointer<QtWebEngineCore::WebContentsAdapter> adapter;
QScopedPointer<QQuickWebEngineViewExperimental> e;
QScopedPointer<QQuickWebEngineViewport> v;
QScopedPointer<QQuickWebEngineHistory> m_history;
diff --git a/src/webengine/doc/images/qtwebengine-architecture.png b/src/webengine/doc/images/qtwebengine-architecture.png
index 1c94d385f..979a0ad3f 100644
--- a/src/webengine/doc/images/qtwebengine-architecture.png
+++ b/src/webengine/doc/images/qtwebengine-architecture.png
Binary files differ
diff --git a/src/webengine/doc/images/qtwebengine-model.qmodel b/src/webengine/doc/images/qtwebengine-model.qmodel
new file mode 100644
index 000000000..f3d5cb52b
--- /dev/null
+++ b/src/webengine/doc/images/qtwebengine-model.qmodel
@@ -0,0 +1,626 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<qmt>
+ <project>
+ <uid>{b4b96dcf-b444-4b48-96a0-0ced0222fbe4}</uid>
+ <root-package>
+ <instance>
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{4b17cf3d-b45a-4ca8-b6c2-f0a9db0a0d9e}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebengine-model</name>
+ <children>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{d0623590-2a20-468b-9ec5-51987e78ae47}</uid>
+ <target>
+ <instance type="MCanvasDiagram">
+ <MCanvasDiagram>
+ <base-MDiagram>
+ <MDiagram>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{d0623590-2a20-468b-9ec5-51987e78ae47}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebengine-model</name>
+ </MObject>
+ </base-MObject>
+ <elements>
+ <qlist>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{e1622bc8-530c-4d18-ba77-202bad11f1e0}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{3507c733-97ee-4b84-835b-4d90f039ca72}</object>
+ <name>View</name>
+ <pos>x:260;y:70</pos>
+ <rect>x:-45;y:-30;w:90;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{0bb9e92a-910d-4a32-877b-fd7e37710f79}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</object>
+ <name>Profile</name>
+ <pos>x:415;y:155</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{54c2f051-8fdb-48f2-b528-2caa8fd1f854}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{999dd0f9-53f0-47bd-90ea-714c0dea50d7}</object>
+ <name>History</name>
+ <pos>x:110;y:155</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{ae2fed61-96c0-4755-aad1-2d02fbc6e36e}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{b2ea9c4f-8b35-46c3-b2a5-3f22d72069e7}</object>
+ <name>Settings</name>
+ <pos>x:260;y:240</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{95fafacc-66c7-42d0-b27e-e92a69964adf}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{e3429382-8484-481e-8690-792b1c1a257e}</object>
+ <a>{e1622bc8-530c-4d18-ba77-202bad11f1e0}</a>
+ <b>{0bb9e92a-910d-4a32-877b-fd7e37710f79}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{673bc9c1-a5ff-44ba-b9a6-d17807014a8e}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{e505b9c3-2332-4056-b3f0-dbd71a5ccbae}</object>
+ <a>{e1622bc8-530c-4d18-ba77-202bad11f1e0}</a>
+ <b>{54c2f051-8fdb-48f2-b528-2caa8fd1f854}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{78e57691-4776-4e73-b0f0-232a1e80da10}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{9cfdd75f-182e-4511-bf4c-19f30309318e}</object>
+ <a>{0bb9e92a-910d-4a32-877b-fd7e37710f79}</a>
+ <b>{ae2fed61-96c0-4755-aad1-2d02fbc6e36e}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{e76fa55e-b2df-4713-9fab-78434c3c7ed3}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{ff72261f-19e3-4983-b10c-856f6070637b}</object>
+ <name>Action</name>
+ <pos>x:260;y:155</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{305524c2-f2c7-44ba-b30b-51fbfdc81063}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{911f495e-313f-4b28-95d6-440b06a05a83}</object>
+ <a>{e1622bc8-530c-4d18-ba77-202bad11f1e0}</a>
+ <b>{e76fa55e-b2df-4713-9fab-78434c3c7ed3}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{28ea46b1-ce73-432f-89a6-a97821dbac59}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{f1e3fd14-d433-4d95-8ea4-1c4b5aaf4334}</object>
+ <name>Script</name>
+ <pos>x:415;y:240</pos>
+ <rect>x:-45;y:-30;w:90;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{41e806b6-c8fd-4ae5-865d-db55feeb5570}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{96788086-5e67-482c-ac8b-0f2a7f0729ff}</object>
+ <name>Cookie</name>
+ <pos>x:555;y:240</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{99a53c8d-8dc1-4ee5-83bf-ec2ff2677817}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{dc399de7-f3b9-4071-84af-b6e5dfa3affe}</object>
+ <a>{0bb9e92a-910d-4a32-877b-fd7e37710f79}</a>
+ <b>{28ea46b1-ce73-432f-89a6-a97821dbac59}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{f3833f3d-d01b-4c7c-bfde-91d014aff654}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{4dc013fb-ced4-4cc0-99e3-3f4a32acebf7}</object>
+ <a>{0bb9e92a-910d-4a32-877b-fd7e37710f79}</a>
+ <b>{41e806b6-c8fd-4ae5-865d-db55feeb5570}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ </qlist>
+ </elements>
+ <last-modified>1455888691589</last-modified>
+ <toolbarid>General</toolbarid>
+ </MDiagram>
+ </base-MDiagram>
+ </MCanvasDiagram>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{3507c733-97ee-4b84-835b-4d90f039ca72}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{3507c733-97ee-4b84-835b-4d90f039ca72}</uid>
+ </MElement>
+ </base-MElement>
+ <name>View</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{e3429382-8484-481e-8690-792b1c1a257e}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{e3429382-8484-481e-8690-792b1c1a257e}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{3507c733-97ee-4b84-835b-4d90f039ca72}</a>
+ <b>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{e505b9c3-2332-4056-b3f0-dbd71a5ccbae}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{e505b9c3-2332-4056-b3f0-dbd71a5ccbae}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{3507c733-97ee-4b84-835b-4d90f039ca72}</a>
+ <b>{999dd0f9-53f0-47bd-90ea-714c0dea50d7}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{4d826dd3-e455-46f3-8dfc-bb74551f3f00}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{4d826dd3-e455-46f3-8dfc-bb74551f3f00}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{3507c733-97ee-4b84-835b-4d90f039ca72}</a>
+ <b>{b2ea9c4f-8b35-46c3-b2a5-3f22d72069e7}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{911f495e-313f-4b28-95d6-440b06a05a83}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{911f495e-313f-4b28-95d6-440b06a05a83}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{3507c733-97ee-4b84-835b-4d90f039ca72}</a>
+ <b>{ff72261f-19e3-4983-b10c-856f6070637b}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Profile</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{9cfdd75f-182e-4511-bf4c-19f30309318e}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{9cfdd75f-182e-4511-bf4c-19f30309318e}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</a>
+ <b>{b2ea9c4f-8b35-46c3-b2a5-3f22d72069e7}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{dc399de7-f3b9-4071-84af-b6e5dfa3affe}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{dc399de7-f3b9-4071-84af-b6e5dfa3affe}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</a>
+ <b>{f1e3fd14-d433-4d95-8ea4-1c4b5aaf4334}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{4dc013fb-ced4-4cc0-99e3-3f4a32acebf7}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{4dc013fb-ced4-4cc0-99e3-3f4a32acebf7}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{ab5f0d96-cf38-430d-bef3-b7bd78952fdb}</a>
+ <b>{96788086-5e67-482c-ac8b-0f2a7f0729ff}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{999dd0f9-53f0-47bd-90ea-714c0dea50d7}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{999dd0f9-53f0-47bd-90ea-714c0dea50d7}</uid>
+ </MElement>
+ </base-MElement>
+ <name>History</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{b2ea9c4f-8b35-46c3-b2a5-3f22d72069e7}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{b2ea9c4f-8b35-46c3-b2a5-3f22d72069e7}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Settings</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{ff72261f-19e3-4983-b10c-856f6070637b}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{ff72261f-19e3-4983-b10c-856f6070637b}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Action</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{f1e3fd14-d433-4d95-8ea4-1c4b5aaf4334}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{f1e3fd14-d433-4d95-8ea4-1c4b5aaf4334}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Script</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{96788086-5e67-482c-ac8b-0f2a7f0729ff}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{96788086-5e67-482c-ac8b-0f2a7f0729ff}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Cookie</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </children>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </root-package>
+ </project>
+</qmt>
diff --git a/src/webengine/doc/images/qtwebengine-modules-model.qmodel b/src/webengine/doc/images/qtwebengine-modules-model.qmodel
new file mode 100644
index 000000000..c1d64b617
--- /dev/null
+++ b/src/webengine/doc/images/qtwebengine-modules-model.qmodel
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<qmt>
+ <project>
+ <uid>{4a2bfe98-50e2-435d-8702-93dc2ccbd56b}</uid>
+ <root-package>
+ <instance>
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{11ff33c5-f533-494d-9add-55ea216b97a6}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebengine-modules-model</name>
+ <children>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{9e8325b8-5731-4c87-9203-fe941456ee06}</uid>
+ <target>
+ <instance type="MCanvasDiagram">
+ <MCanvasDiagram>
+ <base-MDiagram>
+ <MDiagram>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{9e8325b8-5731-4c87-9203-fe941456ee06}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebengine-modules-model</name>
+ </MObject>
+ </base-MObject>
+ <elements>
+ <qlist>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{aee48ad9-14be-47bb-8ebf-1a9b44f1e219}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{4d3871a4-ad9d-4b1a-ab68-acfce8ba5f00}</object>
+ <name>Qt WebEngine Module</name>
+ <pos>x:300;y:70</pos>
+ <rect>x:-275;y:-145;w:550;h:290</rect>
+ <auto-sized>false</auto-sized>
+ <visual-role>0</visual-role>
+ <stereotype-display>0</stereotype-display>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{b667049f-5302-4e68-8679-c26a7c4c37af}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{71104fca-42f0-4145-bf3a-afed38493c8b}</object>
+ <context>Qt WebEngine Module</context>
+ <name>Qt WebEngine </name>
+ <pos>x:300;y:15</pos>
+ <rect>x:-75;y:-35;w:150;h:70</rect>
+ <auto-sized>false</auto-sized>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{6d84908c-9500-4b4f-95b8-b723ff8f2fc3}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{8e8c6646-1175-4ee1-aa02-cd5669cdf92a}</object>
+ <context>Qt WebEngine Module</context>
+ <name> Qt WebEngine Widgets</name>
+ <pos>x:105;y:15</pos>
+ <rect>x:-75;y:-35;w:150;h:70</rect>
+ <auto-sized>false</auto-sized>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{d1260089-4eb6-4465-ac5f-e36ba1ef2311}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{c0946aaa-51df-48db-9ceb-351cd32089be}</object>
+ <context>Qt WebEngine Module</context>
+ <name> Qt WebEngine Process</name>
+ <pos>x:495;y:15</pos>
+ <rect>x:-75;y:-35;w:150;h:70</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{7e01513b-4cfc-4154-b445-a9b341b392a3}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</object>
+ <context>Qt WebEngine Module</context>
+ <name>Qt WebEngine Core</name>
+ <pos>x:300;y:150</pos>
+ <rect>x:-270;y:-60;w:540;h:120</rect>
+ <auto-sized>false</auto-sized>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DPackage">
+ <DPackage>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{620a2a3d-3a6c-4afc-a9ba-e2a0651b81b8}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{ce1e329b-b2ec-465f-bbc7-3cc75160da1a}</object>
+ <context>Qt WebEngine Core</context>
+ <name>Chromium</name>
+ <pos>x:300;y:165</pos>
+ <rect>x:-260;y:-35;w:520;h:70</rect>
+ <auto-sized>false</auto-sized>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DPackage>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{d0b02baa-0ce3-437e-a962-0896efb0b2d0}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{342a09ff-ab96-40d2-b9f9-300d1f2a067b}</object>
+ <a>{6d84908c-9500-4b4f-95b8-b723ff8f2fc3}</a>
+ <b>{7e01513b-4cfc-4154-b445-a9b341b392a3}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{e59a5c27-7bda-44f6-8b7d-a729c2d04ff5}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{45bf7ccd-aafc-4ec1-a846-bb2661aa9def}</object>
+ <a>{b667049f-5302-4e68-8679-c26a7c4c37af}</a>
+ <b>{7e01513b-4cfc-4154-b445-a9b341b392a3}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{8ae66be6-ad8a-442f-a85d-58e53a684249}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{6875416f-210d-4957-b0dc-d1a92a4238ef}</object>
+ <a>{d1260089-4eb6-4465-ac5f-e36ba1ef2311}</a>
+ <b>{7e01513b-4cfc-4154-b445-a9b341b392a3}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ </qlist>
+ </elements>
+ <last-modified>1469021602971</last-modified>
+ <toolbarid>General</toolbarid>
+ </MDiagram>
+ </base-MDiagram>
+ </MCanvasDiagram>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{4d3871a4-ad9d-4b1a-ab68-acfce8ba5f00}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{4d3871a4-ad9d-4b1a-ab68-acfce8ba5f00}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Qt WebEngine Module</name>
+ <children>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{71104fca-42f0-4145-bf3a-afed38493c8b}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{71104fca-42f0-4145-bf3a-afed38493c8b}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Qt WebEngine </name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{45bf7ccd-aafc-4ec1-a846-bb2661aa9def}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{45bf7ccd-aafc-4ec1-a846-bb2661aa9def}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{71104fca-42f0-4145-bf3a-afed38493c8b}</a>
+ <b>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{8e8c6646-1175-4ee1-aa02-cd5669cdf92a}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{8e8c6646-1175-4ee1-aa02-cd5669cdf92a}</uid>
+ </MElement>
+ </base-MElement>
+ <name> Qt WebEngine Widgets</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{342a09ff-ab96-40d2-b9f9-300d1f2a067b}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{342a09ff-ab96-40d2-b9f9-300d1f2a067b}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{8e8c6646-1175-4ee1-aa02-cd5669cdf92a}</a>
+ <b>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{483712c1-3ec0-4271-b02e-b268de07897b}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{483712c1-3ec0-4271-b02e-b268de07897b}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{8e8c6646-1175-4ee1-aa02-cd5669cdf92a}</a>
+ <b>{71104fca-42f0-4145-bf3a-afed38493c8b}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{c0946aaa-51df-48db-9ceb-351cd32089be}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{c0946aaa-51df-48db-9ceb-351cd32089be}</uid>
+ </MElement>
+ </base-MElement>
+ <name> Qt WebEngine Process</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{6875416f-210d-4957-b0dc-d1a92a4238ef}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{6875416f-210d-4957-b0dc-d1a92a4238ef}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{c0946aaa-51df-48db-9ceb-351cd32089be}</a>
+ <b>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{6ee7f00e-5dc3-4f45-a3ca-428390b4c74c}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Qt WebEngine Core</name>
+ <children>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{ce1e329b-b2ec-465f-bbc7-3cc75160da1a}</uid>
+ <target>
+ <instance type="MPackage">
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{ce1e329b-b2ec-465f-bbc7-3cc75160da1a}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Chromium</name>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </children>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </children>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </children>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </root-package>
+ </project>
+</qmt>
diff --git a/src/webengine/doc/images/qtwebenginewidgets-model.qmodel b/src/webengine/doc/images/qtwebenginewidgets-model.qmodel
new file mode 100644
index 000000000..aa59f7b8f
--- /dev/null
+++ b/src/webengine/doc/images/qtwebenginewidgets-model.qmodel
@@ -0,0 +1,789 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<qmt>
+ <project>
+ <uid>{388ed80a-d45a-4746-9b42-b201bdfbe66d}</uid>
+ <root-package>
+ <instance>
+ <MPackage>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{cf413898-e1a1-48a2-be84-dee757d150e1}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebenginewidgets-model</name>
+ <children>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{cb7c93b6-ed69-4e54-bca7-23edd2432e88}</uid>
+ <target>
+ <instance type="MCanvasDiagram">
+ <MCanvasDiagram>
+ <base-MDiagram>
+ <MDiagram>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{cb7c93b6-ed69-4e54-bca7-23edd2432e88}</uid>
+ </MElement>
+ </base-MElement>
+ <name>qtwebenginewidgets-model</name>
+ </MObject>
+ </base-MObject>
+ <elements>
+ <qlist>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{9d9a12d1-d237-4d4f-9b55-bdbbc99bd2b1}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{1a4983f6-27db-4f8c-90ed-f72df621c50f}</object>
+ <name>View</name>
+ <pos>x:235;y:-280</pos>
+ <rect>x:-45;y:-30;w:90;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{81687d47-fbb1-4843-a394-7d7e5e57a2ff}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</object>
+ <name>Page</name>
+ <pos>x:235;y:-195</pos>
+ <rect>x:-45;y:-30;w:90;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{e6d92a82-f898-448f-945e-26b508249746}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{99e69e48-e844-4fc0-942c-aacef280c616}</object>
+ <name>History</name>
+ <pos>x:90;y:-110</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{9ba8a864-bd21-48e5-9df4-c7065d3ab474}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</object>
+ <name>Settings</name>
+ <pos>x:235;y:-20</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{62872913-7080-421b-b12c-d3c094faa37d}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{8afe2dfe-878f-4c40-9f07-c6128611f853}</object>
+ <name>Profile</name>
+ <pos>x:380;y:-110</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{54a21438-6274-4484-9225-97a47d3514ea}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{8e94476c-6a26-4bbc-b134-54a7203a0242}</object>
+ <a>{9d9a12d1-d237-4d4f-9b55-bdbbc99bd2b1}</a>
+ <b>{81687d47-fbb1-4843-a394-7d7e5e57a2ff}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{b3f6b700-e506-471b-9341-78a57b55fb20}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{48d2b9ae-8462-4c93-9772-77f2520e2bcb}</object>
+ <a>{81687d47-fbb1-4843-a394-7d7e5e57a2ff}</a>
+ <b>{e6d92a82-f898-448f-945e-26b508249746}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{5870be46-b8c5-480b-89d0-2ecd38fea9e1}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{2ec57f83-da38-4ed1-970c-d416a5f76425}</object>
+ <a>{81687d47-fbb1-4843-a394-7d7e5e57a2ff}</a>
+ <b>{62872913-7080-421b-b12c-d3c094faa37d}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{9140249c-7a62-4e4d-846a-398e794e34c6}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{9c6691bd-75e5-40af-a662-ecb04e60744e}</object>
+ <a>{62872913-7080-421b-b12c-d3c094faa37d}</a>
+ <b>{9ba8a864-bd21-48e5-9df4-c7065d3ab474}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{97fe6f5f-a947-4c62-880d-e2d9258814dd}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{2dfae517-4615-42b9-bb33-63369291468f}</object>
+ <name>Script</name>
+ <pos>x:380;y:-20</pos>
+ <rect>x:-45;y:-30;w:90;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{3cb4f4a2-0a1d-4adb-8b72-c438a8102a2b}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{8f64c8e2-637e-482e-8565-1bbdcd203709}</object>
+ <name>Action</name>
+ <pos>x:235;y:-110</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{c962daa4-09b9-411d-a0d1-d1c7b9bd1489}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{31cff752-95b7-4994-a5fc-8794dd8a013f}</object>
+ <a>{62872913-7080-421b-b12c-d3c094faa37d}</a>
+ <b>{97fe6f5f-a947-4c62-880d-e2d9258814dd}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{a8f88107-5699-4e25-8945-1113d642fdd0}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{acca28ee-b184-4cbe-9aaa-befeac08c3bd}</object>
+ <a>{81687d47-fbb1-4843-a394-7d7e5e57a2ff}</a>
+ <b>{3cb4f4a2-0a1d-4adb-8b72-c438a8102a2b}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ <item>
+ <instance type="DComponent">
+ <DComponent>
+ <base-DObject>
+ <DObject>
+ <base-DElement>
+ <DElement>
+ <uid>{6208171a-1515-424a-bb4e-5f115b4c21fa}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{b19ba8d3-84ca-4718-b62c-575aa5d95c95}</object>
+ <name>Cookie</name>
+ <pos>x:525;y:-20</pos>
+ <rect>x:-50;y:-30;w:100;h:60</rect>
+ <visual-role>0</visual-role>
+ </DObject>
+ </base-DObject>
+ </DComponent>
+ </instance>
+ </item>
+ <item>
+ <instance type="DDependency">
+ <DDependency>
+ <base-DRelation>
+ <DRelation>
+ <base-DElement>
+ <DElement>
+ <uid>{57732b45-63fc-4d87-91fe-c9e9cbdd69ee}</uid>
+ </DElement>
+ </base-DElement>
+ <object>{b98164e7-ff69-40e7-ac1b-fe4985f451e7}</object>
+ <a>{62872913-7080-421b-b12c-d3c094faa37d}</a>
+ <b>{6208171a-1515-424a-bb4e-5f115b4c21fa}</b>
+ </DRelation>
+ </base-DRelation>
+ </DDependency>
+ </instance>
+ </item>
+ </qlist>
+ </elements>
+ <last-modified>1455889165432</last-modified>
+ <toolbarid>General</toolbarid>
+ </MDiagram>
+ </base-MDiagram>
+ </MCanvasDiagram>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{1a4983f6-27db-4f8c-90ed-f72df621c50f}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{1a4983f6-27db-4f8c-90ed-f72df621c50f}</uid>
+ </MElement>
+ </base-MElement>
+ <name>View</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{8e94476c-6a26-4bbc-b134-54a7203a0242}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{8e94476c-6a26-4bbc-b134-54a7203a0242}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{1a4983f6-27db-4f8c-90ed-f72df621c50f}</a>
+ <b>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Page</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{48d2b9ae-8462-4c93-9772-77f2520e2bcb}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{48d2b9ae-8462-4c93-9772-77f2520e2bcb}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{99e69e48-e844-4fc0-942c-aacef280c616}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{2ec57f83-da38-4ed1-970c-d416a5f76425}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{2ec57f83-da38-4ed1-970c-d416a5f76425}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{8afe2dfe-878f-4c40-9f07-c6128611f853}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{30d6d5e4-eb6b-4816-817d-5a921f823dae}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{30d6d5e4-eb6b-4816-817d-5a921f823dae}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{0011e11e-283e-4ad9-94b0-749d4465eac8}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{0011e11e-283e-4ad9-94b0-749d4465eac8}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{2dfae517-4615-42b9-bb33-63369291468f}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{c354a766-0dba-439d-9f6c-538772784181}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{c354a766-0dba-439d-9f6c-538772784181}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{8f64c8e2-637e-482e-8565-1bbdcd203709}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{acca28ee-b184-4cbe-9aaa-befeac08c3bd}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{acca28ee-b184-4cbe-9aaa-befeac08c3bd}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{e9446d69-de53-47ab-974e-1b8ae8b6edd7}</a>
+ <b>{8f64c8e2-637e-482e-8565-1bbdcd203709}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{99e69e48-e844-4fc0-942c-aacef280c616}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{99e69e48-e844-4fc0-942c-aacef280c616}</uid>
+ </MElement>
+ </base-MElement>
+ <name>History</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{bca413d3-d869-44ce-a68d-38e8ba6de291}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{bca413d3-d869-44ce-a68d-38e8ba6de291}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{99e69e48-e844-4fc0-942c-aacef280c616}</a>
+ <b>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Settings</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{8afe2dfe-878f-4c40-9f07-c6128611f853}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{8afe2dfe-878f-4c40-9f07-c6128611f853}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Profile</name>
+ <relations>
+ <handles>
+ <handles>
+ <qlist>
+ <item>
+ <handle>
+ <uid>{9c6691bd-75e5-40af-a662-ecb04e60744e}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{9c6691bd-75e5-40af-a662-ecb04e60744e}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{8afe2dfe-878f-4c40-9f07-c6128611f853}</a>
+ <b>{6b572233-bf3a-43a2-bfe2-e61d57a59a2e}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{31cff752-95b7-4994-a5fc-8794dd8a013f}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{31cff752-95b7-4994-a5fc-8794dd8a013f}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{8afe2dfe-878f-4c40-9f07-c6128611f853}</a>
+ <b>{2dfae517-4615-42b9-bb33-63369291468f}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{b98164e7-ff69-40e7-ac1b-fe4985f451e7}</uid>
+ <target>
+ <instance type="MDependency">
+ <MDependency>
+ <base-MRelation>
+ <MRelation>
+ <base-MElement>
+ <MElement>
+ <uid>{b98164e7-ff69-40e7-ac1b-fe4985f451e7}</uid>
+ </MElement>
+ </base-MElement>
+ <a>{8afe2dfe-878f-4c40-9f07-c6128611f853}</a>
+ <b>{b19ba8d3-84ca-4718-b62c-575aa5d95c95}</b>
+ </MRelation>
+ </base-MRelation>
+ </MDependency>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </relations>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{2dfae517-4615-42b9-bb33-63369291468f}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{2dfae517-4615-42b9-bb33-63369291468f}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Script</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{8f64c8e2-637e-482e-8565-1bbdcd203709}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{8f64c8e2-637e-482e-8565-1bbdcd203709}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Action</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ <item>
+ <handle>
+ <uid>{b19ba8d3-84ca-4718-b62c-575aa5d95c95}</uid>
+ <target>
+ <instance type="MComponent">
+ <MComponent>
+ <base-MObject>
+ <MObject>
+ <base-MElement>
+ <MElement>
+ <uid>{b19ba8d3-84ca-4718-b62c-575aa5d95c95}</uid>
+ </MElement>
+ </base-MElement>
+ <name>Cookie</name>
+ </MObject>
+ </base-MObject>
+ </MComponent>
+ </instance>
+ </target>
+ </handle>
+ </item>
+ </qlist>
+ </handles>
+ </handles>
+ </children>
+ </MObject>
+ </base-MObject>
+ </MPackage>
+ </instance>
+ </root-package>
+ </project>
+</qmt>
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 860bbbd68..f1b1b69c5 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -31,28 +31,12 @@
The Qt WebEngine module provides a web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application on platforms that do not have a native web engine.
- The web engine is not intended to function as a \e {Web Runtime}; to display web content in a
- QML application by using APIs native to the platform, use the \l{Qt WebView} module, instead.
Qt WebEngine provides C++ classes and QML types for rendering HTML, XHTML, and SVG documents,
styled using Cascading Style Sheets (CSS) and scripted with JavaScript. HTML documents can be
made fully editable by the user through the use of the \c{contenteditable} attribute on HTML
elements.
- Qt WebEngine supercedes the \l{http://doc.qt.io/archives/qt-5.3/qtwebkit-index.html}{Qt WebKit}
- module, which is based on the
- WebKit project, but has not been actively synchronized with the upstream WebKit code since
- Qt 5.2 and has been deprecated in Qt 5.5. For tips on how to change a Qt WebKit widgets
- application to use Qt WebEngine widgets, see \l{Porting from Qt WebKit to Qt WebEngine}. For new
- applications, we recommend using Qt Quick and the WebEngineView QML type.
-
- For more information about the requirements for building Qt WebEngine from source on the
- supported platforms and for other platform-specific information, see
- \l{Qt WebEngine Platform Notes}.
-
- The \l {Qt WebChannel} module can be used to create a bi-directional communication channel
- between QObject objects on the C++ side and JavaScript on the QML side.
-
\section1 Qt WebEngine Architecture
\image qtwebengine-architecture.png
@@ -82,23 +66,24 @@
\e cookies. Profiles can be used to isolate pages from each other. A typical use case is a
dedicated profile for a \e {private browsing} mode, where no information is permanently saved.
+ \note The Qt WebEngine Widgets module uses the \l{Qt Quick Scene Graph}{Qt Quick scene graph}
+ to compose the elements of a web page into one view. This means that the UI process
+ requires OpenGL ES 2.0 or OpenGL 2.0 for its rendering.
+
\section2 Qt WebEngine Module
\image qtwebengine-model.png
- The Qt WebEngine QML implementation contains the same elements as the C++ implementation,
- except that there is no separately accessible web engine page. The supported page functionality
- is integrated into the web engine view.
+ The Qt WebEngine QML implementation contains the same elements as the Qt WebEngine Widgets
+ implementation, except that there is no separately accessible web engine page.
+ The supported page functionality is integrated into the web engine view.
\section2 Qt WebEngine Core Module
The Qt WebEngine core is based on the \l {Chromium Project}. Chromium provides its own network
- and painting engines and is developed tightly together with its dependent modules, and
- therefore Qt WebEngine provides better and more reliable support for the latest HTML5
- specification than Qt WebKit. However, Qt WebEngine is thus heavier than Qt WebKit and does
- not provide direct access to the network stack and the HTML document through C++ APIs.
+ and painting engines and is developed tightly together with its dependent modules.
- Please note that Qt WebEngine is based on Chromium, but does not contain or use any services
+ \note Qt WebEngine is based on Chromium, but does not contain or use any services
or add-ons that might be part of the Chrome browser that is built and delivered by Google.
You can find more detailed information about the differences between Chromium and Chrome in this
\l{https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md}{overview}
@@ -109,30 +94,9 @@
\section2 Qt WebEngine Process
- The Qt WebEngine Process renders web pages and executes JavaScript.
-
- Chromium is tightly integrated to the \l{Qt Quick Scene Graph}{Qt Quick scene graph}, which is
- based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. This provides you with one-pass
- compositing of web content and all the Qt Quick UI. The integration to Chromium is transparent
- to developers, who just work with Qt and JavaScript.
-
- The document object model (DOM) of a page is constructed when the document is ready, typically
- when the page is completely loaded. Therefore, executing scripts as soon as a document is
- created is not suitable for DOM operations, where one has to wait until the DOM is ready.
-
- In addition, an injected script shares the same \e world as the other scripts executed on the
- page, which might lead to conflicts. To avoid this, the QWebEngineScript class and the
- WebEngineScript QML type provide implementations of the Chromium API for
- \e{Content Script Extensions}. They specify the
- script to run, the injection point, and the world where the script is run. This enables
- accessing the DOM to manipulate it within a world.
-
- \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
-
- Because the render process is separated from the GUI process, they should ideally share an
- OpenGL context to enable one process to access the resources uploaded by the other, such as
- images or textures. However, some inter-process communication is needed for safety and
- reliability, because it enables restarting a crashed process.
+ The Qt WebEngine Process is a separate executable that is used to render web pages and
+ execute JavaScript. This mitigates security issues and isolates crashes caused by specific
+ content.
\section1 Embedding Web Content into Widget Based Applications
@@ -201,6 +165,24 @@
\skipto import
\printuntil /^\}/
+ \section1 Script Injection
+
+ Qt WebEngine does not allow direct access to the document object model (DOM) of a page.
+ However, the DOM can be inspected and adapted by injecting scripts.
+
+ The DOM of a page is constructed when the document is ready, typically
+ when the page is completely loaded. Therefore, executing scripts as soon as a document is
+ created is not suitable for DOM operations, where one has to wait until the DOM is ready.
+
+ In addition, an injected script shares the same \e world as the other scripts executed on the
+ page, which might lead to conflicts. To avoid this, the QWebEngineScript class and the
+ WebEngineScript QML type provide implementations of the Chromium API for
+ \e{Content Script Extensions}. They specify the
+ script to run, the injection point, and the world where the script is run. This enables
+ accessing the DOM to manipulate it within a world.
+
+ \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported.
+
\section1 Managing Certificates
Qt WebEngine uses its own network stack, and therefore QSslConfiguration is not used to
@@ -249,4 +231,25 @@
On Windows, QtWebEngineProcess.exe is located in the bin directory of your Qt application.
For more information on deploying Qt applications, please see \l {Deploying Qt Applications}.
+
+ \section1 Platform Notes
+
+ Qt WebEngine currently supports only Windows, Linux, and OS X. Due to Chromium build
+ requirements it also often requires a newer compiler than the rest of Qt. See
+ \l{Qt WebEngine Platform Notes} for further details.
+
+ \section1 Related Modules
+
+ Qt WebEngine supersedes the \l{http://doc.qt.io/archives/qt-5.3/qtwebkit-index.html}{Qt WebKit}
+ module, which is based on the
+ WebKit project, but has not been actively synchronized with the upstream WebKit code since
+ Qt 5.2 and has been deprecated in Qt 5.5. For tips on how to change a Qt WebKit widgets
+ application to use Qt WebEngine widgets, see \l{Porting from Qt WebKit to Qt WebEngine}.
+
+ The \l{Qt WebView} module allows to use a native web browser on platforms where one is
+ available.
+
+ The \l{Qt WebChannel} module can be used to create a bi-directional communication channel
+ between QObject objects on the C++ side and JavaScript on the QML side.
+
*/
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index 0f83d0d23..63b6e30d1 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -504,10 +504,9 @@
*/
/*!
- \qmlsignal WebEngineView::loadingChanged(loadRequest)
+ \qmlsignal WebEngineView::loadingChanged(WebEngineLoadRequest loadRequest)
This signal is emitted when a page load begins, ends, or fails.
- The corresponding handler is \c onLoadingChanged.
When handling the signal with \c onLoadingChanged, various read-only
parameters are available on the \a loadRequest:
@@ -537,33 +536,27 @@
*/
/*!
- \qmlsignal WebEngineView::certificateError(error)
+ \qmlsignal WebEngineView::certificateError(WebEngineCertificateError error)
\since QtWebEngine 1.1
This signal is emitted when an invalid certificate error is raised while loading a given request.
The certificate error can be handled by using the methods of the WebEngineCertificateError
type.
-
- The corresponding handler is \c onCertificateError.
-
- \sa WebEngineCertificateError
*/
/*!
- \qmlsignal WebEngineView::linkHovered(hoveredUrl)
+ \qmlsignal WebEngineView::linkHovered(url hoveredUrl)
Within a mouse-driven interface, this signal is emitted when a mouse
pointer passes over a link, corresponding to the \c{mouseover} DOM
event. This event may also occur in touch interfaces for \c{mouseover}
events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl}
provides the link's location.
-
- The corresponding handler is \c onLinkHovered.
*/
/*!
- \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, message, lineNumber, sourceID)
+ \qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, string message, int lineNumber, string sourceID)
This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console.
For example, in case of evaluation errors the source URL may be provided in \a sourceID as well
@@ -572,14 +565,14 @@
\a level indicates the severity of the event that triggered the message, that is, whether it
was triggered by an error or a less severe event.
- The corresponding handler is \c onJavaScriptConsoleMessage. If no handler is specified,
- the view will log the messages into a \c js \l{QLoggingCategory}{logging category}.
+ If no handler is specified, the view will log the messages into a \c js
+ \l{QLoggingCategory}{logging category}.
\sa{Console Logging}
*/
/*!
- \qmlsignal WebEngineView::newViewRequested(request)
+ \qmlsignal WebEngineView::newViewRequested(WebEngineViewRequest request)
\since QtWebEngine 1.1
This signal is emitted when a page load is requested to happen in a separate
@@ -594,9 +587,7 @@
\snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0
- The corresponding handler is \c onNewViewRequested.
-
- \sa WebEngineNewViewRequest, NewViewDestination, {WebEngine Quick Nano Browser}
+ \sa NewViewDestination, {WebEngine Quick Nano Browser}
*/
/*!
@@ -606,13 +597,11 @@
This signal is emitted when the web page requests fullscreen mode through the
JavaScript API.
- The corresponding handler is \c onFullScreenRequested.
-
- \sa WebEngineFullScreenRequest, isFullScreen
+ \sa isFullScreen
*/
/*!
- \qmlsignal WebEngineView::activeFocusOnPressChanged(bool)
+ \qmlsignal WebEngineView::activeFocusOnPressChanged(bool activeFocusOnPress)
\since QtWebEngine 1.2
This signal is emitted when the ability of the web engine view to get focus when clicked
@@ -646,8 +635,6 @@
This signal is emitted whenever the page requests the web browser window to be closed,
for example through the JavaScript \c{window.close()} call.
-
- The corresponding handler is \c onWindowCloseRequested.
*/
/*!
@@ -799,7 +786,9 @@
\value ToggleMediaMute
Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
\value DownloadLinkToDisk
- Download the current link to the disk. (Added in Qt 5.6)
+ Download the current link to the disk. To implement download
+ actions, connect to the QWebEngineProfile::downloadRequested signal.
+ (Added in Qt 5.6)
\value DownloadImageToDisk
Download the highlighted image to the disk. (Added in Qt 5.6)
\value DownloadMediaToDisk
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 3b75480f9..bfb0dd0e8 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -88,7 +88,6 @@ QWebEngineDownloadItemPrivate::QWebEngineDownloadItemPrivate(QWebEngineProfilePr
QWebEngineDownloadItemPrivate::~QWebEngineDownloadItemPrivate()
{
- profile->downloadDestroyed(downloadId);
}
void QWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::DownloadItemInfo &info)
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index db1915b9f..e4b10faa6 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -81,6 +81,7 @@
#include <QMimeData>
#include <QStandardPaths>
#include <QStyle>
+#include <QTimer>
#include <QUrl>
#include <private/qguiapplication_p.h>
@@ -127,13 +128,13 @@ QWebEnginePage::WebAction editorActionForKeyEvent(QKeyEvent* event)
}
QWebEnginePagePrivate::QWebEnginePagePrivate(QWebEngineProfile *_profile)
- : adapter(new WebContentsAdapter)
+ : adapter(QSharedPointer<WebContentsAdapter>::create())
, history(new QWebEngineHistory(new QWebEngineHistoryPrivate(this)))
, profile(_profile ? _profile : QWebEngineProfile::defaultProfile())
, settings(new QWebEngineSettings(profile->settings()))
, view(0)
, isLoading(false)
- , scriptCollection(new QWebEngineScriptCollectionPrivate(browserContextAdapter()->userResourceController(), adapter.data()))
+ , scriptCollection(new QWebEngineScriptCollectionPrivate(browserContextAdapter()->userResourceController(), adapter))
, m_isBeingAdopted(false)
, m_backgroundColor(Qt::white)
, fullscreenMode(false)
@@ -284,7 +285,7 @@ void QWebEnginePagePrivate::unhandledKeyEvent(QKeyEvent *event)
QGuiApplication::sendEvent(view->parentWidget(), event);
}
-void QWebEnginePagePrivate::adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry)
+void QWebEnginePagePrivate::adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry)
{
Q_Q(QWebEnginePage);
Q_UNUSED(userGesture);
@@ -293,6 +294,20 @@ void QWebEnginePagePrivate::adoptNewWindow(WebContentsAdapter *newWebContents, W
if (!newPage)
return;
+ if (newPage->d_func() == this) {
+ // If createWindow returns /this/ we must delay the adoption.
+ Q_ASSERT(q == newPage);
+ QTimer::singleShot(0, q, [this, newPage, newWebContents, initialGeometry] () {
+ adoptNewWindowImpl(newPage, newWebContents, initialGeometry);
+ });
+ } else {
+ adoptNewWindowImpl(newPage, newWebContents, initialGeometry);
+ }
+}
+
+void QWebEnginePagePrivate::adoptNewWindowImpl(QWebEnginePage *newPage,
+ const QSharedPointer<WebContentsAdapter> &newWebContents, const QRect &initialGeometry)
+{
// Mark the new page as being in the process of being adopted, so that a second mouse move event
// sent by newWebContents->initialize() gets filtered in RenderWidgetHostViewQt::forwardEvent.
// The first mouse move event is being sent by q->createWindow(). This is necessary because
@@ -305,12 +320,11 @@ void QWebEnginePagePrivate::adoptNewWindow(WebContentsAdapter *newWebContents, W
newPage->d_func()->m_isBeingAdopted = true;
// Overwrite the new page's WebContents with ours.
- if (newPage->d_func() != this) {
- newPage->d_func()->adapter = newWebContents;
- newWebContents->initialize(newPage->d_func());
- if (!initialGeometry.isEmpty())
- emit newPage->geometryChangeRequested(initialGeometry);
- }
+ newPage->d_func()->adapter = newWebContents;
+ newWebContents->initialize(newPage->d_func());
+ newPage->d_func()->scriptCollection.d->rebindToContents(newWebContents);
+ if (!initialGeometry.isEmpty())
+ emit newPage->geometryChangeRequested(initialGeometry);
// Page has finished the adoption process.
newPage->d_func()->m_isBeingAdopted = false;
@@ -487,16 +501,13 @@ void QWebEnginePagePrivate::_q_webActionTriggered(bool checked)
void QWebEnginePagePrivate::recreateFromSerializedHistory(QDataStream &input)
{
- QExplicitlySharedDataPointer<WebContentsAdapter> newWebContents = WebContentsAdapter::createFromSerializedNavigationHistory(input, this);
+ QSharedPointer<WebContentsAdapter> newWebContents = WebContentsAdapter::createFromSerializedNavigationHistory(input, this);
if (newWebContents) {
- // Keep the old adapter referenced so the user-scripts are not
- // unregistered immediately.
- QExplicitlySharedDataPointer<WebContentsAdapter> oldWebContents = adapter;
- adapter = newWebContents.data();
+ adapter = std::move(newWebContents);
adapter->initialize(this);
if (webChannel)
adapter->setWebChannel(webChannel, webChannelWorldId);
- scriptCollection.d->rebindToContents(adapter.data());
+ scriptCollection.d->rebindToContents(adapter);
}
}
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index 089dc1cc6..96640a63a 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -100,7 +100,10 @@ public:
virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
+ virtual void adoptNewWindow(QSharedPointer<QtWebEngineCore::WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
+ void adoptNewWindowImpl(QWebEnginePage *newPage,
+ const QSharedPointer<QtWebEngineCore::WebContentsAdapter> &newWebContents,
+ const QRect &initialGeometry);
virtual bool isBeingAdopted() Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
virtual void windowCloseRejected() Q_DECL_OVERRIDE;
@@ -155,7 +158,7 @@ public:
void setFullScreenMode(bool);
- QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> adapter;
+ QSharedPointer<QtWebEngineCore::WebContentsAdapter> adapter;
QWebEngineHistory *history;
QWebEngineProfile *profile;
QWebEngineSettings *settings;
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
index a31c26a16..4b77b4699 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection.cpp
+++ b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
@@ -167,7 +167,7 @@ QList<QWebEngineScript> QWebEngineScriptCollection::toList() const
}
-QWebEngineScriptCollectionPrivate::QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserResourceControllerHost *controller, QtWebEngineCore::WebContentsAdapter *webContents)
+QWebEngineScriptCollectionPrivate::QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserResourceControllerHost *controller, QSharedPointer<QtWebEngineCore::WebContentsAdapter> webContents)
: m_scriptController(controller)
, m_contents(webContents)
{
@@ -175,32 +175,32 @@ QWebEngineScriptCollectionPrivate::QWebEngineScriptCollectionPrivate(QtWebEngine
int QWebEngineScriptCollectionPrivate::count() const
{
- return m_scriptController->registeredScripts(m_contents).count();
+ return m_scriptController->registeredScripts(m_contents.data()).count();
}
bool QWebEngineScriptCollectionPrivate::contains(const QWebEngineScript &s) const
{
- return m_scriptController->containsUserScript(*s.d, m_contents);
+ return m_scriptController->containsUserScript(*s.d, m_contents.data());
}
void QWebEngineScriptCollectionPrivate::insert(const QWebEngineScript &script)
{
if (!script.d)
return;
- m_scriptController->addUserScript(*script.d, m_contents);
+ m_scriptController->addUserScript(*script.d, m_contents.data());
}
bool QWebEngineScriptCollectionPrivate::remove(const QWebEngineScript &script)
{
if (!script.d)
return false;
- return m_scriptController->removeUserScript(*script.d, m_contents);
+ return m_scriptController->removeUserScript(*script.d, m_contents.data());
}
QList<QWebEngineScript> QWebEngineScriptCollectionPrivate::toList(const QString &scriptName) const
{
QList<QWebEngineScript> ret;
- Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents))
+ Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents.data()))
if (scriptName.isNull() || scriptName == script.name())
ret.append(QWebEngineScript(script));
return ret;
@@ -208,7 +208,7 @@ QList<QWebEngineScript> QWebEngineScriptCollectionPrivate::toList(const QString
QWebEngineScript QWebEngineScriptCollectionPrivate::find(const QString &name) const
{
- Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents))
+ Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents.data()))
if (name == script.name())
return QWebEngineScript(script);
return QWebEngineScript();
@@ -216,22 +216,22 @@ QWebEngineScript QWebEngineScriptCollectionPrivate::find(const QString &name) co
void QWebEngineScriptCollectionPrivate::clear()
{
- m_scriptController->clearAllScripts(m_contents);
+ m_scriptController->clearAllScripts(m_contents.data());
}
void QWebEngineScriptCollectionPrivate::reserve(int capacity)
{
- m_scriptController->reserve(m_contents, capacity);
+ m_scriptController->reserve(m_contents.data(), capacity);
}
-void QWebEngineScriptCollectionPrivate::rebindToContents(QtWebEngineCore::WebContentsAdapter *page)
+void QWebEngineScriptCollectionPrivate::rebindToContents(QSharedPointer<QtWebEngineCore::WebContentsAdapter> contents)
{
Q_ASSERT(m_contents);
- Q_ASSERT(page);
- Q_ASSERT(m_contents != page);
+ Q_ASSERT(contents);
+ Q_ASSERT(m_contents != contents);
- Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents)) {
- m_scriptController->addUserScript(script, page);
+ Q_FOREACH (const UserScript &script, m_scriptController->registeredScripts(m_contents.data())) {
+ m_scriptController->addUserScript(script, contents.data());
}
- m_contents = page;
+ m_contents = contents;
}
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection_p.h b/src/webenginewidgets/api/qwebenginescriptcollection_p.h
index 008453224..fa4b4d790 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection_p.h
+++ b/src/webenginewidgets/api/qwebenginescriptcollection_p.h
@@ -54,25 +54,26 @@
#include "qtwebenginewidgetsglobal.h"
#include "qwebenginescript.h"
+#include "web_contents_adapter.h"
#include <QtCore/QSet>
+#include <QtCore/QSharedPointer>
namespace QtWebEngineCore {
class UserResourceControllerHost;
-class WebContentsAdapter;
} // namespace
QT_BEGIN_NAMESPACE
class QWebEngineScriptCollectionPrivate {
public:
- QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserResourceControllerHost *, QtWebEngineCore::WebContentsAdapter * = 0);
+ QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserResourceControllerHost *, QSharedPointer<QtWebEngineCore::WebContentsAdapter> = QSharedPointer<QtWebEngineCore::WebContentsAdapter>());
int count() const;
bool contains(const QWebEngineScript &) const;
QList<QWebEngineScript> toList(const QString &scriptName = QString()) const;
QWebEngineScript find(const QString & name) const;
- void rebindToContents(QtWebEngineCore::WebContentsAdapter *contents);
+ void rebindToContents(QSharedPointer<QtWebEngineCore::WebContentsAdapter> contents);
void insert(const QWebEngineScript &);
bool remove(const QWebEngineScript &);
@@ -81,7 +82,7 @@ public:
private:
QtWebEngineCore::UserResourceControllerHost *m_scriptController;
- QtWebEngineCore::WebContentsAdapter *m_contents;
+ QSharedPointer<QtWebEngineCore::WebContentsAdapter> m_contents;
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index f652b1d5f..7bc7ff48d 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -35,6 +35,13 @@
\l{http://doc.qt.io/archives/qt-5.3/qml-qtwebkit-webview.html}{QWebView API} to use the
\l{Qt WebEngine} QWebEngineView.
+ \section1 Architecture
+
+ Chromium provides its own network and painting engines, which Qt WebEngine uses. This, among
+ other things, allows Qt WebEngine to provide better and more reliable support for the latest
+ HTML5 specification than Qt WebKit. However, Qt WebEngine is thus also heavier than Qt WebKit
+ and does not provide direct access to the network stack and the HTML document through C++ APIs.
+
\section1 Class Names
The Qt WebEngine equivalent of Qt WebKit C++ classes are prefixed by
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index f0385a252..28c40fed5 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -269,6 +269,13 @@ QVariant RenderWidgetHostViewQtDelegateWidget::inputMethodQuery(Qt::InputMethodQ
void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent)
{
QOpenGLWidget::resizeEvent(resizeEvent);
+
+ const QPoint globalPos = mapToGlobal(pos());
+ if (globalPos != m_lastGlobalPos) {
+ m_lastGlobalPos = globalPos;
+ m_client->windowBoundsChanged();
+ }
+
m_client->notifyResize();
}
@@ -387,6 +394,7 @@ void RenderWidgetHostViewQtDelegateWidget::paintGL()
void RenderWidgetHostViewQtDelegateWidget::onWindowPosChanged()
{
+ m_lastGlobalPos = mapToGlobal(pos());
m_client->windowBoundsChanged();
}
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
index 9fd0cdc48..7307bcd55 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -104,6 +104,7 @@ private:
QScopedPointer<QSGAbstractRenderer> m_sgRenderer;
bool m_isPopup;
QColor m_clearColor;
+ QPoint m_lastGlobalPos;
QList<QMetaObject::Connection> m_windowConnections;
};
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/BLACKLIST b/tests/auto/quick/qquickwebengineviewgraphics/BLACKLIST
new file mode 100644
index 000000000..9ec23eb6d
--- /dev/null
+++ b/tests/auto/quick/qquickwebengineviewgraphics/BLACKLIST
@@ -0,0 +1,2 @@
+[showHideShow]
+*
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
index 606f5af9c..2b9742b99 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
+++ b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
@@ -79,9 +79,7 @@ private Q_SLOTS:
private:
void setHtml(const QString &html);
QScopedPointer<TestView> m_view;
-#ifdef ENABLE_QML_TESTSUPPORT_API
QScopedPointer<QQuickWebEngineTestSupport> m_testSupport;
-#endif
};
static const QString greenSquare("<div style=\"background-color: #00ff00; position:absolute; left:50px; top: 50px; width: 50px; height: 50px;\"></div>");
@@ -112,9 +110,7 @@ tst_QQuickWebEngineViewGraphics::~tst_QQuickWebEngineViewGraphics()
void tst_QQuickWebEngineViewGraphics::initTestCase()
{
QtWebEngine::initialize();
-#ifdef ENABLE_QML_TESTSUPPORT_API
m_testSupport.reset(new QQuickWebEngineTestSupport);
-#endif
}
void tst_QQuickWebEngineViewGraphics::init()
@@ -191,9 +187,7 @@ void tst_QQuickWebEngineViewGraphics::setHtml(const QString &html)
QQuickWebEngineView *webEngineView = static_cast<QQuickWebEngineView *>(m_view->rootObject());
webEngineView->setProperty("url", QUrl(QStringLiteral("data:text/html,%1").arg(htmlData)));
-#ifdef ENABLE_QML_TESTSUPPORT_API
webEngineView->setTestSupport(m_testSupport.data());
-#endif
QVERIFY(waitForViewportReady(webEngineView));
QCOMPARE(m_view->rootObject()->property("loading"), QVariant(false));
}
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index b278808f6..d220348ab 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -4,7 +4,10 @@ SUBDIRS += \
inspectorserver \
publicapi \
qquickwebenginedefaultsurfaceformat \
- qquickwebengineview \
- qquickwebengineviewgraphics
+ qquickwebengineview
-isQMLTestSupportApiEnabled(): SUBDIRS += qmltests
+isQMLTestSupportApiEnabled() {
+ SUBDIRS += \
+ qmltests \
+ qquickwebengineviewgraphics
+}
diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST
index 507fb7dbd..d435fadca 100644
--- a/tests/auto/widgets/qwebenginepage/BLACKLIST
+++ b/tests/auto/widgets/qwebenginepage/BLACKLIST
@@ -1,3 +1,6 @@
+[comboBoxPopupPositionAfterMove]
+linux
+
[macCopyUnicodeToClipboard]
osx
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 2f7bfb39f..a8730ce0d 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -24,10 +24,12 @@
#include <QClipboard>
#include <QDir>
#include <QGraphicsWidget>
+#include <QHBoxLayout>
#include <QLineEdit>
#include <QMainWindow>
#include <QMenu>
#include <QMimeDatabase>
+#include <QOpenGLWidget>
#include <QPaintEngine>
#include <QPushButton>
#include <QStateMachine>
@@ -114,6 +116,8 @@ private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void thirdPartyCookiePolicy();
+ void comboBoxPopupPositionAfterMove();
+ void comboBoxPopupPositionAfterChildMove();
void contextMenuCopy();
void contextMenuPopulatedOnce();
void acceptNavigationRequest();
@@ -144,7 +148,6 @@ private Q_SLOTS:
void textEditing();
void backActionUpdate();
void protectBindingsRuntimeObjectsFromCollector();
- void localURLSchemes();
void testOptionalJSObjects();
void testLocalStorageVisibility();
void testEnablePersistentStorage();
@@ -241,6 +244,8 @@ private Q_SLOTS:
void printToPdf();
private:
+ static QPoint elementCenter(QWebEnginePage *page, const QString &id);
+
QWebEngineView* m_view;
QWebEnginePage* m_page;
QWebEngineView* m_inputFieldsTestView;
@@ -2467,34 +2472,6 @@ void tst_QWebEnginePage::protectBindingsRuntimeObjectsFromCollector()
#endif
}
-void tst_QWebEnginePage::localURLSchemes()
-{
-#if !defined(QWEBENGINESECURITYORIGIN)
- QSKIP("QWEBENGINESECURITYORIGIN");
-#else
- int i = QWebEngineSecurityOrigin::localSchemes().size();
-
- QWebEngineSecurityOrigin::removeLocalScheme("file");
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i);
- QWebEngineSecurityOrigin::addLocalScheme("file");
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i);
-
- QWebEngineSecurityOrigin::removeLocalScheme("qrc");
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i - 1);
- QWebEngineSecurityOrigin::addLocalScheme("qrc");
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i);
-
- QString myscheme = "myscheme";
- QWebEngineSecurityOrigin::addLocalScheme(myscheme);
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i + 1);
- QVERIFY(QWebEngineSecurityOrigin::localSchemes().contains(myscheme));
- QWebEngineSecurityOrigin::removeLocalScheme(myscheme);
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i);
- QWebEngineSecurityOrigin::removeLocalScheme(myscheme);
- QTRY_COMPARE(QWebEngineSecurityOrigin::localSchemes().size(), i);
-#endif
-}
-
#if defined(QWEBENGINEPAGE_SETTINGS)
static inline bool testFlag(QWebEnginePage& webPage, QWebEngineSettings::WebAttribute settingAttribute, const QString& jsObjectName, bool settingValue)
{
@@ -2977,31 +2954,26 @@ void tst_QWebEnginePage::findText()
QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
m_page->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>"));
QTRY_COMPARE(loadSpy.count(), 1);
+
+ // Select whole page contents.
m_page->triggerAction(QWebEnginePage::SelectAll);
QTRY_COMPARE(m_page->hasSelection(), true);
-#if defined(QWEBENGINEPAGE_SELECTEDHTML)
- QVERIFY(!m_page->selectedHtml().isEmpty());
-#endif
+
+ // Invoke a stopFinding() operation, which should clear the currently selected text.
m_page->findText("");
- QEXPECT_FAIL("", "Unsupported: findText only highlights and doesn't update the selection.", Continue);
- QVERIFY(m_page->selectedText().isEmpty());
-#if defined(QWEBENGINEPAGE_SELECTEDHTML)
- QVERIFY(m_page->selectedHtml().isEmpty());
-#endif
+ QTRY_VERIFY(m_page->selectedText().isEmpty());
+
QStringList words = (QStringList() << "foo" << "bar");
foreach (QString subString, words) {
+ // Invoke a find operation, which should clear the currently selected text, should
+ // highlight all the found ocurrences, but should not update the selected text to the
+ // searched for string.
m_page->findText(subString);
- QEXPECT_FAIL("", "Unsupported: findText only highlights and doesn't update the selection.", Continue);
- QCOMPARE(m_page->selectedText(), subString);
-#if defined(QWEBENGINEPAGE_SELECTEDHTML)
- QVERIFY(m_page->selectedHtml().contains(subString));
-#endif
+ QTRY_VERIFY(m_page->selectedText().isEmpty());
+
+ // Search highlights should be cleared, selected text should still be empty.
m_page->findText("");
- QEXPECT_FAIL("", "Unsupported: findText only highlights and doesn't update the selection.", Continue);
- QVERIFY(m_page->selectedText().isEmpty());
-#if defined(QWEBENGINEPAGE_SELECTEDHTML)
- QVERIFY(m_page->selectedHtml().isEmpty());
-#endif
+ QTRY_VERIFY(m_page->selectedText().isEmpty());
}
}
@@ -3154,6 +3126,96 @@ void tst_QWebEnginePage::thirdPartyCookiePolicy()
#endif
}
+static QWindow *findNewTopLevelWindow(const QWindowList &oldTopLevelWindows)
+{
+ const auto tlws = QGuiApplication::topLevelWindows();
+ for (auto w : tlws) {
+ if (!oldTopLevelWindows.contains(w)) {
+ return w;
+ }
+ }
+ return nullptr;
+}
+
+void tst_QWebEnginePage::comboBoxPopupPositionAfterMove()
+{
+ QScreen *screen = QGuiApplication::primaryScreen();
+ QWebEngineView view;
+ view.move(screen->availableGeometry().topLeft());
+ view.resize(640, 480);
+ view.show();
+
+ QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
+ view.setHtml(QLatin1String("<html><head></head><body><select id='foo'>"
+ "<option>fran</option><option>troz</option>"
+ "</select></body></html>"));
+ QTRY_COMPARE(loadSpy.count(), 1);
+ const auto oldTlws = QGuiApplication::topLevelWindows();
+ QWindow *window = view.windowHandle();
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(),
+ elementCenter(view.page(), "foo"));
+
+ QWindow *popup = nullptr;
+ QTRY_VERIFY(popup = findNewTopLevelWindow(oldTlws));
+ QPoint popupPos = popup->position();
+
+ // Close the popup by clicking somewhere into the page.
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(1, 1));
+ QTRY_VERIFY(!QGuiApplication::topLevelWindows().contains(popup));
+
+ // Move the top-level QWebEngineView a little and check the popup's position.
+ const QPoint offset(12, 13);
+ view.move(screen->availableGeometry().topLeft() + offset);
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(),
+ elementCenter(view.page(), "foo"));
+ QTRY_VERIFY(popup = findNewTopLevelWindow(oldTlws));
+ QCOMPARE(popupPos + offset, popup->position());
+}
+
+void tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove()
+{
+ QWidget mainWidget;
+ mainWidget.setLayout(new QHBoxLayout);
+
+ QWidget spacer;
+ spacer.setMinimumWidth(50);
+ mainWidget.layout()->addWidget(&spacer);
+
+ QWebEngineView view;
+ mainWidget.layout()->addWidget(&view);
+
+ QScreen *screen = QGuiApplication::primaryScreen();
+ mainWidget.move(screen->availableGeometry().topLeft());
+ mainWidget.resize(640, 480);
+ mainWidget.show();
+
+ QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
+ view.setHtml(QLatin1String("<html><head></head><body><select autofocus id='foo'>"
+ "<option value=\"narf\">narf</option><option>zort</option>"
+ "</select></body></html>"));
+ QTRY_COMPARE(loadSpy.count(), 1);
+ const auto oldTlws = QGuiApplication::topLevelWindows();
+ QWindow *window = view.window()->windowHandle();
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(),
+ view.mapTo(view.window(), elementCenter(view.page(), "foo")));
+
+ QWindow *popup = nullptr;
+ QTRY_VERIFY(popup = findNewTopLevelWindow(oldTlws));
+ QPoint popupPos = popup->position();
+
+ // Close the popup by clicking somewhere into the page.
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(),
+ view.mapTo(view.window(), QPoint(1, 1)));
+ QTRY_VERIFY(!QGuiApplication::topLevelWindows().contains(popup));
+
+ // Resize the "spacer" widget, and implicitly change the global position of the QWebEngineView.
+ spacer.setMinimumWidth(100);
+ QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(),
+ view.mapTo(view.window(), elementCenter(view.page(), "foo")));
+ QTRY_VERIFY(popup = findNewTopLevelWindow(oldTlws));
+ QCOMPARE(popupPos + QPoint(50, 0), popup->position());
+}
+
#ifdef Q_OS_MAC
void tst_QWebEnginePage::macCopyUnicodeToClipboard()
{
@@ -4927,5 +4989,22 @@ void tst_QWebEnginePage::mouseButtonTranslation()
delete view;
}
+QPoint tst_QWebEnginePage::elementCenter(QWebEnginePage *page, const QString &id)
+{
+ QVariantList rectList = evaluateJavaScriptSync(page,
+ "(function(){"
+ "var elem = document.getElementById('" + id + "');"
+ "var rect = elem.getBoundingClientRect();"
+ "return [(rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2];"
+ "})()").toList();
+
+ if (rectList.count() != 2) {
+ qWarning("elementCenter failed.");
+ return QPoint();
+ }
+
+ return QPoint(rectList.at(0).toInt(), rectList.at(1).toInt());
+}
+
QTEST_MAIN(tst_QWebEnginePage)
#include "tst_qwebenginepage.moc"
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index a399f5565..579a0f776 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -35,6 +35,7 @@
#include <QtWebEngineWidgets/qwebenginepage.h>
#include <QtWebEngineWidgets/qwebenginesettings.h>
#include <QtWebEngineWidgets/qwebengineview.h>
+#include <QtWebEngineWidgets/qwebenginedownloaditem.h>
class tst_QWebEngineProfile : public QObject
{
@@ -50,6 +51,7 @@ private Q_SLOTS:
void urlSchemeHandlerFailOnRead();
void customUserAgent();
void httpAcceptLanguage();
+ void downloadItem();
};
void tst_QWebEngineProfile::defaultProfile()
@@ -362,5 +364,16 @@ void tst_QWebEngineProfile::httpAcceptLanguage()
QCOMPARE(evaluateJavaScriptSync(&page, QStringLiteral("navigator.languages")).toStringList(), QStringList(testLang));
}
+void tst_QWebEngineProfile::downloadItem()
+{
+ qRegisterMetaType<QWebEngineDownloadItem *>();
+ QWebEngineProfile testProfile;
+ QWebEnginePage page(&testProfile);
+ QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadItem *)));
+ connect(&testProfile, &QWebEngineProfile::downloadRequested, this, [=] (QWebEngineDownloadItem *item) { item->accept(); });
+ page.load(QUrl::fromLocalFile(QCoreApplication::applicationFilePath()));
+ QTRY_COMPARE(downloadSpy.count(), 1);
+}
+
QTEST_MAIN(tst_QWebEngineProfile)
#include "tst_qwebengineprofile.moc"
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index d896364ed..26f8d0f06 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -108,7 +108,8 @@ if __name__ == '__main__':
break
if not gyp_file_specified:
- args.append(os.path.join(root_dir, 'src/core/core.gyp'))
+ args.append(os.path.join(root_dir, 'src/core/resources/resources.gyp'))
+ args.append(os.path.join(output_dir, 'core_generated.gyp'))
args.extend(['-I' + i for i in additional_include_files(args)])
@@ -154,7 +155,7 @@ if __name__ == '__main__':
# Tweak the output location and format (hardcode ninja for now if not set)
args.extend(['--generator-output', '.'])
- args.extend(['-Goutput_dir='+ os.path.relpath(output_dir, qtwebengine_root)])
+ args.extend(['-Goutput_dir='+ purifyGypVarPath(os.path.relpath(output_dir, qtwebengine_root))])
# Tell gyp not to try finding cl.exe on Windows, Qt already requires the env to be set prior to the build.
args.extend(['-G', 'ninja_use_custom_environment_files'])
diff --git a/tools/qmake/mkspecs/features/gyp_generator.prf b/tools/qmake/mkspecs/features/gyp_generator.prf
index 0ba6de09c..4cf7cd2f4 100644
--- a/tools/qmake/mkspecs/features/gyp_generator.prf
+++ b/tools/qmake/mkspecs/features/gyp_generator.prf
@@ -6,8 +6,8 @@ load(functions)
load(moc)
load(resources)
-MOC_GEN_DIR = <(SHARED_INTERMEDIATE_DIR)/moc
-RCC_GEN_DIR = <(SHARED_INTERMEDIATE_DIR)/rcc
+MOC_GEN_DIR = $$MOC_DIR
+RCC_GEN_DIR = $$RCC_DIR
defineReplace(mocAction) {
INPUT_FILE = $$1
@@ -21,11 +21,11 @@ defineReplace(mocAction) {
OUTPUT_FILE = $$MOC_GEN_DIR/$${OUTPUT_NAME}
contents = " {" \
" 'action_name':'$$OUTPUT_NAME'," \
- " 'inputs': ['$$INPUT_FILE',]," \
+ " 'inputs': ['$$GYPSRCDIR//$$INPUT_FILE',]," \
" 'outputs': ['$$OUTPUT_FILE',]," \
" 'action': ["
for(token, MOC_COMMAND): contents += " '$$replace(token,\',)',"
- contents += " '$$INPUT_FILE'," \
+ contents += " '$$GYPSRCDIR/$$INPUT_FILE'," \
" '-o'," \
" '$$OUTPUT_FILE'," \
" ]," \
@@ -42,14 +42,14 @@ defineReplace(rccAction) {
CLEAN_QMAKE_RCC = $$clean_path($$QMAKE_RCC)
contents = " {" \
" 'action_name':'$$OUTPUT_NAME'," \
- " 'inputs': ['$$INPUT_FILE',]," \
+ " 'inputs': ['$$GYPSRCDIR//$$INPUT_FILE',]," \
" 'outputs': ['$$OUTPUT_FILE',]," \
" 'action': [" \
" '$$replace(CLEAN_QMAKE_RCC,\',)',"
for(resource_flag, $$QMAKE_RESOURCE_FLAGS): contents += " '$$resource_flag',"
contents += " '-name'," \
" '$$EXTERN_FUNC'," \
- " '$$INPUT_FILE'," \
+ " '$$GYPSRCDIR/$$INPUT_FILE'," \
" '-o'," \
" '$$OUTPUT_FILE',"
contents += " ]," \
@@ -76,6 +76,12 @@ for (incl, GYPINCLUDES): GYP_CONTENTS += " '$$incl',"
GYP_CONTENTS += " ],"
}
+!isEmpty(GYPDEPENDENCIES) {
+GYP_CONTENTS += " 'dependencies': ["
+for (depend, GYPDEPENDENCIES): GYP_CONTENTS += " '$$depend',"
+GYP_CONTENTS += " ],"
+}
+
!isEmpty(QMAKE_FRAMEWORKPATH) {
GYP_CONTENTS += " 'mac_framework_dirs': ["
for(path, QMAKE_FRAMEWORKPATH): GYP_CONTENTS += " '$$path',"
@@ -107,8 +113,8 @@ GYP_CONTENTS += " ],"
# Source files to compile
GYP_CONTENTS += " 'sources': ["
-for (sourcefile, SOURCES): GYP_CONTENTS += " '$$sourcefile',"
-for (headerfile, HEADERS): GYP_CONTENTS += " '$$headerfile',"
+for (sourcefile, SOURCES): GYP_CONTENTS += " '$$GYPSRCDIR/$$sourcefile',"
+for (headerfile, HEADERS): GYP_CONTENTS += " '$$GYPSRCDIR/$$headerfile',"
# Add Sources generated by rcc from qrc files.
for (resourcefile, RESOURCES) {
@@ -128,8 +134,6 @@ for (mocable, MOCABLES) {
GYP_CONTENTS += " ],"
GYP_CONTENTS += " 'include_dirs': ["
for (path, INCLUDEPATH): GYP_CONTENTS += " '$$path',"
-# qmake already added MOC_DIR to INCLUDEPATH, but we're telling gyp to use a different one.
-GYP_CONTENTS += " '$$MOC_GEN_DIR',"
GYP_CONTENTS += " ],"
# Generate the actions for moc and rcc