summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lllayoutstack.cpp4
-rw-r--r--indra/llui/llnotifications.h7
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llfirstuse.cpp3
-rw-r--r--indra/newview/llfloatersearch.cpp6
-rw-r--r--indra/newview/llmediactrl.cpp43
-rw-r--r--indra/newview/llmediactrl.h7
-rw-r--r--indra/newview/llpanelhome.cpp1
-rw-r--r--indra/newview/llpanellogin.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency_html.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_help_browser.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tos.xml1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml1
16 files changed, 43 insertions, 47 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index a0275b6ed5..940c7e7e18 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -208,8 +208,8 @@ S32 LLLayoutStack::getDefaultWidth(S32 cur_width)
void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel, bool move_to_front)
{
- LayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move);
- LayoutPanel* embedded_target_panel = move_to_front ? *mPanels.begin() : findEmbeddedPanel(target_panel);
+ LLLayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move);
+ LLLayoutPanel* embedded_target_panel = move_to_front ? *mPanels.begin() : findEmbeddedPanel(target_panel);
if (!embedded_panel_to_move || !embedded_target_panel || embedded_panel_to_move == embedded_target_panel)
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index ed29e0d83e..dcb7b48f92 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -458,6 +458,13 @@ public:
return mRespondedTo;
}
+ bool isActive() const
+ {
+ return !isRespondedTo()
+ && !isCancelled()
+ && !isExpired();
+ }
+
const LLSD& getResponse() { return mResponse; }
bool isIgnored() const
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c2f2f6d797..feb5ebc16d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5233,7 +5233,7 @@
<key>MediaEnablePopups</key>
<map>
<key>Comment</key>
- <string>If true, enable targeted links and javascript in media to open new media browser windows.</string>
+ <string>If true, enable targeted links and javascript in media to open new media browser windows without a prompt.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index b864ba6a36..1764d6b145 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -86,7 +86,8 @@ void LLFirstUse::sit(bool enable)
// static
void LLFirstUse::newInventory(bool enable)
{
- firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left"));
+ // turning this off until bug EXP-62 can be fixed (inventory hint appears for new users when their initial inventory is acquired)
+ // firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left"));
}
// static
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 7661e50eba..3ed4aec89a 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -96,11 +96,7 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
BOOL LLFloaterSearch::postBuild()
{
mBrowser = getChild<LLMediaCtrl>("browser");
- if (mBrowser)
- {
- mBrowser->addObserver(this);
- mBrowser->setTrusted(true);
- }
+ mBrowser->addObserver(this);
return TRUE;
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 621f241227..e59f2ddd07 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -69,7 +69,8 @@ LLMediaCtrl::Params::Params()
texture_height("texture_height", 1024),
caret_color("caret_color"),
initial_mime_type("initial_mime_type"),
- media_id("media_id")
+ media_id("media_id"),
+ trusted_content("trusted_content", false)
{
tab_stop(false);
}
@@ -81,7 +82,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mFrequentUpdates( true ),
mForceUpdate( false ),
mHomePageUrl( "" ),
- mTrusted(false),
mIgnoreUIScale( true ),
mAlwaysRefresh( false ),
mMediaSource( 0 ),
@@ -95,7 +95,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mTextureWidth ( 1024 ),
mTextureHeight ( 1024 ),
mClearCache(false),
- mHomePageMimeType(p.initial_mime_type)
+ mHomePageMimeType(p.initial_mime_type),
+ mTrusted(p.trusted_content)
{
{
LLColor4 color = p.caret_color().get();
@@ -168,16 +169,6 @@ void LLMediaCtrl::setTakeFocusOnClick( bool take_focus )
}
////////////////////////////////////////////////////////////////////////////////
-void LLMediaCtrl::setTrusted( bool valIn )
-{
- if(mMediaSource)
- {
- mMediaSource->setTrustedBrowser(valIn);
- }
- mTrusted = valIn;
-}
-
-////////////////////////////////////////////////////////////////////////////////
//
BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
{
@@ -929,14 +920,10 @@ void LLMediaCtrl::draw()
if ( mBorder && mBorder->getVisible() )
mBorder->setKeyboardFocusHighlight( gFocusMgr.childHasKeyboardFocus( this ) );
- if (mCurNotification)
+ if (mCurNotification && !mCurNotification->isActive())
{
- if (mCurNotification->isCancelled() || mCurNotification->isExpired())
- {
- hideNotification();
- }
+ hideNotification();
}
-
LLPanel::draw();
@@ -1042,11 +1029,19 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
std::string target = self->getClickTarget();
std::string uuid = self->getClickUUID();
- LLNotificationPtr popup_notify = LLNotifications::instance().add("PopupAttempt",
- LLSD(),
- LLSD().with("target", target).with("url", url).with("uuid", uuid),
- boost::bind(&LLMediaCtrl::onPopup, this, _1, _2));
- showNotification(popup_notify);
+ LLNotification::Params notify_params;
+ notify_params.name = "PopupAttempt";
+ notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid);
+ notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
+
+ if (mTrusted)
+ {
+ LLNotifications::instance().forceResponse(notify_params, 0);
+ }
+ else
+ {
+ showNotification(LLNotifications::instance().add(notify_params));
+ }
break;
};
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index b8e10d5591..f010e5f4c8 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -51,7 +51,8 @@ public:
Optional<bool> border_visible,
ignore_ui_scale,
hide_loading,
- decouple_texture_size;
+ decouple_texture_size,
+ trusted_content;
Optional<S32> texture_width,
texture_height;
@@ -104,8 +105,6 @@ public:
// Javascript or some other mechanism. However, we need the search
// floater and login page to handle these URLs. Those are safe
// because we control the page content. See DEV-9530. JC.
- void setTrusted( bool valIn );
-
void setHomePageUrl( const std::string& urlIn, const std::string& mime_type = LLStringUtil::null );
std::string getHomePageUrl();
@@ -176,7 +175,7 @@ public:
LLViewBorder* mBorder;
bool mFrequentUpdates;
bool mForceUpdate;
- bool mTrusted;
+ const bool mTrusted;
std::string mHomePageUrl;
std::string mHomePageMimeType;
std::string mCurrentNavUrl;
diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp
index 93c4e0c9c7..b03bab3127 100644
--- a/indra/newview/llpanelhome.cpp
+++ b/indra/newview/llpanelhome.cpp
@@ -61,7 +61,6 @@ BOOL LLPanelHome::postBuild()
std::string url = LLViewerHome::getHomeURL();
mBrowser->addObserver(this);
- mBrowser->setTrusted(true);
mBrowser->setHomePageUrl(url);
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index f1bd861f1d..7c93d8a1f9 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -257,13 +257,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// Clear the browser's cache to avoid any potential for the cache messing up the login screen.
web_browser->clearCache();
- // Need to handle login secondlife:///app/ URLs
- web_browser->setTrusted( true );
-
- // don't make it a tab stop until SL-27594 is fixed
- web_browser->setTabStop(FALSE);
- // web_browser->navigateToLocalPage( "loading", "loading.html" );
-
reshapeBrowser();
// kick off a request to grab the url manually
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
index 4b990fa566..b9c415633f 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
@@ -16,6 +16,7 @@
https://quick-buy.secondlife.com/[LANGUAGE]/display/?sa=[SPECIFIC_AMOUNT]&amp;sum=[SUM]&amp;msg=[MSG]&amp;bal=[BAL]
</floater.string>
<web_browser
+ trusted_content="true"
follows="all"
layout="topleft"
left="1"
diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml
index 13017cc803..0c90df24f0 100644
--- a/indra/newview/skins/default/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml
@@ -36,6 +36,7 @@
user_resize="false"
width="620">
<web_browser
+ trusted_content="true"
bottom="-11"
follows="left|right|top|bottom"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index 354f1de85e..8770ede7e9 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -38,6 +38,7 @@
user_resize="false"
width="630">
<web_browser
+ trusted_content="true"
follows="left|right|top|bottom"
layout="topleft"
left="0"
diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml
index cbfaac958b..af1617eb39 100644
--- a/indra/newview/skins/default/xui/en/floater_tos.xml
+++ b/indra/newview/skins/default/xui/en/floater_tos.xml
@@ -58,6 +58,7 @@
Please read the following Terms of Service and Privacy Policy carefully. To continue logging in to [SECOND_LIFE], you must accept the agreement.
</text>
<web_browser
+ trusted_content="true"
follows="left|top"
height="340"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d206313185..3084aa3de8 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6455,8 +6455,7 @@ Mute everyone?
name="PopupAttempt"
icon="Popup_Caution"
type="browser"
- duration="10"
- unique="true">
+ duration="10">
A pop-up was prevented from opening.
<form name="form">
<ignore name="ignore"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 6b136495d2..891616b838 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -24,6 +24,8 @@ top="600"
</panel.string>
<!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp -->
<web_browser
+ tab_stop="false"
+trusted_content="true"
bg_opaque_color="Black"
border_visible="false"
bottom="600"
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index 2be95fc081..72b2f5e84f 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -28,6 +28,7 @@
top_delta="0"
width="313">
<web_browser
+ trusted_content="true"
border_visible="false"
follows="all"
height="550"