summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/content_browser_client_qt.cpp16
-rw-r--r--src/core/content_browser_client_qt.h1
-rw-r--r--src/core/core_module.pro2
-rw-r--r--src/core/delegated_frame_node.cpp4
-rw-r--r--src/core/web_engine_context.cpp4
-rw-r--r--src/core/web_engine_library_info.cpp4
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp2
-rw-r--r--src/webengine/webengine.pro2
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.cpp33
-rw-r--r--src/webenginewidgets/webenginewidgets.pro2
-rw-r--r--tests/auto/cmake/CMakeLists.txt16
-rw-r--r--tests/auto/cmake/cmake.pro8
12 files changed, 84 insertions, 10 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 1f29e4bec..6dfaa64c7 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -42,6 +42,7 @@
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/media_observer.h"
+#include "content/public/browser/quota_permission_context.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -291,6 +292,16 @@ void ShareGroupQtQuick::AboutToAddFirstContext()
m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext));
}
+class QuotaPermissionContextQt : public content::QuotaPermissionContext {
+public:
+ virtual void RequestQuotaPermission(const content::StorageQuotaParams &params, int render_process_id, const PermissionCallback &callback) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(params);
+ Q_UNUSED(render_process_id);
+ callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
+ }
+};
+
ContentBrowserClientQt::ContentBrowserClientQt()
: m_browserMainParts(0)
{
@@ -364,6 +375,11 @@ void ContentBrowserClientQt::enableInspector(bool enable, content::BrowserContex
}
}
+content::QuotaPermissionContext *ContentBrowserClientQt::CreateQuotaPermissionContext()
+{
+ return new QuotaPermissionContextQt;
+}
+
void ContentBrowserClientQt::AllowCertificateError(int render_process_id, int render_frame_id, int cert_error,
const net::SSLInfo& ssl_info, const GURL& request_url,
ResourceType::Type resource_type,
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index cc66f6a3b..d5b49e835 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -80,6 +80,7 @@ public:
virtual gfx::GLShareGroup* GetInProcessGpuShareGroup() Q_DECL_OVERRIDE;
virtual content::MediaObserver* GetMediaObserver() Q_DECL_OVERRIDE;
virtual content::AccessTokenStore* CreateAccessTokenStore() Q_DECL_OVERRIDE;
+ virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE;
virtual void OverrideWebkitPrefs(content::RenderViewHost *, const GURL &, WebPreferences *) Q_DECL_OVERRIDE;
virtual void AllowCertificateError(
int render_process_id,
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 1a7b0878f..8801dd4cf 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -1,8 +1,6 @@
MODULE = webenginecore
TARGET = QtWebEngineCore
-CMAKE_MODULE_TESTS = "-"
-
qtHaveModule(positioning):QT += positioning
QT += qml quick
QT_PRIVATE += quick-private gui-private core-private
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 0a24333db..8d09794be 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -189,7 +189,7 @@ static void waitChromiumSync(gfx::TransferableFence *sync)
static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_reusable_sync")) {
+ if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglClientWaitSyncKHR = (PFNEGLCLIENTWAITSYNCKHRPROC)context->getProcAddress("eglClientWaitSyncKHR");
}
@@ -232,7 +232,7 @@ static void deleteChromiumSync(gfx::TransferableFence *sync)
static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0;
if (!resolved) {
- if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_reusable_sync")) {
+ if (gfx::GLSurfaceQt::HasEGLExtension("EGL_KHR_fence_sync")) {
QOpenGLContext *context = QOpenGLContext::currentContext();
eglDestroySyncKHR = (PFNEGLDESTROYSYNCKHRPROC)context->getProcAddress("eglDestroySyncKHR");
}
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index d02202760..d48c23815 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -41,6 +41,7 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/threading/thread_restrictions.h"
#include "cc/base/switches.h"
@@ -134,6 +135,9 @@ bool usingQtQuick2DRenderer()
WebEngineContext::~WebEngineContext()
{
+ base::MessagePump::Delegate *delegate = m_runLoop->loop_;
+ // Flush the UI message loop before quitting.
+ while (delegate->DoWork()) { }
GLContextHelper::destroy();
m_runLoop->AfterRun();
}
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 5f597b92b..09e2af495 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -171,7 +171,7 @@ QString localesPath()
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
return getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_locales");
#else
- return location(QLibraryInfo::TranslationsPath) % QLatin1String("/qtwebengine_locales");
+ return location(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales");
#endif
}
@@ -204,7 +204,7 @@ base::FilePath WebEngineLibraryInfo::getPath(int key)
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
return toFilePath(getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_resources.pak"));
#else
- return toFilePath(location(QLibraryInfo::DataPath) % QLatin1String("/qtwebengine_resources.pak"));
+ return toFilePath(location(QLibraryInfo::DataPath) % QDir::separator() % QLatin1String("qtwebengine_resources.pak"));
#endif
case base::FILE_EXE:
case content::CHILD_PROCESS_EXE:
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 209b5fbea..92aabac8e 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -211,6 +211,8 @@ void RenderWidgetHostViewQtDelegateQuick::wheelEvent(QWheelEvent *event)
void RenderWidgetHostViewQtDelegateQuick::touchEvent(QTouchEvent *event)
{
+ if (event->type() == QEvent::TouchBegin && !m_isPopup)
+ forceActiveFocus();
m_client->forwardEvent(event);
}
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 6d17fd2eb..15514e457 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -1,7 +1,5 @@
TARGET = QtWebEngine
-CMAKE_MODULE_TESTS = "-"
-
# For our export macros
DEFINES += QT_BUILD_WEBENGINE_LIB
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.cpp b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
index 7be8c75d0..bf7239cf3 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.cpp
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
@@ -38,6 +38,15 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QWebEngineCertificateError
+ \brief The QWebEngineCertificateError class provides information about a certificate error.
+
+ \inmodule QtWebEngineWidgets
+
+ QWebEngineCertificateError holds known information about a certificate error to be used to determine whether to allow it or not, and to be reported to the user.
+*/
+
class QWebEngineCertificateErrorPrivate {
public:
QWebEngineCertificateErrorPrivate(int error, QUrl url, bool overridable, QString errorDescription);
@@ -56,15 +65,39 @@ QWebEngineCertificateErrorPrivate::QWebEngineCertificateErrorPrivate(int error,
{ }
+/*! \internal
+*/
QWebEngineCertificateError::QWebEngineCertificateError(int error, QUrl url, bool overridable, QString errorDescription)
: d_ptr(new QWebEngineCertificateErrorPrivate(error, url, overridable, errorDescription))
{ }
+/*! \internal
+*/
QWebEngineCertificateError::~QWebEngineCertificateError()
{
}
/*!
+ \enum QWebEngineCertificateError::Error
+
+ This enum describes the type of certificate error encountered.
+
+ \value SslPinnedKeyNotInCertificateChain The certificate did not match the built-in public key pins for the host name.
+ \value CertificateCommonNameInvalid The certificate's common name did not match the host name.
+ \value CertificateDateInvalid The certificate is not valid at the current date and time.
+ \value CertificateAuthorityInvalid The certificate is not signed by a trusted authority.
+ \value CertificateContainsErrors The certificate contains errors.
+ \value CertificateNoRevocationMechanism The certificate has no mechanism for determining if it has been revoked.
+ \value CertificateUnableToCheckRevocation Revocation information for the certificate is not available.
+ \value CertificateRevoked The certificate has been revoked.
+ \value CertificateInvalid The certificate is invalid.
+ \value CertificateWeakSignatureAlgorithm The certificate is signed using a weak signature algorithm.
+ \value CertificateNonUniqueName The host name specified in the certificate is not unique.
+ \value CertificateWeakKey The certificate contains a weak key.
+ \value CertificateNameConstraintViolation The certificate claimed DNS names that are in violation of name constraints.
+*/
+
+/*!
Returns whether this error can be overridden and accepted.
\sa error(), errorDescription()
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index aabcc710d..638535bbc 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -1,7 +1,5 @@
TARGET = QtWebEngineWidgets
-CMAKE_MODULE_TESTS = "-"
-
# For our export macros
DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
new file mode 100644
index 000000000..d3c0651d1
--- /dev/null
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -0,0 +1,16 @@
+
+cmake_minimum_required(VERSION 2.8)
+
+project(qmake_cmake_files)
+
+enable_testing()
+
+find_package(Qt5Core REQUIRED)
+
+include("${_Qt5CTestMacros}")
+
+if (NOT NO_WIDGETS)
+ test_module_includes(
+ WebEngineWidgets QWebEngineView
+ )
+endif()
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
new file mode 100644
index 000000000..51d30da67
--- /dev/null
+++ b/tests/auto/cmake/cmake.pro
@@ -0,0 +1,8 @@
+
+# Cause make to do nothing.
+TEMPLATE = subdirs
+
+CMAKE_QT_MODULES_UNDER_TEST = webengine
+qtHaveModule(widgets): CMAKE_QT_MODULES_UNDER_TEST += webenginewidgets
+
+CONFIG += ctest_testcase