From e9309d91ac3ec0ddd7076b5cf66655380aa82cac Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 8 Sep 2017 13:21:38 +0200 Subject: Fix position of keyboard-invoked context menu in QQuickWebEngineView In QQuickWebEngineView the context menu is a QtQuickControls.Menu item. This menu is shown by calling popup() which always displays the menu below the mouse cursor. Work around the problem by moving the mouse cursor temporarily to the right position. Use a QObject property "pos" to store the requested menu position between addMenu() and showMenu() calls, because the Menu item doesn't have a "pos" QML property. Change-Id: Id772a0bb1a7548cad932e9f499ade68be32d86d3 Reviewed-by: Peter Varga --- src/webengine/ui_delegates_manager.cpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 6cc496d5b..c9c013d52 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -257,7 +257,7 @@ QObject *UIDelegatesManager::addMenu(QObject *parentMenu, const QString &title, if (!title.isEmpty()) QQmlProperty(menu, QStringLiteral("title")).write(title); if (!pos.isNull()) - QQmlProperty(menu, QStringLiteral("pos")).write(pos); + menu->setProperty("pos", pos); menu->setParent(parentMenu); @@ -496,9 +496,38 @@ void UIDelegatesManager::showFilePicker(QSharedPointer con QMetaObject::invokeMethod(filePicker, "open"); } +class TemporaryCursorMove +{ +public: + TemporaryCursorMove(const QQuickItem *item, const QPoint &pos) + { + if (pos.isNull() || !item->contains(pos)) + return; + const QPoint oldPos = QCursor::pos(); + const QPoint globalPos = item->mapToGlobal(QPointF(pos)).toPoint(); + if (oldPos == globalPos) + return; + m_oldCursorPos = oldPos; + QCursor::setPos(globalPos); + } + + ~TemporaryCursorMove() + { + if (!m_oldCursorPos.isNull()) + QCursor::setPos(m_oldCursorPos); + } + +private: + QPoint m_oldCursorPos; +}; + void UIDelegatesManager::showMenu(QObject *menu) { - QMetaObject::invokeMethod(menu, "popup"); + // QtQuick.Controls.Menu.popup() always shows the menu under the mouse cursor, i.e. the menu's + // position we set above is ignored. Work around the problem by moving the mouse cursor + // temporarily to the right position. + TemporaryCursorMove tcm(m_view, menu->property("pos").toPoint()); + QMetaObject::invokeMethod(menu, "popup"); } void UIDelegatesManager::showMessageBubble(const QRect &anchor, const QString &mainText, const QString &subText) -- cgit v1.2.3 From da2ad89d330291679b288e87ba620b37870d8cf3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 7 Nov 2017 13:28:28 +0100 Subject: Remove double declaration of webengine-libxml2 feature It is declared twice for some reason Change-Id: I85b03c43909bec2f4f539f9716e188987d869f64 Reviewed-by: Joerg Bornemann --- configure.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/configure.json b/configure.json index ecf6e1132..82d4254bc 100644 --- a/configure.json +++ b/configure.json @@ -386,11 +386,6 @@ "condition": "config.unix && tests.srtp", "output": [ "privateFeature" ] }, - "system-libxml2" : { - "label": "libxml2", - "condition": "config.unix && tests.libxml2", - "output": [ "privateFeature" ] - }, "winversion" : { "label": "winversion", "condition": "config.win32 && tests.winversion", -- cgit v1.2.3 From e63fa9829ce57fee2c94bfa92e81f4c3186f0461 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 7 Nov 2017 13:28:56 +0100 Subject: Unbundle pdfium libraries We now have gn flags to request unbundling of zlib and lcms2 in pdfium and can add those to our configure system. Task-number: QTBUG-61746 Change-Id: Iccc4c2a09b7b99121d79348f9e0636785b29f503 Reviewed-by: Joerg Bornemann --- configure.json | 13 +++++++++++++ src/core/config/linux.pri | 12 +++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/configure.json b/configure.json index 82d4254bc..c3a82f32d 100644 --- a/configure.json +++ b/configure.json @@ -163,6 +163,12 @@ "sources": [ { "type": "pkgConfig", "args": "libpng >= 1.6.0" } ] + }, + "lcms2": { + "label": "lcms2", + "sources": [ + { "type": "pkgConfig", "args": "lcms2" } + ] } }, @@ -510,6 +516,12 @@ "condition": "config.unix && libs.libxml2 && tests.icuuc", "output": [ "privateFeature" ] }, + "system-lcms2" : { + "label": "lcms2", + "autoDetect": "libs.lcms2", + "condition": "config.unix && features.printing-and-pdf", + "output": [ "privateFeature" ] + }, "webengine-sanitizer" : { "label": "Sanitizer ", "autoDetect": "config.sanitizer && tests.sanitizer", @@ -583,6 +595,7 @@ "system-jsoncpp", "system-protobuf", "system-libxml2", + "system-lcms2", "webengine-system-png", "webengine-system-harfbuzz" ] diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 78f3e5093..fbe44dc4c 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -117,6 +117,7 @@ host_build { qtConfig(webengine-system-zlib): qtConfig(system-minizip) { gn_args += use_system_zlib=true use_system_minizip=true + qtConfig(printing-and-pdf): gn_args += pdfium_use_system_zlib=true } qtConfig(webengine-system-png): gn_args += use_system_libpng=true qtConfig(system-jpeg): gn_args += use_system_libjpeg=true @@ -139,14 +140,15 @@ host_build { !packagesExist(xscrnsaver): gn_args += use_xscrnsaver=false qtConfig(system-libevent): gn_args += use_system_libevent=true - qtConfig(system-libwebp): gn_args += use_system_libwebp=true - qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true - qtConfig(system-opus): gn_args += use_system_opus=true + qtConfig(system-libwebp): gn_args += use_system_libwebp=true + qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true + qtConfig(system-opus): gn_args += use_system_opus=true qtConfig(system-snappy): gn_args += use_system_snappy=true qtConfig(system-libvpx): gn_args += use_system_libvpx=true - qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false - qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true + qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false + qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true qtConfig(system-re2): gn_args += use_system_re2=true + qtConfig(system-lcms2): gn_args += use_system_lcms2=true # FIXME: #qtConfig(system-protobuf): gn_args += use_system_protobuf=true -- cgit v1.2.3 From f3fdb0d2200ee1fa06bb8620f8bef84a37ab753a Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 3 Nov 2017 10:12:31 +0100 Subject: Do not stop findText on navigation if no finding in progress Avoid unnecessary unselect calls to prevent to lose active focus on an input field during background load. Task-number: QTBUG-64082 Change-Id: I13e8e2a96254360a78329d6ea2b6858da86a2b5a Reviewed-by: Viktor Engelmann --- src/core/web_contents_adapter.cpp | 6 ++++++ src/core/web_contents_adapter.h | 1 + src/webengine/api/qquickwebengineview.cpp | 2 +- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 7c74bb7fd..1930e7a0e 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1427,6 +1427,12 @@ void WebContentsAdapter::focusIfNecessary() d->webContents->Focus(); } +bool WebContentsAdapter::isFindTextInProgress() const +{ + Q_D(const WebContentsAdapter); + return d->lastFindRequestId != d->webContentsDelegate->lastReceivedFindReply(); +} + WebContentsAdapterClient::RenderProcessTerminationStatus WebContentsAdapterClient::renderProcessExitStatus(int terminationStatus) { auto status = WebContentsAdapterClient::RenderProcessTerminationStatus(-1); diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index 67fcbe7af..51fd2891d 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -184,6 +184,7 @@ public: void viewSource(); bool canViewSource(); void focusIfNecessary(); + bool isFindTextInProgress() const; private: diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 53f4f5855..25f578528 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -356,7 +356,7 @@ void QQuickWebEngineViewPrivate::navigationRequested(int navigationType, const Q Q_EMIT q->navigationRequested(&navigationRequest); navigationRequestAction = navigationRequest.action(); - if ((navigationRequestAction == WebContentsAdapterClient::AcceptRequest) && adapter) + if ((navigationRequestAction == WebContentsAdapterClient::AcceptRequest) && adapter && adapter->isFindTextInProgress()) adapter->stopFinding(); } diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index c583c7f51..9d8d52886 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1433,7 +1433,7 @@ void QWebEnginePagePrivate::navigationRequested(int navigationType, const QUrl & { Q_Q(QWebEnginePage); bool accepted = q->acceptNavigationRequest(url, static_cast(navigationType), isMainFrame); - if (accepted && adapter) + if (accepted && adapter && adapter->isFindTextInProgress()) adapter->stopFinding(); navigationRequestAction = accepted ? WebContentsAdapterClient::AcceptRequest : WebContentsAdapterClient::IgnoreRequest; } -- cgit v1.2.3 From 54727da4906e689ff95a7c6804f4135f9673a461 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Nov 2017 12:33:22 +0100 Subject: Doc: Rewrite AllowWindowActivationFromJavaScript docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1486542b2981e5ff16c9eed92c513b9ef7cdd795 Reviewed-by: Michael Brüning --- src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc index d3b16a935..3fe87082a 100644 --- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc @@ -163,7 +163,8 @@ origins to access Geolocation again. Disabled by default. (Added in Qt 5.9) \value AllowWindowActivationFromJavaScript - Allows the window.focus() method in JavaScript. Disallowed by default. + Allows activating windows by using the window.focus() JavaScript + method. Disabled by default. (Added in Qt 5.10) \value ShowScrollBars Shows scroll bars. -- cgit v1.2.3 From 64ad0e8b335509970062ba550a06018426b7c285 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Mon, 30 Oct 2017 17:32:39 +0100 Subject: Fill pointerType member of pointer events Fix pointerType of the currently supported (mouse and touch) events. Support of pen and eraser types is coming with QTBUG-62975. Task-number: QTBUG-63266 Change-Id: Ief32b9680ab5acfb15537aba74c2bcdd6f51c978 Reviewed-by: Peter Varga --- src/core/render_widget_host_view_qt.cpp | 2 +- src/core/web_event_factory.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 0f071f89e..b30069c74 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -291,7 +291,7 @@ public: float GetHistoricalTouchMajor(size_t pointer_index, size_t historical_index) const override { return 0; } float GetHistoricalX(size_t pointer_index, size_t historical_index) const override { return 0; } float GetHistoricalY(size_t pointer_index, size_t historical_index) const override { return 0; } - ToolType GetToolType(size_t pointer_index) const override { return ui::MotionEvent::TOOL_TYPE_UNKNOWN; } + ToolType GetToolType(size_t pointer_index) const override { return ui::MotionEvent::TOOL_TYPE_FINGER; } int GetButtonState() const override { return 0; } private: diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 8c997335c..dcd81efe8 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1190,6 +1190,7 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QMouseEvent *ev, double dpiScale) webKitEvent.button = mouseButtonForEvent(ev); webKitEvent.click_count = 0; + webKitEvent.pointer_type = WebPointerProperties::PointerType::kMouse; return webKitEvent; } @@ -1204,6 +1205,7 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QHoverEvent *ev, double dpiScale) webKitEvent.SetPositionInWidget(ev->pos().x() / dpiScale, ev->pos().y() / dpiScale); webKitEvent.movement_x = ev->pos().x() - ev->oldPos().x(); webKitEvent.movement_y = ev->pos().y() - ev->oldPos().y(); + webKitEvent.pointer_type = WebPointerProperties::PointerType::kMouse; return webKitEvent; } -- cgit v1.2.3 From 86207b164df8ea4251b4269b4fa688d41ce8230f Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Fri, 22 Sep 2017 09:13:50 +0200 Subject: Make GetUserMediaTestPage more robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A 5 second timeout might not be enough for our underpowered CI VMs. Also, if the page isn't loaded (to slow or for other reasons), we must abort, to prevent the JavaScripts from being run on different pages (first scripts to the old page, then to the new page if it eventually finishes loading). The first JavaScript in particular is rejected on the old page, because "about:blank" doesn't have a secure origin. This could even make the test accept wrongfully if all scripts are run on the old page, because the request (which is supposed to be rejected) can be rejected for being run on the wrong page, instead of for requesting forbidden permissions. Task-number: QTBUG-63347 Change-Id: Ib63d55477d35001b174900b73dc3dd23d33c7263 Reviewed-by: Jüri Valdmann Reviewed-by: Allan Sandfeld Jensen --- .../auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index b4b1abc8c..76a0bbf4d 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -2655,18 +2655,19 @@ Q_OBJECT public: GetUserMediaTestPage() : m_gotRequest(false) + , m_loadSucceeded(false) { connect(this, &QWebEnginePage::featurePermissionRequested, this, &GetUserMediaTestPage::onFeaturePermissionRequested); - + connect(this, &QWebEnginePage::loadFinished, [this](bool success){ + m_loadSucceeded = success; + }); // We need to load content from a resource in order for the securityOrigin to be valid. - QSignalSpy loadSpy(this, SIGNAL(loadFinished(bool))); load(QUrl("qrc:///resources/content.html")); - QTRY_COMPARE(loadSpy.count(), 1); } void jsGetUserMedia(const QString & constraints) { - runJavaScript( + evaluateJavaScriptSync(this, QStringLiteral( "var promiseFulfilled = false;" "var promiseRejected = false;" @@ -2707,6 +2708,11 @@ public: return m_gotRequest; } + bool loadSucceeded() const + { + return m_loadSucceeded; + } + private Q_SLOTS: void onFeaturePermissionRequested(const QUrl &securityOrigin, QWebEnginePage::Feature feature) { @@ -2717,6 +2723,7 @@ private Q_SLOTS: private: bool m_gotRequest; + bool m_loadSucceeded; QWebEnginePage::Feature m_requestedFeature; QUrl m_requestSecurityOrigin; @@ -2747,6 +2754,7 @@ void tst_QWebEnginePage::getUserMediaRequest() QFETCH(QWebEnginePage::Feature, feature); GetUserMediaTestPage page; + QTRY_VERIFY_WITH_TIMEOUT(page.loadSucceeded(), 20000); page.settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, true); // 1. Rejecting request on C++ side should reject promise on JS side. @@ -2775,6 +2783,7 @@ void tst_QWebEnginePage::getUserMediaRequest() void tst_QWebEnginePage::getUserMediaRequestDesktopAudio() { GetUserMediaTestPage page; + QTRY_VERIFY_WITH_TIMEOUT(page.loadSucceeded(), 20000); page.settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, true); // Audio-only desktop capture is not supported. JS Promise should be @@ -2792,6 +2801,7 @@ void tst_QWebEnginePage::getUserMediaRequestDesktopAudio() void tst_QWebEnginePage::getUserMediaRequestSettingDisabled() { GetUserMediaTestPage page; + QTRY_VERIFY_WITH_TIMEOUT(page.loadSucceeded(), 20000); page.settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, false); // With the setting disabled, the JS Promise should be rejected without -- cgit v1.2.3 From 707c13fcdf2cbc7e6021cbca3cc4b30fd7b9dcfc Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 6 Nov 2017 17:01:10 +0100 Subject: Update Chromium Changes: 36d7224dff [Backport] Fix for CVE-2017-5124 3cc9c87e76 [Backport] Fix for CVE-2017-5129 ccaf2d569b [Backport] SkSafeMath for tracking size_t overflow 7b155d9f8d [Backport] Ensure IDN domains are in punycode format in extension host permissions fe7cc31259 [Backport] Fix for CVE-2017-5132 96c8d7944e [Backport] Fix for CVE-2017-5128 5de529d03d [Backport] Fix for CVE-2017-5127 edf0736427 [Backport] Fix for CVE-2017-5126 Change-Id: Ib0c76c846791f48820600ee5aaf55ca5389257bf Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index cfe8c6090..36d7224df 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit cfe8c60903b327ac94406661350f4ac05aa8c21b +Subproject commit 36d7224dff1d3e2ddff401e03b821725efbc00e0 -- cgit v1.2.3 From a87049cd7e188ea2185cf467765b60cb9de1210e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 8 Nov 2017 14:42:49 +0100 Subject: Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: c394f9bd67 [Backport] Ensure REG_SZ and REG_MULTI_SZ are null 180b9b53aa [Backport] IDN display: Block U+0307 after i or U+0131 4398e36a05 [Backport] Fix for CVE-2017-15396 [2/2] 8d7c3609b1 [Backport] Fix for CVE-2017-15396 [1/2] d95317e241 [Backport] Remove getOptimalLanguageTag logic 2d6e9c3fc4 [Backport] Fix for CVE-2017-15387 f84377a4e0 [Backport] Fix for CVE-2017-15386 ebccd98fb3 [Backport] Cherry pick: Don't allow iteration through da91cdeb1f [Backport] Fix for CVE-2017-5133 Change-Id: Ie85db1786594bac1feba2c7ca3e26559edfff7f2 Reviewed-by: Michael Brüning --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 36d7224df..c394f9bd6 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 36d7224dff1d3e2ddff401e03b821725efbc00e0 +Subproject commit c394f9bd67128f67bb26bbb47254549ea23a099f -- cgit v1.2.3 From 4de8486b6614896a2b84cc64b69606c7b3bd07e8 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Mon, 6 Nov 2017 16:04:45 +0100 Subject: Notify Chromium about leaving view Forward QEvent::Leave for Widget and QEvent::HoverLeave for Quick. Task-number: QTBUG-64265 Change-Id: Ide32768902956476d24b1d4115e305392b62feb3 Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 4 + src/core/web_event_factory.cpp | 18 +++- src/core/web_event_factory.h | 2 + .../render_widget_host_view_qt_delegate_quick.cpp | 5 ++ .../render_widget_host_view_qt_delegate_quick.h | 1 + tests/auto/quick/qmltests/data/tst_mouseMove.qml | 96 ++++++++++++++++++++++ tests/auto/quick/qmltests/qmltests.pro | 1 + .../widgets/qwebengineview/tst_qwebengineview.cpp | 53 ++++++++++++ 8 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 tests/auto/quick/qmltests/data/tst_mouseMove.qml diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 980550620..0d78d6743 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -960,6 +960,10 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event) case QEvent::InputMethodQuery: handleInputMethodQueryEvent(static_cast(event)); break; + case QEvent::HoverLeave: + case QEvent::Leave: + m_host->ForwardMouseEvent(WebEventFactory::toWebMouseEvent(event)); + break; default: return false; } diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index f5264708d..0e46aced5 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1019,12 +1019,14 @@ static ui::DomKey getDomKeyFromQKeyEvent(QKeyEvent *ev) } } -static inline double currentTimeForEvent(const QInputEvent* event) +static inline double currentTimeForEvent(const QEvent *event) { Q_ASSERT(event); - if (event->timestamp()) - return static_cast(event->timestamp()) / 1000; + if (const QInputEvent *inputEvent = static_cast(event)) { + if (inputEvent->timestamp()) + return static_cast(inputEvent->timestamp()) / 1000; + } static QElapsedTimer timer; if (!timer.isValid()) @@ -1211,6 +1213,16 @@ WebMouseEvent WebEventFactory::toWebMouseEvent(QHoverEvent *ev, double dpiScale) return webKitEvent; } +WebMouseEvent WebEventFactory::toWebMouseEvent(QEvent *ev) +{ + Q_ASSERT(ev->type() == QEvent::Leave || ev->type() == QEvent::HoverLeave); + + WebMouseEvent webKitEvent; + webKitEvent.timeStampSeconds = currentTimeForEvent(ev); + webKitEvent.type = WebInputEvent::MouseLeave; + return webKitEvent; +} + #ifndef QT_NO_GESTURES WebGestureEvent WebEventFactory::toWebGestureEvent(QNativeGestureEvent *ev, double dpiScale) { diff --git a/src/core/web_event_factory.h b/src/core/web_event_factory.h index 859e97643..b28710d66 100644 --- a/src/core/web_event_factory.h +++ b/src/core/web_event_factory.h @@ -49,6 +49,7 @@ #include QT_BEGIN_NAMESPACE +class QEvent; class QHoverEvent; class QKeyEvent; class QMouseEvent; @@ -63,6 +64,7 @@ class WebEventFactory { public: static blink::WebMouseEvent toWebMouseEvent(QMouseEvent*, double dpiScale); static blink::WebMouseEvent toWebMouseEvent(QHoverEvent*, double dpiScale); + static blink::WebMouseEvent toWebMouseEvent(QEvent *); #ifndef QT_NO_GESTURES static blink::WebGestureEvent toWebGestureEvent(QNativeGestureEvent *, double dpiScale); #endif 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 5d8c4fa43..0d77a5040 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -332,6 +332,11 @@ void RenderWidgetHostViewQtDelegateQuick::hoverMoveEvent(QHoverEvent *event) m_client->forwardEvent(event); } +void RenderWidgetHostViewQtDelegateQuick::hoverLeaveEvent(QHoverEvent *event) +{ + m_client->forwardEvent(event); +} + QVariant RenderWidgetHostViewQtDelegateQuick::inputMethodQuery(Qt::InputMethodQuery query) const { return m_client->inputMethodQuery(query); 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 7a08e915b..eeb7db9cb 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.h +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h @@ -90,6 +90,7 @@ protected: virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; virtual void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE; virtual void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE; + virtual void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE; virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE; virtual void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE; virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE; diff --git a/tests/auto/quick/qmltests/data/tst_mouseMove.qml b/tests/auto/quick/qmltests/data/tst_mouseMove.qml new file mode 100644 index 000000000..adb937139 --- /dev/null +++ b/tests/auto/quick/qmltests/data/tst_mouseMove.qml @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtTest 1.0 +import QtWebEngine 1.4 + +Rectangle { + id: root + width: 200 + height: 200 + + Column { + anchors.fill: parent + Rectangle { + id: placeHolder + width: parent.width + height: 100 + color: "red" + } + + TestWebEngineView { + id: webEngineView + width: parent.width + height: 100 + + function getInnerText(element) { + var innerText; + runJavaScript("document.getElementById('" + element + "').innerText", function(result) { + innerText = result; + }); + testCase.tryVerify(function() { return innerText != undefined; }); + return innerText; + } + } + } + + TestCase { + id: testCase + name: "WebEngineViewMouseMove" + when: windowShown + + function test_mouseLeave() { + mouseMove(root, 0, 0); + webEngineView.loadHtml( + "" + + "" + + "" + + "
" + + "" + + ""); + verify(webEngineView.waitForLoadSucceeded()); + verify(!webEngineView.getInnerText("testDiv")); + + for (var i = 90; i < 110; ++i) + mouseMove(root, 50, i); + tryVerify(function() { return webEngineView.getInnerText("testDiv") == "Mouse IN" }); + + for (var i = 110; i > 90; --i) + mouseMove(root, 50, i); + tryVerify(function() { return webEngineView.getInnerText("testDiv") == "Mouse OUT" }); + } + } +} + diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro index e7c5ededc..f09e5f009 100644 --- a/tests/auto/quick/qmltests/qmltests.pro +++ b/tests/auto/quick/qmltests/qmltests.pro @@ -59,6 +59,7 @@ OTHER_FILES += \ $$PWD/data/tst_loadProgress.qml \ $$PWD/data/tst_loadRecursionCrash.qml \ $$PWD/data/tst_loadUrl.qml \ + $$PWD/data/tst_mouseMove.qml \ $$PWD/data/tst_navigationHistory.qml \ $$PWD/data/tst_navigationRequested.qml \ $$PWD/data/tst_newViewRequest.qml \ diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index 7f9e1cff5..04de4d951 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -145,6 +146,8 @@ private Q_SLOTS: void imeCompositionQueryEvent_data(); void imeCompositionQueryEvent(); void newlineInTextarea(); + + void mouseLeave(); }; // This will be called before the first test function is executed. @@ -2207,5 +2210,55 @@ void tst_QWebEngineView::imeCompositionQueryEvent() QTRY_COMPARE(anchorPosQuery.value(Qt::ImAnchorPosition).toInt(), 11); } +void tst_QWebEngineView::mouseLeave() +{ + QScopedPointer containerWidget(new QWidget); + + QLabel *label = new QLabel(containerWidget.data()); + label->setStyleSheet("background-color: red;"); + label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + label->setMinimumHeight(100); + + QWebEngineView *view = new QWebEngineView(containerWidget.data()); + view->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + view->setMinimumHeight(100); + + QVBoxLayout *layout = new QVBoxLayout; + layout->setAlignment(Qt::AlignTop); + layout->setSpacing(0); + layout->setMargin(0); + layout->addWidget(label); + layout->addWidget(view); + containerWidget->setLayout(layout); + containerWidget->show(); + QVERIFY(QTest::qWaitForWindowExposed(containerWidget.data())); + QTest::mouseMove(containerWidget->windowHandle(), QPoint(0, 0)); + + auto innerText = [view]() -> QString { + return evaluateJavaScriptSync(view->page(), "document.getElementById('testDiv').innerText").toString(); + }; + + QSignalSpy loadFinishedSpy(view, SIGNAL(loadFinished(bool))); + view->setHtml("" + "" + "" + "
" + "" + ""); + QVERIFY(loadFinishedSpy.wait()); + QVERIFY(innerText().isEmpty()); + + QTest::mouseMove(containerWidget->windowHandle(), QPoint(50, 150)); + QTRY_COMPARE(innerText(), QStringLiteral("Mouse IN")); + QTest::mouseMove(containerWidget->windowHandle(), QPoint(50, 50)); + QTRY_COMPARE(innerText(), QStringLiteral("Mouse OUT")); +} + QTEST_MAIN(tst_QWebEngineView) #include "tst_qwebengineview.moc" -- cgit v1.2.3 From 2e54fc39cc49bd57541ac4a78a8622c37ef33769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 8 Nov 2017 17:23:48 +0100 Subject: URLRequestQrcJobQt: remove ineffective URL formatting options Remove strange options for call to QUrl::path and add test for "qrc" protocol. Change-Id: I6528d858b7661832852c333a7f932d4714f953f2 Reviewed-by: Alexandru Croitor --- src/core/url_request_qrc_job_qt.cpp | 2 +- .../auto/widgets/qwebenginepage/resources/bar.txt | 1 + .../auto/widgets/qwebenginepage/resources/foo.txt | 1 + .../qwebenginepage/resources/path with spaces.txt | 1 + .../widgets/qwebenginepage/tst_qwebenginepage.cpp | 36 ++++++++++++++++++++++ .../widgets/qwebenginepage/tst_qwebenginepage.qrc | 3 ++ 6 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/auto/widgets/qwebenginepage/resources/bar.txt create mode 100644 tests/auto/widgets/qwebenginepage/resources/foo.txt create mode 100644 tests/auto/widgets/qwebenginepage/resources/path with spaces.txt diff --git a/src/core/url_request_qrc_job_qt.cpp b/src/core/url_request_qrc_job_qt.cpp index b4e960921..a2712653d 100644 --- a/src/core/url_request_qrc_job_qt.cpp +++ b/src/core/url_request_qrc_job_qt.cpp @@ -112,7 +112,7 @@ int URLRequestQrcJobQt::ReadRawData(IOBuffer *buf, int bufSize) void URLRequestQrcJobQt::startGetHead() { // Get qrc file path. - QString qrcFilePath = ':' + toQt(request_->url()).path(QUrl::RemovePath | QUrl::RemoveQuery); + QString qrcFilePath = ':' + toQt(request_->url()).path(); m_file.setFileName(qrcFilePath); QFileInfo qrcFileInfo(m_file); // Get qrc file mime type. diff --git a/tests/auto/widgets/qwebenginepage/resources/bar.txt b/tests/auto/widgets/qwebenginepage/resources/bar.txt new file mode 100644 index 000000000..5716ca598 --- /dev/null +++ b/tests/auto/widgets/qwebenginepage/resources/bar.txt @@ -0,0 +1 @@ +bar diff --git a/tests/auto/widgets/qwebenginepage/resources/foo.txt b/tests/auto/widgets/qwebenginepage/resources/foo.txt new file mode 100644 index 000000000..257cc5642 --- /dev/null +++ b/tests/auto/widgets/qwebenginepage/resources/foo.txt @@ -0,0 +1 @@ +foo diff --git a/tests/auto/widgets/qwebenginepage/resources/path with spaces.txt b/tests/auto/widgets/qwebenginepage/resources/path with spaces.txt new file mode 100644 index 000000000..4f79cb0dd --- /dev/null +++ b/tests/auto/widgets/qwebenginepage/resources/path with spaces.txt @@ -0,0 +1 @@ +contents with spaces diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index bef77d3f1..e3d6a7435 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -197,6 +197,7 @@ private Q_SLOTS: void loadFinishedAfterNotFoundError(); void loadInSignalHandlers_data(); void loadInSignalHandlers(); + void loadFromQrc(); void restoreHistory(); void toPlainTextLoadFinishedRace_data(); @@ -4037,6 +4038,41 @@ void tst_QWebEnginePage::loadInSignalHandlers() QCOMPARE(m_page->url(), urlForSetter); } +void tst_QWebEnginePage::loadFromQrc() +{ + QWebEnginePage page; + QSignalSpy spy(&page, &QWebEnginePage::loadFinished); + + // Standard case. + page.load(QStringLiteral("qrc:///resources/foo.txt")); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst().value(0).toBool(), true); + QCOMPARE(toPlainTextSync(&page), QStringLiteral("foo\n")); + + // Query and fragment parts are ignored. + page.load(QStringLiteral("qrc:///resources/bar.txt?foo=1#bar")); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst().value(0).toBool(), true); + QCOMPARE(toPlainTextSync(&page), QStringLiteral("bar\n")); + + // Literal spaces are OK. + page.load(QStringLiteral("qrc:///resources/path with spaces.txt")); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst().value(0).toBool(), true); + QCOMPARE(toPlainTextSync(&page), QStringLiteral("contents with spaces\n")); + + // Escaped spaces are OK too. + page.load(QStringLiteral("qrc:///resources/path%20with%20spaces.txt")); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst().value(0).toBool(), true); + QCOMPARE(toPlainTextSync(&page), QStringLiteral("contents with spaces\n")); + + // Resource not found, loading fails. + page.load(QStringLiteral("qrc:///nope")); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(spy.takeFirst().value(0).toBool(), false); +} + void tst_QWebEnginePage::restoreHistory() { QWebChannel channel; diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc index 91adeb694..1226e367d 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.qrc @@ -18,5 +18,8 @@ resources/test2.html resources/testiframe.html resources/testiframe2.html + resources/foo.txt + resources/bar.txt + resources/path with spaces.txt -- cgit v1.2.3 From d53efba0b69e883ce70fa834856dcef61976725a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Fri, 10 Nov 2017 11:04:47 +0100 Subject: Fix invalid Q_ASSERT in WebChannelIPCTransport Task-number: QTBUG-64419 Change-Id: I094cfc654498c74f4d6b656ec5647a90700a4f6a Reviewed-by: Peter Varga Reviewed-by: Allan Sandfeld Jensen --- src/core/renderer/web_channel_ipc_transport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp index 2420c4420..865bfc243 100644 --- a/src/core/renderer/web_channel_ipc_transport.cpp +++ b/src/core/renderer/web_channel_ipc_transport.cpp @@ -181,7 +181,7 @@ void WebChannelIPCTransport::installWebChannel(uint worldId) void WebChannelIPCTransport::uninstallWebChannel(uint worldId) { - Q_ASSERT(worldId = m_installedWorldId); + Q_ASSERT(worldId == m_installedWorldId); blink::WebView *webView = render_view()->GetWebView(); if (!webView) return; -- cgit v1.2.3 From 21ce11dc5c344c2ea026ae237c6da1a34776d430 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 6 Nov 2017 10:23:18 +0100 Subject: Update Chomium Pulls in the third and final set of security patches from Chrome 62 Changes: 76dea3c3078e [Backport] Fix for CVE-2017-15386 12688c3d6eec [Backport] Fix for CVE-2017-15387 416280ca01fa [Backport] Fix for CVE-2017-15396 [1/2] b98a40d49b39 [Backport] Fix for CVE-2017-15396 [2/2] 74fbfc898f5b [Backport] mac: Make RWHVMac::ClearCompositorFrame clear locks a32345df103e [Backport] IDN display: Block U+0307 after i or U+0131 e77720eebe44 [Backport] Ensure REG_SZ and REG_MULTI_SZ are null terminated. 7e7cb8668680 FIXUP: Disable WebUI for chrome://accessibility to avoid crash d702e4b BASELINE: Update Chromium to 61.0.3163.140 b6e8bf1 Merge remote-tracking branch 'origin/upstream-master' into 61-based ef44fe2 [Backport] [turbofan] Remove obsolete LoadBuffer and StoreBuffer operators. 2366767 [Backport] Merged: [wasm] Fix Memory.grow when shared with asm.js modules Task-number: QTBUG-64027 Change-Id: I5dd00b2aa5c01260222c5ab6faa9f7621969a75e Reviewed-by: Joerg Bornemann --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index c34649b67..2366767e6 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit c34649b6774ea6cd162049e1242abece13f3a1a7 +Subproject commit 2366767e6c6f333ef090667aa6838d6781725a78 -- cgit v1.2.3 From bb5a158ff01a02dbd9838094f57e0a429c248411 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 9 Nov 2017 12:55:13 +0100 Subject: Fix widevine with proprietary codecs Switched from define to buildflag. Change-Id: I01b3e0aad7f54af1a485733e7d4ec25a31d14015 Reviewed-by: Alexandru Croitor --- src/core/content_client_qt.cpp | 3 ++- src/core/renderer/content_renderer_client_qt.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 1016db0d5..a3a460cb4 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -236,6 +236,7 @@ void AddPepperWidevine(std::vector* plugins) #elif defined(Q_OS_LINUX) pluginPaths << QStringLiteral("/opt/google/chrome/libwidevinecdmadapter.so") // Google Chrome << QStringLiteral("/usr/lib/chromium/libwidevinecdmadapter.so") // Arch + << QStringLiteral("/usr/lib/chromium-browser/libwidevinecdmadapter.so") // Ubuntu/neon << QStringLiteral("/usr/lib64/chromium/libwidevinecdmadapter.so"); // OpenSUSE style #endif } @@ -257,7 +258,7 @@ void AddPepperWidevine(std::vector* plugins) std::vector codecs; codecs.push_back(kCdmSupportedCodecVp8); codecs.push_back(kCdmSupportedCodecVp9); -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) codecs.push_back(kCdmSupportedCodecAvc1); #endif // defined(USE_PROPRIETARY_CODECS) std::string codec_string = diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp index 83c4d719e..5980d7b84 100644 --- a/src/core/renderer/content_renderer_client_qt.cpp +++ b/src/core/renderer/content_renderer_client_qt.cpp @@ -262,11 +262,11 @@ public: return true; case media::EmeInitDataType::CENC: -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) return true; #else return false; -#endif // defined(USE_PROPRIETARY_CODECS) +#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) case media::EmeInitDataType::UNKNOWN: return false; @@ -277,7 +277,7 @@ public: media::SupportedCodecs GetSupportedCodecs() const override { -#if defined(USE_PROPRIETARY_CODECS) +#if BUILDFLAG(USE_PROPRIETARY_CODECS) return media::EME_CODEC_MP4_ALL | media::EME_CODEC_WEBM_ALL; #else return media::EME_CODEC_WEBM_ALL; @@ -390,10 +390,10 @@ static void AddPepperBasedWidevine(std::vectoremplace_back(new cdm::WidevineKeySystemProperties( -- cgit v1.2.3 From 2ed1e0ba423a75f68c1547fe0c06e62e773ef64d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 24 Oct 2017 18:51:42 +0200 Subject: Add 'webengine' prefix to configure features, tests, libraries, etc This is done to make sure there are no conflicts with features in other modules, because they all share a global namespace. Change-Id: I95b3b7fadd8ffc2979ee3aad2234ee543d57c7d8 Reviewed-by: Michal Klocek --- config_help.txt | 34 +- configure.json | 377 +++++++++++---------- .../webenginewidgets/spellchecker/spellchecker.pro | 2 +- examples/webenginewidgets/webenginewidgets.pro | 2 +- mkspecs/features/configure.prf | 18 +- mkspecs/features/functions.prf | 2 +- mkspecs/features/platform.prf | 2 +- src/buildtools/gn.pro | 4 +- src/buildtools/ninja.pro | 2 +- src/core/config/common.pri | 10 +- src/core/config/linux.pri | 34 +- src/core/config/mac_osx.pri | 4 +- src/core/core_chromium.pri | 6 +- src/core/core_module.pro | 4 +- src/core/gn_run.pro | 4 +- src/src.pro | 6 +- src/webengine/webengine.pro | 6 +- src/webenginewidgets/webenginewidgets.pro | 6 +- tests/auto/quick/qmltests/qmltests.pro | 2 +- .../qquickwebengineview/qquickwebengineview.pro | 2 +- tests/auto/quick/quick.pro | 2 +- tests/auto/quick/tests.pri | 2 +- .../auto/widgets/qwebenginepage/qwebenginepage.pro | 2 +- tests/auto/widgets/widgets.pro | 4 +- 24 files changed, 279 insertions(+), 258 deletions(-) diff --git a/config_help.txt b/config_help.txt index 6ff24f8c8..8055de910 100644 --- a/config_help.txt +++ b/config_help.txt @@ -1,13 +1,23 @@ Webengine options: - - -alsa ................ Enable ALSA support [auto] (Linux only) - -webengine-icu ....... Select used ICU libraries [system/qt] (Linux only) - -ffmpeg .............. Select used FFmpeg libraries [system/qt] (Linux only) - -opus ................ Select used Opus libraries [system/qt] (Linux only) - -webp ................ Select used WebP libraries [system/qt] (Linux only) - -pepper-plugins ...... Enable use of Pepper Flash and Widevine plugins [auto] - -printing-and-pdf .... Enable use of printing and output to PDF [auto] - -proprietary-codecs .. Enable support for proprietary codecs [no] - -pulseaudio .......... Enable PulseAudio support [auto] (Linux only) - -spellchecker ........ Enable support for spellchecker [yes] - -webrtc .............. Enable support for WebRTC [auto] + -webengine-alsa ................ Enable ALSA support [auto] (Linux only) + -webengine-pulseaudio .......... Enable PulseAudio support [auto] + (Linux only) + -webengine-embedded-build ...... Enable Linux embedded build [auto] + (Linux only) + -webengine-icu ................. Use system ICU libraries [system/qt] + (Linux only) + -webengine-ffmpeg .............. Use system FFmpeg libraries [system/qt] + (Linux only) + -webengine-opus ................ Use system Opus libraries [system/qt] + (Linux only) + -webengine-webp ................ Use system WebP libraries [system/qt] + (Linux only) + -webengine-pepper-plugins ...... Enable use of Pepper Flash and Widevine + plugins [auto] + -webengine-printing-and-pdf .... Enable use of printing and output to PDF + [auto] + -webengine-proprietary-codecs .. Enable support for proprietary codecs [no] + -webengine-spellchecker ........ Enable support for spellchecker [yes] + -webengine-native-spellchecker . Enable support for native spellchecker [no] + (macOS only) + -webengine-webrtc .............. Enable support for WebRTC [auto] diff --git a/configure.json b/configure.json index c3a82f32d..d0d172835 100644 --- a/configure.json +++ b/configure.json @@ -8,115 +8,126 @@ "commandline": { "options": { - "alsa": "boolean", - "embedded": "boolean", - "webengine-icu": { "type": "enum", "name": "system-icu", "values": { "system": "yes", "qt": "no" } }, - "ffmpeg": { "type": "enum", "name": "system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, - "opus": { "type": "enum", "name": "system-opus", "values": { "system": "yes", "qt": "no" } }, - "webp": { "type": "enum", "name": "system-libwebp", "values": { "system": "yes", "qt": "no" } }, - "pepper-plugins": "boolean", - "printing-and-pdf": "boolean", - "proprietary-codecs": "boolean", - "pulseaudio": "boolean", - "spellchecker": "boolean", - "native-spellchecker": "boolean", - "webrtc": "boolean", - "geolocation" : "boolean" + "webengine-alsa": "boolean", + "webengine-embedded-build": "boolean", + "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } }, + "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, + "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, + "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, + "webengine-pepper-plugins": "boolean", + "webengine-printing-and-pdf": "boolean", + "webengine-proprietary-codecs": "boolean", + "webengine-pulseaudio": "boolean", + "webengine-spellchecker": "boolean", + "webengine-native-spellchecker": "boolean", + "webengine-webrtc": "boolean", + "webengine-geolocation" : "boolean", + + "alsa": { "type": "boolean", "name": "webengine-alsa" }, + "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" }, + "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, + "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, + "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, + "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" }, + "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" }, + "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" }, + "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" }, + "webrtc": { "type": "boolean", "name": "webengine-webrtc" } } }, "libraries": { - "dbus": { + "webengine-dbus": { "label": "d-bus", "sources": [ { "type": "pkgConfig", "args": "dbus-1" } ] }, - "fontconfig": { + "webengine-fontconfig": { "label": "fontconfig", "sources": [ { "type": "pkgConfig", "args": "fontconfig" } ] }, - "libdrm": { + "webengine-libdrm": { "label": "libdrm", "sources": [ { "type": "pkgConfig", "args": "libdrm" } ] }, - "xcomposite": { + "webengine-xcomposite": { "label": "xcomposite", "sources": [ { "type": "pkgConfig", "args": "xcomposite" } ] }, - "xcursor": { + "webengine-xcursor": { "label": "xcursor", "sources": [ { "type": "pkgConfig", "args": "xcursor" } ] }, - "xi": { + "webengine-xi": { "label": "xi", "sources": [ { "type": "pkgConfig", "args": "xi" } ] }, - "xrandr": { + "webengine-xrandr": { "label": "xrandr", "sources": [ { "type": "pkgConfig", "args": "xrandr" } ] }, - "xtst": { + "webengine-xtst": { "label": "xtst", "sources": [ { "type": "pkgConfig", "args": "xtst" } ] }, - "harfbuzz": { + "webengine-harfbuzz": { "label": "harfbuzz >= 1.4.2", "sources": [ { "type": "pkgConfig", "args": "harfbuzz >= 1.4.2" } ] }, - "glib": { + "webengine-glib": { "label": "glib-2.0 >= 2.32.0", "sources": [ { "type": "pkgConfig", "args": "glib-2.0 >= 2.32.0" } ] }, - "zlib": { + "webengine-zlib": { "label": "zlib", "sources": [ { "type": "pkgConfig", "args": "zlib" } ] }, - "minizip": { + "webengine-minizip": { "label": "minizip", "sources": [ { "type": "pkgConfig", "args": "minizip" } ] }, - "libevent": { + "webengine-libevent": { "label": "libevent", "sources": [ { "type": "pkgConfig", "args": "libevent" } ] }, - "libxml2": { + "webengine-libxml2": { "label": "libxml2 and libxslt", "sources": [ { "type": "pkgConfig", "args": "libxml-2.0 libxslt" } ] }, - "jsoncpp": { + "webengine-jsoncpp": { "label": "jsoncpp", "sources": [ { "type": "pkgConfig", "args": "jsoncpp" } ] }, - "protobuf": { + "webengine-protobuf": { "label": "protobuf", "sources": [ { "type": "pkgConfig", "args": "protobuf" } @@ -128,43 +139,43 @@ { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } ] }, - "icu": { + "webengine-icu": { "label": "icu >= 53", "sources": [ { "type": "pkgConfig", "args": "icu-uc >= 53 icu-i18n >= 53" } ] }, - "ffmpeg": { + "webengine-ffmpeg": { "label": "libavcodec libavformat libavutil", "sources": [ { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } ] }, - "opus": { + "webengine-opus": { "label": "opus", "sources": [ { "type": "pkgConfig", "args": "opus" } ] }, - "webp": { + "webengine-webp": { "label": "libwebp, libwebpmux and libwebpdemux", "sources": [ { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } ] }, - "nss": { + "webengine-nss": { "label": "nss", "sources": [ { "type": "pkgConfig", "args": "nss" } ] }, - "png": { + "webengine-png": { "label": "libpng >= 1.6.0", "sources": [ { "type": "pkgConfig", "args": "libpng >= 1.6.0" } ] }, - "lcms2": { + "webengine-lcms2": { "label": "lcms2", "sources": [ { "type": "pkgConfig", "args": "lcms2" } @@ -178,353 +189,353 @@ "test": "alsa", "type": "compile" }, - "khr": { + "webengine-khr": { "label": "khr", "test": "khr", "type": "compile" }, - "libvpx": { + "webengine-libvpx": { "label": "libvpx", "test": "libvpx", "type": "compile" }, - "snappy": { + "webengine-snappy": { "label": "snappy", "test": "snappy", "type": "compile" }, - "srtp": { + "webengine-srtp": { "label": "srtp", "test": "srtp", "type": "compile" }, - "winversion": { + "webengine-winversion": { "label": "winversion", "test": "winversion", "type": "compile" }, - "protoc": { + "webengine-protoc": { "label": "protoc", "type": "detectProtoc" }, - "python2": { + "webengine-python2": { "label": "python2", "type": "detectPython2", "log": "location" }, - "gperf": { + "webengine-gperf": { "label": "gperf", "type": "detectGperf" }, - "bison": { + "webengine-bison": { "label": "bison", "type": "detectBison" }, - "flex": { + "webengine-flex": { "label": "flex", "type": "detectFlex" }, - "ninja": { + "webengine-ninja": { "label": "system ninja", "type": "detectNinja" }, - "gn": { + "webengine-gn": { "label": "system gn", "type": "detectGn" }, - "embedded": { + "webengine-embedded-build": { "label": "embedded", "type": "embedded" }, - "re2": { + "webengine-re2": { "label": "re2", "test": "re2", "type": "compile" }, - "glibc": { + "webengine-glibc": { "label": "glibc > 2.16", "type": "detectGlibc" }, - "icuuc": { + "webengine-icuuc": { "label" : "libxml2 configured with icuuc", "type": "detectIcuuc" }, - "sanitizer": { + "webengine-sanitizer": { "label" : "sanitizer support", "type": "isSanitizerSupported" } }, "features": { - "system-fontconfig": { + "webengine-system-fontconfig": { "label": "fontconfig", - "condition": "libs.fontconfig", + "condition": "libs.webengine-fontconfig", "output": [ "privateFeature" ] }, - "system-dbus": { + "webengine-system-dbus": { "label": "dbus", - "condition": "libs.dbus", + "condition": "libs.webengine-dbus", "output": [ "privateFeature" ] }, - "system-libdrm": { + "webengine-system-libdrm": { "label": "libdrm", - "condition": "libs.libdrm", + "condition": "libs.webengine-libdrm", "output": [ "privateFeature" ] }, - "system-xcomposite": { + "webengine-system-xcomposite": { "label": "xcomposite", - "condition": "libs.xcomposite", + "condition": "libs.webengine-xcomposite", "output": [ "privateFeature" ] }, - "system-xcursor": { + "webengine-system-xcursor": { "label": "xcursor", - "condition": "libs.xcursor", + "condition": "libs.webengine-xcursor", "output": [ "privateFeature" ] }, - "system-xi": { + "webengine-system-xi": { "label": "xi", - "condition": "libs.xi", + "condition": "libs.webengine-xi", "output": [ "privateFeature" ] }, - "system-xrandr": { + "webengine-system-xrandr": { "label": "xrandr", - "condition": "libs.xrandr", + "condition": "libs.webengine-xrandr", "output": [ "privateFeature" ] }, - "system-xtst": { + "webengine-system-xtst": { "label": "xtst", - "condition": "libs.xtst", + "condition": "libs.webengine-xtst", "output": [ "privateFeature" ] }, "webengine-system-harfbuzz": { "label": "harfbuzz", - "condition": "config.unix && features.system-harfbuzz && libs.harfbuzz", + "condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz", "output": [ "privateFeature" ] }, - "system-glib" : { + "webengine-system-glib" : { "label": "glib", - "condition": "config.unix && libs.glib", + "condition": "config.unix && libs.webengine-glib", "output": [ "privateFeature" ] }, - "system-minizip" : { + "webengine-system-minizip" : { "label": "minizip", - "condition": "config.unix && libs.minizip", + "condition": "config.unix && libs.webengine-minizip", "output": [ "privateFeature" ] }, "webengine-system-zlib" : { "label": "zlib", - "condition": "config.unix && features.system-zlib && libs.zlib", + "condition": "config.unix && features.system-zlib && libs.webengine-zlib", "output": [ "privateFeature" ] }, - "system-libevent" : { + "webengine-system-libevent" : { "label": "libevent", - "condition": "config.unix && libs.libevent", + "condition": "config.unix && libs.webengine-libevent", "output": [ "privateFeature" ] }, - "system-jsoncpp" : { + "webengine-system-jsoncpp" : { "label": "jsoncpp", - "condition": "config.unix && libs.jsoncpp", + "condition": "config.unix && libs.webengine-jsoncpp", "output": [ "privateFeature" ] }, - "system-protobuf" : { + "webengine-system-protobuf" : { "label": "protobuf", - "condition": "config.unix && libs.protobuf && tests.protoc", + "condition": "config.unix && libs.webengine-protobuf && tests.webengine-protoc", "output": [ "privateFeature" ] }, "webengine-system-png" : { "label": "png", - "condition": "config.unix && features.system-png && libs.png", + "condition": "config.unix && features.system-png && libs.webengine-png", "output": [ "privateFeature" ] }, - "python2": { + "webengine-python2": { "label": "python2", - "condition": "tests.python2", + "condition": "tests.webengine-python2", "output": [ "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.python2.location" } + { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } ] }, - "gperf": { + "webengine-gperf": { "label": "gperf", - "condition": "tests.gperf", + "condition": "tests.webengine-gperf", "output": [ "privateFeature" ] }, - "bison": { + "webengine-bison": { "label": "bison", - "condition": "tests.bison", + "condition": "tests.webengine-bison", "output": [ "privateFeature" ] }, - "flex": { + "webengine-flex": { "label": "flex", - "condition": "tests.flex", + "condition": "tests.webengine-flex", "output": [ "privateFeature" ] }, - "embedded": { + "webengine-embedded-build": { "label": "Embedded build", "purpose": "Enables the embedded build configuration.", "section": "WebEngine", "condition": "config.unix", - "autoDetect": "tests.embedded", + "autoDetect": "tests.webengine-embedded-build", "output": [ "privateFeature" ] }, - "alsa": { + "webengine-alsa": { "label": "Use ALSA", "condition": "config.unix && tests.alsa", "output": [ "privateFeature" ] }, - "system-khr" : { + "webengine-system-khr" : { "label": "khr", - "condition": "config.unix && tests.khr", + "condition": "config.unix && tests.webengine-khr", "output": [ "privateFeature" ] }, - "system-libvpx" : { + "webengine-system-libvpx" : { "label": "libvpx", - "condition": "config.unix && tests.libvpx", + "condition": "config.unix && tests.webengine-libvpx", "output": [ "privateFeature" ] }, - "system-snappy" : { + "webengine-system-snappy" : { "label": "snappy", - "condition": "config.unix && tests.snappy", + "condition": "config.unix && tests.webengine-snappy", "output": [ "privateFeature" ] }, - "system-libsrtp" : { + "webengine-system-libsrtp" : { "label": "libsrtp", - "condition": "config.unix && tests.srtp", + "condition": "config.unix && tests.webengine-srtp", "output": [ "privateFeature" ] }, - "winversion" : { + "webengine-winversion" : { "label": "winversion", - "condition": "config.win32 && tests.winversion", + "condition": "config.win32 && tests.webengine-winversion", "output": [ "privateFeature" ] }, - "geolocation": { + "webengine-geolocation": { "label": "Geolocation", "condition": "module.positioning", "output": [ "privateFeature" ] }, - "pulseaudio": { + "webengine-pulseaudio": { "label": "Use PulseAudio", "autoDetect": "config.unix", "condition": "libs.pulseaudio", "output": [ "privateFeature" ] }, - "pepper-plugins": { + "webengine-pepper-plugins": { "label": "Pepper Plugins", "purpose": "Enables use of Pepper Flash and Widevine plugins.", "section": "WebEngine", - "autoDetect": "!features.embedded", + "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, - "printing-and-pdf": { + "webengine-printing-and-pdf": { "label": "Printing and PDF", "purpose": "Provides printing and output to PDF.", "section": "WebEngine", "condition": "module.printsupport && features.printer", - "autoDetect": "!features.embedded", + "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, - "proprietary-codecs": { + "webengine-proprietary-codecs": { "label": "Proprietary Codecs", "purpose": "Enables the use of proprietary codecs such as h.264/h.265 and MP3.", "section": "WebEngine", "autoDetect": false, "output": [ "privateFeature" ] }, - "spellchecker": { + "webengine-spellchecker": { "label": "Spellchecker", "purpose": "Provides a spellchecker.", "section": "WebEngine", "output": [ "publicFeature" ] }, - "native-spellchecker": { + "webengine-native-spellchecker": { "label": "Native Spellchecker", "purpose": "Use the system's native spellchecking engine.", "section": "WebEngine", "autoDetect": false, - "condition": "config.macos && features.spellchecker", + "condition": "config.macos && features.webengine-spellchecker", "output": [ "publicFeature" ] }, - "ui-delegates": { + "webengine-ui-delegates": { "label": "UI Delegates", "output": [ "privateFeature" ] }, - "testsupport": { + "webengine-testsupport": { "label": "Test Support", "autoDetect": "features.private_tests || call.isTestsInBuildParts", "output": [ "privateFeature" ] }, - "webrtc": { + "webengine-webrtc": { "label": "WebRTC", "purpose": "Provides WebRTC support.", "section": "WebEngine", - "autoDetect": "!features.embedded", + "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, - "system-nss": { + "webengine-system-nss": { "label": "nss", - "condition": "config.unix && !config.darwin && libs.nss", + "condition": "config.unix && !config.darwin && libs.webengine-nss", "output": [ "privateFeature" ] }, - "system-libwebp": { + "webengine-system-libwebp": { "label": "libwebp, libwebpmux and libwebpdemux", "autoDetect": "config.unix", - "condition": "libs.webp", + "condition": "libs.webengine-webp", "output": [ "privateFeature" ] }, - "system-opus": { + "webengine-system-opus": { "label": "opus", "autoDetect": "config.unix", - "condition": "libs.opus", + "condition": "libs.webengine-opus", "output": [ "privateFeature" ] }, - "system-ffmpeg": { + "webengine-system-ffmpeg": { "label": "ffmpeg", "autoDetect": false, - "condition": "libs.ffmpeg && features.system-opus && features.system-libwebp", + "condition": "libs.webengine-ffmpeg && features.webengine-system-opus && features.webengine-system-libwebp", "output": [ "privateFeature" ] }, - "system-icu": { + "webengine-system-icu": { "label": "icu", "autoDetect": false, - "condition": "libs.icu", + "condition": "libs.webengine-icu", "output": [ "privateFeature" ] }, - "system-re2": { + "webengine-system-re2": { "label": "re2", "autoDetect": "config.unix", - "condition": "tests.re2", + "condition": "tests.webengine-re2", "output": [ "privateFeature" ] }, - "system-ninja": { + "webengine-system-ninja": { "label": "Use System Ninja", - "condition": "tests.ninja", + "condition": "tests.webengine-ninja", "output": [ "privateFeature" ] }, - "system-gn": { + "webengine-system-gn": { "label": "Use System Gn", "autoDetect": false, - "condition": "tests.gn", + "condition": "tests.webengine-gn", "output": [ "privateFeature" ] }, - "system-glibc": { + "webengine-system-glibc": { "label": "glibc", - "condition": "config.linux && tests.glibc", + "condition": "config.linux && tests.webengine-glibc", "output": [ "privateFeature" ] }, - "system-libxml2": { + "webengine-system-libxml2": { "label": "libxml2 and libxslt", - "condition": "config.unix && libs.libxml2 && tests.icuuc", + "condition": "config.unix && libs.webengine-libxml2 && tests.webengine-icuuc", "output": [ "privateFeature" ] }, - "system-lcms2" : { + "webengine-system-lcms2" : { "label": "lcms2", - "autoDetect": "libs.lcms2", + "autoDetect": "libs.webengine-lcms2", "condition": "config.unix && features.printing-and-pdf", "output": [ "privateFeature" ] }, "webengine-sanitizer" : { "label": "Sanitizer ", - "autoDetect": "config.sanitizer && tests.sanitizer", + "autoDetect": "config.sanitizer && tests.webengine-sanitizer", "condition": "config.sanitizer", "output": [ "privateFeature" ] } @@ -533,22 +544,22 @@ "report": [ { "type": "warning", - "condition": "!features.python2", + "condition": "!features.webengine-python2", "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." }, { "type": "warning", - "condition": "!features.gperf", + "condition": "!features.webengine-gperf", "message": "gperf is required to build QtWebEngine." }, { "type": "warning", - "condition": "!features.bison", + "condition": "!features.webengine-bison", "message": "bison is required to build QtWebEngine." }, { "type": "warning", - "condition": "!features.flex", + "condition": "!features.webengine-flex", "message": "flex is required to build QtWebEngine." } ], @@ -557,45 +568,45 @@ { "section": "Qt WebEngine", "entries": [ - "embedded", - "pepper-plugins", - "printing-and-pdf", - "proprietary-codecs", - "spellchecker", - "native-spellchecker", - "webrtc", - "system-ninja", - "geolocation", + "webengine-embedded-build", + "webengine-pepper-plugins", + "webengine-printing-and-pdf", + "webengine-proprietary-codecs", + "webengine-spellchecker", + "webengine-native-spellchecker", + "webengine-webrtc", + "webengine-system-ninja", + "webengine-geolocation", { "type": "feature", - "args": "alsa", + "args": "webengine-alsa", "condition": "config.unix" }, { "type": "feature", - "args": "pulseaudio", + "args": "webengine-pulseaudio", "condition": "config.unix" }, { "section": "Optional system libraries used", "condition": "config.unix", "entries": [ - "system-re2", - "system-icu", - "system-libwebp", - "system-opus", - "system-ffmpeg", - "system-libvpx", - "system-snappy", - "system-libsrtp", - "system-glib", + "webengine-system-re2", + "webengine-system-icu", + "webengine-system-libwebp", + "webengine-system-opus", + "webengine-system-ffmpeg", + "webengine-system-libvpx", + "webengine-system-snappy", + "webengine-system-libsrtp", + "webengine-system-glib", "webengine-system-zlib", - "system-minizip", - "system-libevent", - "system-jsoncpp", - "system-protobuf", - "system-libxml2", - "system-lcms2", + "webengine-system-minizip", + "webengine-system-libevent", + "webengine-system-jsoncpp", + "webengine-system-protobuf", + "webengine-system-libxml2", + "webengine-system-lcms2", "webengine-system-png", "webengine-system-harfbuzz" ] @@ -604,23 +615,23 @@ "section": "Required system libraries", "condition": "config.unix && !config.macos", "entries": [ - "system-fontconfig", - "system-dbus", - "system-nss", - "system-khr", - "system-glibc" + "webengine-system-fontconfig", + "webengine-system-dbus", + "webengine-system-nss", + "webengine-system-khr", + "webengine-system-glibc" ] }, { "section": "Required system libraries for qpa-xcb", "condition": "config.unix && !config.macos", "entries": [ - "system-libdrm", - "system-xcomposite", - "system-xcursor", - "system-xi", - "system-xrandr", - "system-xtst" + "webengine-system-libdrm", + "webengine-system-xcomposite", + "webengine-system-xcursor", + "webengine-system-xi", + "webengine-system-xrandr", + "webengine-system-xtst" ] } ] diff --git a/examples/webenginewidgets/spellchecker/spellchecker.pro b/examples/webenginewidgets/spellchecker/spellchecker.pro index a5f59974a..d41f2c4f7 100644 --- a/examples/webenginewidgets/spellchecker/spellchecker.pro +++ b/examples/webenginewidgets/spellchecker/spellchecker.pro @@ -5,7 +5,7 @@ TARGET = spellchecker QT += webenginewidgets CONFIG += c++11 -qtConfig(native-spellchecker) { +qtConfig(webengine-native-spellchecker) { error("Spellcheck example can not be built when using native OS dictionaries.") } diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro index 8e91c530b..ed8fa2561 100644 --- a/examples/webenginewidgets/webenginewidgets.pro +++ b/examples/webenginewidgets/webenginewidgets.pro @@ -14,7 +14,7 @@ SUBDIRS += \ qtHaveModule(positioning): SUBDIRS += maps -qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile { +qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { SUBDIRS += spellchecker } else { message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.") diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index ed9882735..904e7b1c0 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -30,19 +30,19 @@ defineTest(runConfigure) { include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) QT_FOR_CONFIG += webengine-private - !qtConfig(gperf) { + !qtConfig(webengine-gperf) { skipBuild("Required gperf could not be found.") return(false) } - !qtConfig(bison) { + !qtConfig(webengine-bison) { skipBuild("Required bison could not be found.") return(false) } - !qtConfig(flex) { + !qtConfig(webengine-flex) { skipBuild("Required flex could not be found.") return(false) } - !qtConfig(python2) { + !qtConfig(webengine-python2) { skipBuild("A suitable version of python2 could not be found.") return(false) } @@ -53,28 +53,28 @@ defineTest(runConfigure) { } linux { - !qtConfig(system-glibc) { + !qtConfig(webengine-system-glibc) { skipBuild("A suitable version of libc could not be found. See: https://sourceware.org/bugzilla/show_bug.cgi?id=14898") return(false) } QT_FOR_CONFIG += gui-private - !qtConfig(system-khr) { + !qtConfig(webengine-system-khr) { skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") return(false) } for(package, $$list("nss dbus fontconfig")) { - !qtConfig(system-$$package) { + !qtConfig(webengine-system-$$package) { skipBuild("A suitable version of $$package could not be found.") return(false) } } - !qtConfig(embedded): qtConfig(xcb) { + !qtConfig(webengine-embedded-build): qtConfig(xcb) { for(package, $$list("libdrm xcomposite xcursor xi xrandr xtst")) { - !qtConfig(system-$$package) { + !qtConfig(webengine-system-$$package) { skipBuild("A suitable version of $$package could not be found.") return(false) } diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index c15b5118d..3b9a400b1 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -78,7 +78,7 @@ defineReplace(gnPath) { defineReplace(gnArgs) { linux { - qtConfig(embedded): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri) + qtConfig(webengine-embedded-build): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri) else: include($$QTWEBENGINE_ROOT/src/core/config/desktop_linux.pri) } macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri) diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf index 0b0bb6746..bb171f753 100644 --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -33,7 +33,7 @@ defineTest(isPlatformSupported) { skipBuild("Qt WebEngine on Windows requires a Windows SDK version 10.0.10586 or newer.") return(false) } - !qtConfig(winversion) { + !qtConfig(webengine-winversion) { skipBuild("Needs VS 2015 Update 3 with Cumulative Servicing Release or higher") return(false) } diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro index 9d9af9eb8..f66f4bd68 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -7,11 +7,11 @@ include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) QT_FOR_CONFIG += webengine webengine-private build_pass|!debug_and_release { - !qtConfig(system-gn): CONFIG(release, debug|release) { + !qtConfig(webengine-system-gn): CONFIG(release, debug|release) { buildgn.target = build_gn gn_args = $$gnArgs() out = $$gnPath() - !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()" + !qtConfig(webengine-system-ninja): ninja_path = "--path $$ninjaPath()" # check if it is not already build !exists($$out) { mkpath($$dirname(out)) diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro index c99513f85..1b15bcb6b 100644 --- a/src/buildtools/ninja.pro +++ b/src/buildtools/ninja.pro @@ -7,7 +7,7 @@ QT_FOR_CONFIG += webengine-private build_pass|!debug_and_release { - !qtConfig(system-ninja): CONFIG(release, debug|release) { + !qtConfig(webengine-system-ninja): CONFIG(release, debug|release) { out = $$ninjaPath() # check if it is not already build !exists($$out) { diff --git a/src/core/config/common.pri b/src/core/config/common.pri index e7010a13a..c1d5331ab 100644 --- a/src/core/config/common.pri +++ b/src/core/config/common.pri @@ -14,7 +14,7 @@ gn_args += \ enable_swiftshader=false \ use_custom_libcxx=false -qtConfig(printing-and-pdf) { +qtConfig(webengine-printing-and-pdf) { gn_args += enable_basic_printing=true enable_print_preview=true gn_args += enable_pdf=true } else { @@ -22,25 +22,25 @@ qtConfig(printing-and-pdf) { gn_args += enable_pdf=false } -qtConfig(pepper-plugins) { +qtConfig(webengine-pepper-plugins) { gn_args += enable_plugins=true enable_widevine=true } else { gn_args += enable_plugins=false enable_widevine=false } -qtConfig(spellchecker) { +qtConfig(webengine-spellchecker) { gn_args += enable_spellcheck=true } else { gn_args += enable_spellcheck=false } -qtConfig(webrtc) { +qtConfig(webengine-webrtc) { gn_args += enable_webrtc=true } else { gn_args += enable_webrtc=false } -qtConfig(proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\" +qtConfig(webengine-proprietary-codecs): gn_args += proprietary_codecs=true ffmpeg_branding=\"Chrome\" CONFIG(release, debug|release) { force_debug_info { diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index fbe44dc4c..c5329dfcc 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -115,7 +115,7 @@ host_build { gn_args += host_pkg_config=\"pkg-config\" } - qtConfig(webengine-system-zlib): qtConfig(system-minizip) { + qtConfig(webengine-system-zlib): qtConfig(webengine-system-minizip) { gn_args += use_system_zlib=true use_system_minizip=true qtConfig(printing-and-pdf): gn_args += pdfium_use_system_zlib=true } @@ -123,13 +123,13 @@ host_build { qtConfig(system-jpeg): gn_args += use_system_libjpeg=true qtConfig(system-freetype): gn_args += use_system_freetype=true qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true - qtConfig(system-glib): gn_args += use_glib=false - qtConfig(pulseaudio) { + qtConfig(webengine-system-glib): gn_args += use_glib=false + qtConfig(webengine-pulseaudio) { gn_args += use_pulseaudio=true } else { gn_args += use_pulseaudio=false } - qtConfig(alsa) { + qtConfig(webengine-alsa) { gn_args += use_alsa=true } else { gn_args += use_alsa=false @@ -139,19 +139,19 @@ host_build { !packagesExist(libpci): gn_args += use_libpci=false !packagesExist(xscrnsaver): gn_args += use_xscrnsaver=false - qtConfig(system-libevent): gn_args += use_system_libevent=true - qtConfig(system-libwebp): gn_args += use_system_libwebp=true - qtConfig(system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true - qtConfig(system-opus): gn_args += use_system_opus=true - qtConfig(system-snappy): gn_args += use_system_snappy=true - qtConfig(system-libvpx): gn_args += use_system_libvpx=true - qtConfig(system-icu): gn_args += use_system_icu=true icu_use_data_file=false - qtConfig(system-ffmpeg): gn_args += use_system_ffmpeg=true - qtConfig(system-re2): gn_args += use_system_re2=true - qtConfig(system-lcms2): gn_args += use_system_lcms2=true + qtConfig(webengine-system-libevent): gn_args += use_system_libevent=true + qtConfig(webengine-system-libwebp): gn_args += use_system_libwebp=true + qtConfig(webengine-system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true + qtConfig(webengine-system-opus): gn_args += use_system_opus=true + qtConfig(webengine-system-snappy): gn_args += use_system_snappy=true + qtConfig(webengine-system-libvpx): gn_args += use_system_libvpx=true + qtConfig(webengine-system-icu): gn_args += use_system_icu=true icu_use_data_file=false + qtConfig(webengine-system-ffmpeg): gn_args += use_system_ffmpeg=true + qtConfig(webengine-system-re2): gn_args += use_system_re2=true + qtConfig(webengine-system-lcms2): gn_args += use_system_lcms2=true # FIXME: - #qtConfig(system-protobuf): gn_args += use_system_protobuf=true - #qtConfig(system-jsoncpp): gn_args += use_system_jsoncpp=true - #qtConfig(system-libsrtp: gn_args += use_system_libsrtp=true + #qtConfig(webengine-system-protobuf): gn_args += use_system_protobuf=true + #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true + #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true } diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri index 57f301f18..2d820c889 100644 --- a/src/core/config/mac_osx.pri +++ b/src/core/config/mac_osx.pri @@ -32,8 +32,8 @@ gn_args += \ toolkit_views=false \ use_external_popup_menu=false -qtConfig(spellchecker) { - qtConfig(native-spellchecker): gn_args += use_browser_spellchecker=true +qtConfig(webengine-spellchecker) { + qtConfig(webengine-native-spellchecker): gn_args += use_browser_spellchecker=true else: gn_args += use_browser_spellchecker=false } else { gn_args += use_browser_spellchecker=false diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index 8e24645f0..0ec6979c8 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -28,7 +28,7 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc # Assume that we want mobile touch and low-end hardware behaviors # whenever we are cross compiling. -qtConfig(embedded): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES +qtConfig(webengine-embedded-build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES qtConfig(egl): CONFIG += egl @@ -186,7 +186,7 @@ HEADERS = \ web_engine_settings.h \ web_event_factory.h -qtConfig(pepper-plugins) { +qtConfig(webengine-pepper-plugins) { SOURCES += \ renderer_host/pepper/pepper_flash_browser_host_qt.cpp \ @@ -203,7 +203,7 @@ qtConfig(pepper-plugins) { renderer/pepper/pepper_renderer_host_factory_qt.h } -qtConfig(printing-and-pdf) { +qtConfig(webengine-printing-and-pdf) { SOURCES += \ printing_message_filter_qt.cpp \ diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 78bb8baee..2409ccb12 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -115,7 +115,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat resources.path = $$[QT_INSTALL_DATA]/resources INSTALLS += locales resources - !qtConfig(system-icu) { + !qtConfig(webengine-system-icu) { icu.CONFIG += no_check_exist icu.path = $$[QT_INSTALL_DATA]/resources INSTALLS += icu @@ -127,7 +127,7 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat # Copy essential files to the qtbase build directory for non-prefix builds # - !qtConfig(system-icu) { + !qtConfig(webengine-system-icu) { COPIES += icu } diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index a9089c569..dbf859100 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -5,7 +5,7 @@ TEMPLATE = aux qtConfig(debug_and_release): CONFIG += debug_and_release build_all -qtConfig(system-ninja) { +qtConfig(webengine-system-ninja) { QT_TOOL.ninja.binary = ninja } else { QT_TOOL.ninja.binary = $$shell_quote($$shell_path($$ninjaPath())) @@ -35,7 +35,7 @@ build_pass|!debug_and_release { gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" - !qtConfig(system-gn) { + !qtConfig(webengine-system-gn) { gn_binary = $$system_quote($$system_path($$gnPath())) } diff --git a/src/src.pro b/src/src.pro index 76d342c8d..d675f1f13 100644 --- a/src/src.pro +++ b/src/src.pro @@ -20,20 +20,20 @@ SUBDIRS += buildtools \ plugins -qtConfig(spellchecker):!qtConfig(native-spellchecker):!cross_compile { +qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { SUBDIRS += qwebengine_convert_dict qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict qwebengine_convert_dict.depends = core } -qtConfig(testsupport) { +qtConfig(webengine-testsupport) { webengine_testsupport_plugin.subdir = webengine/plugin/testsupport webengine_testsupport_plugin.target = sub-webengine-testsupport-plugin webengine_testsupport_plugin.depends = webengine SUBDIRS += webengine_testsupport_plugin } -qtConfig(ui-delegates) { +qtConfig(webengine-ui-delegates) { SUBDIRS += webengine/ui \ webengine/ui2 } diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro index 24fa2d9d8..58e1263a7 100644 --- a/src/webengine/webengine.pro +++ b/src/webengine/webengine.pro @@ -58,7 +58,7 @@ HEADERS = \ render_widget_host_view_qt_delegate_quickwindow.h \ ui_delegates_manager.h -qtConfig(testsupport) { +qtConfig(webengine-testsupport) { QT += testlib SOURCES += api/qquickwebenginetestsupport.cpp @@ -67,11 +67,11 @@ qtConfig(testsupport) { DEFINES += ENABLE_QML_TESTSUPPORT_API } -qtConfig(spellchecker) { +qtConfig(webengine-spellchecker) { DEFINES += ENABLE_SPELLCHECK } -qtConfig(printing-and-pdf) { +qtConfig(webengine-printing-and-pdf) { DEFINES += ENABLE_PDF } diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro index ffe9cc0de..540c4d538 100644 --- a/src/webenginewidgets/webenginewidgets.pro +++ b/src/webenginewidgets/webenginewidgets.pro @@ -44,17 +44,17 @@ HEADERS = \ api/qwebengineview_p.h \ render_widget_host_view_qt_delegate_widget.h -qtConfig(ui-delegates) { +qtConfig(webengine-ui-delegates) { SOURCES += ui/messagebubblewidget.cpp HEADERS += ui/messagebubblewidget_p.h DEFINES += QT_UI_DELEGATES } -qtConfig(spellchecker) { +qtConfig(webengine-spellchecker) { DEFINES += ENABLE_SPELLCHECK } -qtConfig(printing-and-pdf) { +qtConfig(webengine-printing-and-pdf) { DEFINES += ENABLE_PRINTING DEFINES += ENABLE_PDF QT += printsupport diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro index 9530e115c..56e61138d 100644 --- a/tests/auto/quick/qmltests/qmltests.pro +++ b/tests/auto/quick/qmltests/qmltests.pro @@ -100,7 +100,7 @@ OTHER_FILES += \ load(qt_build_paths) DEFINES += QUICK_TEST_SOURCE_DIR=\\\"$$re_escape($$PWD$${QMAKE_DIR_SEP}data)\\\" -!qtConfig(testsupport) { +!qtConfig(webengine-testsupport) { PLUGIN_EXTENSION = .so PLUGIN_PREFIX = lib osx: PLUGIN_PREFIX = .dylib diff --git a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro index 0f62ec21d..25bf44597 100644 --- a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro +++ b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro @@ -5,7 +5,7 @@ QT_PRIVATE += webengine-private gui-private HEADERS += ../shared/util.h -qtConfig(printing-and-pdf) { +qtConfig(webengine-printing-and-pdf) { DEFINES += ENABLE_PDF } diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index 2e6343469..e67cf0ed0 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -8,7 +8,7 @@ SUBDIRS += \ qquickwebenginedefaultsurfaceformat \ qquickwebengineview -qtConfig(testsupport) { +qtConfig(webengine-testsupport) { SUBDIRS += \ qmltests \ qquickwebengineviewgraphics diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri index 15f6517a4..7983a248f 100644 --- a/tests/auto/quick/tests.pri +++ b/tests/auto/quick/tests.pri @@ -19,7 +19,7 @@ QT += testlib network quick webengine # This define is used by some tests to look up resources in the source tree DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\" -qtConfig(testsupport) { +qtConfig(webengine-testsupport) { DEFINES += ENABLE_QML_TESTSUPPORT_API } diff --git a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro index a2dbd4d70..47c09e1ce 100644 --- a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro +++ b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro @@ -1,4 +1,4 @@ include(../tests.pri) QT *= core-private -qtConfig(printing-and-pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED +qtConfig(webengine-printing-and-pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro index 027eeb235..32a7806fe 100644 --- a/tests/auto/widgets/widgets.pro +++ b/tests/auto/widgets/widgets.pro @@ -19,8 +19,8 @@ qtConfig(accessibility) { SUBDIRS += qwebengineaccessibility } -qtConfig(spellchecker):!cross_compile { - !qtConfig(native-spellchecker) { +qtConfig(webengine-spellchecker):!cross_compile { + !qtConfig(webengine-native-spellchecker) { SUBDIRS += qwebenginespellcheck } else { message("Spellcheck test will not be built because it depends on usage of Hunspell dictionaries.") -- cgit v1.2.3 From 0f0d07ba0fc0792e78ebff1201b1034f7195b7cf Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 10 Nov 2017 13:33:08 +0100 Subject: Update Chromium Changes: a83d8cdb8d [Backport] Fix Stack Buffer Overflow in QuicClientPromisedInfo::OnPromiseHeaders Change-Id: I1a3f36a84d5f4838912bb5b6716f94282b064299 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index c394f9bd6..a83d8cdb8 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit c394f9bd67128f67bb26bbb47254549ea23a099f +Subproject commit a83d8cdb8d8361eadb86ac48d020486f56543114 -- cgit v1.2.3 From e366d91f5d3138a024512d66cc8918ccad1ffa00 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Thu, 2 Nov 2017 12:40:47 +0200 Subject: Add changes file for Qt 5.9.3 Change-Id: I032afc7d0784f5d755da1f93e8a621171f53bed9 Reviewed-by: Leena Miettinen --- dist/changes-5.9.3 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 dist/changes-5.9.3 diff --git a/dist/changes-5.9.3 b/dist/changes-5.9.3 new file mode 100644 index 000000000..ba90ff32d --- /dev/null +++ b/dist/changes-5.9.3 @@ -0,0 +1,50 @@ +Qt 5.9.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.9.3 Changes * +**************************************************************************** + + - This release contains only minor code improvements. + * Security fixes from Chromium up to version 62.0.3202.89 + Including: *NOT FINISHED MERGING* + + - QtWebEngineCore: + * [QTBUG-64032] Fix crash after resizing view to be empty. + + - QtWebEngine[QML]: + * Fix loading some favicons including qt.io's + + - QtWebEngineWidgets: + * [QTBUG-62147] Fix crash on shutdown if a QWebEngineProfile was child + of QApplication. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + + - Windows: + * Fix build issues with newer VS 2017 updates + + - Linux: + * Fix build issue with clang 3.9 + * [QTBUG-63675] Fix build issue with gcc 7.2 + + - macOS: + * Support for 10.13 High Sierra internals -- cgit v1.2.3 From bc6915f0ae19a5bd5223b2b722c4c7f684972e4f Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 10 Nov 2017 11:46:34 +0100 Subject: Update changes file with security CVEs for 5.9.3 Change-Id: I5ab44cf691c4a0fa4e7e96a8fe957dc849dc6f19 Reviewed-by: Allan Sandfeld Jensen --- dist/changes-5.9.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/changes-5.9.3 b/dist/changes-5.9.3 index ba90ff32d..9144fae79 100644 --- a/dist/changes-5.9.3 +++ b/dist/changes-5.9.3 @@ -23,7 +23,9 @@ information about a particular change. - This release contains only minor code improvements. * Security fixes from Chromium up to version 62.0.3202.89 - Including: *NOT FINISHED MERGING* + Including: CVE-2017-5124, CVE-2017-5126, CVE-2017-5127, CVE-2017-5128, CVE-2017-5129, + CVE-2017-5132, CVE-2017-5133, CVE-2017-15386, CVE-2017-15387, CVE-2017-15388, + CVE-2017-15390, CVE-2017-15392, CVE-2017-15394, CVE-2017-15396, CVE-2017-15398. - QtWebEngineCore: * [QTBUG-64032] Fix crash after resizing view to be empty. -- cgit v1.2.3 From a1a2bd2d30f756c5fb51ae2c9e2575e56be05c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 16 Oct 2017 12:49:26 +0200 Subject: Add tests setUrlToBadDomain and setUrlToBadPort Document the somewhat strange behavior of the signals QWebEnginePage::urlChanged, QWebEnginePage::titleChanged, and QWebEnginePage::loadFinished when trying to load invalid URLs via QWebEnginePage::setUrl. Change-Id: I5218a49105ad6187f87e7091589b5175f4349593 Reviewed-by: Peter Varga Reviewed-by: Allan Sandfeld Jensen --- .../widgets/qwebenginepage/tst_qwebenginepage.cpp | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 76a0bbf4d..35e703bbc 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -193,6 +193,8 @@ private Q_SLOTS: void setUrlWithPendingLoads(); void setUrlToEmpty(); void setUrlToInvalid(); + void setUrlToBadDomain(); + void setUrlToBadPort(); void setUrlHistory(); void setUrlUsingStateObject(); void setUrlThenLoads_data(); @@ -3829,6 +3831,92 @@ void tst_QWebEnginePage::setUrlToInvalid() QCOMPARE(baseUrlSync(&page), aboutBlank); } +void tst_QWebEnginePage::setUrlToBadDomain() +{ + // Failing to load a URL should still emit a urlChanged signal. + // + // This test is based on the scenario in QTBUG-48995 where the second setUrl + // call first triggers an unexpected additional urlChanged signal with the + // original url before the expected signal with the new url. + + // RFC 2606 says the .invalid TLD should be invalid. + const QUrl url1 = QStringLiteral("http://this.is.definitely.invalid/"); + const QUrl url2 = QStringLiteral("http://this.is.also.invalid/"); + QWebEnginePage page; + QSignalSpy urlSpy(&page, &QWebEnginePage::urlChanged); + QSignalSpy titleSpy(&page, &QWebEnginePage::titleChanged); + QSignalSpy loadSpy(&page, &QWebEnginePage::loadFinished); + + page.setUrl(url1); + + QTRY_COMPARE(urlSpy.count(), 1); + QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(loadSpy.count(), 1); + + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url1); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.host()); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.host()); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); + + QCOMPARE(page.url(), url1); + QCOMPARE(page.title(), url1.host()); + + page.setUrl(url2); + + QTRY_COMPARE(urlSpy.count(), 1); + QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(loadSpy.count(), 1); + + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url2); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.host()); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.host()); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); + + QCOMPARE(page.url(), url2); + QCOMPARE(page.title(), url2.host()); +} + +void tst_QWebEnginePage::setUrlToBadPort() +{ + // Failing to load a URL should still emit a urlChanged signal. + + // Ports 244-245 are hopefully unbound (marked unassigned in RFC1700). + const QUrl url1 = QStringLiteral("http://127.0.0.1:244/"); + const QUrl url2 = QStringLiteral("http://127.0.0.1:245/"); + QWebEnginePage page; + QSignalSpy urlSpy(&page, &QWebEnginePage::urlChanged); + QSignalSpy titleSpy(&page, &QWebEnginePage::titleChanged); + QSignalSpy loadSpy(&page, &QWebEnginePage::loadFinished); + + page.setUrl(url1); + + QTRY_COMPARE(urlSpy.count(), 1); + QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(loadSpy.count(), 1); + + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url1); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.authority()); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.host()); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); + + QCOMPARE(page.url(), url1); + QCOMPARE(page.title(), url1.host()); + + page.setUrl(url2); + + QTRY_COMPARE(urlSpy.count(), 1); + QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(loadSpy.count(), 1); + + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url2); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.authority()); + QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.host()); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); + + QCOMPARE(page.url(), url2); + QCOMPARE(page.title(), url2.host()); +} + static QStringList collectHistoryUrls(QWebEngineHistory *history) { QStringList urls; -- cgit v1.2.3 From cf6768d81ed7b9444e28ede6e26e125d5919b143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 16 Oct 2017 12:54:35 +0200 Subject: Stop preserving aborted navigation entries Consider the scenario 1. user enters url "http://localhost:8000/" A new navigation entry is created and committed in the NavigationController. 2. user enters url "http://localhost:8000/download.bin" A new navigation entry is created and a download is triggered, but the pending navigation entry in the NavigationController is neither committed nor discarded (since our WebContentsDelegate's ShouldPreserveAbortedURLs() returns true). 3. user enters url "http://localhost:8000/download.bin" At this point the NavigationController will have "http://localhost:8000/" as the committed navigation entry and "http://localhost:8000/download.bin" as the pending entry. NavigateToPendingEntry will see that the user is trying to navigate again to the same URL as the last pending entry and will therefore identify this new navigation as a reload. However Blink interprets 'reload' to mean reloading the last committed entry, i.e. "http://localhost:8000/", and so we end up trying to download "http://localhost:8000/" instead of "http://localhost:8000/download.bin" as the user might have expected. The patch removes the ShouldPreserveAbortedURLs override and relies on the default implementation which always returns false. As a result the pending navigation entry in step 2 above is discarded once the download has been triggered and the unexpected behavior in step 3 is no longer triggered. Removing the override resurrects QTBUG-48995 where, for example, calling QWebEnginePage::setUrl triggers first a urlChanged signal for the *old* URL. The patch adds url and title properties to WebContentsDelegateQt so that property change signals are triggered only if the properties have actually changed. A consequence of this fix is that the first urlChanged signal is delivered directly from the setUrl/load method and not asynchronously once the loading starts (this is also how Chrome's URL bar is updated). Task-number: QTBUG-63388 Change-Id: Icfa300b165e5e56f1fbc8978a00a237c263df183 Reviewed-by: Peter Varga --- src/core/web_contents_adapter.cpp | 6 +- src/core/web_contents_delegate_qt.cpp | 33 ++++---- src/core/web_contents_delegate_qt.h | 7 +- tests/auto/quick/qmltests/data/tst_viewSource.qml | 9 +- .../tst_qwebenginedownloads.cpp | 97 ++++++++++++++++++---- .../widgets/qwebenginepage/tst_qwebenginepage.cpp | 26 +++--- 6 files changed, 121 insertions(+), 57 deletions(-) diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index effd6e340..ed13883c0 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -594,6 +594,8 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request) } d->webContents->GetController().LoadURLWithParams(params); + // Follow chrome::Navigate and invalidate the URL immediately. + d->webContentsDelegate->NavigationStateChanged(d->webContents.get(), content::INVALIDATE_TYPE_URL); focusIfNecessary(); } @@ -635,7 +637,7 @@ void WebContentsAdapter::save(const QString &filePath, int savePageFormat) QUrl WebContentsAdapter::activeUrl() const { Q_D(const WebContentsAdapter); - return toQt(d->webContents->GetLastCommittedURL()); + return d->webContentsDelegate->url(); } QUrl WebContentsAdapter::requestedUrl() const @@ -670,7 +672,7 @@ QUrl WebContentsAdapter::iconUrl() const QString WebContentsAdapter::pageTitle() const { Q_D(const WebContentsAdapter); - return toQt(d->webContents->GetTitle()); + return d->webContentsDelegate->title(); } QString WebContentsAdapter::selectedText() const diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index f35620c86..96c7c4c41 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -131,10 +131,21 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source, content::InvalidateTypes changed_flags) { - if (changed_flags & content::INVALIDATE_TYPE_URL) - m_viewClient->urlChanged(toQt(source->GetVisibleURL())); - if (changed_flags & content::INVALIDATE_TYPE_TITLE) - m_viewClient->titleChanged(toQt(source->GetTitle())); + if (changed_flags & content::INVALIDATE_TYPE_URL) { + QUrl newUrl = toQt(source->GetVisibleURL()); + if (m_url != newUrl) { + m_url = newUrl; + m_viewClient->urlChanged(m_url); + } + } + + if (changed_flags & content::INVALIDATE_TYPE_TITLE) { + QString newTitle = toQt(source->GetTitle()); + if (m_title != newTitle) { + m_title = newTitle; + m_viewClient->titleChanged(m_title); + } + } // NavigationStateChanged gets called with INVALIDATE_TYPE_TAB by AudioStateProvider::Notify, // whenever an audio sound gets played or stopped, this is the only way to actually figure out @@ -146,20 +157,6 @@ void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source, } } -bool WebContentsDelegateQt::ShouldPreserveAbortedURLs(content::WebContents *source) -{ - Q_UNUSED(source) - - // Allow failed URLs to stick around in the URL bar, but only when the error-page is enabled. - WebEngineSettings *settings = m_viewClient->webEngineSettings(); - bool isErrorPageEnabled = settings->testAttribute(settings->Attribute::ErrorPageEnabled); - - if (isErrorPageEnabled) - return true; - - return false; -} - 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) diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index 44fb93093..8440ec053 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -97,6 +97,9 @@ public: void setLastSearchedString(const QString &s) { m_lastSearchedString = s; } int lastReceivedFindReply() const { return m_lastReceivedFindReply; } + QUrl url() const { return m_url; } + QString title() const { return m_title; } + // WebContentsDelegate overrides content::WebContents *OpenURLFromTab(content::WebContents *source, const content::OpenURLParams ¶ms) override; void NavigationStateChanged(content::WebContents* source, content::InvalidateTypes changed_flags) override; @@ -119,7 +122,6 @@ public: bool IsPopupOrPanel(const content::WebContents *source) const override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; void RequestToLockMouse(content::WebContents *web_contents, bool user_gesture, bool last_unlocked_by_target) override; - bool ShouldPreserveAbortedURLs(content::WebContents *source) override; void ShowValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view, const base::string16 &main_text, const base::string16 &sub_text) override; void HideValidationMessage(content::WebContents *web_contents) override; void MoveValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view) override; @@ -165,6 +167,9 @@ private: QSharedPointer m_filePickerController; QUrl m_initialTargetUrl; int m_lastLoadProgress; + + QUrl m_url; + QString m_title; }; } // namespace QtWebEngineCore diff --git a/tests/auto/quick/qmltests/data/tst_viewSource.qml b/tests/auto/quick/qmltests/data/tst_viewSource.qml index 22c3947d3..576035ef2 100644 --- a/tests/auto/quick/qmltests/data/tst_viewSource.qml +++ b/tests/auto/quick/qmltests/data/tst_viewSource.qml @@ -63,7 +63,7 @@ TestWebEngineView { name: "WebEngineViewSource" function init() { - webEngineView.url = Qt.resolvedUrl("about:blank"); + webEngineView.url = Qt.resolvedUrl("test1.html"); verify(webEngineView.waitForLoadSucceeded()); newViewRequestedSpy.clear(); @@ -103,8 +103,8 @@ TestWebEngineView { { tag: "view-source:about:blank", userInputUrl: "view-source:about:blank", loadSucceed: true, url: "view-source:about:blank", title: "view-source:about:blank" }, { tag: testLocalUrl, userInputUrl: testLocalUrl, loadSucceed: true, url: testLocalUrl, title: "test1.html" }, { tag: testLocalUrlWithoutScheme, userInputUrl: testLocalUrlWithoutScheme, loadSucceed: true, url: testLocalUrl, title: "test1.html" }, - { tag: "view-source:http://non.existent", userInputUrl: "view-source:http://non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "non.existent" }, - { tag: "view-source:non.existent", userInputUrl: "view-source:non.existent", loadSucceed: false, url: "view-source:http://non.existent/", title: "non.existent" }, + { tag: "view-source:http://non.existent", userInputUrl: "view-source:http://non.existent", loadSucceed: false, url: "http://non.existent/", title: "non.existent" }, + { tag: "view-source:non.existent", userInputUrl: "view-source:non.existent", loadSucceed: false, url: "http://non.existent/", title: "non.existent" }, ]; } @@ -114,11 +114,10 @@ TestWebEngineView { if (row.loadSucceed) { verify(webEngineView.waitForLoadSucceeded()); - tryVerify(function() { return titleChangedSpy.count >= 1; }); } else { verify(webEngineView.waitForLoadFailed()); - tryVerify(function() { return titleChangedSpy.count >= 2; }); } + tryVerify(function() { return titleChangedSpy.count == 1; }); compare(webEngineView.url, row.url); tryCompare(webEngineView, "title", row.title); diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp index 9531d0cf4..7094c8e4b 100644 --- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp +++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp @@ -27,6 +27,7 @@ ****************************************************************************/ #include +#include #include #include #include @@ -37,6 +38,18 @@ #include #include +static std::unique_ptr waitForFaviconRequest(HttpServer *server) +{ + auto rr = waitForRequest(server); + if (!rr || + rr->requestMethod() != QByteArrayLiteral("GET") || + rr->requestPath() != QByteArrayLiteral("/favicon.ico")) + return nullptr; + rr->setResponseStatus(404); + rr->sendResponse(); + return std::move(rr); +} + class tst_QWebEngineDownloads : public QObject { Q_OBJECT @@ -46,6 +59,7 @@ private Q_SLOTS: void downloadTwoLinks(); void downloadPage_data(); void downloadPage(); + void downloadViaSetUrl(); }; enum DownloadTestUserAction { @@ -317,12 +331,8 @@ void tst_QWebEngineDownloads::downloadLink() QVERIFY(loadOk); // 1.1. Ignore favicon request - auto favIconRR = waitForRequest(&server); + auto favIconRR = waitForFaviconRequest(&server); QVERIFY(favIconRR); - QCOMPARE(favIconRR->requestMethod(), QByteArrayLiteral("GET")); - QCOMPARE(favIconRR->requestPath(), QByteArrayLiteral("/favicon.ico")); - favIconRR->setResponseStatus(404); - favIconRR->sendResponse(); // 2. Simulate user action // @@ -439,12 +449,8 @@ void tst_QWebEngineDownloads::downloadTwoLinks() QVERIFY(waitForSignal(&page, &QWebEnginePage::loadFinished, [&](bool ok){ loadOk = ok; })); QVERIFY(loadOk); - auto favIconRR = waitForRequest(&server); + auto favIconRR = waitForFaviconRequest(&server); QVERIFY(favIconRR); - QCOMPARE(favIconRR->requestMethod(), QByteArrayLiteral("GET")); - QCOMPARE(favIconRR->requestPath(), QByteArrayLiteral("/favicon.ico")); - favIconRR->setResponseStatus(404); - favIconRR->sendResponse(); QTRY_VERIFY(view.focusWidget()); QWidget *renderWidget = view.focusWidget(); @@ -541,12 +547,8 @@ void tst_QWebEngineDownloads::downloadPage() QVERIFY(waitForSignal(&page, &QWebEnginePage::loadFinished, [&](bool ok){ loadOk = ok; })); QVERIFY(loadOk); - auto favIconRR = waitForRequest(&server); + auto favIconRR = waitForFaviconRequest(&server); QVERIFY(favIconRR); - QCOMPARE(favIconRR->requestMethod(), QByteArrayLiteral("GET")); - QCOMPARE(favIconRR->requestPath(), QByteArrayLiteral("/favicon.ico")); - favIconRR->setResponseStatus(404); - favIconRR->sendResponse(); QTemporaryDir tmpDir; QVERIFY(tmpDir.isValid()); @@ -593,5 +595,70 @@ void tst_QWebEngineDownloads::downloadPage() QVERIFY(file.exists()); } +void tst_QWebEngineDownloads::downloadViaSetUrl() +{ + // Reproduce the scenario described in QTBUG-63388 by triggering downloads + // of the same file multiple times via QWebEnginePage::setUrl + + HttpServer server; + QWebEngineProfile profile; + QWebEnginePage page(&profile); + QSignalSpy loadSpy(&page, &QWebEnginePage::loadFinished); + QSignalSpy urlSpy(&page, &QWebEnginePage::urlChanged); + const QUrl indexUrl = server.url(); + const QUrl fileUrl = server.url(QByteArrayLiteral("/file")); + + // Set up the test scenario by trying to load some unrelated HTML. + + page.setUrl(indexUrl); + + auto indexRR = waitForRequest(&server); + QVERIFY(indexRR); + QCOMPARE(indexRR->requestMethod(), QByteArrayLiteral("GET")); + QCOMPARE(indexRR->requestPath(), QByteArrayLiteral("/")); + indexRR->setResponseHeader(QByteArrayLiteral("content-type"), QByteArrayLiteral("text/html")); + indexRR->setResponseBody(QByteArrayLiteral("Hello")); + indexRR->sendResponse(); + + auto indexFavRR = waitForFaviconRequest(&server); + QVERIFY(indexFavRR); + + QTRY_COMPARE(loadSpy.count(), 1); + QTRY_COMPARE(urlSpy.count(), 1); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), true); + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), indexUrl); + + // Download files via setUrl. With QTBUG-63388 after the first iteration the + // downloads would be triggered for indexUrl and not fileUrl. + + QVector downloadUrls; + QObject::connect(&profile, &QWebEngineProfile::downloadRequested, [&](QWebEngineDownloadItem *item) { + downloadUrls.append(item->url()); + }); + + for (int i = 0; i != 3; ++i) { + page.setUrl(fileUrl); + QCOMPARE(page.url(), fileUrl); + + auto fileRR = waitForRequest(&server); + QVERIFY(fileRR); + fileRR->setResponseHeader(QByteArrayLiteral("content-disposition"), QByteArrayLiteral("attachment")); + fileRR->setResponseBody(QByteArrayLiteral("redacted")); + fileRR->sendResponse(); + + auto fileFavRR = waitForFaviconRequest(&server); + QVERIFY(fileFavRR); + + QTRY_COMPARE(loadSpy.count(), 1); + QTRY_COMPARE(urlSpy.count(), 2); + QTRY_COMPARE(downloadUrls.count(), 1); + QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), fileUrl); + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), indexUrl); + QCOMPARE(downloadUrls.takeFirst(), fileUrl); + QCOMPARE(page.url(), indexUrl); + } +} + QTEST_MAIN(tst_QWebEngineDownloads) #include "tst_qwebenginedownloads.moc" diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 35e703bbc..47e83855c 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -3192,21 +3192,19 @@ void tst_QWebEnginePage::progressSignal() void tst_QWebEnginePage::urlChange() { - QSignalSpy urlSpy(m_page, SIGNAL(urlChanged(QUrl))); + QSignalSpy urlSpy(m_page, &QWebEnginePage::urlChanged); QUrl dataUrl("data:text/html,

