From 79f697ad513525893fe9ebab62bf2a61186342ec Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 21 May 2010 15:36:12 -0700 Subject: Fix for EXT-5667 (support window.open() in shared media so google docs will work). Moved the processing of clicks on _external and _blank targeted links from LLMediaCtrl to LLViewerMediaImpl. Removed LLMediaCtrl::setOpenInExternalBrowser() since that functionality is available through the use of the _external target attribute in web content. Removed LLMediaCtrl:: setOpenInInternalBrowser() since it was unimplemented and not used. Made the webkit media plugin set llqtwebkit's window open behavior to WOB_SIMULATE_BLANK_HREF_CLICK. This is #ifdefed out on Linux until we get a new Linux build of llqtwebkit. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 47766a24cb..0cd6e48d14 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -297,11 +297,17 @@ private: // append details to agent string LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); + // TODO: Remove this ifdef when the Linux version of llqtwebkit gets updated with the new WOB constant. +#if !LL_LINUX + // Set up window open behavior + LLQtWebKit::getInstance()->setWindowOpenBehavior(mBrowserWindowId, LLQtWebKit::WOB_SIMULATE_BLANK_HREF_CLICK); +#endif + #if !LL_QTWEBKIT_USES_PIXMAPS // don't flip bitmap LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true ); #endif // !LL_QTWEBKIT_USES_PIXMAPS - + // set background color // convert background color channels from [0.0, 1.0] to [0, 255]; LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, int(mBackgroundR * 255.0f), int(mBackgroundG * 255.0f), int(mBackgroundB * 255.0f) ); -- cgit v1.2.3 From 79c4c1241b5acc8135ba3bc965ae1bb774cff49a Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 15 Jun 2010 14:11:26 -0700 Subject: Enable the call to LLQtWebKit::setWindowOpenBehavior() on Linux, since the llqtwebkit build has been updated. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 0cd6e48d14..6990354486 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -297,11 +297,8 @@ private: // append details to agent string LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); - // TODO: Remove this ifdef when the Linux version of llqtwebkit gets updated with the new WOB constant. -#if !LL_LINUX // Set up window open behavior LLQtWebKit::getInstance()->setWindowOpenBehavior(mBrowserWindowId, LLQtWebKit::WOB_SIMULATE_BLANK_HREF_CLICK); -#endif #if !LL_QTWEBKIT_USES_PIXMAPS // don't flip bitmap -- cgit v1.2.3 From 7295e1ee034b3163b2f1c9f4aa11695beb7db8b0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 11:07:35 +0100 Subject: EXT-7889 PARTIAL Linux fails to load splash screen and side panel home tab. Start to restore manual glib handling. Backed out changeset ff86a9f5b917 --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 3c24b4ed22..b607d2f66a 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -43,15 +43,21 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" +#if LL_LINUX +extern "C" { +# include +} +#endif // LL_LINUX + #if LL_WINDOWS -#include +# include #else -#include -#include +# include +# include #endif #if LL_WINDOWS - // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below + // *NOTE:Mani - This captures the module handle for the dll. This is used below // to get the path to this dll for webkit initialization. // I don't know how/if this can be done with apr... namespace { HMODULE gModuleHandle;}; @@ -112,6 +118,16 @@ private: // void update(int milliseconds) { +#if LL_LINUX + // pump glib generously, as Linux browser plugins are on the + // glib main loop, even if the browser itself isn't - ugh + //*TODO: shouldn't this be transparent if Qt was compiled with + // glib mainloop integration? investigate. + GMainContext *mainc = g_main_context_default(); + while(g_main_context_iteration(mainc, FALSE)); +#endif // LL_LINUX + + // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); checkEditState(); -- cgit v1.2.3 From 68c5a7f25cf92c896a6c6a3e431ab4917a14915d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 12:20:45 +0100 Subject: EXT-7889 FIXED Linux fails to load splash screen and side panel home tab. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index a9ff7bf752..3b00edec4e 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -48,6 +48,7 @@ # define LL_QTWEBKIT_USES_PIXMAPS 0 extern "C" { # include +# include } #else # define LL_QTWEBKIT_USES_PIXMAPS 0 @@ -132,14 +133,14 @@ private: // void update(int milliseconds) { -#if LL_LINUX +#if LL_QTLINUX_DOESNT_HAVE_GLIB // pump glib generously, as Linux browser plugins are on the // glib main loop, even if the browser itself isn't - ugh - //*TODO: shouldn't this be transparent if Qt was compiled with - // glib mainloop integration? investigate. + // This is NOT NEEDED if Qt itself was built with glib + // mainloop integration. GMainContext *mainc = g_main_context_default(); while(g_main_context_iteration(mainc, FALSE)); -#endif // LL_LINUX +#endif // LL_QTLINUX_DOESNT_HAVE_GLIB // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); @@ -213,6 +214,14 @@ private: } std::string application_dir = std::string( cwd ); +#if LL_LINUX + // take care to initialize glib properly, because some + // versions of Qt don't, and we indirectly need it for (some + // versions of) Flash to not crash the browser. + if (!g_thread_supported ()) g_thread_init (NULL); + g_type_init(); +#endif + #if LL_DARWIN // When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on. // This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger. -- cgit v1.2.3 From 06b0d72efa96b6a0ed665f7cd46f358c48929e7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Aug 2010 07:24:57 -0400 Subject: Change license from GPL to LGPL (version 2.1) --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'indra/media_plugins/webkit/media_plugin_webkit.cpp') diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 3b00edec4e..047146f8f3 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -3,30 +3,25 @@ * @brief Webkit plugin for LLMedia API plugin system * * @cond - * $LicenseInfo:firstyear=2008&license=viewergpl$ - * - * Copyright (c) 2008, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ * @endcond */ -- cgit v1.2.3