EXP-1056 FIX Web popup issues with Web Content Browser

changed browser id back to a string so it accepts malformed uuid strings
coming from webkit - "{uuid}" instead of "uuid"
meow-7.2.2
Richard Linden 2011-07-29 16:38:07 -07:00
parent 63a857f0c7
commit feddda6740
4 changed files with 14 additions and 14 deletions

View File

@ -318,7 +318,7 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
LLFloaterWebContent::create(LLFloaterWebContent::Params().
url(url).
id(agent_id).
id(agent_id.asString()).
show_chrome(show_chrome).
window_class("profile").
preferred_media_size(profile_rect));

View File

@ -53,8 +53,8 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker<LLFloaterWebContent, LLUUID>(params.id()),
mUUID(params.id().asString())
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
mUUID(params.id())
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
@ -126,16 +126,16 @@ void LLFloaterWebContent::initializeURLHistory()
//static
LLFloater* LLFloaterWebContent::create( Params p)
{
lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id().asString() << llendl;
lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
if (!p.id.isProvided())
{
p.id = LLUUID::generateNewID();
p.id = LLUUID::generateNewID().asString();
}
if(!p.target.isProvided() || p.target() == "_blank")
if(p.target().empty() || p.target() == "_blank")
{
p.target = p.id().asString();
p.target = p.id();
}
S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
@ -172,7 +172,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
//static
void LLFloaterWebContent::closeRequest(const std::string &uuid)
{
LLFloaterWebContent* floaterp = getInstance(LLUUID(uuid));
LLFloaterWebContent* floaterp = getInstance(uuid);
if (floaterp)
{
floaterp->closeFloater(false);
@ -182,7 +182,7 @@ void LLFloaterWebContent::closeRequest(const std::string &uuid)
//static
void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
{
LLFloaterWebContent* floaterp = getInstance(LLUUID(uuid));
LLFloaterWebContent* floaterp = getInstance(uuid);
if (floaterp)
{
floaterp->geometryChanged(x, y, width, height);
@ -219,7 +219,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
LLViewerMedia::proxyWindowOpened(p.target(), p.id().asString());
LLViewerMedia::proxyWindowOpened(p.target(), p.id());
mWebBrowser->setHomePageUrl(p.url, "text/html");
mWebBrowser->setTarget(p.target);
mWebBrowser->navigateTo(p.url, "text/html");

View File

@ -40,7 +40,7 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
public LLViewerMediaObserver,
public LLInstanceTracker<LLFloaterWebContent, LLUUID>
public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
LOG_CLASS(LLFloaterWebContent);
@ -49,8 +49,8 @@ public:
{
Optional<std::string> url,
target,
window_class;
Optional<LLUUID> id;
window_class,
id;
Optional<bool> show_chrome,
allow_address_entry,
trusted_content;

View File

@ -125,7 +125,7 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c
// Explicitly open a Web URL using the Web content floater
void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
{
LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(LLUUID(uuid)));
LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(uuid));
}
// static