From 2daa442d8202c11e2f925991176ae1f6a6a978a6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 1 Feb 2017 12:00:12 +0100 Subject: Avoid crash in desktop linux with --disable-gpu Don't try to access null OpenGL contexts. Change-Id: I7d0e607e8d29d3cfba8d6e98cd142b951c960281 Reviewed-by: Michal Klocek --- src/core/delegated_frame_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index baf064025..b122a3333 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -454,7 +454,7 @@ DelegatedFrameNode::DelegatedFrameNode() #if defined(USE_X11) && !defined(QT_NO_OPENGL) QOpenGLContext *currentContext = QOpenGLContext::currentContext() ; QOpenGLContext *sharedContext = qt_gl_global_share_context(); - if (!QOpenGLContext::areSharing(currentContext, sharedContext)) { + if (currentContext && sharedContext && !QOpenGLContext::areSharing(currentContext, sharedContext)) { static bool allowNotSharedContextWarningShown = true; if (allowNotSharedContextWarningShown) { allowNotSharedContextWarningShown = false; -- cgit v1.2.3 From 685366c9a3d8d967e072c721c64a365ce50bc531 Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Mon, 30 Jan 2017 17:45:33 +0100 Subject: Provisional Fix for Navigation-Breakage on right-click in Flash applet When one right-clicks into a flash applet, chromium believes that a context menu was open (even though PepperRendererHostFactoryQt::CreateResourceHost returns NULL, which only causes an ASSERT on chromiums side). Because of this, the navigation is disabled, although no context menu is displayed. This fix just sends a message to chromium, telling it that "the context menu" is now "closed", which causes another ASSERT, but re-enables the navigation. Task-number: QTBUG-57924 Change-Id: Id6d8150a7d4944162bab81362153f8621d35bb4c Reviewed-by: Allan Sandfeld Jensen --- src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp index febde84f7..bc36a8057 100644 --- a/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp +++ b/src/core/renderer/pepper/pepper_renderer_host_factory_qt.cpp @@ -81,8 +81,16 @@ std::unique_ptr PepperRendererHostFactoryQt::CreateRe switch (message.type()) { case PpapiHostMsg_Flash_Create::ID: return base::WrapUnique(new PepperFlashRendererHostQt(host_, instance, resource)); + case PpapiHostMsg_FlashMenu_Create::ID: { + ppapi::host::ReplyMessageContext reply_context( + ppapi::proxy::ResourceMessageReplyParams(resource, 0), + NULL, + MSG_ROUTING_NONE); + reply_context.params.set_result(PP_ERROR_USERCANCEL); + host_->GetPpapiHost()->SendReply(reply_context, PpapiPluginMsg_FlashMenu_ShowReply(-1)); + break; + } case PpapiHostMsg_FlashFullscreen_Create::ID: - case PpapiHostMsg_FlashMenu_Create::ID: // Not implemented break; } -- cgit v1.2.3 From 18185684b6c18d68906405c8573df16211a80f98 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Feb 2017 15:36:02 +0100 Subject: Do not create directories for overridden paths When overriding Chromium's default paths do not create non-existent directories anymore. Just print a diagnostic message. Task-number: QTBUG-54258 Change-Id: Ie642a630ad5b4aebc4e80e3eace7db7489a82907 Reviewed-by: Allan Sandfeld Jensen --- src/core/content_main_delegate_qt.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 095e54caa..84f767ee3 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -154,15 +154,29 @@ content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClie #define ICU_UTIL_DATA_SHARED 1 #define ICU_UTIL_DATA_STATIC 2 +static void SafeOverridePathImpl(const char *keyName, int key, const base::FilePath &path) +{ + if (path.empty()) + return; + + // Do not create directories for overridden paths. + if (PathService::OverrideAndCreateIfNeeded(key, path, false, false)) + return; + + qWarning("Path override failed for key %s and path '%s'", keyName, path.value().c_str()); +} + +#define SafeOverridePath(KEY, PATH) SafeOverridePathImpl(#KEY, KEY, PATH) + bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code) { - PathService::Override(base::FILE_EXE, WebEngineLibraryInfo::getPath(base::FILE_EXE)); + SafeOverridePath(base::FILE_EXE, WebEngineLibraryInfo::getPath(base::FILE_EXE)); #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE - PathService::Override(base::DIR_QT_LIBRARY_DATA, WebEngineLibraryInfo::getPath(base::DIR_QT_LIBRARY_DATA)); + SafeOverridePath(base::DIR_QT_LIBRARY_DATA, WebEngineLibraryInfo::getPath(base::DIR_QT_LIBRARY_DATA)); #endif - PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::getPath(ui::DIR_LOCALES)); + SafeOverridePath(ui::DIR_LOCALES, WebEngineLibraryInfo::getPath(ui::DIR_LOCALES)); #if defined(ENABLE_SPELLCHECK) - PathService::Override(base::DIR_APP_DICTIONARIES, WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES)); + SafeOverridePath(base::DIR_APP_DICTIONARIES, WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES)); #endif SetContentClient(new ContentClientQt); return false; -- cgit v1.2.3