diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-07-12 12:50:34 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-07-12 12:50:34 -0700 |
commit | 3602d64a09fb068129cccd4f7993c0d658cc4669 (patch) | |
tree | 4ecae7d0d80ee749df7ca7e28a77a5368e64584d | |
parent | 7ff743a13856d1e883baaa8294480d9973bfedfb (diff) |
Fix for SL-15559 PDF files do not load in CEF v91
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 4 |
2 files changed, 14 insertions, 5 deletions
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); |