From 2aea7cfc25d42e3d87db4fb759baa4419ec23dca Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 24 Feb 2021 15:20:39 -0800 Subject: Pull in new version of Dullahan with support for setting the host process path, tweak viewer manifest so it copies the SwiftShader folder (required but may be a Chromium bug) and improve background color matching --- indra/media_plugins/cef/media_plugin_cef.cpp | 12 +++++++++++- 1 file changed, 11 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 0bb62d79ff..c658f35480 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -525,8 +525,18 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnJSDialogCallback(std::bind(&MediaPluginCEF::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); dullahan::dullahan_settings settings; +#if LL_WINDOWS + // As of CEF version 83+, for Windows versions, we need to tell CEF + // where the host helper process is since this DLL is not in the same + // dir as the executable that loaded it (SLPlugin.exe). The code in + // Dullahan that tried to figure out the location automatically uses + // the location of the exe which isn't helpful so we tell it explicitly. + char cur_dir_str[MAX_PATH]; + GetCurrentDirectoryA(MAX_PATH, cur_dir_str); + settings.host_process_path = std::string(cur_dir_str); +#endif settings.accept_language_list = mHostLanguage; - settings.background_color = 0xffffffff; + settings.background_color = 0xff282828; // close to Viewer background color settings.cache_enabled = true; settings.root_cache_path = mRootCachePath; settings.cache_path = mCachePath; -- cgit v1.3 From a442f8b4513f385952f586f2950645ac5050556f Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 13 May 2021 20:29:01 +0300 Subject: Revert "Merge branch 'DRTVWR-531' into DRTVWR-516-maint" This reverts commit 07456abe92ab24f373b238f6bd64087c078b7fc3, reversing changes made to 8a33636e8f56f8d1229b3f76ed6205ce8087048d. --- autobuild.xml | 14 +++++++------- indra/media_plugins/cef/media_plugin_cef.cpp | 12 +----------- indra/newview/viewer_manifest.py | 6 ------ 3 files changed, 8 insertions(+), 24 deletions(-) (limited to 'indra/media_plugins') diff --git a/autobuild.xml b/autobuild.xml index 1ead2c409f..eb057ec8e0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -580,9 +580,9 @@ archive hash - a0dd76112ade26f5bcc47b801ca28d5f + 856ba0e5b7be4bf683cf2849bce845e0 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/72458/699860/dullahan-1.7.0.202011160759_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-552313.tar.bz2 name darwin64 @@ -592,9 +592,9 @@ archive hash - 520bafbf2d7f660297390d46632cce89 + 515950c911a53ff910b18c7c417ea984 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/72460/699870/dullahan-1.7.0.202011161603_81.3.10_gb223419_chromium-81.0.4044.138-windows-552313.tar.bz2 name windows @@ -604,16 +604,16 @@ archive hash - 37d579ff1f13b2a07b696e09cddc486d + f1dccbdfe0603f488eeee4c8f518c959 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/72459/699874/dullahan-1.7.0.202011161603_81.3.10_gb223419_chromium-81.0.4044.138-windows64-552313.tar.bz2 name windows64 version - 1.10.0.202104131537_89.0.17_ge7bbb1d_chromium-89.0.4389.114 + 1.7.0.202011161603_81.3.10_gb223419_chromium-81.0.4044.138 elfio diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index c658f35480..0bb62d79ff 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -525,18 +525,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnJSDialogCallback(std::bind(&MediaPluginCEF::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); dullahan::dullahan_settings settings; -#if LL_WINDOWS - // As of CEF version 83+, for Windows versions, we need to tell CEF - // where the host helper process is since this DLL is not in the same - // dir as the executable that loaded it (SLPlugin.exe). The code in - // Dullahan that tried to figure out the location automatically uses - // the location of the exe which isn't helpful so we tell it explicitly. - char cur_dir_str[MAX_PATH]; - GetCurrentDirectoryA(MAX_PATH, cur_dir_str); - settings.host_process_path = std::string(cur_dir_str); -#endif settings.accept_language_list = mHostLanguage; - settings.background_color = 0xff282828; // close to Viewer background color + settings.background_color = 0xffffffff; settings.cache_enabled = true; settings.root_cache_path = mRootCachePath; settings.cache_path = mCachePath; diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0207256e96..adac7af712 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -614,12 +614,6 @@ class WindowsManifest(ViewerManifest): self.path("msvcp140.dll") self.path("vcruntime140.dll") - # as of CEF 88, this (apparently software rendering support) - # folder is required - likely a Chromium bug - but including - # for now until the root cause is found - it's tiny - with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')): - self.path("swiftshader/") - # CEF files common to all configurations with self.prefix(src=os.path.join(pkgdir, 'resources')): self.path("cef.pak") -- cgit v1.3 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 ++++++++++--- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llviewermedia.cpp | 4 ---- .../skins/default/xui/en/panel_preferences_setup.xml | 14 -------------- 4 files changed, 10 insertions(+), 32 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; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 77f0fd99bc..5baca21df7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2076,17 +2076,6 @@ Value 1 - BrowserPluginsEnabled - - Comment - Enable Web plugins in the built-in Web browser? - Persist - 1 - Type - Boolean - Value - 1 - ChatBarCustomWidth Comment diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9ed2df2759..9a1403f892 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1744,10 +1744,6 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" ); media_source->cookies_enabled( cookies_enabled || clean_browser); - // collect 'plugins enabled' setting from prefs and send to embedded browser - bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" ); - media_source->setPluginsEnabled( plugins_enabled || clean_browser); - // collect 'javascript enabled' setting from prefs and send to embedded browser bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); media_source->setJavascriptEnabled( javascript_enabled || clean_browser); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 6732f4ff1c..89a5a5ca6f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -147,20 +147,6 @@ width="480" /> - 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') 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') 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') 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