summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterwebcontent.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-10-11 15:16:45 -0700
committerMerov Linden <merov@lindenlab.com>2011-10-11 15:16:45 -0700
commit682609d254fb973cfa267923b69c5e06b7efd7e1 (patch)
tree0063e23841b6e3bb588355ad428608bb1f4fcdf9 /indra/newview/llfloaterwebcontent.cpp
parent3596c0f7e139724f31258ffb96157146aeba77b1 (diff)
parentc1a9ca33b27f4e741eeacf781a09156009167ad3 (diff)
Pull from richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llfloaterwebcontent.cpp')
-rw-r--r--indra/newview/llfloaterwebcontent.cpp39
1 files changed, 16 insertions, 23 deletions
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 2c9a736aff..c76aeb0498 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -88,20 +88,6 @@ BOOL LLFloaterWebContent::postBuild()
return TRUE;
}
-bool LLFloaterWebContent::matchesKey(const LLSD& key)
-{
- LLUUID id = key["id"];
- if (id.notNull())
- {
- return id == mKey["id"].asUUID();
- }
- else
- {
- return key["target"].asString() == mKey["target"].asString();
- }
-}
-
-
void LLFloaterWebContent::initializeURLHistory()
{
// start with an empty list
@@ -123,6 +109,20 @@ void LLFloaterWebContent::initializeURLHistory()
}
}
+bool LLFloaterWebContent::matchesKey(const LLSD& key)
+{
+ Params p(mKey);
+ Params other_p(key);
+ if (!other_p.target().empty() && other_p.target() != "_blank")
+ {
+ return other_p.target() == p.target();
+ }
+ else
+ {
+ return other_p.id() == p.id();
+ }
+}
+
//static
LLFloater* LLFloaterWebContent::create( Params p)
{
@@ -139,14 +139,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
}
S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
-
- LLSD sd;
- sd["target"] = p.target;
- if(LLFloaterReg::findInstance(p.window_class, sd) != NULL)
- {
- // There's already a web browser for this tag, so we won't be opening a new window.
- }
- else if(browser_window_limit != 0)
+ if(browser_window_limit != 0)
{
// showInstance will open a new window. Figure out how many web browsers are already open,
// and close the least recently opened one if this will put us over the limit.
@@ -166,7 +159,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
}
}
- return LLFloaterReg::showInstance(p.window_class, p);
+ return new LLFloaterWebContent(p);
}
//static