Commits

Anonymous committed bccac72

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"

  • Participants
  • Parent commits d3cfe63

Comments (0)

Files changed (4)

File indra/newview/llavataractions.cpp

 	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));

File indra/newview/llfloaterwebcontent.cpp

 
 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 ));
 //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");
 //static
 void LLFloaterWebContent::closeRequest(const std::string &uuid)
 {
-	LLFloaterWebContent* floaterp = getInstance(LLUUID(uuid));
+	LLFloaterWebContent* floaterp = getInstance(uuid);
 	if (floaterp)
 	{
 		floaterp->closeFloater(false);
 //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);
 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");

File indra/newview/llfloaterwebcontent.h

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

File indra/newview/llweb.cpp

 // 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