diff options
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 9 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 63 | ||||
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 43 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerhelp.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerhelputil.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llviewerhelputil.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewerhome.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 2 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llweb.cpp | 32 | ||||
-rw-r--r-- | indra/newview/llweb.h | 5 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_search.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 4 | ||||
-rw-r--r-- | indra/newview/tests/llviewerhelputil_test.cpp | 122 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 1 | ||||
-rw-r--r-- | indra/test_apps/llplugintest/CMakeLists.txt | 8 | ||||
-rw-r--r-- | install.xml | 8 |
21 files changed, 233 insertions, 209 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 276ad39dfb..707edaa3d6 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -211,7 +211,7 @@ private: LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_DARWIN // Disable plugins - LLQtWebKit::getInstance()->enablePlugins(false); + LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_LINUX // Disable plugins LLQtWebKit::getInstance()->enablePlugins(false); @@ -626,7 +626,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) } else if(message_name == "cleanup") { - // TODO: clean up here + // DTOR most likely won't be called but the recent change to the way this process + // is (not) killed means we see this message and can do what we need to here. + // Note: this cleanup is ultimately what writes cookies to the disk + LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this ); + LLQtWebKit::getInstance()->reset(); } else if(message_name == "shm_added") { @@ -635,7 +639,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) info.mSize = (size_t)message_in.getValueS32("size"); std::string name = message_in.getValue("name"); - // std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name // << ", size: " << info.mSize // << ", address: " << info.mAddress diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 492d70a956..293faa7b70 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1780,6 +1780,7 @@ if (WINDOWS) qtnetworkd4.dll qtopengld4.dll qtwebkitd4.dll + qtxmlpatternsd4.dll ssleay32.dll ) copy_if_different( @@ -1799,6 +1800,7 @@ if (WINDOWS) qtnetwork4.dll qtopengl4.dll qtwebkit4.dll + qtxmlpatterns4.dll ssleay32.dll ) copy_if_different( diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7ac7a09d56..578f8fd4f0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3585,7 +3585,18 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://www.secondlife.com/</string> + <string>http://lecs.viewer-sidebar.secondlife.com.s3.amazonaws.com/sidebar.html</string> + </map> + <key>SearchURL</key> + <map> + <key>Comment</key> + <string>URL for Search website, displayed in the Find floater</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]</string> </map> <key>HighResSnapshot</key> <map> @@ -5460,6 +5471,17 @@ <key>Value</key> <integer>13</integer> </map> + <key>PrimMediaMasterEnabled</key> + <map> + <key>Comment</key> + <string>Whether or not Media on a Prim is enabled.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>PrimMediaControlsUseHoverControlSet</key> <map> <key>Comment</key> @@ -7539,45 +7561,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>SearchURLDefault</key> - <map> - <key>Comment</key> - <string>URL to load for empty searches</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>http://search.secondlife.com/client_search.php?</string> - </map> - <key>SearchURLQuery</key> - <map> - <key>Comment</key> - <string>URL to use for searches</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>http://search.secondlife.com/client_search.php?q=[QUERY]&s=[COLLECTION]&</string> - </map> - <key>SearchURLSuffix2</key> - <map> - <key>Comment</key> - <string>Parameters added to end of search queries</string> - <key>Persist</key> - <integer>1</integer> - <key>HideFromEditor</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string>lang=[LANG]&mat=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]</string> - </map> <key>SelectMovableOnly</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index c658963708..595d84f9f0 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,8 @@ #include "lluri.h" #include "llagent.h" #include "llui.h" +#include "llviewercontrol.h" +#include "llweb.h" LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), @@ -65,7 +67,6 @@ BOOL LLFloaterSearch::postBuild() { mBrowser->addObserver(this); mBrowser->setTrusted(true); - mBrowser->setHomePageUrl(getString("search_url")); } return TRUE; @@ -113,33 +114,32 @@ void LLFloaterSearch::search(const LLSD &key) childHide("refresh_search"); mSearchGodLevel = gAgent.getGodLevel(); - // get the URL for the search page - std::string url = getString("search_url"); - if (! LLStringUtil::endsWith(url, "/")) - { - url += "/"; - } - // work out the subdir to use based on the requested category + LLSD subs; std::string category = key.has("category") ? key["category"].asString() : ""; if (mCategoryPaths.has(category)) { - url += mCategoryPaths[category].asString(); + subs["CATEGORY"] = mCategoryPaths[category].asString(); } else { - url += mCategoryPaths["all"].asString(); + subs["CATEGORY"] = mCategoryPaths["all"].asString(); } - // append the search query string + // add the search query string std::string search_text = key.has("id") ? key["id"].asString() : ""; - url += std::string("?q=") + LLURI::escape(search_text); + subs["QUERY"] = LLURI::escape(search_text); - // append the permissions token that login.cgi gave us + // add the permissions token that login.cgi gave us + // We use "search_token", and fallback to "auth_token" if not present. LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - url += "&p=" + search_token.asString(); + if (search_token.asString().empty()) + { + search_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + subs["AUTH_TOKEN"] = search_token.asString(); - // also append the user's preferred maturity (can be changed via prefs) + // add the user's preferred maturity (can be changed via prefs) std::string maturity; if (gAgent.prefersAdult()) { @@ -153,14 +153,15 @@ void LLFloaterSearch::search(const LLSD &key) { maturity = "13"; // PG } - url += "&r=" + maturity; - - // add the current localization information - url += "&lang=" + LLUI::getLanguage(); + subs["MATURITY"] = maturity; // add the user's god status - std::string godlike = gAgent.isGodlike() ? "1" : "0"; - url += "&g=" + godlike; + subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; + + // get the search URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string url = gSavedSettings.getString("SearchURL"); + url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view mBrowser->navigateTo(url); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 85259fdc1e..9f69ed3964 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -887,6 +887,8 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + // mFormattedImage gauranteed to not be NULL since cur_size != 0 + mLoadedDiscard = mFormattedImage->getDiscardLevel(); mState = DECODE_IMAGE; return false; // use what we have } diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index b8f91697e5..5af79b4fd3 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -81,8 +81,7 @@ void LLViewerHelp::showTopic(const std::string &topic) // work out the URL for this topic and display it showHelp(); - const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); - std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); + std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic ); setRawURL( helpURL ); } diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index df08470518..5ba4fc834c 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -34,12 +34,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewerhelputil.h" -#include "llcontrol.h" +#include "llsd.h" #include "llstring.h" -#include "llsys.h" #include "lluri.h" -#include "llversioninfo.h" - +#include "llweb.h" +#include "llviewercontrol.h" ////////////////////////////////////////////// // Build a help URL from a topic and formatter @@ -59,40 +58,14 @@ std::string LLViewerHelpUtil::helpURLEncode( const std::string &component ) return escaped; } -static std::string buildHelpVersion( const U32 ver_int ) -{ - std::ostringstream ver_str; - ver_str << ver_int; - return ver_str.str(); // not encoded - numbers are rfc3986-safe -} - //static -std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo ) +std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic) { - std::string helpURL = savedSettings.getString("HelpURLFormat"); LLSD substitution; substitution["TOPIC"] = helpURLEncode(topic); - substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName")); - - substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion()); - substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor()); - substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor()); - substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch()); - substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild()); - - substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple()); - - std::string language = savedSettings.getString("Language"); - if( language.empty() || language == "default" ) - { - language = savedSettings.getString("SystemLanguage"); - } - substitution["LANGUAGE"] = helpURLEncode(language); - - LLStringUtil::format(helpURL, substitution); - - return helpURL; + // get the help URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string helpURL = gSavedSettings.getString("HelpURLFormat"); + return LLWeb::expandURLSubstitutions(helpURL, substitution); } diff --git a/indra/newview/llviewerhelputil.h b/indra/newview/llviewerhelputil.h index 8ee0d96023..95e6744842 100644 --- a/indra/newview/llviewerhelputil.h +++ b/indra/newview/llviewerhelputil.h @@ -41,9 +41,7 @@ class LLViewerHelpUtil { public: static std::string helpURLEncode( const std::string &component ); - static std::string buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo); + static std::string buildHelpURL( const std::string &topic ); }; #endif // header guard diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index 58630978c4..6299b4fabd 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -35,12 +35,11 @@ #include "llviewerhome.h" #include "lllogininstance.h" +#include "llsd.h" #include "llui.h" #include "lluri.h" -#include "llsd.h" -#include "llversioninfo.h" #include "llviewercontrol.h" -#include "llviewernetwork.h" +#include "llweb.h" //static std::string LLViewerHome::getHomeURL() @@ -49,16 +48,12 @@ std::string LLViewerHome::getHomeURL() // this value from settings.xml and support various substitutions LLSD substitution; - substitution["VERSION"] = LLVersionInfo::getVersion(); - substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName")); - substitution["LANGUAGE"] = LLUI::getLanguage(); - substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); - substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey()); + // get the home URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) std::string homeURL = gSavedSettings.getString("HomeSidePanelURL"); - LLStringUtil::format(homeURL, substitution); - - return homeURL; + return LLWeb::expandURLSubstitutions(homeURL, substitution); } //static @@ -67,7 +62,13 @@ std::string LLViewerHome::getAuthKey() // return the value of the (optional) auth token returned by login.cgi // this lets the server provide an authentication token that we can // blindly pass to the Home web page for it to perform authentication. - static const std::string authKeyName("home_sidetray_token"); - return LLLoginInstance::getInstance()->getResponse(authKeyName); + // We use "home_sidetray_token", and fallback to "auth_token" if not + // present. + LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token"); + if (auth_token.asString().empty()) + { + auth_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + return auth_token.asString(); } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 367c0c8343..103a70e032 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -561,11 +561,22 @@ bool LLViewerMedia::getInWorldMediaDisabled() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest) +bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) { bool result = false; - if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id) + if (NULL == object) + { + result = false; + } + // Focused? Then it is interesting! + else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID()) + { + result = true; + } + // Selected? Then it is interesting! + // XXX Sadly, 'contains()' doesn't take a const :( + else if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(object))) { result = true; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 26b822aba6..7151186089 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,7 +112,7 @@ class LLViewerMedia static void setInWorldMediaDisabled(bool disabled); static bool getInWorldMediaDisabled(); - static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest); + static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); // Returns the priority-sorted list of all media impls. static impl_list &getPriorityList(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 801bd90423..f98aa361e0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -139,7 +139,7 @@ public: } virtual bool isInterestingEnough() const { - return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest()); + return LLViewerMedia::isInterestingEnough(mObject, getMediaInterest()); } virtual std::string getCapabilityUrl(const std::string &name) const @@ -204,8 +204,8 @@ void LLVOVolume::markDead() if (!mDead) { LLMediaDataClientObject::ptr_t obj = new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false); - sObjectMediaClient->removeFromQueue(obj); - sObjectMediaNavigateClient->removeFromQueue(obj); + if (sObjectMediaClient) sObjectMediaClient->removeFromQueue(obj); + if (sObjectMediaNavigateClient) sObjectMediaNavigateClient->removeFromQueue(obj); // Detach all media impls from this object for(U32 i = 0 ; i < mMediaImplList.size() ; i++) @@ -222,15 +222,18 @@ void LLVOVolume::markDead() void LLVOVolume::initClass() { // gSavedSettings better be around - const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); - const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); - const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); - const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); - const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); - sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, - max_sorted_queue_size, max_round_robin_queue_size); - sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, - max_retries, max_sorted_queue_size, max_round_robin_queue_size); + if (gSavedSettings.getBOOL("PrimMediaMasterEnabled")) + { + const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); + const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); + const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); + const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); + const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); + sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, + max_sorted_queue_size, max_round_robin_queue_size); + sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, + max_retries, max_sorted_queue_size, max_round_robin_queue_size); + } } // static @@ -1719,14 +1722,15 @@ LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id) void LLVOVolume::requestMediaDataUpdate(bool isNew) { - sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); + if (sObjectMediaClient) + sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); } bool LLVOVolume::isMediaDataBeingFetched() const { // I know what I'm doing by const_casting this away: this is just // a wrapper class that is only going to do a lookup. - return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)); + return (sObjectMediaClient) ? sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)) : false; } void LLVOVolume::cleanUpMediaImpls() @@ -1925,7 +1929,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu // "bounce back" to the current URL from the media entry mediaNavigateBounceBack(face_index); } - else + else if (sObjectMediaNavigateClient) { llinfos << "broadcasting navigate with URI " << new_location << llendl; @@ -1994,7 +1998,8 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, void LLVOVolume::sendMediaDataUpdate() { - sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); + if (sObjectMediaClient) + sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); } void LLVOVolume::removeMediaImpl(S32 texture_index) diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index c056c84e19..f8bb7336db 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,11 +38,18 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() -#include "llviewerwindow.h" -#include "llviewercontrol.h" +#include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" +#include "lllogininstance.h" +#include "llsd.h" #include "lltoastalertpanel.h" +#include "llui.h" +#include "lluri.h" +#include "llversioninfo.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerwindow.h" class URLLoader : public LLToastAlertPanel::URLLoader { @@ -122,3 +129,24 @@ std::string LLWeb::escapeURL(const std::string& url) } return escaped_url; } + +//static +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) +{ + LLSD substitution = default_subs; + substitution["VERSION"] = LLVersionInfo::getVersion(); + substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor(); + substitution["VERSION_MINOR"] = LLVersionInfo::getMinor(); + substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); + substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); + substitution["CHANNEL"] = LLVersionInfo::getChannel(); + substitution["LANGUAGE"] = LLUI::getLanguage(); + substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + + std::string expanded_url = url; + LLStringUtil::format(expanded_url, substitution); + + return LLWeb::escapeURL(expanded_url); +} diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index 96a53db2ca..f4666c9280 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -57,8 +57,11 @@ public: /// Load the given url in the operating system's web browser static void loadURLExternal(const std::string& url); - // Returns escaped url (eg, " " to "%20") - used by all loadURL methods + /// Returns escaped url (eg, " " to "%20") - used by all loadURL methods static std::string escapeURL(const std::string& url); + /// Expands various strings like [LANG], [VERSION], etc. in a URL + static std::string expandURLSubstitutions(const std::string &url, + const LLSD &default_subs); }; #endif diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 282eddf380..73b5222ee3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7268,13 +7268,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) updateCull(camera, ref_result, 1); stateSort(camera, ref_result); } - else - { - gGL.setColorMask(true, true); - mWaterRef.clear(); - gGL.setColorMask(true, false); - } - + ref_mask = mRenderTypeMask; mRenderTypeMask = mask; } diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index e6bdcdf78e..9c1a5499db 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -13,10 +13,6 @@ title="FIND" width="670"> <floater.string - name="search_url"> - http://int.searchwww-phx0.damballah.lindenlab.com/viewer - </floater.string> - <floater.string name="loading_text"> Loading... </floater.string> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a7def5306e..a65f7d3a54 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -3,7 +3,7 @@ border="true" follows="left|top|right|bottom" height="408" - label="Input & Camera" + label="Setup" layout="topleft" left="102" name="Input panel" @@ -223,7 +223,7 @@ follows="left|top" height="23" label="Reset" - label_selected="Set" + label_selected="Reset" layout="topleft" left_pad="3" name="reset_cache" diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 68743357a6..ec612c4606 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -36,54 +36,59 @@ #include "../test/lltut.h" #include "../llviewerhelputil.h" -#include "../llversioninfo.h" +#include "../llweb.h" #include "llcontrol.h" -#include "llsys.h" #include <iostream> -//---------------------------------------------------------------------------- -// Implementation of enough of LLControlGroup to support the tests: +// values for all of the supported substitutions parameters +static std::string gHelpURL; +static std::string gVersion; +static std::string gChannel; +static std::string gLanguage; +static std::string gGrid; +static std::string gOS; -static std::map<std::string,std::string> test_stringvec; +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing LLControlGroup::LLControlGroup(const std::string& name) - : LLInstanceTracker<LLControlGroup, std::string>(name) -{ -} - -LLControlGroup::~LLControlGroup() -{ -} - -// Implementation of just the LLControlGroup methods we requre + : LLInstanceTracker<LLControlGroup, std::string>(name) {} +LLControlGroup::~LLControlGroup() {} BOOL LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, - BOOL persist) -{ - test_stringvec[name] = initial_val; - return true; -} - -void LLControlGroup::setString(const std::string& name, const std::string& val) + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) { - test_stringvec[name] = val; + if (name == "HelpURLFormat") + return gHelpURL; + return ""; } +LLControlGroup gSavedSettings("test"); -std::string LLControlGroup::getString(const std::string& name) +static void substitute_string(std::string &input, const std::string &search, const std::string &replace) { - return test_stringvec[name]; + size_t pos = input.find(search); + while (pos != std::string::npos) + { + input = input.replace(pos, search.size(), replace); + pos = input.find(search); + } } -S32 LLVersionInfo::getMajor() { return 2; } -S32 LLVersionInfo::getMinor() { return 0; } -S32 LLVersionInfo::getPatch() { return 0; } -S32 LLVersionInfo::getBuild() { return 200099; } -const std::string &LLVersionInfo::getVersion() +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) { - static std::string version = "2.0.0.200099"; - return version; + std::string new_url = url; + substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString()); + substitute_string(new_url, "[VERSION]", gVersion); + substitute_string(new_url, "[CHANNEL]", gChannel); + substitute_string(new_url, "[LANGUAGE]", gLanguage); + substitute_string(new_url, "[GRID]", gGrid); + substitute_string(new_url, "[OS]", gOS); + return new_url; } //---------------------------------------------------------------------------- @@ -101,41 +106,52 @@ namespace tut template<> template<> void viewerhelputil_object_t::test<1>() { - LLOSInfo osinfo; - LLControlGroup cgr("test"); - cgr.declareString("HelpURLFormat", "fooformat", "declared_for_test", FALSE); - cgr.declareString("VersionChannelName", "foochannelname", "declared_for_test", FALSE); - cgr.declareString("Language", "foolanguage", "declared_for_test", FALSE); std::string topic("test_topic"); - std::string subresult; - cgr.setString("HelpURLFormat", "fooformat"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "fooformat"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("no substitution tags", subresult, "fooformat"); - cgr.setString("HelpURLFormat", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("blank substitution format", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[TOPIC]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("topic name", subresult, "test_topic"); + + gHelpURL = "[LANGUAGE]"; + gLanguage = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution with blank", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution", subresult, "Esperanto"); - cgr.setString("HelpURLFormat", "[XXX]"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "http://secondlife.com/[LANGUAGE]"; + gLanguage = "Gaelic"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("simple substitution with url", subresult, "http://secondlife.com/Gaelic"); + + gHelpURL = "[XXX]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("unknown substitution", subresult, "[XXX]"); - cgr.setString("HelpURLFormat", "[LANGUAGE]/[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]/[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("multiple substitution", subresult, "Esperanto/Esperanto"); + + gHelpURL = "http://[CHANNEL]/[VERSION]/[LANGUAGE]/[OS]/[GRID]/[XXX]"; + gChannel = "Second Life Test"; + gVersion = "2.0"; + gLanguage = "gaelic"; + gOS = "AmigaOS 2.1"; + gGrid = "mysim"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("complex substitution", subresult, "http://Second Life Test/2.0/gaelic/AmigaOS 2.1/mysim/[XXX]"); } - } diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 32fdd41be2..d6d6aa48d1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -324,6 +324,7 @@ class WindowsManifest(ViewerManifest): self.path("qtnetwork4.dll") self.path("qtopengl4.dll") self.path("qtwebkit4.dll") + self.path("qtxmlpatterns4.dll") self.path("ssleay32.dll") self.end_prefix() diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt index 0011daaec6..89e2d8582d 100644 --- a/indra/test_apps/llplugintest/CMakeLists.txt +++ b/indra/test_apps/llplugintest/CMakeLists.txt @@ -338,6 +338,13 @@ add_custom_command(TARGET llmediaplugintest POST_BUILD DEPENDS ${BUILT_SLPLUGIN} ) +get_target_property(BUILT_LLCOMMON llcommon LOCATION) +add_custom_command(TARGET llmediaplugintest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_LLCOMMON} ${PLUGINS_DESTINATION_DIR} + DEPENDS ${BUILT_LLCOMMON} +) + + if (DARWIN OR WINDOWS) get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION) add_custom_command(TARGET llmediaplugintest POST_BUILD @@ -435,6 +442,7 @@ if(WINDOWS) qtnetwork4.dll qtopengl4.dll qtwebkit4.dll + qtxmlpatterns4.dll ssleay32.dll ) copy_if_different( diff --git a/install.xml b/install.xml index 2d60f07c11..2e317755da 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard</string> <key>darwin</key> <map> <key>md5sum</key> - <string>7f818f13faf7c02838fe66f7d27e1913</string> + <string>44fe5bca65db2951ce91b5b6c8596ee0</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-darwin-20091124.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20091215.tar.bz2</uri> </map> <key>linux</key> <map> @@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard</string> <key>windows</key> <map> <key>md5sum</key> - <string>92cff05661b5547caae7cc6c66d09870</string> + <string>3846354e2e20a98c0401317eb114ff5e</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091123.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20091215.tar.bz2</uri> </map> </map> </map> |