Test"); m_view->setUrl(dataUrl); - QVERIFY(urlSpy.wait()); - - QCOMPARE(urlSpy.size(), 1); + QTRY_COMPARE(urlSpy.size(), 1); + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), dataUrl); QUrl dataUrl2("data:text/html,title

Test"); m_view->setUrl(dataUrl2); - QVERIFY(urlSpy.wait()); - - QCOMPARE(urlSpy.size(), 2); + QTRY_COMPARE(urlSpy.size(), 1); + QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), dataUrl2); } class FakeReply : public QNetworkReply { @@ -3317,7 +3315,7 @@ void tst_QWebEnginePage::requestedUrlAfterSetAndLoadFailures() page.load(second); QTRY_COMPARE_WITH_TIMEOUT(spy.count(), 2, 12000); - QCOMPARE(page.url(), first); + QCOMPARE(page.url(), second); QCOMPARE(page.requestedUrl(), second); QVERIFY(!spy.at(1).first().toBool()); } @@ -3850,12 +3848,11 @@ void tst_QWebEnginePage::setUrlToBadDomain() page.setUrl(url1); QTRY_COMPARE(urlSpy.count(), 1); - QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(titleSpy.count(), 1); QTRY_COMPARE(loadSpy.count(), 1); QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url1); QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.host()); - QCOMPARE(titleSpy.takeFirst().value(0).toString(), url1.host()); QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); QCOMPARE(page.url(), url1); @@ -3864,12 +3861,11 @@ void tst_QWebEnginePage::setUrlToBadDomain() page.setUrl(url2); QTRY_COMPARE(urlSpy.count(), 1); - QTRY_COMPARE(titleSpy.count(), 2); + QTRY_COMPARE(titleSpy.count(), 1); QTRY_COMPARE(loadSpy.count(), 1); QCOMPARE(urlSpy.takeFirst().value(0).toUrl(), url2); QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.host()); - QCOMPARE(titleSpy.takeFirst().value(0).toString(), url2.host()); QCOMPARE(loadSpy.takeFirst().value(0).toBool(), false); QCOMPARE(page.url(), url2); @@ -4077,9 +4073,8 @@ void tst_QWebEnginePage::setUrlThenLoads() const QUrl urlToLoad1("qrc:/resources/test2.html"); const QUrl urlToLoad2("qrc:/resources/test1.html"); - // Just after first load. URL didn't changed yet. m_page->load(urlToLoad1); - QCOMPARE(m_page->url(), url); + QCOMPARE(m_page->url(), urlToLoad1); QCOMPARE(m_page->requestedUrl(), urlToLoad1); // baseUrlSync spins an event loop and this sometimes return the next result. // QCOMPARE(baseUrlSync(m_page), baseUrl); @@ -4093,9 +4088,8 @@ void tst_QWebEnginePage::setUrlThenLoads() QCOMPARE(m_page->requestedUrl(), urlToLoad1); QCOMPARE(baseUrlSync(m_page), extractBaseUrl(urlToLoad1)); - // Just after second load. URL didn't changed yet. m_page->load(urlToLoad2); - QCOMPARE(m_page->url(), urlToLoad1); + QCOMPARE(m_page->url(), urlToLoad2); QCOMPARE(m_page->requestedUrl(), urlToLoad2); QCOMPARE(baseUrlSync(m_page), extractBaseUrl(urlToLoad1)); QTRY_COMPARE(startedSpy.count(), 3); -- cgit v1.2.3 From f1003c50652c1f5ef9ae0e16036b175fe3e8f215 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 17 Nov 2017 13:12:56 +0100 Subject: Blacklist failing test_findTextInterruptedByLoad QML test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Continiously failed 5 times on Windows when integrating unrelated patches. Task-number: QTBUG-61887 Change-Id: I8055673e04c3bdfddfcfe05c3905ef5a86e8d1ec Reviewed-by: Michael Brüning --- tests/auto/quick/qmltests/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST index 19d75dfb7..f449f4949 100644 --- a/tests/auto/quick/qmltests/BLACKLIST +++ b/tests/auto/quick/qmltests/BLACKLIST @@ -19,3 +19,6 @@ linux [WebEngineViewSingleFileUpload::test_acceptSingleFileSelection] * + +[WebViewFindText::test_findTextInterruptedByLoad] +* -- cgit v1.2.3