summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-04 07:29:26 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-05 11:35:18 +0200
commit179463fd2b17343dae291ab6f7617311bcfbdb75 (patch)
treee32e298ca5d6e2b6e206dab7d42538a6ce68eba1
parentc8851dd1a77e730bc6a3c17b7c75b1a4c6b41f53 (diff)
parent336e706cbc839dd7b7c1d461b6b015600b5f009e (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Also blacklist tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove() and comboBoxPopupPositionAfterMove(). Conflicts: .qmake.conf src/3rdparty src/core/render_widget_host_view_qt.cpp src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-platform-notes.qdoc src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h tests/auto/widgets/qwebenginepage/BLACKLIST tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp tools/qmake/mkspecs/features/functions.prf Task-number: QTBUG-55158 Change-Id: I1d73ac9b3ca5293ad3c7e3a56f4c395da930e6f4
-rw-r--r--.gitignore1
-rw-r--r--examples/webengine/minimal/doc/src/minimal.qdoc7
-rw-r--r--examples/webengine/minimal/main.cpp2
-rw-r--r--examples/webengine/quicknanobrowser/main.cpp2
-rw-r--r--examples/webenginewidgets/contentmanipulation/main.cpp1
-rw-r--r--examples/webenginewidgets/cookiebrowser/main.cpp1
-rw-r--r--examples/webenginewidgets/demobrowser/browsermainwindow.cpp22
-rw-r--r--examples/webenginewidgets/demobrowser/history.cpp10
-rw-r--r--examples/webenginewidgets/demobrowser/history.h2
-rw-r--r--examples/webenginewidgets/demobrowser/main.cpp1
-rw-r--r--examples/webenginewidgets/markdowneditor/main.cpp1
-rw-r--r--examples/webenginewidgets/minimal/doc/src/minimal.qdoc5
-rw-r--r--examples/webenginewidgets/minimal/main.cpp1
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp22
-rw-r--r--examples/webenginewidgets/simplebrowser/main.cpp2
m---------src/3rdparty0
-rw-r--r--src/core/browser_context_adapter.cpp10
-rw-r--r--src/core/browser_context_adapter.h1
-rw-r--r--src/core/config/mac_osx.pri5
-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.pro15
-rw-r--r--src/core/proxy_config_service_qt.cpp1
-rw-r--r--src/core/qtwebengine.gypi2
-rw-r--r--src/core/render_widget_host_view_qt.cpp89
-rw-r--r--src/core/render_widget_host_view_qt.h1
-rw-r--r--src/core/resources/resources.gyp16
-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_channel_ipc_transport_host.cpp7
-rw-r--r--src/core/web_channel_ipc_transport_host.h3
-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.cpp24
-rw-r--r--src/webengine/api/qquickwebenginecontextmenudata.cpp16
-rw-r--r--src/webengine/api/qquickwebenginenewviewrequest_p.h2
-rw-r--r--src/webengine/api/qquickwebengineview.cpp48
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h6
-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-deploying.qdoc44
-rw-r--r--src/webengine/doc/src/qtwebengine-index.qdoc5
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc105
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc8
-rw-r--r--src/webengine/doc/src/qtwebengine-qmlmodule.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc37
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp12
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h1
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp1
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp76
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h11
-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.cpp16
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h2
-rw-r--r--tests/auto/quick/qmltests/data/tst_userScripts.qml6
-rw-r--r--tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp31
-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/BLACKLIST6
-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/configure.prf3
-rw-r--r--tools/qmake/mkspecs/features/functions.prf20
-rw-r--r--tools/qmake/mkspecs/features/gyp_generator.prf24
78 files changed, 2716 insertions, 353 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/webengine/minimal/doc/src/minimal.qdoc b/examples/webengine/minimal/doc/src/minimal.qdoc
index c0b89ba5a..5d7ca45e7 100644
--- a/examples/webengine/minimal/doc/src/minimal.qdoc
+++ b/examples/webengine/minimal/doc/src/minimal.qdoc
@@ -50,8 +50,11 @@
\skipto #include
\printto main
- In the main function we first instantiate a QGuiApplication object.
- We then call \l{QtWebEngine::initialize}, which makes sure that OpenGL
+ In the \c main function we first set the Qt::AA_EnableHighDpiScaling
+ attribute. This lets the web view automatically scale on high-dpi displays.
+ Then we instantiate a QGuiApplication object.
+
+ Next, we call \l{QtWebEngine::initialize}, which makes sure that OpenGL
contexts can be shared between the main process and the dedicated renderer
process (\c QtWebEngineProcess). This method needs to be called before
any OpenGL context is created.
diff --git a/examples/webengine/minimal/main.cpp b/examples/webengine/minimal/main.cpp
index cc5a1f61e..099b70707 100644
--- a/examples/webengine/minimal/main.cpp
+++ b/examples/webengine/minimal/main.cpp
@@ -44,7 +44,9 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
+
QtWebEngine::initialize();
QQmlApplicationEngine engine;
diff --git a/examples/webengine/quicknanobrowser/main.cpp b/examples/webengine/quicknanobrowser/main.cpp
index 779648fac..94d6f8519 100644
--- a/examples/webengine/quicknanobrowser/main.cpp
+++ b/examples/webengine/quicknanobrowser/main.cpp
@@ -78,6 +78,8 @@ static QUrl startupUrl()
int main(int argc, char **argv)
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+
Application app(argc, argv);
QtWebEngine::initialize();
diff --git a/examples/webenginewidgets/contentmanipulation/main.cpp b/examples/webenginewidgets/contentmanipulation/main.cpp
index 9f2f2f736..5645f9b9a 100644
--- a/examples/webenginewidgets/contentmanipulation/main.cpp
+++ b/examples/webenginewidgets/contentmanipulation/main.cpp
@@ -54,6 +54,7 @@
int main(int argc, char * argv[])
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QUrl url;
diff --git a/examples/webenginewidgets/cookiebrowser/main.cpp b/examples/webenginewidgets/cookiebrowser/main.cpp
index c122eb7c3..15a87609b 100644
--- a/examples/webenginewidgets/cookiebrowser/main.cpp
+++ b/examples/webenginewidgets/cookiebrowser/main.cpp
@@ -45,6 +45,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
MainWindow window(QUrl("http://qt.io"));
window.show();
diff --git a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
index b93c538d8..246ab2c0c 100644
--- a/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
+++ b/examples/webenginewidgets/demobrowser/browsermainwindow.cpp
@@ -422,13 +422,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/demobrowser/history.cpp b/examples/webenginewidgets/demobrowser/history.cpp
index 188490aca..bce65b917 100644
--- a/examples/webenginewidgets/demobrowser/history.cpp
+++ b/examples/webenginewidgets/demobrowser/history.cpp
@@ -137,7 +137,7 @@ void HistoryManager::setHistory(const QList<HistoryItem> &history, bool loadedAn
if (!loadedAndSorted)
qSort(m_history.begin(), m_history.end());
- checkForExpired();
+ checkForExpired(loadedAndSorted);
if (loadedAndSorted) {
m_lastSavedUrl = m_history.value(0).url;
@@ -163,7 +163,7 @@ HistoryTreeModel *HistoryManager::historyTreeModel() const
return m_historyTreeModel;
}
-void HistoryManager::checkForExpired()
+void HistoryManager::checkForExpired(bool removeEntriesDirectly)
{
if (m_historyLimit < 0 || m_history.isEmpty())
return;
@@ -185,7 +185,11 @@ void HistoryManager::checkForExpired()
const HistoryItem& item = m_history.last();
// remove from saved file also
m_lastSavedUrl = QString();
- emit entryRemoved(item);
+
+ if (removeEntriesDirectly)
+ m_history.takeLast();
+ else
+ emit entryRemoved(item);
}
if (nextTimeout > 0)
diff --git a/examples/webenginewidgets/demobrowser/history.h b/examples/webenginewidgets/demobrowser/history.h
index 6d7da5e6d..2a6dce9e1 100644
--- a/examples/webenginewidgets/demobrowser/history.h
+++ b/examples/webenginewidgets/demobrowser/history.h
@@ -126,7 +126,7 @@ public slots:
private slots:
void save();
- void checkForExpired();
+ void checkForExpired(bool removeExpiredEntriesDirectly = false);
protected:
void addHistoryItem(const HistoryItem &item);
diff --git a/examples/webenginewidgets/demobrowser/main.cpp b/examples/webenginewidgets/demobrowser/main.cpp
index 4427a446d..41cae306a 100644
--- a/examples/webenginewidgets/demobrowser/main.cpp
+++ b/examples/webenginewidgets/demobrowser/main.cpp
@@ -54,6 +54,7 @@
int main(int argc, char **argv)
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Q_INIT_RESOURCE(data);
BrowserApplication application(argc, argv);
if (!application.isTheOnlyBrowser())
diff --git a/examples/webenginewidgets/markdowneditor/main.cpp b/examples/webenginewidgets/markdowneditor/main.cpp
index 5d1e56eed..1051dcfd4 100644
--- a/examples/webenginewidgets/markdowneditor/main.cpp
+++ b/examples/webenginewidgets/markdowneditor/main.cpp
@@ -56,6 +56,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
MainWindow window;
diff --git a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
index 22f28e604..dd6a70566 100644
--- a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
+++ b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
@@ -42,7 +42,10 @@
\section1 The Code
- In \c main.cpp we instantiate a QApplication and a QWebEngineView. The URL
+ In the \c main function we first set the Qt::AA_EnableHighDpiScaling.
+ This lets the web view automatically scale on high-dpi displays.
+
+ Next, we instantiate a QApplication and a QWebEngineView. The URL
to load is set by calling \l QWebEngineView::setUrl. The view widget is
given a reasonable default size, and shown.
Finally, QApplication::exec() launches the main event loop.
diff --git a/examples/webenginewidgets/minimal/main.cpp b/examples/webenginewidgets/minimal/main.cpp
index d9a137739..729d68fa0 100644
--- a/examples/webenginewidgets/minimal/main.cpp
+++ b/examples/webenginewidgets/minimal/main.cpp
@@ -43,6 +43,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QWebEngineView view;
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/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp
index 1d2796b8c..fa9f44c34 100644
--- a/examples/webenginewidgets/simplebrowser/main.cpp
+++ b/examples/webenginewidgets/simplebrowser/main.cpp
@@ -57,6 +57,8 @@ QString getCommandLineUrlArgument()
int main(int argc, char **argv)
{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+
QApplication app(argc, argv);
app.setWindowIcon(QIcon(QLatin1String(":simplebrowser.svg")));
diff --git a/src/3rdparty b/src/3rdparty
-Subproject b5d5ca440f575fdc81ca95b9ba8c4c8f4ff5818
+Subproject 73ce027510183c151bb792433f36eb143aff72f
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index 57afb7c33..03150d322 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -254,6 +254,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/config/mac_osx.pri b/src/core/config/mac_osx.pri
index 83ddea233..c447add4a 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -1,4 +1,5 @@
include(common.pri)
+load(functions)
# Reuse the cached sdk version value from mac/sdk.prf if available
# otherwise query for it.
@@ -26,5 +27,9 @@ GYP_CONFIG += \
clang_use_chrome_plugins=0 \
enable_widevine=1
+# Force touch API is used in 49-based Chromium, which is included starting with 10.10.3 SDK, so we
+# disable the API usage if the SDK version is lower.
+!isMinOSXSDKVersion(10, 10, 3): GYP_CONFIG += disable_force_touch=1
+
QMAKE_MAC_SDK_PATH = "$$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)"
exists($$QMAKE_MAC_SDK_PATH): GYP_CONFIG += mac_sdk_path=\"$${QMAKE_MAC_SDK_PATH}\"
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 379c42468..095e54caa 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -160,7 +160,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 155d81f5d..70644e5f6 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 a1b33e258..2264d9b70 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -89,9 +89,16 @@ contains(QT_ARCH, "arm") {
contains(QT_ARCH, "mips") {
GYP_CONFIG += target_arch=mipsel
- contains(QMAKE_CFLAGS, "mips32r6"): mips_arch_variant=\"r6\"
- else: contains(QMAKE_CFLAGS, "mips32r2"): mips_arch_variant=\"r2\"
- else: contains(QMAKE_CFLAGS, "mips32"): mips_arch_variant=\"r1\"
+ MARCH = $$extractCFlag("-march=.*")
+ !isEmpty(MARCH) {
+ equals(MARCH, "mips32r6"): GYP_CONFIG += mips_arch_variant=\"r6\"
+ else: equals(MARCH, "mips32r2"): GYP_CONFIG += mips_arch_variant=\"r2\"
+ else: equals(MARCH, "mips32"): GYP_CONFIG += mips_arch_variant=\"r1\"
+ } else {
+ contains(QMAKE_CFLAGS, "mips32r6"): GYP_CONFIG += mips_arch_variant=\"r6\"
+ else: contains(QMAKE_CFLAGS, "mips32r2"): GYP_CONFIG += mips_arch_variant=\"r2\"
+ else: contains(QMAKE_CFLAGS, "mips32"): GYP_CONFIG += mips_arch_variant=\"r1\"
+ }
contains(QMAKE_CFLAGS, "-mdsp2"): GYP_CONFIG += mips_dsp_rev=2
else: contains(QMAKE_CFLAGS, "-mdsp"): GYP_CONFIG += mips_dsp_rev=1
@@ -126,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 00c65fdd4..84a9ff564 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/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 326965416..a0ad53c1e 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -239,6 +239,7 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget
, m_didFirstVisuallyNonEmptyLayout(false)
, m_adapterClient(0)
, m_imeInProgress(false)
+ , m_receivedEmptyImeText(false)
, m_anchorPositionWithinSelection(0)
, m_cursorPositionWithinSelection(0)
, m_initPending(false)
@@ -945,6 +946,19 @@ void RenderWidgetHostViewQt::handleMouseEvent(QMouseEvent* event)
QCursor::setPos(m_lockedMousePosition);
}
+ if (m_imeInProgress && event->type() == QMouseEvent::MouseButtonPress) {
+ m_imeInProgress = false;
+ // Tell input method to commit the pre-edit string entered so far, and finish the
+ // composition operation.
+#ifdef Q_OS_WIN
+ // Yes the function name is counter-intuitive, but commit isn't actually implemented
+ // by the Windows QPA, and reset does exactly what is necessary in this case.
+ qApp->inputMethod()->reset();
+#else
+ qApp->inputMethod()->commit();
+#endif
+ }
+
m_host->ForwardMouseEvent(webEvent);
}
@@ -953,15 +967,16 @@ void RenderWidgetHostViewQt::handleKeyEvent(QKeyEvent *ev)
if (IsMouseLocked() && ev->key() == Qt::Key_Escape && ev->type() == QEvent::KeyRelease)
UnlockMouse();
- if (m_imeInProgress) {
+ if (m_receivedEmptyImeText) {
// IME composition was not finished with a valid commit string.
// We're getting the composition result in a key event.
if (ev->key() != 0) {
// The key event is not a result of an IME composition. Cancel IME.
m_host->ImeCancelComposition();
- m_imeInProgress = false;
+ m_receivedEmptyImeText = false;
} else {
if (ev->type() == QEvent::KeyRelease) {
+ m_receivedEmptyImeText = false;
m_host->ImeConfirmComposition(toString16(ev->text()), gfx::Range::InvalidRange(),
false);
m_imeInProgress = false;
@@ -1001,6 +1016,17 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
const QList<QInputMethodEvent::Attribute> &attributes = ev->attributes();
std::vector<blink::WebCompositionUnderline> underlines;
+ auto ensureValidSelectionRange = [&]() {
+ if (!selectionRange.IsValid()) {
+ // We did not receive a valid selection range, hence the range is going to mark the
+ // cursor position.
+ int newCursorPosition =
+ (cursorPositionInPreeditString < 0) ? preeditString.length()
+ : cursorPositionInPreeditString;
+ selectionRange.set_start(newCursorPosition);
+ selectionRange.set_end(newCursorPosition);
+ }
+ };
Q_FOREACH (const QInputMethodEvent::Attribute &attribute, attributes) {
switch (attribute.type) {
@@ -1014,8 +1040,11 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
break;
}
case QInputMethodEvent::Cursor:
- if (attribute.length)
- cursorPositionInPreeditString = attribute.start;
+ // Always set the position of the cursor, even if it's marked invisible by Qt, otherwise
+ // there is no way the user will know which part of the composition string will be
+ // changed, when performing an IME-specific action (like selecting a different word
+ // suggestion).
+ cursorPositionInPreeditString = attribute.start;
break;
case QInputMethodEvent::Selection:
selectionRange.set_start(qMin(attribute.start, (attribute.start + attribute.length)));
@@ -1028,18 +1057,54 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
: gfx::Range::InvalidRange();
+
+ auto setCompositionForPreEditString = [&](){
+ ensureValidSelectionRange();
+ m_host->ImeSetComposition(toString16(preeditString),
+ underlines,
+ replacementRange,
+ selectionRange.start(),
+ selectionRange.end());
+ };
+
if (!commitString.isEmpty()) {
m_host->ImeConfirmComposition(toString16(commitString), replacementRange, false);
- m_imeInProgress = false;
- } else if (!preeditString.isEmpty()) {
- if (!selectionRange.IsValid()) {
- // We did not receive a valid selection range, hence the range is going to mark the cursor position.
- int newCursorPosition = (cursorPositionInPreeditString < 0) ? preeditString.length() : cursorPositionInPreeditString;
- selectionRange.set_start(newCursorPosition);
- selectionRange.set_end(newCursorPosition);
+
+ // We might get a commit string and a pre-edit string in a single event, which means
+ // we need to confirm the last composition, and start a new composition.
+ if (!preeditString.isEmpty()) {
+ setCompositionForPreEditString();
+ m_imeInProgress = true;
+ } else {
+ m_imeInProgress = false;
}
- m_host->ImeSetComposition(toString16(preeditString), underlines, replacementRange, selectionRange.start(), selectionRange.end());
+ m_receivedEmptyImeText = false;
+
+ } else if (!preeditString.isEmpty()) {
+ setCompositionForPreEditString();
m_imeInProgress = true;
+ m_receivedEmptyImeText = false;
+ } else {
+ // There are so-far two known cases, when an empty QInputMethodEvent is received.
+ // First one happens when backspace is used to remove the last character in the pre-edit
+ // string, thus signaling the end of the composition.
+ // The second one happens (on Windows) when a Korean char gets composed, but instead of
+ // the event having a commit string, both strings are empty, and the actual char is received
+ // as a QKeyEvent after the QInputMethodEvent is processed.
+ // In lieu of the second case, we can't simply cancel the composition on an empty event,
+ // and then add the Korean char when QKeyEvent is received, because that leads to text
+ // flickering in the textarea (or any other element).
+ // Instead we postpone the processing of the empty QInputMethodEvent by posting it
+ // to the same focused object, and cancelling the composition on the next event loop tick.
+ if (!m_receivedEmptyImeText && m_imeInProgress) {
+ m_receivedEmptyImeText = true;
+ m_imeInProgress = false;
+ QInputMethodEvent *eventCopy = new QInputMethodEvent(*ev);
+ QGuiApplication::postEvent(qApp->focusObject(), eventCopy);
+ } else {
+ m_receivedEmptyImeText = false;
+ m_host->ImeCancelComposition();
+ }
}
}
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index a6d34fd6a..fa698f0ea 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -228,6 +228,7 @@ private:
ui::TextInputType m_currentInputType;
bool m_imeInProgress;
+ bool m_receivedEmptyImeText;
QRect m_cursorRect;
size_t m_anchorPositionWithinSelection;
size_t m_cursorPositionWithinSelection;
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 7c22c8d9f..8b7d520a9 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -13,18 +13,18 @@
'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_resources.gyp:components_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_resources.gyp:components_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 5fb324b6c..959dd3d95 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 b4bd3fdfe..b6209030b 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -134,6 +134,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_channel_ipc_transport_host.cpp b/src/core/web_channel_ipc_transport_host.cpp
index ce5ea320b..aef16f0a0 100644
--- a/src/core/web_channel_ipc_transport_host.cpp
+++ b/src/core/web_channel_ipc_transport_host.cpp
@@ -61,6 +61,13 @@ WebChannelIPCTransportHost::~WebChannelIPCTransportHost()
{
}
+void WebChannelIPCTransportHost::RenderViewHostChanged(content::RenderViewHost *, content::RenderViewHost *)
+{
+ // This means that we were moved into a different RenderView, possibly in a different
+ // render process and that we lost our WebChannelIPCTransport object and its state.
+ Send(new WebChannelIPCTransport_Install(routing_id(), m_worldId));
+}
+
void WebChannelIPCTransportHost::setWorldId(uint worldId)
{
if (worldId == m_worldId)
diff --git a/src/core/web_channel_ipc_transport_host.h b/src/core/web_channel_ipc_transport_host.h
index 51adcb95f..75b40477e 100644
--- a/src/core/web_channel_ipc_transport_host.h
+++ b/src/core/web_channel_ipc_transport_host.h
@@ -58,6 +58,9 @@ public:
WebChannelIPCTransportHost(content::WebContents *, uint worldId = 0, QObject *parent = 0);
virtual ~WebChannelIPCTransportHost();
+ // WebContentsObserver
+ virtual void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) Q_DECL_OVERRIDE;
+
// QWebChannelAbstractTransport
void sendMessage(const QJsonObject &message) Q_DECL_OVERRIDE;
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index c3789318a..b0aae6ca9 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -349,14 +349,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());
@@ -374,7 +374,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)
@@ -837,6 +837,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 72e1f6447..a29778a7e 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 3118c36b1..31786a8f8 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 b60f31ac3..9aa584369 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -146,7 +146,7 @@ public:
const SavePageInfo &savePageInfo() { return m_savePageInfo; }
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 43dc943e7..329f9c9db 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>
@@ -301,15 +303,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()");
@@ -323,9 +350,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 a81a26d16..2be59d1c6 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 505a684eb..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,14 +672,11 @@ blink::WebMouseWheelEvent WebEventFactory::toWebWheelEvent(QWheelEvent *ev, doub
webEvent.modifiers = modifiersForEvent(ev);
webEvent.timeStampSeconds = currentTimeForEvent(ev);
- if (ev->orientation() == Qt::Horizontal)
- webEvent.wheelTicksX = ev->delta() / 120.0f;
- else
- webEvent.wheelTicksY = ev->delta() / 120.0f;
-
+ webEvent.wheelTicksX = static_cast<float>(ev->angleDelta().x()) / QWheelEvent::DefaultDeltasPerStep;
+ webEvent.wheelTicksY = static_cast<float>(ev->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep;
- // Since we report the scroll by the pixel, convert the delta to pixel distance using standard scroll step.
- // Use the same single scroll step as QTextEdit (in QTextEditPrivate::init [h,v]bar->setSingleStep)
+ // We can't use the device specific QWheelEvent::pixelDelta(), so we calculate
+ // a pixel delta based on ticks and scroll per line.
static const float cDefaultQtScrollStep = 20.f;
webEvent.deltaX = webEvent.wheelTicksX * wheelScrollLines * cDefaultQtScrollStep;
diff --git a/src/webengine/api/qquickwebenginecontextmenudata.cpp b/src/webengine/api/qquickwebenginecontextmenudata.cpp
index 16cb4ff69..269d655a2 100644
--- a/src/webengine/api/qquickwebenginecontextmenudata.cpp
+++ b/src/webengine/api/qquickwebenginecontextmenudata.cpp
@@ -74,7 +74,7 @@ QQuickWebEngineContextMenuData::~QQuickWebEngineContextMenuData()
}
/*!
- \qmlproperty bool WebEngineDownloadItem::isValid
+ \qmlproperty bool WebEngineContextMenuData::isValid
Is \c true if the context data is valid; otherwise \c false.
*/
@@ -84,7 +84,7 @@ bool QQuickWebEngineContextMenuData::isValid() const
}
/*!
- \qmlproperty QPoint WebEngineDownloadItem::position
+ \qmlproperty QPoint WebEngineContextMenuData::position
Returns the position of the context, usually the mouse position where the context menu event was triggered.
@@ -95,7 +95,7 @@ QPoint QQuickWebEngineContextMenuData::position() const
}
/*!
- \qmlproperty QString WebEngineDownloadItem::linkText
+ \qmlproperty QString WebEngineContextMenuData::linkText
Returns the text of a link if the context is a link.
*/
@@ -105,7 +105,7 @@ QString QQuickWebEngineContextMenuData::linkText() const
}
/*!
- \qmlproperty QUrl WebEngineDownloadItem::linkUrl
+ \qmlproperty QUrl WebEngineContextMenuData::linkUrl
Returns the URL of a link if the context is a link.
*/
@@ -115,7 +115,7 @@ QUrl QQuickWebEngineContextMenuData::linkUrl() const
}
/*!
- \qmlproperty QString WebEngineDownloadItem::selectedText
+ \qmlproperty QString WebEngineContextMenuData::selectedText
Returns the selected text of the context.
*/
@@ -125,7 +125,7 @@ QString QQuickWebEngineContextMenuData::selectedText() const
}
/*!
- \qmlproperty QUrl WebEngineDownloadItem::mediaUrl
+ \qmlproperty QUrl WebEngineContextMenuData::mediaUrl
If the context is a media element, returns the URL of that media.
*/
@@ -135,7 +135,7 @@ QUrl QQuickWebEngineContextMenuData::mediaUrl() const
}
/*!
- \qmlproperty MediaType WebEngineDownloadItem::mediaType
+ \qmlproperty MediaType WebEngineContextMenuData::mediaType
Returns the type of the media element or \c MediaTypeNone if the context is not a media element.
@@ -161,7 +161,7 @@ QQuickWebEngineContextMenuData::MediaType QQuickWebEngineContextMenuData::mediaT
}
/*!
- \qmlproperty bool WebEngineDownloadItem::isContentEditable
+ \qmlproperty bool WebEngineContextMenuData::isContentEditable
Returns \c true if the content is editable by the user; otherwise returns \c false.
*/
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 0170018e7..02484548b 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -93,6 +93,27 @@
QT_BEGIN_NAMESPACE
using namespace QtWebEngineCore;
+QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event)
+{
+ static struct {
+ QKeySequence::StandardKey standardKey;
+ QQuickWebEngineView::WebAction action;
+ } editorActions[] = {
+ { QKeySequence::Cut, QQuickWebEngineView::Cut },
+ { QKeySequence::Copy, QQuickWebEngineView::Copy },
+ { QKeySequence::Paste, QQuickWebEngineView::Paste },
+ { QKeySequence::Undo, QQuickWebEngineView::Undo },
+ { QKeySequence::Redo, QQuickWebEngineView::Redo },
+ { QKeySequence::SelectAll, QQuickWebEngineView::SelectAll },
+ { QKeySequence::UnknownKey, QQuickWebEngineView::NoWebAction }
+ };
+ for (int i = 0; editorActions[i].standardKey != QKeySequence::UnknownKey; ++i)
+ if (event == editorActions[i].standardKey)
+ return editorActions[i].action;
+
+ return QQuickWebEngineView::NoWebAction;
+}
+
#ifndef QT_NO_ACCESSIBILITY
static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
{
@@ -356,7 +377,8 @@ void QQuickWebEngineViewPrivate::allowCertificateError(const QSharedPointer<Cert
Q_Q(QQuickWebEngineView);
QQuickWebEngineCertificateError *quickController = new QQuickWebEngineCertificateError(errorController);
- QQmlEngine::setObjectOwnership(quickController, QQmlEngine::JavaScriptOwnership);
+ // mark the object for gc by creating temporary jsvalue
+ qmlEngine(q)->newQObject(quickController);
Q_EMIT q->certificateError(quickController);
if (!quickController->deferred() && !quickController->answered())
quickController->rejectCertificate();
@@ -539,11 +561,23 @@ void QQuickWebEngineViewPrivate::focusContainer()
void QQuickWebEngineViewPrivate::unhandledKeyEvent(QKeyEvent *event)
{
Q_Q(QQuickWebEngineView);
+#ifdef Q_OS_OSX
+ if (event->type() == QEvent::KeyPress) {
+ QQuickWebEngineView::WebAction action = editorActionForKeyEvent(event);
+ if (action != QQuickWebEngineView::NoWebAction) {
+ // Try triggering a registered short-cut
+ if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcut(event))
+ return;
+ q->triggerWebAction(action);
+ return;
+ }
+ }
+#endif
if (q->parentItem())
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;
@@ -749,7 +783,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)
{}
@@ -776,9 +810,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
@@ -835,7 +869,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();
@@ -995,7 +1029,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 45332ddb1..66952ca6e 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -73,6 +73,8 @@ class QQmlContext;
class QQuickWebEngineSettings;
class QQuickWebEngineFaviconProvider;
+QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event);
+
#ifdef ENABLE_QML_TESTSUPPORT_API
class QQuickWebEngineTestSupport;
#endif
@@ -150,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;
@@ -206,7 +208,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-deploying.qdoc b/src/webengine/doc/src/qtwebengine-deploying.qdoc
new file mode 100644
index 000000000..4aa57c0df
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-deploying.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtwebengine-deploying.html
+ \title Deploying Qt WebEngine Applications
+
+ Qt WebEngine takes advantage of the multi process model that the Chromium
+ project offers. The multi process model requires the QtWebEngineProcess
+ executable to be deployed alongside your application. To do this, we
+ recommend the use of Qt's cross-platform deployment tools.
+
+ Alternatively, if you are carrying out manual deployment, you will find the
+ QtWebEngineProcess executable in the libexec directory of your Qt
+ installation. 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}.
+*/
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index e7314fcf9..c4be591ff 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -38,10 +38,6 @@
\annotatedlist qtwebengine-modules
- For Qt Quick applications, Qt WebEngine provides the following QML modules:
-
- \annotatedlist qtwebengine-qmlmodules
-
\section1 Articles and Guides
\list
@@ -50,6 +46,7 @@
\li \l{Qt WebEngine Platform Notes}
\li \l{Qt WebEngine Licensing}
\li \l{Qt WebEngine Debugging and Profiling}
+ \li \l{Deploying Qt WebEngine Applications}
\li \l{Porting from Qt WebKit to Qt WebEngine}
\endlist
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 064dfb44b..f34b4514b 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,57 +66,37 @@
\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}
that is part of the documentation in the \l {Chromium Project} upstream source tree.
- This version of Qt WebEngine is based on Chromium version 45.0.2554.101, with
+ This version of Qt WebEngine is based on Chromium version 49.0.2623.111, with
additional security fixes from newer versions.
\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
@@ -238,15 +220,24 @@
The functions can be used to synchronize cookies with QNetworkAccessManager, as well as to set,
delete, and intercept cookies during navigation.
- \section1 Deploying Qt WebEngine 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 takes advantage of the multi process model that the Chromium project offers.
- The multi process model requires the QtWebEngineProcess executable to be deployed alongside your application.
- To do this, we recommend the use of Qt's cross-platform deployment tools.
+ 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}.
- Alternatively, if you are carrying out manual deployment, you will find the QtWebEngineProcess executable in the
- libexec directory of your Qt installation.
- On Windows, QtWebEngineProcess.exe is located in the bin directory of your Qt application.
+ 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.
- For more information on deploying Qt applications, please see \l {Deploying Qt Applications}.
*/
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 286d849c0..b66e7874d 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -114,7 +114,13 @@
\section2 OS X
- On OS X, Xcode version 6.3 or later on OS X 10.10 or later is required.
+ On OS X, the following are required:
+
+ \list
+ \li OS X 10.10 or later
+ \li Xcode 6.3 or later
+ \li OS X 10.10 SDK or later
+ \endlist
\note Qt WebEngine cannot be built for the 32-bit mode of OS X (using the
\c macx-clang-32 \c mkspec).
diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
index c749b468b..9d22d3f36 100644
--- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
+++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
@@ -27,7 +27,7 @@
\qmlmodule QtWebEngine 1.4
\title Qt WebEngine QML Types
\brief Provides QML types for rendering web content within a QML application
- \ingroup qtwebengine-qmlmodules
+ \ingroup qtwebengine-modules
The QML types can be imported into your application using the following import statements in
your .qml file:
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index 83eadd563..6fd9ba45b 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/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 3b86e623e..c04e20a5e 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -237,6 +237,18 @@ void RenderWidgetHostViewQtDelegateQuick::inputMethodStateChanged(bool editorVis
}
+bool RenderWidgetHostViewQtDelegateQuick::event(QEvent *event)
+{
+ if (event->type() == QEvent::ShortcutOverride) {
+ if (editorActionForKeyEvent(static_cast<QKeyEvent*>(event)) != QQuickWebEngineView::NoWebAction) {
+ event->accept();
+ return true;
+ }
+ }
+
+ return QQuickItem::event(event);
+}
+
void RenderWidgetHostViewQtDelegateQuick::focusInEvent(QFocusEvent *event)
{
m_client->forwardEvent(event);
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h
index 2267a131b..de3aff291 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -78,6 +78,7 @@ public:
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
protected:
+ virtual bool event(QEvent *event) Q_DECL_OVERRIDE;
virtual void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
virtual void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
virtual void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index 5efe4337d..6f7865a50 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -89,7 +89,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 be5a39e83..c180699f3 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -84,6 +84,8 @@
#include <QTimer>
#include <QUrl>
+#include <private/qguiapplication_p.h>
+
QT_BEGIN_NAMESPACE
using namespace QtWebEngineCore;
@@ -106,14 +108,35 @@ static QWebEnginePage::WebWindowType toWindowType(WebContentsAdapterClient::Wind
}
}
+QWebEnginePage::WebAction editorActionForKeyEvent(QKeyEvent* event)
+{
+ static struct {
+ QKeySequence::StandardKey standardKey;
+ QWebEnginePage::WebAction action;
+ } editorActions[] = {
+ { QKeySequence::Cut, QWebEnginePage::Cut },
+ { QKeySequence::Copy, QWebEnginePage::Copy },
+ { QKeySequence::Paste, QWebEnginePage::Paste },
+ { QKeySequence::Undo, QWebEnginePage::Undo },
+ { QKeySequence::Redo, QWebEnginePage::Redo },
+ { QKeySequence::SelectAll, QWebEnginePage::SelectAll },
+ { QKeySequence::UnknownKey, QWebEnginePage::NoWebAction }
+ };
+ for (int i = 0; editorActions[i].standardKey != QKeySequence::UnknownKey; ++i)
+ if (event == editorActions[i].standardKey)
+ return editorActions[i].action;
+
+ return QWebEnginePage::NoWebAction;
+}
+
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)
@@ -247,11 +270,24 @@ void QWebEnginePagePrivate::focusContainer()
void QWebEnginePagePrivate::unhandledKeyEvent(QKeyEvent *event)
{
+#ifdef Q_OS_OSX
+ Q_Q(QWebEnginePage);
+ if (event->type() == QEvent::KeyPress) {
+ QWebEnginePage::WebAction action = editorActionForKeyEvent(event);
+ if (action != QWebEnginePage::NoWebAction) {
+ // Try triggering a registered short-cut
+ if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcut(event))
+ return;
+ q->triggerAction(action);
+ return;
+ }
+ }
+#endif
if (view && view->parentWidget())
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);
@@ -260,6 +296,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
@@ -272,12 +322,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;
@@ -458,16 +507,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 6f14f25a6..03883bb44 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -71,6 +71,8 @@ class QWebEngineProfile;
class QWebEngineSettings;
class QWebEngineView;
+QWebEnginePage::WebAction editorActionForKeyEvent(QKeyEvent* event);
+
class QWebEnginePagePrivate : public QtWebEngineCore::WebContentsAdapterClient
{
public:
@@ -98,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;
@@ -108,7 +113,7 @@ public:
virtual bool isFullScreenMode() const Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(QtWebEngineCore::FilePickerController *controller) Q_DECL_OVERRIDE;
- virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>);
+ virtual void showColorDialog(QSharedPointer<QtWebEngineCore::ColorChooserController>) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentInnerText(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
@@ -154,7 +159,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 098e48b9d..c7b825854 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -315,6 +315,13 @@ QVariant RenderWidgetHostViewQtDelegateWidget::inputMethodQuery(Qt::InputMethodQ
void RenderWidgetHostViewQtDelegateWidget::resizeEvent(QResizeEvent *resizeEvent)
{
QQuickWidget::resizeEvent(resizeEvent);
+
+ const QPoint globalPos = mapToGlobal(pos());
+ if (globalPos != m_lastGlobalPos) {
+ m_lastGlobalPos = globalPos;
+ m_client->windowBoundsChanged();
+ }
+
m_client->notifyResize();
}
@@ -372,11 +379,17 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
}
}
- // We forward focus events later, once they have made it to the m_rootItem.
switch (event->type()) {
case QEvent::FocusIn:
case QEvent::FocusOut:
+ // We forward focus events later, once they have made it to the m_rootItem.
return QQuickWidget::event(event);
+ case QEvent::ShortcutOverride:
+ if (editorActionForKeyEvent(static_cast<QKeyEvent*>(event)) != QWebEnginePage::NoWebAction) {
+ event->accept();
+ return true;
+ }
+ break;
default:
break;
}
@@ -400,6 +413,7 @@ bool RenderWidgetHostViewQtDelegateWidget::event(QEvent *event)
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 29cac82db..77907ec5a 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -92,6 +92,8 @@ private:
RenderWidgetHostViewQtDelegateClient *m_client;
QScopedPointer<QQuickItem> m_rootItem;
bool m_isPopup;
+ QColor m_clearColor;
+ QPoint m_lastGlobalPos;
QList<QMetaObject::Connection> m_windowConnections;
};
diff --git a/tests/auto/quick/qmltests/data/tst_userScripts.qml b/tests/auto/quick/qmltests/data/tst_userScripts.qml
index dbad8cd56..92ae71f0b 100644
--- a/tests/auto/quick/qmltests/data/tst_userScripts.qml
+++ b/tests/auto/quick/qmltests/data/tst_userScripts.qml
@@ -119,19 +119,19 @@ Item {
appendDocumentTitleScript.injectionPoint = WebEngineScript.Deferred
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "New title with appendix");
+ tryCompare(webEngineView, "title", "New title with appendix");
appendDocumentTitleScript.injectionPoint = WebEngineScript.DocumentReady
changeDocumentTitleScript.injectionPoint = WebEngineScript.Deferred
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "New title");
+ tryCompare(webEngineView, "title", "New title");
// Make sure we can remove scripts from the preload list.
webEngineView.userScripts = [ appendDocumentTitleScript ];
webEngineView.reload();
webEngineView.waitForLoadSucceeded();
- compare(webEngineView.title, "Test page 1 with appendix");
+ tryCompare(webEngineView, "title", "Test page 1 with appendix");
changeDocumentTitleScript.injectionPoint = WebEngineScript.DocumentReady
}
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index d59fa92e9..904dfac26 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -549,9 +549,10 @@ void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled_data()
}
class MouseTouchEventRecordingItem : public QQuickItem {
+ Q_OBJECT
public:
- explicit MouseTouchEventRecordingItem(QQuickItem *parent = 0) :
- QQuickItem(parent), m_eventCounter(0) {
+ explicit MouseTouchEventRecordingItem(QQuickItem* child, QQuickItem *parent = 0) :
+ QQuickItem(parent), m_eventCounter(0), m_child(child) {
setFlag(ItemHasContents);
setAcceptedMouseButtons(Qt::AllButtons);
setAcceptHoverEvents(true);
@@ -571,9 +572,6 @@ public:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
case QEvent::TouchCancel:
- case QEvent::HoverEnter:
- case QEvent::HoverMove:
- case QEvent::HoverLeave:
++m_eventCounter;
event->accept();
return true;
@@ -593,16 +591,34 @@ public:
return m_eventCounter;
}
+public Q_SLOTS:
+ void changeWidth() {
+ if (m_child)
+ setWidth(m_child->width());
+ }
+
+ void changeHeight() {
+ if (m_child)
+ setHeight(m_child->height());
+ }
+
private:
int m_eventCounter;
+ QQuickItem *m_child;
};
void tst_QQuickWebEngineView::inputEventForwardingDisabledWhenActiveFocusOnPressDisabled()
{
QQuickWebEngineView *view = webEngineView();
- MouseTouchEventRecordingItem item;
+ MouseTouchEventRecordingItem item(view);
item.setParentItem(m_window->contentItem());
- item.setSize(QSizeF(640, 480));
+
+ // Resize the event recorder whenever the view is resized, so that all event positions
+ // are contained in both of the item regions.
+ QObject::connect(view, &QQuickItem::widthChanged, &item,
+ &MouseTouchEventRecordingItem::changeWidth);
+ QObject::connect(view, &QQuickItem::heightChanged, &item,
+ &MouseTouchEventRecordingItem::changeHeight);
view->setParentItem(&item);
view->setSize(QSizeF(640, 480));
m_window->show();
@@ -610,6 +626,7 @@ void tst_QQuickWebEngineView::inputEventForwardingDisabledWhenActiveFocusOnPress
// Simulate click and move of mouse, so that last known position in the application
// is updated, thus a mouse move event is not generated when we don't expect it.
QTest::mouseClick(view->window(), Qt::LeftButton);
+ QTRY_COMPARE(item.eventCount(), 2);
item.clearEventCount();
// First disable view, so it does not receive focus on page load.
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..9900a7345 100644
--- a/tests/auto/widgets/qwebenginepage/BLACKLIST
+++ b/tests/auto/widgets/qwebenginepage/BLACKLIST
@@ -1,3 +1,9 @@
+[comboBoxPopupPositionAfterMove]
+*
+
+[comboBoxPopupPositionAfterChildMove]
+*
+
[macCopyUnicodeToClipboard]
osx
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index de13019d7..d5f651384 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>
@@ -115,6 +117,8 @@ private Q_SLOTS:
void initTestCase();
void cleanupTestCase();
void thirdPartyCookiePolicy();
+ void comboBoxPopupPositionAfterMove();
+ void comboBoxPopupPositionAfterChildMove();
void contextMenuCopy();
void contextMenuPopulatedOnce();
void acceptNavigationRequest();
@@ -145,7 +149,6 @@ private Q_SLOTS:
void textEditing();
void backActionUpdate();
void protectBindingsRuntimeObjectsFromCollector();
- void localURLSchemes();
void testOptionalJSObjects();
void testLocalStorageVisibility();
void testEnablePersistentStorage();
@@ -242,6 +245,8 @@ private Q_SLOTS:
void viewSource();
private:
+ static QPoint elementCenter(QWebEnginePage *page, const QString &id);
+
QWebEngineView* m_view;
QWebEnginePage* m_page;
QWebEngineView* m_inputFieldsTestView;
@@ -2474,34 +2479,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)
{
@@ -2960,31 +2937,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());
}
}
@@ -3121,6 +3093,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()
{
@@ -4946,6 +5008,23 @@ 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());
+}
+
void tst_QWebEnginePage::viewSource()
{
TestPage page;
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/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 5b2a85330..044fa94aa 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -124,6 +124,9 @@ defineTest(finalizeConfigure) {
} else {
log("AppStore Compliant ............... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}")
}
+ !isMinOSXSDKVersion(10, 10, 3) {
+ log("Force Touch API usage ............ Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
+ }
}
}
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 04d3aa40f..ab9593bf9 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -37,8 +37,8 @@ defineTest(isPlatformSupported) {
skipBuild("Qt WebEngine requires OS X version 10.10 or newer.")
return(false)
}
- !isMinOSXSDKVersion(10, 10, 3): {
- skipBuild("Qt WebEngine requires an OS X SDK version 10.10.3 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
+ !isMinOSXSDKVersion(10, 10): {
+ skipBuild("Qt WebEngine requires an OS X SDK version of 10.10 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
return(false)
}
} else {
@@ -59,16 +59,20 @@ defineTest(isPlatformSupported) {
}
defineTest(isPythonVersionSupported) {
- python_error_msg = "Python version 2 (2.7 or later) is required to build Qt WebEngine."
- python_major_version = $$system('python -c "import sys; print(sys.version_info[0])"')
+ python_error_msg = "Python version 2 (2.7.5 or later) is required to build Qt WebEngine."
+ python_version = $$system('python -c "import sys; print(sys.version_info[0:3])"')
+ python_version ~= s/[()]//g
+ python_version = $$split(python_version, ',')
+ python_major_version = $$first(python_version)
greaterThan(python_major_version, 2) {
skipBuild("Python version 3 is not supported by Chromium.")
skipBuild($$python_error_msg)
return(false)
}
- python_minor_version = $$system('python -c "import sys; print(sys.version_info[1])"')
- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true)
- skipBuild("Using Python version "$$python_major_version"."$$python_minor_version".")
+ python_minor_version = $$member(python_version, 1)
+ python_patch_version = $$member(python_version, 2)
+ greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
+ skipBuild("Using Python version $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
skipBuild($$python_error_msg)
return(false)
}
@@ -101,6 +105,7 @@ defineTest(isMinOSXSDKVersion) {
requested_major = $$1
requested_minor = $$2
requested_patch = $$3
+ isEmpty(requested_patch): requested_patch = 0
WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
export(WEBENGINE_OSX_SDK_PRODUCT_VERSION)
isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) {
@@ -110,6 +115,7 @@ defineTest(isMinOSXSDKVersion) {
major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0)
minor_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 1, 1)
patch_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 2, 2)
+ isEmpty(patch_version): patch_version = 0
greaterThan(major_version, $$requested_major):return(true)
equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
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