diff options
Diffstat (limited to 'src')
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 16 | ||||
-rw-r--r-- | src/core/content_browser_client_qt.h | 1 | ||||
-rw-r--r-- | src/core/core_module.pro | 21 | ||||
-rw-r--r-- | src/core/delegated_frame_node.cpp | 4 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 5 | ||||
-rw-r--r-- | src/core/resources/repack_locales.gypi | 2 | ||||
-rw-r--r-- | src/core/resources/resources.gyp | 23 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 4 | ||||
-rw-r--r-- | src/core/web_engine_library_info.cpp | 4 | ||||
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 2 | ||||
-rw-r--r-- | src/webengine/webengine.pro | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginecertificateerror.cpp | 33 | ||||
-rw-r--r-- | src/webenginewidgets/webenginewidgets.pro | 2 |
14 files changed, 107 insertions, 12 deletions
diff --git a/src/3rdparty b/src/3rdparty -Subproject 577cd47e54bb88c81b7a5b5a6d658d8d61b2c74 +Subproject be4ec3fa64a4c6c2b641830a9811ab7847c7dd3 diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index ee403298b..4948d1d8d 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" @@ -294,6 +295,16 @@ void ShareGroupQtQuick::AboutToAddFirstContext() m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext)); } +class QuotaPermissionContextQt : public content::QuotaPermissionContext { +public: + virtual void RequestQuotaPermission(const content::StorageQuotaParams ¶ms, 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) { @@ -374,6 +385,11 @@ void ContentBrowserClientQt::enableInspector(bool enable) } } +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 4f216030c..f1ecf5825 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -80,6 +80,7 @@ public: virtual content::MediaObserver* GetMediaObserver() Q_DECL_OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost *, const GURL &, WebPreferences *) Q_DECL_OVERRIDE; virtual content::AccessTokenStore *CreateAccessTokenStore() Q_DECL_OVERRIDE; + virtual content::QuotaPermissionContext *CreateQuotaPermissionContext() Q_DECL_OVERRIDE; virtual void AllowCertificateError( int render_process_id, int render_frame_id, diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 66ab3ee4d..14f249142 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -1,8 +1,6 @@ MODULE = webenginecore TARGET = QtWebEngineCore -CMAKE_MODULE_TESTS = "-" - QT += qml quick QT_PRIVATE += gui-private @@ -69,3 +67,22 @@ CONFIG -= bsymbolic_functions contains(QT_CONFIG, egl): CONFIG += egl linux: contains(QT_CONFIG, separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" + +!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { + ICU_TARGET = $$shell_path($$[QT_INSTALL_DATA]/icudtl.dat) + ICU_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/icudtl.dat) + icu_rule.target = $$ICU_TARGET + unix: icu_rule.commands = if [ -e $$ICU_FILE ] ; then $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ; fi + win32: icu_rule.commands = if exist $$ICU_FILE ( $$QMAKE_COPY $$ICU_FILE $$ICU_TARGET ) + + PLUGIN_DIR = $$shell_path($$[QT_INSTALL_PLUGINS]/qtwebengine) + PLUGIN_TARGET = $$shell_path($$PLUGIN_DIR/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) + PLUGIN_FILE = $$shell_path($$OUT_PWD/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}) + plugins_rule.target = $$PLUGIN_TARGET + unix: plugins_rule.commands = $$QMAKE_MKDIR $$PLUGIN_DIR && if [ -e $$PLUGIN_FILE ] ; then $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ; fi + win32: plugins_rule.commands = (if not exist $$PLUGIN_DIR ( $$QMAKE_MKDIR $$PLUGIN_DIR )) && \ + if exist $$PLUGIN_FILE ( $$QMAKE_COPY $$PLUGIN_FILE $$PLUGIN_TARGET ) + + QMAKE_EXTRA_TARGETS += icu_rule plugins_rule + PRE_TARGETDEPS += $$ICU_TARGET $$PLUGIN_TARGET +} diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 1a393a0c7..e12873c81 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -218,7 +218,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"); } @@ -261,7 +261,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/gyp_run.pro b/src/core/gyp_run.pro index 137b600b9..8d4d77351 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -87,6 +87,11 @@ contains(QT_ARCH, "i386"): GYP_ARGS += "-D target_arch=ia32" contains(WEBENGINE_CONFIG, proprietary_codecs): GYP_ARGS += "-Dproprietary_codecs=1 -Dffmpeg_branding=Chrome -Duse_system_ffmpeg=0" +!contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { + GYP_ARGS += "-D qt_install_data=\"$$[QT_INSTALL_DATA]\"" + GYP_ARGS += "-D qt_install_translations=\"$$[QT_INSTALL_TRANSLATIONS]\"" +} + !build_pass { message("Running gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}...") !system("python $$QTWEBENGINE_ROOT/tools/buildscripts/gyp_qtwebengine \"$$OUT_PWD\" $${GYP_ARGS}"): error("-- running gyp_qtwebengine failed --") diff --git a/src/core/resources/repack_locales.gypi b/src/core/resources/repack_locales.gypi index ca3507912..d24da1b5d 100644 --- a/src/core/resources/repack_locales.gypi +++ b/src/core/resources/repack_locales.gypi @@ -13,7 +13,7 @@ '<!@pymod_do_main(repack_locales -i -p <(OS) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(repack_extra_flags) <(locales))' ], 'outputs': [ - '<!@pymod_do_main(repack_locales -o -p <(OS) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(locales))' + '<@(locale_files)' ], 'action': [ '<@(repack_locales_script)', diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp index f07facca6..835a87cdf 100644 --- a/src/core/resources/resources.gyp +++ b/src/core/resources/resources.gyp @@ -9,6 +9,9 @@ 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW', ], + 'locale_files': ['<!@pymod_do_main(repack_locales -o -p <(OS) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'], + 'qt_install_data%': '', + 'qt_install_translations%': '', }, 'dependencies': [ '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_strings', @@ -29,7 +32,25 @@ 'action_name': 'repack_locales', 'includes': [ 'repack_locales.gypi' ], }, - ] + ], + 'conditions': [ + ['qt_install_data != ""', { + 'copies': [ + { + 'destination': '<(qt_install_data)', + 'files': [ '<(SHARED_INTERMEDIATE_DIR)/repack/qtwebengine_resources.pak' ], + }, + ], + }], + ['qt_install_translations != ""', { + 'copies': [ + { + 'destination': '<(qt_install_translations)/qtwebengine_locales', + 'files': [ '<@(locale_files)' ], + }, + ], + }], + ], } ] } diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index ac9a921e7..db3956e5a 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" @@ -93,6 +94,9 @@ void destroyContext() 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 026f4db83..beae9dd75 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 a2f60d4ef..7c04cb8c0 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -192,6 +192,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 6f48e9d49..4c4606690 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 71240cbaf..4da888baa 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 |