From 6fcc0994dff2bd88256ff8306c8df670df627ef6 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Mon, 28 Jun 2010 16:30:08 +0100 Subject: EXT-7498 WIP Snapshot Sharing Reviewed by Tofu. --- indra/newview/llviewermedia.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 34e30b3ccd..178d928f57 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -56,6 +56,7 @@ #include "llvoavatar.h" #include "llvoavatarself.h" #include "llviewerregion.h" +#include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! #include "llevent.h" // LLSimpleListener #include "llnotificationsutil.h" @@ -1318,6 +1319,9 @@ void LLViewerMedia::setOpenIDCookie() } getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start)); + + // *HACK: Doing this here is nasty, find a better way. + LLWebSharing::instance().setOpenIDCookie(sOpenIDCookie); } } -- cgit v1.2.3 From fbd05e947829714d81278dfa0b138b22e32d56a7 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Jul 2010 13:51:37 -0700 Subject: Fix for EXT-8339 Added a couple of new nav states to LLViewerMediaImpl: MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS and MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS. These behave just like the corresponding states without the _SPURIOUS suffix, but will be used if the new navigate doesn't change the current URL of the impl. This allows us to catch cases like the repro of this issue and discard the spurious navigate events. --- indra/newview/llviewermedia.cpp | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 178d928f57..55f180c0d9 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2916,14 +2916,23 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { LL_DEBUGS("Media") << "MEDIA_EVENT_NAVIGATE_COMPLETE, uri is: " << plugin->getNavigateURI() << LL_ENDL; + std::string url = plugin->getNavigateURI(); if(getNavState() == MEDIANAVSTATE_BEGUN) { - mCurrentMediaURL = plugin->getNavigateURI(); - setNavState(MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED); + if(mCurrentMediaURL == url) + { + // This is a navigate that takes us to the same url as the previous navigate. + setNavState(MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS); + } + else + { + mCurrentMediaURL = url; + setNavState(MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED); + } } else if(getNavState() == MEDIANAVSTATE_SERVER_BEGUN) { - mCurrentMediaURL = plugin->getNavigateURI(); + mCurrentMediaURL = url; setNavState(MEDIANAVSTATE_SERVER_COMPLETE_BEFORE_LOCATION_CHANGED); } else @@ -2937,14 +2946,24 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { LL_DEBUGS("Media") << "MEDIA_EVENT_LOCATION_CHANGED, uri is: " << plugin->getLocation() << LL_ENDL; + std::string url = plugin->getLocation(); + if(getNavState() == MEDIANAVSTATE_BEGUN) { - mCurrentMediaURL = plugin->getLocation(); - setNavState(MEDIANAVSTATE_FIRST_LOCATION_CHANGED); + if(mCurrentMediaURL == url) + { + // This is a navigate that takes us to the same url as the previous navigate. + setNavState(MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS); + } + else + { + mCurrentMediaURL = url; + setNavState(MEDIANAVSTATE_FIRST_LOCATION_CHANGED); + } } else if(getNavState() == MEDIANAVSTATE_SERVER_BEGUN) { - mCurrentMediaURL = plugin->getLocation(); + mCurrentMediaURL = url; setNavState(MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED); } else @@ -3223,7 +3242,9 @@ void LLViewerMediaImpl::setNavState(EMediaNavState state) case MEDIANAVSTATE_NONE: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_NONE" << llendl; break; case MEDIANAVSTATE_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_BEGUN" << llendl; break; case MEDIANAVSTATE_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED" << llendl; break; + case MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_FIRST_LOCATION_CHANGED_SPURIOUS" << llendl; break; case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED" << llendl; break; + case MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_COMPLETE_BEFORE_LOCATION_CHANGED_SPURIOUS" << llendl; break; case MEDIANAVSTATE_SERVER_SENT: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_SENT" << llendl; break; case MEDIANAVSTATE_SERVER_BEGUN: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_BEGUN" << llendl; break; case MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED: LL_DEBUGS("Media") << "Setting nav state to MEDIANAVSTATE_SERVER_FIRST_LOCATION_CHANGED" << llendl; break; -- cgit v1.2.3 From 4b3e4d2ab42e1748afc7f201809f2bf669a34908 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 30 Jul 2010 17:13:27 -0700 Subject: Fix for EXT-8533 When sending the MIME type probe, tell LLCurl to allow cookies in the response. This works around an issue with some sites that will get into an infinite redirect loop when cookies are disabled. --- indra/newview/llviewermedia.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 55f180c0d9..99220e288c 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2308,6 +2308,8 @@ void LLViewerMediaImpl::navigateInternal() // which is really not what we want. LLSD headers = LLSD::emptyMap(); headers["Accept"] = "*/*"; + // Allow cookies in the response, to prevent a redirect loop when accessing join.secondlife.com + headers["Cookie"] = ""; LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), headers, 10.0f); } else if("data" == scheme || "file" == scheme || "about" == scheme) -- cgit v1.2.3 From 21e8a119cc96b226d7593de16ea7ae990d1da3d9 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 2 Aug 2010 14:52:09 -0700 Subject: EXT-8540 - Implement mime type override for web_browser ctrl reviewed by Monroe --- indra/newview/llviewermedia.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 99220e288c..77f7740449 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2196,7 +2196,8 @@ void LLViewerMediaImpl::navigateReload() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateHome() { - navigateTo(mHomeURL, "", true, false); + bool rediscover_mimetype = mHomeMimeType.empty(); + navigateTo(mHomeURL, mHomeMimeType, rediscover_mimetype, false); } ////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 2fea1d5d33ec1b41a3cfa4307a1bfa58d8014f88 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 19 Aug 2010 12:25:15 -0500 Subject: Integrate SIMD API from oreh/server-trunk-oreh --- indra/newview/llviewermedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 178d928f57..303f339f7d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -865,7 +865,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) // Set the low priority size for downsampling to approximately the size the texture is displayed at. { - F32 approximate_interest_dimension = fsqrtf(pimpl->getInterest()); + F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest()); pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension)); } -- cgit v1.2.3 From 90e3d83a5cb35e98a02a3017dd79ebc272bbfe85 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Sep 2010 13:26:52 -0400 Subject: Fix for build failures - disabling tcmalloc for now --- indra/newview/llviewermedia.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/llviewermedia.cpp (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp old mode 100644 new mode 100755 -- cgit v1.2.3