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') 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.2.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 --- indra/media_plugins/cef/media_plugin_cef.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/media_plugins') 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.2.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 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/media_plugins') 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; -- cgit v1.2.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') 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.2.3