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(-) 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 0084d969ae717bddb03bc4943e971d672b893733 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 16 Dec 2009 18:06:23 -0800 Subject: Added setInitState() function to use as a logging point. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 844da76042..e7de782731 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -98,6 +98,12 @@ private: int mLastMouseY; bool mFirstFocus; + void setInitState(int state) + { +// std::cerr << "changing init state to " << state << std::endl; + mInitState = state; + } + //////////////////////////////////////////////////////////////////////////////// // void update(int milliseconds) @@ -234,7 +240,7 @@ private: LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, 0x00, 0x00, 0x00 ); // Set state _before_ starting the navigate, since onNavigateBegin might get called before this call returns. - mInitState = INIT_STATE_NAVIGATING; + setInitState(INIT_STATE_NAVIGATING); // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance. // FIXME: Re-added this because navigating to a "page" initializes things correctly - especially @@ -289,7 +295,7 @@ private: { if(mInitState == INIT_STATE_WAIT_REDRAW) { - mInitState = INIT_STATE_RUNNING; + setInitState(INIT_STATE_RUNNING); } // flag that an update is required @@ -311,7 +317,7 @@ private: if(mInitState == INIT_STATE_NAVIGATE_COMPLETE) { - mInitState = INIT_STATE_WAIT_REDRAW; + setInitState(INIT_STATE_WAIT_REDRAW); } } @@ -334,7 +340,7 @@ private: } else if(mInitState == INIT_STATE_NAVIGATING) { - mInitState = INIT_STATE_NAVIGATE_COMPLETE; + setInitState(INIT_STATE_NAVIGATE_COMPLETE); } } -- 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(-) 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(-) 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(-) 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(-) 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(-) 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(-) 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 252ccc48a019f26c1c1e06bf82651becf987c96d Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 17:11:05 -0800 Subject: New mac llqtwebkit built from revision 3e60e0d929ff in hg.lindenlab.com/monroe/llqtwebkit-4.6 . I believe this should fix the following issues: DEV-44406 (login screen occasionally remains black/grey with no background image) DEV-44449 (Mac webkit will not navigate to certain sites) --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.xml b/install.xml index fafbe816ba..2d3293b349 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 44fe5bca65db2951ce91b5b6c8596ee0 + 1631831b63310d85ad272b4dca3c1fbf url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20091215.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20091217.tar.bz2 linux -- cgit v1.2.3 From eb7bd0a214ad794db9cb2acb33c45b9d7f46b981 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 18:00:59 -0800 Subject: Changed default launch timeout in LLPluginProcessParent to 60 seconds, and added an to LLPluginProcessParent that allows callers to adjust the launch and lockup timeouts. --- indra/llplugin/llpluginprocessparent.cpp | 24 +++++++++--------------- indra/llplugin/llpluginprocessparent.h | 7 +++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 608e444375..49f9783824 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -39,12 +39,6 @@ #include "llapr.h" -// If we don't receive a heartbeat in this many seconds, we declare the plugin locked up. -static const F32 PLUGIN_LOCKED_UP_SECONDS = 15.0f; - -// Somewhat longer timeout for initial launch. -static const F32 PLUGIN_LAUNCH_SECONDS = 20.0f; - //virtual LLPluginProcessParentOwner::~LLPluginProcessParentOwner() { @@ -59,11 +53,11 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) mDisableTimeout = false; mDebug = false; - // initialize timer - heartbeat test (mHeartbeat.hasExpired()) - // can sometimes return true immediately otherwise and plugins - // fail immediately because it looks like -// mHeartbeat.initClass(); - mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS); + mPluginLaunchTimeout = 60.0f; + mPluginLockupTimeout = 15.0f; + + // Don't start the timer here -- start it when we actually launch the plugin process. + mHeartbeat.stop(); } LLPluginProcessParent::~LLPluginProcessParent() @@ -326,7 +320,7 @@ void LLPluginProcessParent::idle(void) // This will allow us to time out if the process never starts. mHeartbeat.start(); - mHeartbeat.setTimerExpirySec(PLUGIN_LAUNCH_SECONDS); + mHeartbeat.setTimerExpirySec(mPluginLaunchTimeout); setState(STATE_LAUNCHED); } } @@ -560,7 +554,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) else if(message_name == "heartbeat") { // this resets our timer. - mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS); + mHeartbeat.setTimerExpirySec(mPluginLockupTimeout); mCPUUsage = message.getValueReal("cpu_usage"); @@ -715,7 +709,7 @@ bool LLPluginProcessParent::pluginLockedUpOrQuit() bool LLPluginProcessParent::pluginLockedUp() { - // If the timer has expired, the plugin has locked up. - return mHeartbeat.hasExpired(); + // If the timer is running and has expired, the plugin has locked up. + return (mHeartbeat.getStarted() && mHeartbeat.hasExpired()); } diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 03ce10f86c..524cd9923f 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -102,6 +102,9 @@ public: bool getDisableTimeout() { return mDisableTimeout; }; void setDisableTimeout(bool disable) { mDisableTimeout = disable; }; + + void setLaunchTimeout(F32 timeout) { mPluginLaunchTimeout = timeout; }; + void setLockupTimeout(F32 timeout) { mPluginLockupTimeout = timeout; }; F64 getCPUUsage() { return mCPUUsage; }; @@ -158,6 +161,10 @@ private: bool mDebug; LLProcessLauncher mDebugger; + + F32 mPluginLaunchTimeout; // Somewhat longer timeout for initial launch. + F32 mPluginLockupTimeout; // If we don't receive a heartbeat in this many seconds, we declare the plugin locked up. + }; #endif // LL_LLPLUGINPROCESSPARENT_H -- 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 --- indra/llui/llmultisliderctrl.cpp | 4 +- .../default/xui/en/floater_day_cycle_options.xml | 108 ++++++--------------- 2 files changed, 32 insertions(+), 80 deletions(-) diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 87938c19d4..7323323d8c 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -328,7 +328,7 @@ void LLMultiSliderCtrl::updateText() // static void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) { - LLMultiSliderCtrl* self = dynamic_cast(ctrl); + LLMultiSliderCtrl* self = dynamic_cast(ctrl->getParent()); if (!ctrl) return; @@ -369,7 +369,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) // static void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata) { - LLMultiSliderCtrl* self = dynamic_cast(ctrl); + LLMultiSliderCtrl* self = dynamic_cast(ctrl->getParent()); if (!self) return; 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"> |