diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 9f2a44d7bdd9234c05ce3ee38352746fa3434cdc..89b751c4ab492205f076b03b99426c5a631217d3 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -79,7 +79,7 @@ contains(QT_ARCH, "arm") {
         # If the toolchain does not explicitly specify to use NEON instructions
         # we use arm_neon_optional for ARMv7 and newer and let chromium decide
         # about the mfpu option.
-        contains(MFPU, "neon")|contains(MFPU, "neon-vfpv4"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1
+        contains(MFPU, ".*neon.*"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1
         else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1
         else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0
     } else {
diff --git a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
index a8a65cfb76d4ec09332a5ec88c1ea795428928fa..6690f9a0fb569d95b408b738ab82768b66329454 100644
--- a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
@@ -76,7 +76,7 @@ private:
     int m_renderProcessId;
     int m_renderFrameId;
 
-    net::AuthChallengeInfo *m_authInfo;
+    scoped_refptr<net::AuthChallengeInfo> m_authInfo;
 
     // The request that wants login data.
     // Must only be accessed on the IO thread.
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 8e284c9d6fbecab3c571927cf620c83161092dd5..c171777452bf80bf398ac3c5b654971c83d8ddad 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -306,6 +306,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
     prefs->javascript_can_access_clipboard = testAttribute(JavascriptCanAccessClipboard);
     prefs->tabs_to_links = testAttribute(LinksIncludedInFocusChain);
     prefs->local_storage_enabled = testAttribute(LocalStorageEnabled);
+    prefs->databases_enabled = testAttribute(LocalStorageEnabled);
     prefs->allow_universal_access_from_file_urls = testAttribute(LocalContentCanAccessRemoteUrls);
     prefs->xss_auditor_enabled = testAttribute(XSSAuditingEnabled);
     prefs->spatial_navigation_enabled = testAttribute(SpatialNavigationEnabled);
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index 447937592a1d76c441477d760b8b58a14a7ca599..8bf319b85e3e258351fa7f213aa29f6a4fc469a1 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -163,7 +163,7 @@ void QQuickWebEngineDownloadItem::cancel()
 }
 
 /*!
-    \qmlproperty quint32 WebEngineDownloadItem::id
+    \qmlproperty int WebEngineDownloadItem::id
 
     Holds the download item's ID.
 */
@@ -222,7 +222,7 @@ qint64 QQuickWebEngineDownloadItem::receivedBytes() const
 }
 
 /*!
-    \qmlproperty QString WebEngineDownloadItem::mimeType
+    \qmlproperty string WebEngineDownloadItem::mimeType
     \since QtWebEngine 1.2
 
     Holds the MIME type of the download.
@@ -235,7 +235,7 @@ QString QQuickWebEngineDownloadItem::mimeType() const
 }
 
 /*!
-    \qmlproperty QString WebEngineDownloadItem::path
+    \qmlproperty string WebEngineDownloadItem::path
 
     Holds the full target path where data is being downloaded to.
 
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 32161570df105e67ab8f06811cf62654424d6cd2..1ca97adeaaaadfe2d48b5f5e1420accee84b5321 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -288,7 +288,7 @@ QQuickWebEngineProfile::~QQuickWebEngineProfile()
 }
 
 /*!
-    \qmlproperty QString WebEngineProfile::storageName
+    \qmlproperty string WebEngineProfile::storageName
 
     The storage name that is used to create separate subdirectories for each profile that uses
     the disk for storing persistent data and cache.
@@ -367,7 +367,7 @@ void QQuickWebEngineProfile::setOffTheRecord(bool offTheRecord)
 }
 
 /*!
-    \qmlproperty QString WebEngineProfile::persistentStoragePath
+    \qmlproperty string WebEngineProfile::persistentStoragePath
 
     The path to the location where the persistent data for the browser and web content are
     stored. Persistent data includes persistent cookies, HTML5 local storage, and visited links.
@@ -404,7 +404,7 @@ void QQuickWebEngineProfile::setPersistentStoragePath(const QString &path)
 }
 
 /*!
-    \qmlproperty QString WebEngineProfile::cachePath
+    \qmlproperty string WebEngineProfile::cachePath
 
     The path to the location where the profile's caches are stored, in particular the HTTP cache.
 
@@ -439,7 +439,7 @@ void QQuickWebEngineProfile::setCachePath(const QString &path)
 }
 
 /*!
-    \qmlproperty QString WebEngineProfile::httpUserAgent
+    \qmlproperty string WebEngineProfile::httpUserAgent
 
     The user-agent string sent with HTTP to identify the browser.
 */
@@ -574,7 +574,7 @@ void QQuickWebEngineProfile::setHttpCacheMaximumSize(int maximumSize)
 }
 
 /*!
-    \qmlproperty QString WebEngineProfile::httpAcceptLanguage
+    \qmlproperty string WebEngineProfile::httpAcceptLanguage
 
     The value of the Accept-Language HTTP request-header field.
 
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 56634392c318d44a795a983ca4a95facc312eb45..09bf2708ed32d388b4e208c1e3bdac1083df0e3b 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -347,7 +347,7 @@ bool QQuickWebEngineSettings::allowRunningInsecureContent() const
 }
 
 /*!
-    \qmlproperty QString WebEngineSettings::defaultTextEncoding
+    \qmlproperty string WebEngineSettings::defaultTextEncoding
     \since QtWebEngine 1.2
 
     Sets the default encoding. The value must be a string describing an encoding such as "utf-8" or
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 64f7fb5beddf826e761e0b24566bd7a7306125c3..61f940f159e44885a5bcb7017e36439107c73d51 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -826,8 +826,10 @@ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContent
 
     // This throws away the WebContentsAdapter that has been used until now.
     // All its states, particularly the loading URL, are replaced by the adopted WebContentsAdapter.
-    WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis());
-    adapterOwner->deleteLater();
+    if (adapter) {
+        WebContentsAdapterOwner *adapterOwner = new WebContentsAdapterOwner(adapter->sharedFromThis());
+        adapterOwner->deleteLater();
+    }
     adapter = webContents->sharedFromThis();
     adapter->initialize(this);
 
diff --git a/src/webengine/api/qtwebengineglobal.cpp b/src/webengine/api/qtwebengineglobal.cpp
index 8010527828de0560e1c94686026cb8cc15c786f6..a242fc6aa1b1a926d93915a22b3fb6994d75e750 100644
--- a/src/webengine/api/qtwebengineglobal.cpp
+++ b/src/webengine/api/qtwebengineglobal.cpp
@@ -62,7 +62,7 @@ namespace QtWebEngine {
 /*!
     \fn QtWebEngine::initialize()
 
-    Sets up an OpenGL Context that can be shared between processes. This has to be done after
+    Sets up an OpenGL Context that can be shared between threads. This has to be done after
     QGuiApplication is created, but before a Qt Quick window is created.
 
     This has the same effect as setting the Qt::AA_ShareOpenGLContexts
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 68b097d4a0daec9fe7f067f39c0c7d555801dc1f..f79b0ca22a915626ac083276b89aefb37b156188 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -343,6 +343,16 @@ void RenderWidgetHostViewQtDelegateQuick::inputMethodEvent(QInputMethodEvent *ev
 void RenderWidgetHostViewQtDelegateQuick::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
 {
     QQuickItem::geometryChanged(newGeometry, oldGeometry);
+
+    if (window()) {
+        // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7
+        const QPoint globalPos = window()->mapToGlobal(position().toPoint());
+        if (globalPos != m_lastGlobalPos) {
+            m_lastGlobalPos = globalPos;
+            m_client->windowBoundsChanged();
+        }
+    }
+
     m_client->notifyResize();
 }
 
@@ -375,6 +385,10 @@ QSGNode *RenderWidgetHostViewQtDelegateQuick::updatePaintNode(QSGNode *oldNode,
 
 void RenderWidgetHostViewQtDelegateQuick::onWindowPosChanged()
 {
+    if (window()) {
+        // TODO(pvarga): Use QQuickItem::mapToGlobal from Qt 5.7
+        m_lastGlobalPos = window()->mapToGlobal(position().toPoint());
+    }
     m_client->windowBoundsChanged();
 }
 
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 de3aff29118b7f463e2c3efab0f88af068314b8a..385a98a3cb8ff1291387b64c8a304411074c2bab 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -104,6 +104,7 @@ private:
     QList<QMetaObject::Connection> m_windowConnections;
     bool m_isPopup;
     bool m_initialized;
+    QPoint m_lastGlobalPos;
 };
 
 } // namespace QtWebEngineCore
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.h b/src/webenginewidgets/api/qwebenginecontextmenudata.h
index 1a2ff8de410468bc1540807a615ff380d8d93a8e..97cfe9f65215e0cca3ad9625b9da49da50569b76 100644
--- a/src/webenginewidgets/api/qwebenginecontextmenudata.h
+++ b/src/webenginewidgets/api/qwebenginecontextmenudata.h
@@ -40,7 +40,7 @@
 #ifndef QWEBENGINECONTEXTDATA_H
 #define QWEBENGINECONTEXTDATA_H
 
-#include <qtwebenginewidgetsglobal.h>
+#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
 #include <QtCore/qpoint.h>
 #include <QtCore/qstring.h>
 #include <QtCore/qurl.h>
diff --git a/src/webenginewidgets/api/qwebenginefullscreenrequest.h b/src/webenginewidgets/api/qwebenginefullscreenrequest.h
index 138a76e088f0cd3268db4e650485e1c93ed2c8f1..e5f2b7b198185059eb2813032de1f4e7ef0cd24e 100644
--- a/src/webenginewidgets/api/qwebenginefullscreenrequest.h
+++ b/src/webenginewidgets/api/qwebenginefullscreenrequest.h
@@ -40,9 +40,9 @@
 #ifndef QWEBENGINEFULLSCREENREQUEST_H
 #define QWEBENGINEFULLSCREENREQUEST_H
 
-#include <qtwebenginewidgetsglobal.h>
-#include <qurl.h>
-#include <qpointer.h>
+#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
+#include <QtCore/qurl.h>
+#include <QtCore/qpointer.h>
 
 QT_BEGIN_NAMESPACE
 class QWebEnginePage;
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 904dfac268d8c72f45631c36475a91cd7ac4e5aa..2d68fd7441c4933a7f750704e7d85521cf4a8570 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -250,9 +250,8 @@ void tst_QQuickWebEngineView::loadProgress()
     QSignalSpy loadProgressChangedSpy(webEngineView(), SIGNAL(loadProgressChanged()));
     QVERIFY(waitForLoadSucceeded(webEngineView()));
 
-    QVERIFY(loadProgressChangedSpy.count() >= 1);
-
-    QCOMPARE(webEngineView()->loadProgress(), 100);
+    loadProgressChangedSpy.wait();
+    QTRY_COMPARE(webEngineView()->loadProgress(), 100);
 }
 
 void tst_QQuickWebEngineView::show()
@@ -507,8 +506,7 @@ void tst_QQuickWebEngineView::printToPdf()
 
     QString path = tempDir.path() + "/print_success.pdf";
     view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait);
-    QTest::qWait(500);
-    QVERIFY(QFile::exists(path));
+    QTRY_VERIFY(QFile::exists(path));
 
 #if !defined(Q_OS_WIN)
     path = tempDir.path() + "/print_//fail.pdf";
@@ -516,8 +514,7 @@ void tst_QQuickWebEngineView::printToPdf()
     path = tempDir.path() + "/print_|fail.pdf";
 #endif // #if !defined(Q_OS_WIN)
     view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait);
-    QTest::qWait(500);
-    QVERIFY(!QFile::exists(path));
+    QTRY_VERIFY(!QFile::exists(path));
 }
 
 void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled()
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index f7c0914bc36270a62d6a3bf80ce113ee0e735bc9..166c5a499465effd229a9659ab14a5be57a217a3 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -2823,6 +2823,9 @@ void tst_QWebEnginePage::testJSPrompt()
 {
     JSPromptPage page;
     bool res;
+    QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
+    page.setHtml(QStringLiteral("<html><body></body></html>"));
+    QTRY_COMPARE(loadSpy.count(), 1);
 
     // OK + QString()
     res = evaluateJavaScriptSync(&page,