Commit cfe1100a authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into master

parents 307f176e c40b8310
......@@ -500,11 +500,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>96b9850aeb24d1fd40383e2559847785b2e2017e101d08294682db6403965a8c9d4df9cbc80f00823f04d08ee503778b</string>
<string>49cda7b3a00499dd43a619f73ca18aebd6fafe282d793ac87d6a1a9c7de94f4fa748a652d957237c61a0bd8049aea4af</string>
<key>hash_algorithm</key>
<string>sha3_384</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan-916/0.0.916/dullahan-1.9.0_91.1.20_g5800665_chromium-91.0.4472.101-darwin64-916.tar.xz</string>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan/0.0.0.1137/dullahan-1.12.2_92.0.15_g159e655_chromium-92.0.4515.101-darwin64-1137.tar.xz</string>
</map>
<key>name</key>
<string>darwin64</string>
......@@ -514,11 +514,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>69c8a7fbb353aa6110d494eeb81436ff4bf98f608408cb9a9507cf9a8227ec4b0e6ef6a87b4684c1adefb52716729e38</string>
<string>e017aeea4431f68e83b9db1064b6a10a486d30aa6f08de9a3d1d921752bb8ace8b1fb988cdb7c1079a9c2d985bc7c3e1</string>
<key>hash_algorithm</key>
<string>sha3_384</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan-916/0.0.916/dullahan-1.9.0_91.1.20_g5800665_chromium-91.0.4472.101-linux64-916.tar.xz</string>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan/0.0.0.1137/dullahan-1.12.2_92.0.15_g159e655_chromium-92.0.4515.101-linux64-1137.tar.xz</string>
</map>
<key>name</key>
<string>linux64</string>
......@@ -542,18 +542,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>243c5504e130dcd4707fd76bcd25f16196b97c42d40eefc1cd0b122ffb4d30fac4edb6a87bde1be621dbc26bcd387102</string>
<string>d7cb823a92a33f0b2a18a0f0718a9c20a6d8ce06fb615854f72efd7f8a556b2d217c64c07446c6d98b35b8b855bce5c9</string>
<key>hash_algorithm</key>
<string>sha3_384</string>
<key>url</key>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan-916/0.0.916/dullahan-1.9.0_91.1.20_g5800665_chromium-91.0.4472.101-windows64-916.tar.xz</string>
<string>https://git.alchemyviewer.org/api/v4/projects/103/packages/generic/dullahan/0.0.0.1137/dullahan-1.12.2_92.0.16_g3492b1b_chromium-92.0.4515.107-windows64-1137.tar.xz</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>1.9.0_91.1.20_g5800665_chromium-91.0.4472.101</string>
<string>1.12.2_92.0.15_g159e655_chromium-92.0.4515.101</string>
</map>
<key>expat</key>
<map>
......
......@@ -73,6 +73,7 @@ class MediaPluginCEF :
void onCursorChangedCallback(dullahan::ECursorType type);
const std::vector<std::string> 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);
......@@ -404,6 +405,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)
......@@ -552,10 +561,25 @@ 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
// 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.
settings.host_process_path = mHelperPath;
#endif
settings.accept_language_list = mHostLanguage;
settings.background_color = 0xffffffff;
// 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;
......@@ -566,6 +590,16 @@ 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;
settings.flip_mouse_y = false;
settings.flip_pixels_y = true;
settings.frame_rate = 60;
......@@ -573,8 +607,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.initial_height = 1024;
settings.initial_width = 1024;
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
settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring);
settings.webgl_enabled = true;
settings.log_file = mCefLogFile;
......@@ -589,7 +623,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
// Set subprocess helper and cef app data paths
#if !LL_DARWIN
settings.browser_subprocess_path = mHelperPath;
settings.resources_dir_path = mResourcesPath;
#endif
settings.locales_dir_path = mLocalesPath;
......@@ -598,10 +631,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mCEFLib->setCustomSchemes(custom_schemes);
bool result = mCEFLib->init(settings);
if (!result)
{
// if this fails, the media system in viewer will put up a message
}
if (!result)
{
// if this fails, the media system in viewer will put up a message
}
// now we can set page zoom factor
F32 factor = (F32)message_in.getValueReal("factor");
......
......@@ -2454,17 +2454,6 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>BrowserPluginsEnabled</key>
<map>
<key>Comment</key>
<string>Enable Web plugins in the built-in Web browser?</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ChatBarCustomWidth</key>
<map>
<key>Comment</key>
......
......@@ -1755,14 +1755,14 @@ 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);
// 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);
......
......@@ -147,20 +147,6 @@
width="480" />
</radio_group>
<check_box
top_delta="2"
enabled="true"
follows="left|top"
height="18"
initial_value="true"
control_name="BrowserPluginsEnabled"
label="Enable plugins"
left_delta="20"
mouse_opaque="true"
name="browser_plugins_enabled"
radio_style="false"
width="400"
top_pad="5"/>
<check_box
top_delta="4"
enabled="true"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment