summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebenginecontextmenurequest.cpp3
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp82
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p.h8
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h2
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp35
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp39
-rw-r--r--src/webengine/api/qquickwebenginesettings_p.h8
-rw-r--r--src/webengine/api/qquickwebenginetestsupport.cpp118
-rw-r--r--src/webengine/api/qquickwebenginetestsupport_p.h41
-rw-r--r--src/webengine/api/qquickwebengineview.cpp122
-rw-r--r--src/webengine/api/qquickwebengineview_p.h20
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h3
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc67
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview_lgpl.qdoc61
-rw-r--r--src/webengine/plugin/plugin.cpp4
-rw-r--r--src/webengine/plugin/plugin.pro2
-rw-r--r--src/webengine/plugin/plugins.qmltypes33
-rw-r--r--src/webengine/plugin/testsupport/plugin.cpp4
-rw-r--r--src/webengine/plugin/testsupport/testsupport.pro2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp34
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h3
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.h2
-rw-r--r--src/webengine/ui_delegates_manager.cpp4
-rw-r--r--src/webengine/webengine.pro13
25 files changed, 556 insertions, 156 deletions
diff --git a/src/webengine/api/qquickwebenginecontextmenurequest.cpp b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
index df57442a1..c53e28d93 100644
--- a/src/webengine/api/qquickwebenginecontextmenurequest.cpp
+++ b/src/webengine/api/qquickwebenginecontextmenurequest.cpp
@@ -159,11 +159,12 @@ QString QQuickWebEngineContextMenuRequest::linkText() const
\readonly
The URL of the link if the selected web page content is a link.
+ It is not guaranteed to be a valid URL.
*/
QUrl QQuickWebEngineContextMenuRequest::linkUrl() const
{
- return m_data->linkUrl();
+ return m_data->unfilteredLinkUrl();
}
/*!
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index bc40e6771..5afb19531 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -39,6 +39,8 @@
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebenginedownloaditem_p_p.h"
+
+#include "browser_context_adapter.h"
#include "qquickwebengineprofile_p.h"
using QtWebEngineCore::BrowserContextAdapterClient;
@@ -103,6 +105,8 @@ QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWeb
, interruptReason(QQuickWebEngineDownloadItem::NoReason)
, totalBytes(-1)
, receivedBytes(0)
+ , downloadFinished(false)
+ , downloadPaused(false)
{
}
@@ -145,6 +149,16 @@ void QQuickWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClien
totalBytes = info.totalBytes;
Q_EMIT q->totalBytesChanged();
}
+
+ if (info.done != downloadFinished) {
+ downloadFinished = info.done;
+ Q_EMIT q->isFinishedChanged();
+ }
+
+ if (info.paused != downloadPaused) {
+ downloadPaused = info.paused;
+ Q_EMIT q->isPausedChanged();
+ }
}
void QQuickWebEngineDownloadItemPrivate::updateState(QQuickWebEngineDownloadItem::DownloadState newState)
@@ -199,6 +213,46 @@ void QQuickWebEngineDownloadItem::cancel()
}
}
+
+/*!
+ \qmlmethod void WebEngineDownloadItem::pause()
+ \since QtWebEngine 1.6
+
+ Pauses the download.
+*/
+
+void QQuickWebEngineDownloadItem::pause()
+{
+ Q_D(QQuickWebEngineDownloadItem);
+
+ QQuickWebEngineDownloadItem::DownloadState state = d->downloadState;
+
+ if (state != QQuickWebEngineDownloadItem::DownloadInProgress)
+ return;
+
+ if (d->profile)
+ d->profile->d_ptr->browserContext()->pauseDownload(d->downloadId);
+}
+
+/*!
+ \qmlmethod void WebEngineDownloadItem::resume()
+ \since QtWebEngine 1.6
+
+ Resumes the download if it was paused or interrupted.
+*/
+void QQuickWebEngineDownloadItem::resume()
+{
+ Q_D(QQuickWebEngineDownloadItem);
+
+ QQuickWebEngineDownloadItem::DownloadState state = d->downloadState;
+
+ if (d->downloadFinished || (state != QQuickWebEngineDownloadItem::DownloadInProgress && state != QQuickWebEngineDownloadItem::DownloadInterrupted))
+ return;
+
+ if (d->profile)
+ d->profile->d_ptr->browserContext()->resumeDownload(d->downloadId);
+}
+
/*!
\qmlproperty int WebEngineDownloadItem::id
@@ -426,6 +480,34 @@ QString QQuickWebEngineDownloadItem::interruptReasonString() const
static_cast<BrowserContextAdapterClient::DownloadInterruptReason>(interruptReason()));
}
+/*!
+ \qmlproperty bool WebEngineDownloadItem::isFinished
+ \readonly
+ \since QtWebEngine 1.6
+
+ Whether this download is finished (completed, cancelled, or non-resumable interrupted state).
+ */
+
+bool QQuickWebEngineDownloadItem::isFinished() const
+{
+ Q_D(const QQuickWebEngineDownloadItem);
+ return d->downloadFinished;
+}
+
+/*!
+ \qmlproperty bool WebEngineDownloadItem::isPaused
+ \readonly
+ \since QtWebEngine 1.6
+
+ Whether this download is paused.
+ */
+
+bool QQuickWebEngineDownloadItem::isPaused() const
+{
+ Q_D(const QQuickWebEngineDownloadItem);
+ return d->downloadPaused;
+}
+
QQuickWebEngineDownloadItem::QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate *p, QObject *parent)
: QObject(parent)
, d_ptr(p)
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h
index 889d0bcb7..972b130aa 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p.h
@@ -131,9 +131,13 @@ public:
Q_PROPERTY(DownloadType type READ type NOTIFY typeChanged REVISION 3 FINAL)
Q_PROPERTY(DownloadInterruptReason interruptReason READ interruptReason NOTIFY interruptReasonChanged REVISION 4 FINAL)
Q_PROPERTY(QString interruptReasonString READ interruptReasonString NOTIFY interruptReasonChanged REVISION 4 FINAL)
+ Q_PROPERTY(bool isFinished READ isFinished NOTIFY isFinishedChanged REVISION 5 FINAL)
+ Q_PROPERTY(bool isPaused READ isPaused NOTIFY isPausedChanged REVISION 5 FINAL)
Q_INVOKABLE void accept();
Q_INVOKABLE void cancel();
+ Q_INVOKABLE void pause();
+ Q_INVOKABLE void resume();
quint32 id() const;
DownloadState state() const;
@@ -147,6 +151,8 @@ public:
DownloadType type() const;
DownloadInterruptReason interruptReason() const;
QString interruptReasonString() const;
+ bool isFinished() const;
+ bool isPaused() const;
Q_SIGNALS:
void stateChanged();
@@ -157,6 +163,8 @@ Q_SIGNALS:
void pathChanged();
Q_REVISION(3) void typeChanged();
Q_REVISION(4) void interruptReasonChanged();
+ Q_REVISION(5) void isFinishedChanged();
+ Q_REVISION(5) void isPausedChanged();
private:
QQuickWebEngineDownloadItem(QQuickWebEngineDownloadItemPrivate*, QObject *parent = 0);
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index 4fb609492..6b4f7c8d3 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -79,6 +79,8 @@ public:
qint64 receivedBytes;
QString mimeType;
QString downloadPath;
+ bool downloadFinished;
+ bool downloadPaused;
void update(const QtWebEngineCore::BrowserContextAdapterClient::DownloadItemInfo &info);
void updateState(QQuickWebEngineDownloadItem::DownloadState newState);
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index e051d8755..7f591efe3 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -144,7 +144,7 @@ QQuickWebEngineProfilePrivate::QQuickWebEngineProfilePrivate(QSharedPointer<Brow
: m_settings(new QQuickWebEngineSettings())
, m_browserContext(new QWebEngineBrowserContext(browserContext, this))
{
- m_settings->d_ptr->initDefaults(browserContext->isOffTheRecord());
+ m_settings->d_ptr->initDefaults();
// Fullscreen API was implemented before the supported setting, so we must
// make it default true to avoid change in default API behavior.
m_settings->d_ptr->setAttribute(QtWebEngineCore::WebEngineSettings::FullScreenSupportEnabled, true);
@@ -676,34 +676,8 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
For example, the language \c en-US will load the \c en-US.bdic
dictionary file.
- Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
- first in the local directory and if it is not found, in the Qt
- installation directory.
-
- On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
- how spellchecking data is found:
-
- \list
- \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
- platforms
- \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
- will depend on the installed OS dictionaries)
- \endlist
-
- Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
- subdirectory located inside the application bundle \c Resources directory, and also in the
- \c Resources directory located inside the Qt framework bundle.
-
- To summarize, in case of Hunspell usage, the following paths are considered:
-
- \list
- \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
- or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
- (on macOS)
- \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
- or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
- bundle on macOS)
- \endlist
+ See the \l {Spellchecker}{Spellchecker feature documentation} for how
+ dictionary files are searched.
For more information about how to compile \c .bdic dictionaries, see the
\l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
@@ -821,7 +795,8 @@ static bool checkInternalScheme(const QByteArray &scheme)
static QSet<QByteArray> internalSchemes;
if (internalSchemes.isEmpty()) {
internalSchemes << QByteArrayLiteral("qrc") << QByteArrayLiteral("data") << QByteArrayLiteral("blob")
- << QByteArrayLiteral("http") << QByteArrayLiteral("ftp") << QByteArrayLiteral("javascript");
+ << QByteArrayLiteral("http") << QByteArrayLiteral("https") << QByteArrayLiteral("ftp")
+ << QByteArrayLiteral("javascript");
}
return internalSchemes.contains(scheme);
}
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index ff2541376..3ce53337c 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -311,8 +311,7 @@ bool QQuickWebEngineSettings::touchIconsEnabled() const
Focus is given to the view whenever a navigation operation occurs
(load, stop, reload, reload and bypass cache, forward, backward, set content, and so on).
- Enabled by default. See \l{WebEngine Recipe Browser} for an example where
- this property is disabled.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::focusOnNavigationEnabled() const
{
@@ -363,6 +362,26 @@ bool QQuickWebEngineSettings::allowGeolocationOnInsecureOrigins() const
}
/*!
+ \qmlproperty bool WebEngineSettings::allowWindowActivationFromJavaScript
+ \since QtWebEngine 1.6
+ Allows the window.focus() method in JavaScript. Disallowed by default.
+*/
+bool QQuickWebEngineSettings::allowWindowActivationFromJavaScript() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::AllowWindowActivationFromJavaScript);
+}
+
+/*!
+ \qmlproperty bool WebEngineSettings::showScrollBars
+ \since QtWebEngine 1.6
+ Shows scroll bars. Enabled by default.
+*/
+bool QQuickWebEngineSettings::showScrollBars() const
+{
+ return d_ptr->testAttribute(WebEngineSettings::ShowScrollBars);
+}
+
+/*!
\qmlproperty string WebEngineSettings::defaultTextEncoding
\since QtWebEngine 1.2
@@ -564,6 +583,22 @@ void QQuickWebEngineSettings::setAllowGeolocationOnInsecureOrigins(bool on)
Q_EMIT allowGeolocationOnInsecureOriginsChanged();
}
+void QQuickWebEngineSettings::setAllowWindowActivationFromJavaScript(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::AllowWindowActivationFromJavaScript);
+ d_ptr->setAttribute(WebEngineSettings::AllowWindowActivationFromJavaScript, on);
+ if (wasOn != on)
+ Q_EMIT allowWindowActivationFromJavaScriptChanged();
+}
+
+void QQuickWebEngineSettings::setShowScrollBars(bool on)
+{
+ bool wasOn = d_ptr->testAttribute(WebEngineSettings::ShowScrollBars);
+ d_ptr->setAttribute(WebEngineSettings::ShowScrollBars, on);
+ if (wasOn != on)
+ Q_EMIT showScrollBarsChanged();
+}
+
void QQuickWebEngineSettings::setParentSettings(QQuickWebEngineSettings *parentSettings)
{
d_ptr->setParentSettings(parentSettings->d_ptr.data());
diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h
index 10217c678..a8b11c769 100644
--- a/src/webengine/api/qquickwebenginesettings_p.h
+++ b/src/webengine/api/qquickwebenginesettings_p.h
@@ -86,6 +86,8 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineSettings : public QObject {
Q_PROPERTY(bool printElementBackgrounds READ printElementBackgrounds WRITE setPrintElementBackgrounds NOTIFY printElementBackgroundsChanged REVISION 3 FINAL)
Q_PROPERTY(bool allowRunningInsecureContent READ allowRunningInsecureContent WRITE setAllowRunningInsecureContent NOTIFY allowRunningInsecureContentChanged REVISION 3 FINAL)
Q_PROPERTY(bool allowGeolocationOnInsecureOrigins READ allowGeolocationOnInsecureOrigins WRITE setAllowGeolocationOnInsecureOrigins NOTIFY allowGeolocationOnInsecureOriginsChanged REVISION 4 FINAL)
+ Q_PROPERTY(bool allowWindowActivationFromJavaScript READ allowWindowActivationFromJavaScript WRITE setAllowWindowActivationFromJavaScript NOTIFY allowWindowActivationFromJavaScriptChanged REVISION 5 FINAL)
+ Q_PROPERTY(bool showScrollBars READ showScrollBars WRITE setShowScrollBars NOTIFY showScrollBarsChanged REVISION 5 FINAL)
public:
~QQuickWebEngineSettings();
@@ -113,6 +115,8 @@ public:
bool printElementBackgrounds() const;
bool allowRunningInsecureContent() const;
bool allowGeolocationOnInsecureOrigins() const;
+ bool allowWindowActivationFromJavaScript() const;
+ bool showScrollBars() const;
void setAutoLoadImages(bool on);
void setJavascriptEnabled(bool on);
@@ -137,6 +141,8 @@ public:
void setPrintElementBackgrounds(bool on);
void setAllowRunningInsecureContent(bool on);
void setAllowGeolocationOnInsecureOrigins(bool on);
+ void setAllowWindowActivationFromJavaScript(bool on);
+ void setShowScrollBars(bool on);
signals:
void autoLoadImagesChanged();
@@ -162,6 +168,8 @@ signals:
Q_REVISION(3) void printElementBackgroundsChanged();
Q_REVISION(3) void allowRunningInsecureContentChanged();
Q_REVISION(4) void allowGeolocationOnInsecureOriginsChanged();
+ Q_REVISION(5) void allowWindowActivationFromJavaScriptChanged();
+ Q_REVISION(5) void showScrollBarsChanged();
private:
explicit QQuickWebEngineSettings(QQuickWebEngineSettings *parentSettings = 0);
diff --git a/src/webengine/api/qquickwebenginetestsupport.cpp b/src/webengine/api/qquickwebenginetestsupport.cpp
index 46ffb06f4..b3290d3cc 100644
--- a/src/webengine/api/qquickwebenginetestsupport.cpp
+++ b/src/webengine/api/qquickwebenginetestsupport.cpp
@@ -40,17 +40,21 @@
#include "qquickwebenginetestsupport_p.h"
#include "qquickwebengineloadrequest_p.h"
+#include <QQuickWindow>
+#include <QtTest/qtest.h>
QT_BEGIN_NAMESPACE
+namespace QTest {
+ int Q_TESTLIB_EXPORT defaultMouseDelay();
+}
+
QQuickWebEngineErrorPage::QQuickWebEngineErrorPage()
{
}
void QQuickWebEngineErrorPage::loadFinished(bool success, const QUrl &url)
{
- // Loading of the error page should not fail.
- Q_ASSERT(success);
Q_UNUSED(success);
QQuickWebEngineLoadRequest loadRequest(url, QQuickWebEngineView::LoadSucceededStatus);
@@ -64,8 +68,106 @@ void QQuickWebEngineErrorPage::loadStarted(const QUrl &provisionalUrl)
Q_EMIT loadingChanged(&loadRequest);
}
+
+QQuickWebEngineTestInputContext::QQuickWebEngineTestInputContext()
+ : m_visible(false)
+{
+}
+
+QQuickWebEngineTestInputContext::~QQuickWebEngineTestInputContext()
+{
+ release();
+}
+
+void QQuickWebEngineTestInputContext::create()
+{
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = this;
+}
+
+void QQuickWebEngineTestInputContext::release()
+{
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = 0;
+}
+
+void QQuickWebEngineTestInputContext::showInputPanel()
+{
+ m_visible = true;
+}
+
+void QQuickWebEngineTestInputContext::hideInputPanel()
+{
+ m_visible = false;
+}
+
+bool QQuickWebEngineTestInputContext::isInputPanelVisible() const
+{
+ return m_visible;
+}
+
+
+QQuickWebEngineTestEvent::QQuickWebEngineTestEvent()
+{
+}
+
+bool QQuickWebEngineTestEvent::mouseMultiClick(QObject *item, qreal x, qreal y, int clickCount)
+{
+ QTEST_ASSERT(item);
+
+ QWindow *view = eventWindow(item);
+ if (!view)
+ return false;
+
+ for (int i = 0; i < clickCount; ++i) {
+ mouseEvent(QMouseEvent::MouseButtonPress, view, item, QPointF(x, y));
+ mouseEvent(QMouseEvent::MouseButtonRelease, view, item, QPointF(x, y));
+ }
+ QTest::lastMouseTimestamp += QTest::mouseDoubleClickInterval;
+
+ return true;
+}
+
+QWindow *QQuickWebEngineTestEvent::eventWindow(QObject *item)
+{
+ QWindow *window = qobject_cast<QWindow *>(item);
+ if (window)
+ return window;
+
+ QQuickItem *quickItem = qobject_cast<QQuickItem *>(item);
+ if (quickItem)
+ return quickItem->window();
+
+ QQuickItem *testParentItem = qobject_cast<QQuickItem *>(parent());
+ if (testParentItem)
+ return testParentItem->window();
+
+ return nullptr;
+}
+
+void QQuickWebEngineTestEvent::mouseEvent(QEvent::Type type, QWindow *window, QObject *item, const QPointF &_pos)
+{
+ QTest::qWait(QTest::defaultMouseDelay());
+ QTest::lastMouseTimestamp += QTest::defaultMouseDelay();
+
+ QPoint pos;
+ QQuickItem *sgitem = qobject_cast<QQuickItem *>(item);
+ if (sgitem)
+ pos = sgitem->mapToScene(_pos).toPoint();
+
+ QMouseEvent me(type, pos, window->mapFromGlobal(pos), Qt::LeftButton, Qt::LeftButton, 0);
+ me.setTimestamp(++QTest::lastMouseTimestamp);
+
+ QSpontaneKeyEvent::setSpontaneous(&me);
+ if (!qApp->notify(window, &me))
+ QTest::qWarn("Mouse click event not accepted by receiving window");
+}
+
+
QQuickWebEngineTestSupport::QQuickWebEngineTestSupport()
- : m_errorPage(new QQuickWebEngineErrorPage())
+ : m_errorPage(new QQuickWebEngineErrorPage)
+ , m_testInputContext(new QQuickWebEngineTestInputContext)
+ , m_testEvent(new QQuickWebEngineTestEvent)
{
}
@@ -74,6 +176,16 @@ QQuickWebEngineErrorPage *QQuickWebEngineTestSupport::errorPage() const
return m_errorPage.data();
}
+QQuickWebEngineTestInputContext *QQuickWebEngineTestSupport::testInputContext() const
+{
+ return m_testInputContext.data();
+}
+
+QQuickWebEngineTestEvent * QQuickWebEngineTestSupport::testEvent() const
+{
+ return m_testEvent.data();
+}
+
QT_END_NAMESPACE
#include "moc_qquickwebenginetestsupport_p.cpp"
diff --git a/src/webengine/api/qquickwebenginetestsupport_p.h b/src/webengine/api/qquickwebenginetestsupport_p.h
index cca8d1df4..b601fb47c 100644
--- a/src/webengine/api/qquickwebenginetestsupport_p.h
+++ b/src/webengine/api/qquickwebenginetestsupport_p.h
@@ -51,14 +51,17 @@
// We mean it.
//
+#include <private/qinputmethod_p.h>
#include <private/qtwebengineglobal_p.h>
+#include <QEvent>
#include <QObject>
#include <QUrl>
QT_BEGIN_NAMESPACE
class QQuickWebEngineLoadRequest;
+class QWindow;
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineErrorPage : public QObject {
Q_OBJECT
@@ -73,13 +76,49 @@ Q_SIGNALS:
void loadingChanged(QQuickWebEngineLoadRequest *loadRequest);
};
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineTestInputContext : public QPlatformInputContext {
+ Q_OBJECT
+
+public:
+ QQuickWebEngineTestInputContext();
+ ~QQuickWebEngineTestInputContext();
+
+ Q_INVOKABLE void create();
+ Q_INVOKABLE void release();
+
+ virtual void showInputPanel();
+ virtual void hideInputPanel();
+ virtual bool isInputPanelVisible() const;
+
+private:
+ bool m_visible;
+};
+
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineTestEvent : public QObject {
+ Q_OBJECT
+
+public:
+ QQuickWebEngineTestEvent();
+
+public Q_SLOTS:
+ bool mouseMultiClick(QObject *item, qreal x, qreal y, int clickCount);
+
+private:
+ QWindow *eventWindow(QObject *item = 0);
+ void mouseEvent(QEvent::Type type, QWindow *window, QObject *item, const QPointF &_pos);
+};
+
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineTestSupport : public QObject {
Q_OBJECT
Q_PROPERTY(QQuickWebEngineErrorPage *errorPage READ errorPage CONSTANT FINAL)
+ Q_PROPERTY(QQuickWebEngineTestInputContext *testInputContext READ testInputContext CONSTANT FINAL)
+ Q_PROPERTY(QQuickWebEngineTestEvent *testEvent READ testEvent CONSTANT FINAL)
public:
QQuickWebEngineTestSupport();
QQuickWebEngineErrorPage *errorPage() const;
+ QQuickWebEngineTestInputContext *testInputContext() const;
+ QQuickWebEngineTestEvent *testEvent() const;
Q_SIGNALS:
void windowCloseRejected();
@@ -87,6 +126,8 @@ Q_SIGNALS:
private:
QScopedPointer<QQuickWebEngineErrorPage> m_errorPage;
+ QScopedPointer<QQuickWebEngineTestInputContext> m_testInputContext;
+ QScopedPointer<QQuickWebEngineTestEvent> m_testEvent;
};
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 25f578528..b4270a876 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -94,27 +94,6 @@
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)
{
@@ -138,6 +117,7 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
, m_fullscreenMode(false)
, isLoading(false)
, m_activeFocusOnPress(true)
+ , m_validationShowing(false)
, devicePixelRatio(QGuiApplication::primaryScreen()->devicePixelRatio())
, m_webChannel(0)
, m_webChannelWorld(0)
@@ -202,7 +182,7 @@ RenderWidgetHostViewQtDelegate *QQuickWebEngineViewPrivate::CreateRenderWidgetHo
return quickDelegate;
}
-bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenuData &data)
+void QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenuData &data)
{
Q_Q(QQuickWebEngineView);
@@ -214,13 +194,13 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
Q_EMIT q->contextMenuRequested(request);
if (request->isAccepted())
- return true;
+ return;
// Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated
// on OSX.
QObject *menu = ui()->addMenu(q, QString(), data.position());
if (!menu)
- return false;
+ return;
// Populate our menu
MenuItemHandler *item = 0;
@@ -265,10 +245,12 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
ui()->addMenuItem(item, QQuickWebEngineView::tr("Unselect"));
}
- if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
+ if (!data.linkText().isEmpty() && !data.unfilteredLinkUrl().isEmpty()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::CopyLinkToClipboard); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Copy Link URL"));
+ }
+ if (!data.linkText().isEmpty() && data.linkUrl().isValid()) {
item = new MenuItemHandler(menu);
QObject::connect(item, &MenuItemHandler::triggered, [q] { q->triggerWebAction(QQuickWebEngineView::DownloadLinkToDisk); });
ui()->addMenuItem(item, QQuickWebEngineView::tr("Save Link"));
@@ -346,7 +328,6 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu
// Now fire the popup() method on the top level menu
ui()->showMenu(menu);
- return true;
}
void QQuickWebEngineViewPrivate::navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame)
@@ -566,26 +547,17 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, boo
void QQuickWebEngineViewPrivate::focusContainer()
{
Q_Q(QQuickWebEngineView);
+ QQuickWindow *window = q->window();
+ if (window)
+ window->requestActivate();
q->forceActiveFocus();
}
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);
+ QCoreApplication::sendEvent(q->parentItem(), event);
}
void QQuickWebEngineViewPrivate::adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &, const QUrl &targetUrl)
@@ -698,8 +670,13 @@ void QQuickWebEngineViewPrivate::runMediaAccessPermissionRequest(const QUrl &sec
feature = QQuickWebEngineView::MediaAudioVideoCapture;
else if (requestFlags.testFlag(WebContentsAdapterClient::MediaAudioCapture))
feature = QQuickWebEngineView::MediaAudioCapture;
- else // WebContentsAdapterClient::MediaVideoCapture
+ else if (requestFlags.testFlag(WebContentsAdapterClient::MediaVideoCapture))
feature = QQuickWebEngineView::MediaVideoCapture;
+ else if (requestFlags.testFlag(WebContentsAdapterClient::MediaDesktopAudioCapture) &&
+ requestFlags.testFlag(WebContentsAdapterClient::MediaDesktopVideoCapture))
+ feature = QQuickWebEngineView::DesktopAudioVideoCapture;
+ else // if (requestFlags.testFlag(WebContentsAdapterClient::MediaDesktopVideoCapture))
+ feature = QQuickWebEngineView::DesktopVideoCapture;
Q_EMIT q->featurePermissionRequested(securityOrigin, feature);
}
@@ -867,8 +844,7 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
Q_D(QQuickWebEngineView);
d->q_ptr = this;
this->setActiveFocusOnTab(true);
- this->setFlags(QQuickItem::ItemIsFocusScope | QQuickItem::ItemAcceptsInputMethod
- | QQuickItem::ItemAcceptsDrops);
+ this->setFlags(QQuickItem::ItemIsFocusScope | QQuickItem::ItemAcceptsDrops);
#ifndef QT_NO_ACCESSIBILITY
QQuickAccessibleAttached *accessible = QQuickAccessibleAttached::qmlAttachedProperties(this);
@@ -1115,7 +1091,8 @@ void QQuickWebEngineViewPrivate::showValidationMessage(const QRect &anchor, cons
Q_Q(QQuickWebEngineView);
QQuickWebEngineFormValidationMessageRequest *request;
request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Show,
- anchor,mainText,subText);
+ anchor,mainText,subText);
+ m_validationShowing = true;
// mark the object for gc by creating temporary jsvalue
qmlEngine(q)->newQObject(request);
Q_EMIT q->formValidationMessageRequested(request);
@@ -1126,8 +1103,12 @@ void QQuickWebEngineViewPrivate::showValidationMessage(const QRect &anchor, cons
void QQuickWebEngineViewPrivate::hideValidationMessage()
{
Q_Q(QQuickWebEngineView);
+ // Suppress the initial hide message before any show messages (Since 61-based)
+ if (!m_validationShowing)
+ return;
QQuickWebEngineFormValidationMessageRequest *request;
request = new QQuickWebEngineFormValidationMessageRequest(QQuickWebEngineFormValidationMessageRequest::Hide);
+ m_validationShowing = false;
// mark the object for gc by creating temporary jsvalue
qmlEngine(q)->newQObject(request);
Q_EMIT q->formValidationMessageRequested(request);
@@ -1427,7 +1408,8 @@ void QQuickWebEngineView::grantFeaturePermission(const QUrl &securityOrigin, QQu
{
if (!d_ptr->adapter)
return;
- if (!granted && feature >= MediaAudioCapture && feature <= MediaAudioVideoCapture) {
+ if (!granted && ((feature >= MediaAudioCapture && feature <= MediaAudioVideoCapture) ||
+ (feature >= DesktopVideoCapture && feature <= DesktopAudioVideoCapture))) {
d_ptr->adapter->grantMediaAccessPermission(securityOrigin, WebContentsAdapterClient::MediaNone);
return;
}
@@ -1445,6 +1427,16 @@ void QQuickWebEngineView::grantFeaturePermission(const QUrl &securityOrigin, QQu
case Geolocation:
d_ptr->adapter->runGeolocationRequestCallback(securityOrigin, granted);
break;
+ case DesktopVideoCapture:
+ d_ptr->adapter->grantMediaAccessPermission(securityOrigin, WebContentsAdapterClient::MediaDesktopVideoCapture);
+ break;
+ case DesktopAudioVideoCapture:
+ d_ptr->adapter->grantMediaAccessPermission(
+ securityOrigin,
+ WebContentsAdapterClient::MediaRequestFlags(
+ WebContentsAdapterClient::MediaDesktopAudioCapture |
+ WebContentsAdapterClient::MediaDesktopVideoCapture));
+ break;
default:
Q_UNREACHABLE();
}
@@ -1606,14 +1598,14 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
}
break;
case CopyLinkToClipboard:
- if (d->m_contextMenuData.linkUrl().isValid()) {
- QString urlString = d->m_contextMenuData.linkUrl().toString(QUrl::FullyEncoded);
+ if (!d->m_contextMenuData.unfilteredLinkUrl().isEmpty()) {
+ QString urlString = d->m_contextMenuData.unfilteredLinkUrl().toString(QUrl::FullyEncoded);
QString title = d->m_contextMenuData.linkText().toHtmlEscaped();
QMimeData *data = new QMimeData();
data->setText(urlString);
QString html = QStringLiteral("<a href=\"") + urlString + QStringLiteral("\">") + title + QStringLiteral("</a>");
data->setHtml(html);
- data->setUrls(QList<QUrl>() << d->m_contextMenuData.linkUrl());
+ data->setUrls(QList<QUrl>() << d->m_contextMenuData.unfilteredLinkUrl());
qApp->clipboard()->setMimeData(data);
}
break;
@@ -1711,6 +1703,42 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
case ViewSource:
d->adapter->viewSource();
break;
+ case ToggleBold:
+ runJavaScript(QStringLiteral("document.execCommand('bold');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case ToggleItalic:
+ runJavaScript(QStringLiteral("document.execCommand('italic');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case ToggleUnderline:
+ runJavaScript(QStringLiteral("document.execCommand('underline');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case ToggleStrikethrough:
+ runJavaScript(QStringLiteral("document.execCommand('strikethrough');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case AlignLeft:
+ runJavaScript(QStringLiteral("document.execCommand('justifyLeft');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case AlignCenter:
+ runJavaScript(QStringLiteral("document.execCommand('justifyCenter');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case AlignRight:
+ runJavaScript(QStringLiteral("document.execCommand('justifyRight');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case AlignJustified:
+ runJavaScript(QStringLiteral("document.execCommand('justifyFull');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case Indent:
+ runJavaScript(QStringLiteral("document.execCommand('indent');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case Outdent:
+ runJavaScript(QStringLiteral("document.execCommand('outdent');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case InsertOrderedList:
+ runJavaScript(QStringLiteral("document.execCommand('insertOrderedList');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
+ case InsertUnorderedList:
+ runJavaScript(QStringLiteral("document.execCommand('insertUnorderedList');"), QQuickWebEngineScript::ApplicationWorld);
+ break;
default:
Q_UNREACHABLE();
}
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index 8112c7609..ae0523460 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -199,7 +199,9 @@ public:
MediaAudioCapture,
MediaVideoCapture,
MediaAudioVideoCapture,
- Geolocation
+ Geolocation,
+ DesktopVideoCapture,
+ DesktopAudioVideoCapture
};
Q_ENUM(Feature)
@@ -244,6 +246,22 @@ public:
Unselect,
SavePage,
ViewSource,
+
+ ToggleBold,
+ ToggleItalic,
+ ToggleUnderline,
+ ToggleStrikethrough,
+
+ AlignLeft,
+ AlignCenter,
+ AlignRight,
+ AlignJustified,
+ Indent,
+ Outdent,
+
+ InsertOrderedList,
+ InsertUnorderedList,
+
WebActionCount
};
Q_ENUM(WebAction)
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 19ecf5e1f..1b8edc800 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -113,7 +113,7 @@ public:
virtual void windowCloseRejected() Q_DECL_OVERRIDE;
virtual void requestFullScreenMode(const QUrl &origin, bool fullscreen) Q_DECL_OVERRIDE;
virtual bool isFullScreenMode() const Q_DECL_OVERRIDE;
- virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
+ virtual void contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(QSharedPointer<QtWebEngineCore::FilePickerController>) Q_DECL_OVERRIDE;
@@ -179,6 +179,7 @@ public:
bool isLoading;
bool m_activeFocusOnPress;
bool m_navigationActionTriggered;
+ bool m_validationShowing;
qreal devicePixelRatio;
QMap<quint64, QJSValue> m_callbacks;
QList<QSharedPointer<CertificateErrorController> > m_certificateErrorControllers;
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 9e1979429..07d9269db 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -78,8 +78,8 @@
This feature can be tested by launching a Qt WebEngine application with the
command line option \c {--remote-debugging-port=[your-port]} or by setting
the environment variable \c QTWEBENGINE_REMOTE_DEBUGGING, and then using a
- Chromium based browser (such as \l{WebEngine Demo Browser Example}
- {Demo Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}) to connect
+ Chromium based browser (such as \l{WebEngine Widgets Simple Browser Example}
+ {Simple Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}) to connect
to \c {http://localhost:[your-port]}.
For more information, see \l {Qt WebEngine Debugging and Profiling}.
@@ -90,8 +90,8 @@
This feature can be tested by opening an HTML5 drag and drop demo, such as
\l{HTML5 Demos - Drag and Drop}, \l{HTML5 Demos - Simple Drag and Drop}, or
- \l{HTML5 Demos - Drag and Drop, Automatic Upload}, in \l{WebEngine Demo
- Browser Example}{Demo Browser} or \l{WebEngine Quick Nano Browser}
+ \l{HTML5 Demos - Drag and Drop, Automatic Upload}, in \l{WebEngine Widgets
+ Simple Browser Example}{Simple Browser} or \l{WebEngine Quick Nano Browser}
{Nano Browser}.
Dragging files into the browser is not actually part of HTML5, but it is
@@ -109,7 +109,7 @@
QWebEnginePage::fullScreenRequested.
This feature can be tested by playing a video from YouTube in \l{WebEngine
- Demo Browser Example}{Demo Browser} or \l{WebEngine Quick Nano Browser}
+ Widgets Video Player Example}{Video Player} or \l{WebEngine Quick Nano Browser}
{Nano Browser}, and clicking the full screen icon to go into fullscreen
mode.
@@ -124,8 +124,8 @@
proprietary audio and video codecs. For more information about enabling the
codecs, see \l{Audio and Video Codecs}.
- This feature can be tested by playing a video in \l{WebEngine Demo Browser
- Example}{Demo Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}
+ This feature can be tested by playing a video in \l{WebEngine Widgets Simple Browser
+ Example}{Simple Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}
from \l{castLabs}, \l{Swank Motion Pictures, Inc.}, or \l{Shaka Player}.
Support for this feature was added in Qt 5.7.0.
@@ -137,11 +137,11 @@
QWebEnginePage::Geolocation or \l{WebEngineView::Feature}
{WebEngineView.Feature}.
- This feature can be tested if Qt Location has been built before Qt WebEngine.
- The \c http://html5demos.com/geo page can be opened in the \l{WebEngine Demo
- Browser Example}{Demo Browser} and allowed to find the current position of
- the user. Note that on Windows an external GPS receiver must be connected to
- the application. For more information, see \l{Qt Positioning}.
+ If Qt Location has been built before Qt WebEngine then this feature can be
+ tested by using \l{WebEngine Widgets Maps Example}{Maps} and allowing it to
+ find the current position of the user. Note that on Windows an external GPS
+ receiver must be connected to the application. For more information, see
+ \l{Qt Positioning}.
Support for this feature was added in Qt 5.5.0.
@@ -254,7 +254,7 @@
--ppapi-flash-version=16.0.0.235
\endcode
- This feature can be tested in \l{WebEngine Demo Browser Example}{Demo Browser}
+ This feature can be tested in \l{WebEngine Widgets Simple Browser Example}{Simple Browser}
or \l{WebEngine Quick Nano Browser}{Nano Browser} if the Adobe Flash PPAPI
plugin is installed and plugins are enabled in the browser. To test the
feature, the \c https://helpx.adobe.com/flash-player.html page can be opened
@@ -266,8 +266,8 @@
information, see QWebEnginePage::printToPdf() and
\l{WebEngineView::printToPdf}{WebEngineView.printToPdf}.
- This feature can be tested in \l{WebEngine Demo Browser Example}
- {Demo Browser} by selecting \uicontrol File > \uicontrol {Print to PDF}.
+ This feature can be tested using \l{WebEngine Widgets Html2Pdf Example}
+ {Html2Pdf}.
Support for this feature was added in Qt 5.7.0.
@@ -294,9 +294,40 @@
These two files can be converted into the \c bdic format by using the
\c qwebengine_convert_dict tool that is shipped together with Qt.
When the Qt WebEngine spellchecker initializes, it will try to load the
- \c bdict dictionaries and to check them for consistency. First, it searches
- \e qtwebengine_dictionaries directories relative to the executable,
- then it will look in \c QT_INSTALL_PREFIX/qtwebengine_dictionaries.
+ \c bdict dictionaries and to check them for consistency.
+
+ If \c QTWEBENGINE_DICTIONARIES_PATH is set, the spellchecker uses the
+ dictionaries in the specified directory without looking anywere else.
+ Otherwise, it uses the \e qtwebengine_dictionaries directory relative to the
+ executable if it exists. If it does not exist, it will look in \c
+ QT_INSTALL_PREFIX/qtwebengines_dictionaries.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there
+ are two possibilities how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just
+ like on other platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which
+ means the results will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e
+ qtwebengine_dictionaries subdirectory located inside the application bundle
+ \c Resources directory, and also in the \c Resources directory located
+ inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
+
+ \list
+ \li \c QTWEBENGINE_DICTIONARIES_PATH, if set
+ \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
+ \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
+ \endlist
Spellchecking is disabled by default and can be enabled per profile by
using the QWebEngineProfile::setSpellCheckEnabled() method in widget-based
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index e9ca573b7..904e4a551 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -89,7 +89,7 @@
\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 56.0.2924.122, with
+ This version of Qt WebEngine is based on Chromium version 61.0.3163.99, with
additional security fixes from newer versions.
\section2 Qt WebEngine Process
diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc
index 27c3d6920..9cd7e3f27 100644
--- a/src/webengine/doc/src/webengineview_lgpl.qdoc
+++ b/src/webengine/doc/src/webengineview_lgpl.qdoc
@@ -86,7 +86,7 @@
focus on press. This can be useful in a hybrid UI.
The \l {WebEngineSettings::focusOnNavigationEnabled} {focusOnNavigationEnabled} setting can be
- used to stop the view from automatically receiving focus when a navigation operation occurs
+ used to make the view automatically receive focus when a navigation operation occurs
(like loading or reloading a page or navigating through history).
The \l linkHovered() signal is emitted when a mouse pointer passes over a link and thus
@@ -112,7 +112,7 @@
A web page can request through the JavaScript API to be loaded in fullscreen mode. The
\l fullScreenRequested() signal is emitted when the web page issues the request. The
- WebEngineFullScreenRequest utility type can be used to toggle fullscreen requests. The
+ FullScreenRequest utility type can be used to toggle fullscreen requests. The
\l fullScreenCancelled method can be used to notify the browser engine when the windowing
system forces the application to leave fullscreen mode.
@@ -576,7 +576,7 @@
*/
/*!
- \qmlsignal WebEngineView::fullScreenRequested(WebEngineFullScreenRequest request)
+ \qmlsignal WebEngineView::fullScreenRequested(FullScreenRequest request)
\since QtWebEngine 1.1
This signal is emitted when the web page requests fullscreen mode through the
@@ -793,6 +793,46 @@
\value WebEngineView.ViewSource
Show the source of the current page in a new tab. (Added in Qt 5.8)
+ \value WebEngineView.ToggleBold
+ Toggles boldness for the selection or at the cursor position.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.ToggleItalic
+ Toggles italics for the selection or at the cursor position.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.ToggleUnderline
+ Toggles underlining of the selection or at the cursor position.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.ToggleStrikethrough
+ Toggles striking through the selection or at the cursor position.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+
+ \value WebEngineView.AlignLeft
+ Aligns the lines containing the selection or the cursor to the left.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.AlignCenter
+ Aligns the lines containing the selection or the cursor at the center.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.AlignRight
+ Aligns the lines containing the selection or the cursor to the right.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.AlignJustified
+ Stretches the lines containing the selection or the cursor so that each
+ line has equal width.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.Indent
+ Indents the lines containing the selection or the cursor.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.Outdent
+ Outdents the lines containing the selection or the cursor.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+
+ \value WebEngineView.InsertOrderedList
+ Inserts an ordered list at the current cursor position, deleting the current selection.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
+ \value WebEngineView.InsertUnorderedList
+ Inserts an unordered list at the current cursor position,
+ deleting the current selection.
+ Requires \c contenteditable="true". (Added in Qt 5.10)
\omitvalue WebActionCount
*/
@@ -810,6 +850,11 @@
Video devices, such as cameras.
\value WebEngineView.MediaAudioVideoCapture
Both audio and video capture devices.
+ \value DesktopVideoCapture
+ Video output capture, that is, the capture of the user's display.
+ (Added in Qt 5.10)
+ \value DesktopAudioVideoCapture
+ Both audio and video output capture. (Added in Qt 5.10)
\sa featurePermissionRequested(), grantFeaturePermission()
*/
@@ -994,7 +1039,7 @@
*/
/*!
- \qmltype WebEngineFullScreenRequest
+ \qmltype FullScreenRequest
\instantiates QQuickWebEngineFullScreenRequest
\inqmlmodule QtWebEngine
\since QtWebEngine 1.1
@@ -1005,13 +1050,13 @@
*/
/*!
- \qmlproperty url WebEngineFullScreenRequest::origin
+ \qmlproperty url FullScreenRequest::origin
\readonly
The URL of the web page that issued the fullscreen request.
*/
/*!
- \qmlproperty bool WebEngineFullScreenRequest::toggleOn
+ \qmlproperty bool FullScreenRequest::toggleOn
\readonly
Returns \c{true} if the application should toggle fullscreen mode on, \c{false} otherwise.
@@ -1020,7 +1065,7 @@
*/
/*!
- \qmlmethod void WebEngineFullScreenRequest::accept()
+ \qmlmethod void FullScreenRequest::accept()
Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
property to be equal to toggleOn.
@@ -1044,7 +1089,7 @@
*/
/*!
- \qmlmethod void WebEngineFullScreenRequest::reject()
+ \qmlmethod void FullScreenRequest::reject()
Rejects a fullscreen request.
*/
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index 3c8991ff7..5ab792699 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -85,6 +85,7 @@ public:
qmlRegisterType<QQuickWebEngineView, 3>(uri, 1, 3, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 4>(uri, 1, 4, "WebEngineView");
qmlRegisterType<QQuickWebEngineView, 5>(uri, 1, 5, "WebEngineView");
+ qmlRegisterType<QQuickWebEngineView, 6>(uri, 1, 6, "WebEngineView");
qmlRegisterType<QQuickWebEngineProfile>(uri, 1, 1, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 1>(uri, 1, 2, "WebEngineProfile");
qmlRegisterType<QQuickWebEngineProfile, 2>(uri, 1, 3, "WebEngineProfile");
@@ -102,6 +103,8 @@ public:
tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 4>(uri, 1, 5, "WebEngineDownloadItem",
tr("Cannot create a separate instance of WebEngineDownloadItem"));
+ qmlRegisterUncreatableType<QQuickWebEngineDownloadItem, 5>(uri, 1, 6, "WebEngineDownloadItem",
+ tr("Cannot create a separate instance of WebEngineDownloadItem"));
qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", msgUncreatableType("WebEngineNewViewRequest"));
qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest, 1>(uri, 1, 5, "WebEngineNewViewRequest", tr("Cannot create separate instance of WebEngineNewViewRequest"));
qmlRegisterUncreatableType<QQuickWebEngineSettings>(uri, 1, 1, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
@@ -109,6 +112,7 @@ public:
qmlRegisterUncreatableType<QQuickWebEngineSettings, 2>(uri, 1, 3, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 3>(uri, 1, 4, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterUncreatableType<QQuickWebEngineSettings, 4>(uri, 1, 5, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
+ qmlRegisterUncreatableType<QQuickWebEngineSettings, 5>(uri, 1, 6, "WebEngineSettings", tr("Cannot create a separate instance of WebEngineSettings"));
qmlRegisterSingletonType<QQuickWebEngineSingleton>(uri, 1, 1, "WebEngine", webEngineSingletonProvider);
qmlRegisterUncreatableType<QQuickWebEngineHistory>(uri, 1, 1, "NavigationHistory",
tr("Cannot create a separate instance of NavigationHistory"));
diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro
index 68404b4f8..1f9ef00c5 100644
--- a/src/webengine/plugin/plugin.pro
+++ b/src/webengine/plugin/plugin.pro
@@ -1,7 +1,7 @@
CXX_MODULE = qml
TARGET = qtwebengineplugin
TARGETPATH = QtWebEngine
-IMPORT_VERSION = 1.5
+IMPORT_VERSION = 1.6
QT += webengine qml quick
QT_PRIVATE += webengine-private
diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
index 459d56c75..321c462b5 100644
--- a/src/webengine/plugin/plugins.qmltypes
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -defaultplatform -dependencies dependencies.json -nonrelocatable QtWebEngine 1.5'
+// 'qmlplugindump -defaultplatform -dependencies dependencies.json -nonrelocatable QtWebEngine 1.6'
Module {
dependencies: ["QtQuick 2.6"]
@@ -509,10 +509,11 @@ Module {
"QtWebEngine/WebEngineSettings 1.2",
"QtWebEngine/WebEngineSettings 1.3",
"QtWebEngine/WebEngineSettings 1.4",
- "QtWebEngine/WebEngineSettings 1.5"
+ "QtWebEngine/WebEngineSettings 1.5",
+ "QtWebEngine/WebEngineSettings 1.6"
]
isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2, 3, 4]
+ exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5]
Property { name: "autoLoadImages"; type: "bool" }
Property { name: "javascriptEnabled"; type: "bool" }
Property { name: "javascriptCanOpenWindows"; type: "bool" }
@@ -536,6 +537,7 @@ Module {
Property { name: "printElementBackgrounds"; revision: 3; type: "bool" }
Property { name: "allowRunningInsecureContent"; revision: 3; type: "bool" }
Property { name: "allowGeolocationOnInsecureOrigins"; revision: 4; type: "bool" }
+ Property { name: "allowWindowActivationFromJavaScript"; revision: 5; type: "bool" }
Signal { name: "fullScreenSupportEnabledChanged"; revision: 1 }
Signal { name: "screenCaptureEnabledChanged"; revision: 2 }
Signal { name: "webGLEnabledChanged"; revision: 2 }
@@ -546,6 +548,7 @@ Module {
Signal { name: "printElementBackgroundsChanged"; revision: 3 }
Signal { name: "allowRunningInsecureContentChanged"; revision: 3 }
Signal { name: "allowGeolocationOnInsecureOriginsChanged"; revision: 4 }
+ Signal { name: "allowWindowActivationFromJavaScriptChanged"; revision: 5 }
}
Component {
name: "QQuickWebEngineSingleton"
@@ -573,9 +576,10 @@ Module {
"QtWebEngine/WebEngineView 1.2",
"QtWebEngine/WebEngineView 1.3",
"QtWebEngine/WebEngineView 1.4",
- "QtWebEngine/WebEngineView 1.5"
+ "QtWebEngine/WebEngineView 1.5",
+ "QtWebEngine/WebEngineView 1.6"
]
- exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5]
+ exportMetaObjectRevisions: [0, 1, 2, 3, 4, 5, 6]
Enum {
name: "NavigationRequestAction"
values: {
@@ -630,7 +634,9 @@ Module {
"MediaAudioCapture": 0,
"MediaVideoCapture": 1,
"MediaAudioVideoCapture": 2,
- "Geolocation": 3
+ "Geolocation": 3,
+ "DesktopVideoCapture": 4,
+ "DesktopAudioVideoCapture": 5
}
}
Enum {
@@ -669,7 +675,19 @@ Module {
"Unselect": 29,
"SavePage": 30,
"ViewSource": 31,
- "WebActionCount": 32
+ "ToggleBold": 32,
+ "ToggleItalic": 33,
+ "ToggleUnderline": 34,
+ "ToggleStrikethrough": 35,
+ "AlignLeft": 36,
+ "AlignCenter": 37,
+ "AlignRight": 38,
+ "AlignJustified": 39,
+ "Indent": 40,
+ "Outdent": 41,
+ "InsertOrderedList": 42,
+ "InsertUnorderedList": 43,
+ "WebActionCount": 44
}
}
Enum {
@@ -874,6 +892,7 @@ Module {
Property { name: "audioMuted"; revision: 3; type: "bool" }
Property { name: "recentlyAudible"; revision: 3; type: "bool"; isReadonly: true }
Property { name: "webChannelWorld"; revision: 3; type: "uint" }
+ Property { name: "testSupport"; type: "QQuickWebEngineTestSupport"; isPointer: true }
Signal {
name: "loadingChanged"
Parameter { name: "loadRequest"; type: "QQuickWebEngineLoadRequest"; isPointer: true }
diff --git a/src/webengine/plugin/testsupport/plugin.cpp b/src/webengine/plugin/testsupport/plugin.cpp
index 9352e3666..d5c43a859 100644
--- a/src/webengine/plugin/testsupport/plugin.cpp
+++ b/src/webengine/plugin/testsupport/plugin.cpp
@@ -58,6 +58,10 @@ public:
qmlRegisterType<QQuickWebEngineTestSupport>(uri, 1, 0, "WebEngineTestSupport");
qmlRegisterUncreatableType<QQuickWebEngineErrorPage>(uri, 1, 0, "WebEngineErrorPage",
tr("Cannot create a separate instance of WebEngineErrorPage"));
+ qmlRegisterUncreatableType<QQuickWebEngineTestInputContext>(uri, 1, 0, "TestInputContext",
+ tr("Cannot create a separate instance of WebEngineErrorPage"));
+ qmlRegisterUncreatableType<QQuickWebEngineTestEvent>(uri, 1, 0, "WebEngineTestEvent",
+ tr("Cannot create a separate instance of WebEngineTestEvent"));
}
};
diff --git a/src/webengine/plugin/testsupport/testsupport.pro b/src/webengine/plugin/testsupport/testsupport.pro
index 1a45ad56a..2804635f8 100644
--- a/src/webengine/plugin/testsupport/testsupport.pro
+++ b/src/webengine/plugin/testsupport/testsupport.pro
@@ -4,7 +4,7 @@ TARGETPATH = QtWebEngine/testsupport
IMPORT_VERSION = 1.0
QT += webengine qml quick
-QT_PRIVATE += webengine-private
+QT_PRIVATE += webengine-private gui-private
INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
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 0d77a5040..0a31811d9 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -48,18 +48,13 @@
#include <QVariant>
#include <QWindow>
#include <private/qquickwindow_p.h>
-#include <private/qsgcontext_p.h>
-
-#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
-#include <QSGSimpleRectNode>
-#include <QSGSimpleTextureNode>
-#endif
namespace QtWebEngineCore {
RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderWidgetHostViewQtDelegateClient *client, bool isPopup)
: m_client(client)
, m_isPopup(isPopup)
+ , m_isPasswordInput(false)
, m_initialized(false)
{
setFlag(ItemHasContents);
@@ -185,30 +180,17 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuick::createLayer()
QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode()
{
QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
return renderContext->sceneGraphContext()->createInternalImageNode();
-#else
- return renderContext->sceneGraphContext()->createImageNode();
-#endif
}
QSGTextureNode *RenderWidgetHostViewQtDelegateQuick::createTextureNode()
{
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
return QQuickItem::window()->createImageNode();
-#else
- return new QSGSimpleTextureNode();
-#endif
}
QSGRectangleNode *RenderWidgetHostViewQtDelegateQuick::createRectangleNode()
{
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
return QQuickItem::window()->createRectangleNode();
-#else
- QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context;
- return renderContext->sceneGraphContext()->createRectangleNode();
-#endif
}
void RenderWidgetHostViewQtDelegateQuick::update()
@@ -226,22 +208,24 @@ void RenderWidgetHostViewQtDelegateQuick::resize(int width, int height)
setSize(QSizeF(width, height));
}
-void RenderWidgetHostViewQtDelegateQuick::inputMethodStateChanged(bool editorVisible)
+void RenderWidgetHostViewQtDelegateQuick::inputMethodStateChanged(bool editorVisible, bool passwordInput)
{
- if (qApp->inputMethod()->isVisible() == editorVisible)
- return;
+ setFlag(QQuickItem::ItemAcceptsInputMethod, editorVisible && !passwordInput);
+
+ if (parentItem())
+ parentItem()->setFlag(QQuickItem::ItemAcceptsInputMethod, editorVisible && !passwordInput);
- if (parentItem() && parentItem()->flags() & QQuickItem::ItemAcceptsInputMethod) {
+ if (qApp->inputMethod()->isVisible() != editorVisible || m_isPasswordInput != passwordInput) {
qApp->inputMethod()->update(Qt::ImQueryInput | Qt::ImEnabled | Qt::ImHints);
qApp->inputMethod()->setVisible(editorVisible);
+ m_isPasswordInput = passwordInput;
}
-
}
bool RenderWidgetHostViewQtDelegateQuick::event(QEvent *event)
{
if (event->type() == QEvent::ShortcutOverride)
- return m_client->handleShortcutOverrideEvent(static_cast<QKeyEvent *>(event));
+ return m_client->forwardEvent(event);
#ifndef QT_NO_GESTURES
if (event->type() == QEvent::NativeGesture)
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 eeb7db9cb..7426dc16d 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -73,7 +73,7 @@ public:
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint&) Q_DECL_OVERRIDE { }
- virtual void inputMethodStateChanged(bool editorVisible) Q_DECL_OVERRIDE;
+ virtual void inputMethodStateChanged(bool editorVisible, bool isPasswordInput) Q_DECL_OVERRIDE;
virtual void setInputMethodHints(Qt::InputMethodHints) Q_DECL_OVERRIDE { }
// The QtQuick view doesn't have a backbuffer of its own and doesn't need this
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
@@ -105,6 +105,7 @@ private:
RenderWidgetHostViewQtDelegateClient *m_client;
QList<QMetaObject::Connection> m_windowConnections;
bool m_isPopup;
+ bool m_isPasswordInput;
bool m_initialized;
QPoint m_lastGlobalPos;
};
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
index 057b91c75..6244ee6ce 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
@@ -76,7 +76,7 @@ public:
virtual void updateCursor(const QCursor &) Q_DECL_OVERRIDE;
virtual void resize(int width, int height) Q_DECL_OVERRIDE;
virtual void move(const QPoint &screenPos) Q_DECL_OVERRIDE;
- virtual void inputMethodStateChanged(bool) Q_DECL_OVERRIDE {}
+ virtual void inputMethodStateChanged(bool, bool) Q_DECL_OVERRIDE {}
virtual void setInputMethodHints(Qt::InputMethodHints) Q_DECL_OVERRIDE { }
virtual void setClearColor(const QColor &) Q_DECL_OVERRIDE { }
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 24861fd35..046affbf4 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -594,11 +594,7 @@ void UIDelegatesManager::showToolTip(const QString &text)
int width = QQmlProperty(m_toolTip.data(), QStringLiteral("width")).read().toInt();
QSize toolTipSize(width, height);
QPoint position = m_view->cursor().pos();
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
position = m_view->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)).toPoint();
-#else
- position = m_view->window()->mapFromGlobal(calculateToolTipPosition(position, toolTipSize));
-#endif
QQmlProperty(m_toolTip.data(), QStringLiteral("x")).write(position.x());
QQmlProperty(m_toolTip.data(), QStringLiteral("y")).write(position.y());
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 5ac93c9a7..570f41866 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -1,3 +1,6 @@
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine webengine-private
+
TARGET = QtWebEngine
# For our export macros
@@ -55,18 +58,20 @@ HEADERS = \
render_widget_host_view_qt_delegate_quickwindow.h \
ui_delegates_manager.h
-isQMLTestSupportApiEnabled() {
+qtConfig(webengine-testsupport) {
+ QT_PRIVATE += testlib
+
SOURCES += api/qquickwebenginetestsupport.cpp
HEADERS += api/qquickwebenginetestsupport_p.h
DEFINES += ENABLE_QML_TESTSUPPORT_API
}
-contains(WEBENGINE_CONFIG, use_spellchecker) {
+qtConfig(webengine-spellchecker) {
DEFINES += ENABLE_SPELLCHECK
}
-use?(pdf) {
+qtConfig(webengine-printing-and-pdf) {
DEFINES += ENABLE_PDF
}
@@ -77,7 +82,7 @@ use?(pdf) {
$$python chromium/tools/licenses.py \
--file-template ../../tools/about_credits.tmpl \
--entry-template ../../tools/about_credits_entry.tmpl credits \
- > $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
+ $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
chromium_attributions.CONFIG += phony
QMAKE_EXTRA_TARGETS += chromium_attributions