summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterwebcontent.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-07-13 17:59:53 -0700
committerRichard Linden <none@none>2011-07-13 17:59:53 -0700
commit38ba526cc57799211c4d926a6b4009cef32d21cd (patch)
treec3682b2b1fea7f89041f467e8f35dc4523a76052 /indra/newview/llfloaterwebcontent.cpp
parent42c6949e304b1a0ba19251ba889132796adb1295 (diff)
EXP-1009 WIP Teleport links from Search floater and destination guide in viewer fail with intrusted browser error in viewer
Diffstat (limited to 'indra/newview/llfloaterwebcontent.cpp')
-rw-r--r--indra/newview/llfloaterwebcontent.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 4cc29267da..c7c6857a47 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -45,10 +45,12 @@ LLFloaterWebContent::_Params::_Params()
target("target"),
id("id"),
show_chrome("show_chrome", true),
- preferred_media_size("preferred_media_size")
+ allow_address_entry("allow_address_entry", true),
+ preferred_media_size("preferred_media_size"),
+ trusted_content("trusted_content", false)
{}
-LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
+LLFloaterWebContent::LLFloaterWebContent( const Params& key )
: LLFloater( key )
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
@@ -218,10 +220,12 @@ void LLFloaterWebContent::open_media(const Params& p)
mWebBrowser->setHomePageUrl(p.url, "text/html");
mWebBrowser->setTarget(p.target);
mWebBrowser->navigateTo(p.url, "text/html");
+
set_current_url(p.url);
getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome);
getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
+ getChild<LLUICtrl>("address")->setEnabled(p.allow_address_entry && !p.trusted_content);
if (!p.show_chrome)
{
@@ -247,6 +251,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key)
}
mUUID = params.id().asString();
+ mWebBrowser->setTrustedContent(params.trusted_content);
// tell the browser instance to load the specified URL
open_media(params);