From c7098186151b4f7481fdb2ce33e5c326e899a086 Mon Sep 17 00:00:00 2001 From: skolb Date: Thu, 17 Dec 2009 11:54:35 -0800 Subject: Fixed carriage return text to use word wrap instead --- indra/newview/skins/default/xui/en/floater_about_land.xml | 4 +--- indra/newview/skins/default/xui/en/panel_media_settings_security.xml | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/newview') 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. -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. -- cgit v1.2.3 From 1f377c6b53346b419df8874cfdf8bb4c33f7b6d5 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 11:10:03 -0800 Subject: Made LLPanelLogin tell the browser plugin to clear its cache before opening the login screen. Added clearCache() functions to LLViewerMediaImpl and LLMediaCtrl to facilitate this. --- indra/newview/llmediactrl.cpp | 25 +++++++++++++++++++++++-- indra/newview/llmediactrl.h | 4 ++++ indra/newview/llpanellogin.cpp | 3 +++ indra/newview/llviewermedia.cpp | 20 ++++++++++++++++++++ indra/newview/llviewermedia.h | 2 ++ 5 files changed, 52 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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(); @@ -489,6 +490,21 @@ void LLMediaCtrl::clr404RedirectUrl() mMediaSource->getMediaPlugin()->set_status_redirect(404, ""); } +//////////////////////////////////////////////////////////////////////////////// +// +void LLMediaCtrl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clearCache(); + } + else + { + mClearCache = true; + } + +} + //////////////////////////////////////////////////////////////////////////////// // void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) @@ -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("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..7bcc601705 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -929,6 +929,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mMimeTypeProbe(NULL), mMediaAutoPlay(false), mInNearbyMediaList(false), + mClearCache(false), mIsUpdated(false) { @@ -1139,6 +1140,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(); @@ -1351,6 +1358,19 @@ std::string LLViewerMediaImpl::getCurrentMediaURL() return mMediaURL; } +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clear_cache(); + } + else + { + mClearCache = true; + } +} + ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { 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 ; -- cgit v1.2.3 From 0f7e49dea1dceacbf5c1e1fe2e047c2e18a59cf7 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 11:11:45 -0800 Subject: Set an explicit "Accept" header when doing the MIME type probe. This prevents LLHTTPClient from adding an "Accept: application/llsd+xml", which is just wrong. --- indra/newview/llviewermedia.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 7bcc601705..1258bce151 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1653,7 +1653,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) { -- cgit v1.2.3 From 20e51aa3aabf5a83f8538cb457b279d12569c267 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 17 Dec 2009 11:52:15 -0800 Subject: Quiet some logging, make sure if 1024 is lowest we still load it --- indra/newview/llviewermedia.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 103a70e032..f5b6ae038e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -582,8 +582,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; } -- cgit v1.2.3 From 2475335994649dbd8bc20a75d9ca2a78630464c9 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 12:08:44 -0800 Subject: Rearranged the handling of error status codes in LLMimeDiscoveryResponder. We should now deal with many more classes of subtly misbehaving web servers, and will use the returned MIME type for 4xx errors instead of guessing text/html. --- indra/newview/llviewermedia.cpp | 46 ++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1258bce151..5aebbc1bdd 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) -- cgit v1.2.3 From 3f165e17663a89f789a0f8b704e15d8b2dacf662 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 12:11:23 -0800 Subject: Turned debug spam in LLViewerMedia::isInterestingEnough() down to lldebugs. --- indra/newview/llviewermedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 5aebbc1bdd..cd16b29f99 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -572,7 +572,7 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj } else { - llinfos << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; + lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; if(object_interest > sLowestLoadableImplInterest) result = true; } -- cgit v1.2.3 From cf4c5117336349ff25f2c49131e9e26dc7b50e38 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 17 Dec 2009 13:50:48 -0800 Subject: Change "url prefix" to "url pattern" --- indra/newview/skins/default/xui/en/panel_media_settings_security.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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..e393df79e9 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" -- cgit v1.2.3 From 5962d8804f19105d8f98372606745e3f9ec0bc27 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Fri, 18 Dec 2009 13:28:23 -0600 Subject: ext-3386 Fix for day cycle crash and xui cleanup Reviewed by Richard --- .../default/xui/en/floater_day_cycle_options.xml | 108 ++++++--------------- 1 file changed, 30 insertions(+), 78 deletions(-) (limited to 'indra/newview') 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 @@ + width="6"> | + width="6"> I + width="6"> | + width="6"> I + width="6"> | + width="6"> I + width="6"> | + width="6"> I + width="6"> |