From c705126d0be0b6a60d0e8e23bf8919e08e0db967 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 14 May 2021 15:21:06 -0700 Subject: Fixes SL-14897 Disable Flash support in the embedded browser --- indra/media_plugins/cef/media_plugin_cef.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index c658f35480..181355d395 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -547,7 +547,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.disable_network_service = mDisableNetworkService; settings.use_mock_keychain = mUseMockKeyChain; #endif - settings.flash_enabled = mPluginsEnabled; + // SL-14897 Disable Flash support in the embedded browser + //settings.flash_enabled = mPluginsEnabled; + settings.flash_enabled = false; + settings.flip_mouse_y = false; settings.flip_pixels_y = true; settings.frame_rate = 60; @@ -556,8 +559,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.initial_width = 1024; settings.java_enabled = false; settings.javascript_enabled = mJavascriptEnabled; - settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI - settings.plugins_enabled = mPluginsEnabled; + settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granularity/query UI + + // SL-14897 Disable Flash support in the embedded browser + //settings.plugins_enabled = mPluginsEnabled; + settings.plugins_enabled = false; + settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring); settings.webgl_enabled = true; settings.log_file = mCefLogFile; -- cgit v1.3 From c308c1cf5987fcca5614d472d3098d5075cbd678 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 18 May 2021 08:45:57 -0700 Subject: Pull in updated Dullahan and use it for for: Fix SL-14888 Media on a Prim should not show JS (about to unload) popups --- autobuild.xml | 14 +++++++------- indra/media_plugins/cef/media_plugin_cef.cpp | 10 ++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/autobuild.xml b/autobuild.xml index 828a30a31f..6a8ee9c7ee 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -580,9 +580,9 @@ archive hash - a0dd76112ade26f5bcc47b801ca28d5f + e53ed82de49ef544860bd6af470f51f4 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80065/756313/dullahan-1.10.0.202104131525_89.0.17_ge7bbb1d_chromium-89.0.4389.114-darwin64-558200.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82243/772012/dullahan-1.11.0.202105180250_89.0.17_ge7bbb1d_chromium-89.0.4389.114-darwin64-559872.tar.bz2 name darwin64 @@ -592,9 +592,9 @@ archive hash - 520bafbf2d7f660297390d46632cce89 + 396c013eaeea2c63f1a55bad988363e1 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80066/756326/dullahan-1.10.0.202104131537_89.0.17_ge7bbb1d_chromium-89.0.4389.114-windows-558200.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82244/772021/dullahan-1.11.0.202105180259_89.0.17_ge7bbb1d_chromium-89.0.4389.114-windows-559872.tar.bz2 name windows @@ -604,16 +604,16 @@ archive hash - 37d579ff1f13b2a07b696e09cddc486d + 557e4ae265e67d5cd8799e8f1a291e56 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/80067/756330/dullahan-1.10.0.202104131537_89.0.17_ge7bbb1d_chromium-89.0.4389.114-windows64-558200.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82245/772026/dullahan-1.11.0.202105180259_89.0.17_ge7bbb1d_chromium-89.0.4389.114-windows64-559872.tar.bz2 name windows64 version - 1.10.0.202104131537_89.0.17_ge7bbb1d_chromium-89.0.4389.114 + 1.11.0.202105180259_89.0.17_ge7bbb1d_chromium-89.0.4389.114 elfio diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 181355d395..8c1855d5cb 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -73,6 +73,7 @@ private: void onCursorChangedCallback(dullahan::ECursorType type); const std::vector onFileDialog(dullahan::EFileDialogType dialog_type, const std::string dialog_title, const std::string default_file, const std::string dialog_accept_filter, bool& use_default); bool onJSDialogCallback(const std::string origin_url, const std::string message_text, const std::string default_prompt_text); + bool onJSBeforeUnloadCallback(); void postDebugMessage(const std::string& msg); void authResponse(LLPluginMessage &message); @@ -375,6 +376,14 @@ bool MediaPluginCEF::onJSDialogCallback(const std::string origin_url, const std: return true; } +//////////////////////////////////////////////////////////////////////////////// +// +bool MediaPluginCEF::onJSBeforeUnloadCallback() +{ + // return true indicates we suppress the JavaScript UI entirely + return true; +} + //////////////////////////////////////////////////////////////////////////////// // void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type) @@ -523,6 +532,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1)); mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this)); mCEFLib->setOnJSDialogCallback(std::bind(&MediaPluginCEF::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); + mCEFLib->setOnJSBeforeUnloadCallback(std::bind(&MediaPluginCEF::onJSBeforeUnloadCallback, this)); dullahan::dullahan_settings settings; #if LL_WINDOWS -- cgit v1.3 From 3602d64a09fb068129cccd4f7993c0d658cc4669 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 12 Jul 2021 12:50:34 -0700 Subject: Fix for SL-15559 PDF files do not load in CEF v91 --- indra/media_plugins/cef/media_plugin_cef.cpp | 15 ++++++++++----- indra/newview/llviewermedia.cpp | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 8c1855d5cb..97ad3d54cc 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -557,8 +557,17 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.disable_network_service = mDisableNetworkService; settings.use_mock_keychain = mUseMockKeyChain; #endif + // This setting applies to all plugins, not just Flash + // Regarding, SL-15559 PDF files do not load in CEF v91, + // it turns out that on Windows, PDF support is treated + // as a plugin on Windows only so turning all plugins + // off, disabled built in PDF support. (Works okay in + // macOS surprisingly). To mitigrate this, we set the global + // media enabled flag to whatever the consumer wants and + // explicitly disable Flash with a different setting (below) + settings.plugins_enabled = mPluginsEnabled; + // SL-14897 Disable Flash support in the embedded browser - //settings.flash_enabled = mPluginsEnabled; settings.flash_enabled = false; settings.flip_mouse_y = false; @@ -571,10 +580,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.javascript_enabled = mJavascriptEnabled; settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granularity/query UI - // SL-14897 Disable Flash support in the embedded browser - //settings.plugins_enabled = mPluginsEnabled; - settings.plugins_enabled = false; - settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring); settings.webgl_enabled = true; settings.log_file = mCefLogFile; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9a1403f892..556c12bafa 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1748,6 +1748,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); media_source->setJavascriptEnabled( javascript_enabled || clean_browser); + // As of SL-15559 PDF files do not load in CEF v91 we enable plugins + // but explicitly disable Flash (PDF support in CEF is now treated as a plugin) + media_source->setPluginsEnabled(true); + bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled || clean_browser); -- cgit v1.3 From 95b26d3becf8fef901ea09998866a9d8227cdcad Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 12 Jul 2021 14:17:04 -0700 Subject: Fix for SL-15560 pages with undefined html render with gray background instead of white in CEF v91 --- indra/media_plugins/cef/media_plugin_cef.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 97ad3d54cc..44407c3dfb 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -546,7 +546,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.host_process_path = std::string(cur_dir_str); #endif settings.accept_language_list = mHostLanguage; - settings.background_color = 0xff282828; // close to Viewer background color + + // SL-15560: Product team overruled my change to set the default + // embedded background color to match the floater background + // and set it to white + settings.background_color = 0xffffffff; // white + settings.cache_enabled = true; settings.root_cache_path = mRootCachePath; settings.cache_path = mCachePath; -- cgit v1.3