summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-18 15:19:24 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-18 15:19:24 -0500
commitc1b58587dfe4711383b1878d341527221d2c298f (patch)
tree4bdf329a3fa23039e5c9cbb3cca3ba005f652b57 /indra/newview
parente0f5ce4ecff112857a03b5f9b61d29ef86209d24 (diff)
parentfd71944170e69b0fc47b45c385c33ef7acf4cafb (diff)
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmediactrl.cpp25
-rw-r--r--indra/newview/llmediactrl.h4
-rw-r--r--indra/newview/llpanellogin.cpp3
-rw-r--r--indra/newview/llviewermedia.cpp77
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llwearable.h2
-rw-r--r--indra/newview/llwearablelist.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_day_cycle_options.xml108
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_security.xml7
11 files changed, 117 insertions, 120 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index f32866b1fe..199bd966ef 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -95,7 +95,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mHidingInitialLoad (false),
mDecoupleTextureSize ( false ),
mTextureWidth ( 1024 ),
- mTextureHeight ( 1024 )
+ mTextureHeight ( 1024 ),
+ mClearCache(false)
{
{
LLColor4 color = p.caret_color().get();
@@ -491,6 +492,21 @@ void LLMediaCtrl::clr404RedirectUrl()
////////////////////////////////////////////////////////////////////////////////
//
+void LLMediaCtrl::clearCache()
+{
+ if(mMediaSource)
+ {
+ mMediaSource->clearCache();
+ }
+ else
+ {
+ mClearCache = true;
+ }
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
{
// don't browse to anything that starts with secondlife:// or sl://
@@ -617,7 +633,12 @@ bool LLMediaCtrl::ensureMediaSourceExists()
mMediaSource->setHomeURL(mHomePageUrl);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
-
+ if(mClearCache)
+ {
+ mMediaSource->clearCache();
+ mClearCache = false;
+ }
+
if(mHideLoading)
{
mHidingInitialLoad = true;
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index f07513a3fd..8f9e6e7179 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -117,6 +117,9 @@ public:
// set/clear URL to visit when a 404 page is reached
void set404RedirectUrl( std::string redirect_url );
void clr404RedirectUrl();
+
+ // Clear the browser cache when the instance gets loaded
+ void clearCache();
// accessor/mutator for flag that indicates if frequent updates to texture happen
bool getFrequentUpdates() { return mFrequentUpdates; };
@@ -192,6 +195,7 @@ public:
bool mDecoupleTextureSize;
S32 mTextureWidth;
S32 mTextureHeight;
+ bool mClearCache;
};
#endif // LL_LLMediaCtrl_H
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index a9c604b72a..dbe962ed59 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -272,6 +272,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// get the web browser control
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html");
web_browser->addObserver(this);
+
+ // 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 );
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 103a70e032..df62c9628d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -160,36 +160,25 @@ public:
std::string media_type = content["content-type"].asString();
std::string::size_type idx1 = media_type.find_first_of(";");
std::string mime_type = media_type.substr(0, idx1);
- completeAny(status, mime_type);
- }
- virtual void error( U32 status, const std::string& reason )
- {
- if(status == 401)
- {
- // This is the "you need to authenticate" status.
- // Treat this like an html page.
- completeAny(status, "text/html");
- }
- else
- if(status == 403)
- {
- completeAny(status, "text/html");
- }
- else
- if(status == 404)
- {
- // 404 is content not found - sites often have bespoke 404 pages so
- // treat them like an html page.
- completeAny(status, "text/html");
- }
- else
- if(status == 406)
+ lldebugs << "status is " << status << ", media type \"" << media_type << "\"" << llendl;
+
+ // 2xx status codes indicate success.
+ // Most 4xx status codes are successful enough for our purposes.
+ // 499 is the error code for host not found, timeout, etc.
+ if( ((status >= 200) && (status < 300)) ||
+ ((status >= 400) && (status < 499)) )
{
- // 406 means the server sent something that we didn't indicate was acceptable
- // Eventually we should send what we accept in the headers but for now,
- // treat 406s like an html page.
- completeAny(status, "text/html");
+ // The probe was successful.
+
+ if(mime_type.empty())
+ {
+ // Some sites don't return any content-type header at all.
+ // Treat an empty mime type as text/html.
+ mime_type = "text/html";
+ }
+
+ completeAny(status, mime_type);
}
else
{
@@ -200,6 +189,7 @@ public:
mMediaImpl->mMediaSourceFailed = true;
}
}
+
}
void completeAny(U32 status, const std::string& mime_type)
@@ -582,8 +572,8 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj
}
else
{
- llinfos << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl;
- if(object_interest > sLowestLoadableImplInterest)
+ lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl;
+ if(object_interest >= sLowestLoadableImplInterest)
result = true;
}
@@ -929,6 +919,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mMimeTypeProbe(NULL),
mMediaAutoPlay(false),
mInNearbyMediaList(false),
+ mClearCache(false),
mIsUpdated(false)
{
@@ -1139,6 +1130,12 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent());
media_source->focus(mHasFocus);
+ if(mClearCache)
+ {
+ mClearCache = false;
+ media_source->clear_cache();
+ }
+
mMediaSource = media_source;
updateVolume();
@@ -1352,6 +1349,19 @@ std::string LLViewerMediaImpl::getCurrentMediaURL()
}
//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::clearCache()
+{
+ if(mMediaSource)
+ {
+ mMediaSource->clear_cache();
+ }
+ else
+ {
+ mClearCache = true;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
@@ -1633,7 +1643,12 @@ void LLViewerMediaImpl::navigateInternal()
if(scheme.empty() || "http" == scheme || "https" == scheme)
{
- LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), 10.0f);
+ // If we don't set an Accept header, LLHTTPClient will add one like this:
+ // Accept: application/llsd+xml
+ // which is really not what we want.
+ LLSD headers = LLSD::emptyMap();
+ headers["Accept"] = "*/*";
+ LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), headers, 10.0f);
}
else if("data" == scheme || "file" == scheme || "about" == scheme)
{
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 7151186089..28fb379960 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -188,6 +188,7 @@ public:
std::string getCurrentMediaURL();
std::string getHomeURL() { return mHomeURL; }
void setHomeURL(const std::string& home_url) { mHomeURL = home_url; };
+ void clearCache();
std::string getMimeType() { return mMimeType; }
void scaleMouse(S32 *mouse_x, S32 *mouse_y);
void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y);
@@ -355,6 +356,7 @@ public:
bool mMediaAutoPlay;
std::string mMediaEntryURL;
bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons
+ bool mClearCache;
private:
BOOL mIsUpdated ;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 82d388ab7e..7a579b248e 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -127,6 +127,7 @@ public:
void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake );
void revertValues();
+ void saveValues();
BOOL isOnTop() const;
@@ -143,7 +144,6 @@ private:
void createLayers(S32 te);
void createVisualParams();
- void saveValues();
void syncImages(te_map_t &src, te_map_t &dst);
void destroyTextures();
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index bd7619f7e5..5636256856 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -249,9 +249,13 @@ LLWearable* LLWearableList::createNewWearable( EWearableType type )
wearable->setParamsToDefaults();
wearable->setTexturesToDefaults();
+ //mark all values (params & images) as saved
+ wearable->saveValues();
+
// Send to the dataserver
wearable->saveNewAsset();
+
return wearable;
}
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 1239152c32..a64716cb35 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1672,9 +1672,7 @@ Only large parcels can be listed in search.
name="replace_texture_help"
width="300"
word_wrap="true">
- Objects using this texture will show the movie or web page after you click the play arrow.
-
-Select the thumbnail to choose a different texture.
+ Objects using this texture will show the movie or web page after you click the play arrow. Select the thumbnail to choose a different texture.
</text>
<check_box
height="16"
diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
index 35f3e643c3..8c5af2283d 100644
--- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
@@ -65,11 +65,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12am"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left="8"
name="WL12am"
@@ -80,11 +78,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL3am"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL3am"
@@ -95,11 +91,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL6am"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL6am"
@@ -110,11 +104,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL9am"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL9amHash"
@@ -125,11 +117,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12pm"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL12pmHash"
@@ -140,11 +130,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL3pm"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL3pm"
@@ -155,11 +143,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL6pm"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL6pm"
@@ -170,11 +156,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL9pm"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL9pm"
@@ -185,11 +169,9 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12am2"
follows="left|top|right"
- height="6"
+ height="16"
layout="topleft"
left_pad="10"
name="WL12am2"
@@ -200,9 +182,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12amHash"
follows="left|top|right"
font="SansSerif"
height="14"
@@ -210,135 +190,119 @@
left="20"
name="WL12amHash"
top="54"
- width="4">
+ width="6">
|
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL3amHash"
follows="left|top|right"
font="SansSerif"
height="11"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL3amHash"
top_delta="3"
- width="4">
+ width="6">
I
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL6amHash"
follows="left|top|right"
font="SansSerif"
height="14"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL6amHash"
top_delta="-3"
- width="4">
+ width="6">
|
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL9amHash"
follows="left|top|right"
font="SansSerif"
height="11"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL9amHash2"
top_delta="3"
- width="4">
+ width="6">
I
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12pmHash"
follows="left|top|right"
font="SansSerif"
height="14"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL12pmHash2"
top_delta="-3"
- width="4">
+ width="6">
|
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL3pmHash"
follows="left|top|right"
font="SansSerif"
height="11"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL3pmHash"
top_delta="3"
- width="4">
+ width="6">
I
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL6pmHash"
follows="left|top|right"
font="SansSerif"
height="14"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL6pmHash"
top_delta="-3"
- width="4">
+ width="6">
|
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL9pmHash"
follows="left|top|right"
font="SansSerif"
height="11"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL9pmHash"
top_delta="3"
- width="4">
+ width="6">
I
</text>
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WL12amHash2"
follows="left|top|right"
font="SansSerif"
height="14"
layout="topleft"
- left_pad="61"
+ left_pad="59"
name="WL12amHash2"
top_delta="-3"
- width="4">
+ width="6">
|
</text>
<button
@@ -346,9 +310,9 @@
label="Add Key"
label_selected="Add Key"
layout="topleft"
- left="550"
+ left="555"
name="WLAddKey"
- top="20"
+ top="30"
width="80" />
<button
height="20"
@@ -362,9 +326,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="DayCycleText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -378,9 +340,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="DayCycleText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -424,9 +384,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="WLCurKeyTimeText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -456,9 +414,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="DayCycleText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -481,9 +437,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="DayCycleText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -542,9 +496,7 @@
<text
type="string"
length="1"
- bg_visible="true"
border_visible="true"
- control_name="DayCycleText"
follows="left|top|right"
font="SansSerif"
height="16"
@@ -560,7 +512,7 @@
label="Play"
label_selected="Play"
layout="topleft"
- left_delta="0"
+ left_delta="60"
name="WLAnimSky"
top_pad="5"
width="50" />
@@ -581,7 +533,7 @@
left_pad="5"
name="WLUseLindenTime"
top_delta="0"
- width="140" />
+ width="150" />
<button
height="20"
label="Save Test Day"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index bcf006f1a0..99debc7473 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4328,7 +4328,6 @@ Hmm. Gesture [NAME] is missing from the database.
name="UnableToLoadGesture"
type="notifytip">
Unable to load gesture [NAME].
-Please try again.
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
index 1f41a0d284..1f580831f9 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
@@ -17,7 +17,7 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Only Allow Access to Specified URLs (by prefix)"
+ label="Only Allow Access to Specified URL patterns"
left="10"
mouse_opaque="true"
name="whitelist_enable"
@@ -81,10 +81,9 @@
height="40"
left="30"
text_color="0.6 0.0 0.0 1.0"
+ word_wrap="true"
name="home_url_fails_whitelist">
-Warning: the home page specified in the General tab
-fails to pass this whitelist. It has been disabled
-until a valid entry has been added.
+Warning: the home page specified in the General tab fails to pass this whitelist. It has been disabled until a valid entry has been added.
</text>
</panel>