diff --git a/doc/contributions.txt b/doc/contributions.txt
index 4cabb84b1034af760667cf16d4f0d9384e2edc93..4c56ef86dcab421c8c8ea89967292b0a313e79b2 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -282,6 +282,7 @@ Beq Janus
 	SL-11300
 	SL-15709
 	SL-16021
+	SL-18592
 	SL-18637
 Beth Walcher
 Bezilon Kasei
@@ -373,6 +374,7 @@ Charlie Sazaland
 Chaser Zaks
     BUG-225599
     BUG-227485
+    SL-16874
 Cherry Cheevers
 ChickyBabes Zuzu
 Chorazin Allen
@@ -1381,6 +1383,7 @@ Sovereign Engineer
     OPEN-343
 	SL-11625
     BUG-229030
+	SL-14696
 	SL-14705
 	SL-14706
 	SL-14707
@@ -1388,6 +1391,12 @@ Sovereign Engineer
 	SL-14732
 	SL-15096
 	SL-16127
+	SL-18249
+    SL-18394
+    SL-18412
+    SL-18497
+    SL-18525
+    SL-18534
 SpacedOut Frye
 	VWR-34
 	VWR-45
@@ -1650,6 +1659,8 @@ Zi Ree
 	VWR-25588
 	STORM-1790
 	STORM-1842
+	SL-18348
+	SL-18593
 Zipherius Turas
 	VWR-76
 	VWR-77
diff --git a/indra/cmake/FindOpenJPEG.cmake b/indra/cmake/FindOpenJPEG.cmake
index 949384eec4e1d0d9d245883d8d821710ed39c539..2d4353b54f991881e9620da269c8a86aee1433d5 100644
--- a/indra/cmake/FindOpenJPEG.cmake
+++ b/indra/cmake/FindOpenJPEG.cmake
@@ -14,9 +14,10 @@ FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
 /usr/local/include
 /usr/include/openjpeg
 /usr/include
+include/openjpeg
 )
 
-SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
+SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjp2)
 FIND_LIBRARY(OPENJPEG_LIBRARY
   NAMES ${OPENJPEG_NAMES}
   PATHS /usr/lib /usr/local/lib
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index be0a875848903cee851e3e2dac7a57f5f1b69dd7..acbd4b5f7d7ebb50e91f4293e1df4e533801fcdb 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -284,12 +284,12 @@ LLAvatarAppearance::~LLAvatarAppearance()
 		}
 	}
 
-	if (mRoot)
-    {
-        mRoot->removeAllChildren();
-        delete mRoot;
+	if (mRoot) 
+	{
+		mRoot->removeAllChildren();
+		delete mRoot;
 		mRoot = nullptr;
-    }
+	}
 	mJointMap.clear();
 
 	clearSkeleton();
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 2b10a1b691829308e98f79287b17e805e3c75125..5c9e7e511c9fe0403a2d8aab976fd94e89f1b49d 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -284,25 +284,15 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
     return name;
 }
 
+namespace
+{
+
 #if LL_WINDOWS
 
 static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
 
-U32 cpp_exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop, const std::string& name)
+U32 exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop)
 {
-    // C++ exceptions were logged in toplevelTryWrapper, but not SEH
-    // log SEH exceptions here, to make sure it gets into bugsplat's 
-    // report and because __try won't allow std::string operations
-    if (code != STATUS_MSC_EXCEPTION)
-    {
-        LL_WARNS() << "SEH crash in " << name << ", code: " << code << LL_ENDL;
-    }
-    // Handle bugsplat here, since GetExceptionInformation() can only be
-    // called from within filter for __except(filter), not from __except's {}
-    // Bugsplat should get all exceptions, C++ and SEH
-    LLApp::instance()->reportCrashToBugsplat(exception_infop);
-
-    // Only convert non C++ exceptions.
     if (code == STATUS_MSC_EXCEPTION)
     {
         // C++ exception, go on
@@ -315,28 +305,38 @@ U32 cpp_exception_filter(U32 code, struct _EXCEPTION_POINTERS *exception_infop,
     }
 }
 
-void LLCoros::sehHandle(const std::string& name, const LLCoros::callable_t& callable)
+void sehandle(const LLCoros::callable_t& callable)
 {
     __try
     {
-        LLCoros::toplevelTryWrapper(name, callable);
+        callable();
     }
-    __except (cpp_exception_filter(GetExceptionCode(), GetExceptionInformation(), name))
+    __except (exception_filter(GetExceptionCode(), GetExceptionInformation()))
     {
-        // convert to C++ styled exception for handlers other than bugsplat
+        // convert to C++ styled exception
         // Note: it might be better to use _se_set_translator
         // if you want exception to inherit full callstack
-        //
-        // in case of bugsplat this will get to exceptionTerminateHandler and
-        // looks like fiber will terminate application after that
         char integer_string[512];
-        snprintf(integer_string, 512, "SEH crash in %s, code: %lu\n", name.c_str(), GetExceptionCode());
+        snprintf(integer_string, 512, "SEH, code: %lu\n", GetExceptionCode());
         throw std::exception(integer_string);
     }
 }
-#endif
 
-void LLCoros::toplevelTryWrapper(const std::string& name, const callable_t& callable)
+#else  // ! LL_WINDOWS
+
+inline void sehandle(const LLCoros::callable_t& callable)
+{
+    callable();
+}
+
+#endif // ! LL_WINDOWS
+
+} // anonymous namespace
+
+// Top-level wrapper around caller's coroutine callable.
+// Normally we like to pass strings and such by const reference -- but in this
+// case, we WANT to copy both the name and the callable to our local stack!
+void LLCoros::toplevel(std::string name, callable_t callable)
 {
     // keep the CoroData on this top-level function's stack frame
     CoroData corodata(name);
@@ -346,12 +346,12 @@ void LLCoros::toplevelTryWrapper(const std::string& name, const callable_t& call
     // run the code the caller actually wants in the coroutine
     try
     {
-        callable();
+        sehandle(callable);
     }
     catch (const Stop& exc)
     {
         LL_INFOS("LLCoros") << "coroutine " << name << " terminating because "
-            << exc.what() << LL_ENDL;
+                            << exc.what() << LL_ENDL;
     }
     catch (const LLContinueError&)
     {
@@ -362,36 +362,14 @@ void LLCoros::toplevelTryWrapper(const std::string& name, const callable_t& call
     }
     catch (...)
     {
-#if LL_WINDOWS
-        // Any OTHER kind of uncaught exception will cause the viewer to
-        // crash, SEH handling should catch it and report to bugsplat.
-        LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << name));
-        // to not modify callstack
-        throw;
-#else
         // Stash any OTHER kind of uncaught exception in the rethrow() queue
         // to be rethrown by the main fiber.
         LL_WARNS("LLCoros") << "Capturing uncaught exception in coroutine "
                             << name << LL_ENDL;
         LLCoros::instance().saveException(name, std::current_exception());
-#endif
     }
 }
 
-// Top-level wrapper around caller's coroutine callable.
-// Normally we like to pass strings and such by const reference -- but in this
-// case, we WANT to copy both the name and the callable to our local stack!
-void LLCoros::toplevel(std::string name, callable_t callable)
-{
-#if LL_WINDOWS
-    // Because SEH can's have unwinding, need to call a wrapper
-    // 'try' is inside SEH handling to not catch LLContinue
-    sehHandle(name, callable);
-#else
-    toplevelTryWrapper(name, callable);
-#endif
-}
-
 //static
 void LLCoros::checkStop()
 {
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index a68e1ddbfcf685c4d9e4d3b087b3d9c2e4d32f5e..c5871f070d2ea0bf2e9ae2d0902f7a871f4076ca 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -307,11 +307,7 @@ class LL_COMMON_API LLCoros final : public LLSingleton<LLCoros>
 
 private:
     std::string generateDistinctName(const std::string& prefix) const;
-    void toplevelTryWrapper(const std::string& name, const callable_t& callable);
-#if LL_WINDOWS
-    void sehHandle(const std::string& name, const callable_t& callable); // calls toplevelTryWrapper
-#endif
-    void toplevel(std::string name, callable_t callable); // calls sehHandle or toplevelTryWrapper
+    void toplevel(std::string name, callable_t callable);
     struct CoroData;
     static CoroData& get_CoroData(const std::string& caller);
     void saveException(const std::string& name, std::exception_ptr exc);
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 3a28f521d5474a0d1e512befc6f0b501167f119c..065df86b53a63bffc30c0240a1337f4cf53c49b3 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -2161,12 +2161,8 @@ std::string zip_llsd(LLSD& data)
 // and deserializes from that copy using LLSDSerialize
 LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, std::istream& is, S32 size)
 {
-	std::unique_ptr<U8[]> in;
-	try
-	{
-		in = std::unique_ptr<U8[]>(new U8[size]);
-	}
-	catch(const std::bad_alloc&)
+	std::unique_ptr<U8[]> in = std::unique_ptr<U8[]>(new(std::nothrow) U8[size]);
+	if (!in)
 	{
 		return ZR_MEM_ERROR;
 	}
@@ -2181,19 +2177,12 @@ LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, const U8* in, S32
 	U32 cur_size = 0;
 	z_stream strm;
 		
-	constexpr U32 CHUNK = 1024 * 256;
+	constexpr U32 CHUNK = 1024 * 512;
 
 	static thread_local std::unique_ptr<U8[]> out;
 	if (!out)
 	{
-		try
-		{
-			out = std::unique_ptr<U8[]>(new U8[CHUNK]);
-		}
-		catch (const std::bad_alloc&)
-		{
-			return ZR_MEM_ERROR;
-		}
+		out = std::unique_ptr<U8[]>(new(std::nothrow) U8[CHUNK]);
 	}
 		
 	strm.zalloc = Z_NULL;
diff --git a/indra/llfilesystem/lldir_mac.cpp b/indra/llfilesystem/lldir_mac.cpp
index a706b800aa1f23463511aec8c53e5776a60eda80..3dfd24acdac73522a14fdc66266b4598f0dce954 100644
--- a/indra/llfilesystem/lldir_mac.cpp
+++ b/indra/llfilesystem/lldir_mac.cpp
@@ -127,9 +127,7 @@ LLDir_Mac::LLDir_Mac()
     
 		//mOSCacheDir
         std::string cachedir =  getSystemCacheFolder();
-
         if (!cachedir.empty())
-		
 		{
             mOSCacheDir = cachedir;
             //TODO:  This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife.  Last dir level could go away.
diff --git a/indra/llfilesystem/lldir_utils_objc.mm b/indra/llfilesystem/lldir_utils_objc.mm
index 663e756818bf002ccbc2fac9fd37a50cc4798f0d..20540fb93cd2d85e1d4a554cb8c92d4c3ce09341 100644
--- a/indra/llfilesystem/lldir_utils_objc.mm
+++ b/indra/llfilesystem/lldir_utils_objc.mm
@@ -32,20 +32,23 @@
 
 std::string getSystemTempFolder()
 {
+    std::string result;
     @autoreleasepool {
         NSString * tempDir = NSTemporaryDirectory();
         if (tempDir == nil)
             tempDir = @"/tmp";
-        return std::string([tempDir UTF8String]);
+        result = std::string([tempDir UTF8String]);
     }
+    
+    return result;
 }
 
 //findSystemDirectory scoped exclusively to this file. 
 std::string findSystemDirectory(NSSearchPathDirectory searchPathDirectory,
                                    NSSearchPathDomainMask domainMask)
 {
+    std::string result;
     @autoreleasepool {
-        std::string result;
         NSString *path = nil;
         
         // Search for the path
@@ -57,31 +60,36 @@ std::string findSystemDirectory(NSSearchPathDirectory searchPathDirectory,
             path = [paths objectAtIndex:0];
             //HACK:  Always attempt to create directory, ignore errors.
             NSError *error = nil;
-
+            
             [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error];
-
+            
             
             result = std::string([path UTF8String]);
         }
-
-        return result;
     }
+    return result;
 }
 
 std::string getSystemExecutableFolder()
 {
+    std::string result;
     @autoreleasepool {
         NSString *bundlePath = [[NSBundle mainBundle] executablePath];
-        return std::string([bundlePath UTF8String]);
+        result = std::string([bundlePath UTF8String]);
     }
+
+    return result;
 }
 
 std::string getSystemResourceFolder()
 {
+    std::string result;
     @autoreleasepool {
         NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
-        return std::string([bundlePath UTF8String]);
+        result = std::string([bundlePath UTF8String]);
     }
+    
+    return result;
 }
 
 std::string getSystemCacheFolder()
diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp
index 3becd96824eaccaa388fa9a2a51ee564f31dde98..5dd8af449082c7793feabbaa2fd409ef3b342dae 100644
--- a/indra/llimage/llpngwrapper.cpp
+++ b/indra/llimage/llpngwrapper.cpp
@@ -258,7 +258,6 @@ void LLPngWrapper::normalizeImage()
 	}
 
 	const F64 SCREEN_GAMMA = 2.2;
-
 	if (png_get_gAMA(mReadPngPtr, mReadInfoPtr, &mGamma))
 	{
 		png_set_gamma(mReadPngPtr, SCREEN_GAMMA, mGamma);
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 44dca35926981de8c47527092d44eff1fea254ae..c28e966db5a68792a732108aec748c890c5aa0c2 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2386,7 +2386,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
 
 bool LLVolume::unpackVolumeFaces(U8* in_data, S32 size)
 {
-	//input stream is now pointing at a zlib compressed block of LLSD
+	//input data is now pointing at a zlib compressed block of LLSD
 	//decompress block
 	LLSD mdl;
 	U32 uzip_result = LLUZipHelper::unzip_llsd(mdl, in_data, size);
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp
index 64cd1c2ad0a5259190faf420c3c17d76863d5a05..9f7768f78ec6f13c7f4fdc75b389ac11f72f9ed8 100644
--- a/indra/llmessage/lldatapacker.cpp
+++ b/indra/llmessage/lldatapacker.cpp
@@ -754,14 +754,13 @@ BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n
 
 BOOL LLDataPackerAsciiBuffer::unpackString(std::string& value, const char *name)
 {
-	BOOL success = TRUE;
 	char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/
 	if (!getValueStr(name, valuestr, DP_BUFSIZE))  // NULL terminated
 	{
 		return FALSE;
 	}
 	value = valuestr;
-	return success;
+	return TRUE;
 }
 
 
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index b119cbc89a459ebb88887536fa7c52a64958fd05..323d14e6adf8ed2e8beb5869aabbe59c437a285c 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -514,7 +514,13 @@ LLFlatListView::LLFlatListView(const LLFlatListView::Params& p)
 
 LLFlatListView::~LLFlatListView()
 {
-	delete_and_clear(mItemPairs);
+	for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it)
+	{
+		mItemsPanel->removeChild((*it)->first);
+		(*it)->first->die();
+		delete *it;
+	}
+	mItemPairs.clear();
 }
 
 // virtual
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 8363a61dcbad84fac823ba3e2cc64f806424e843..089c0fc66162342cf009222ec9936cddcd1b20f0 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1476,7 +1476,7 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
 		}
 	}
 	bool hide_folder_menu = mSuppressFolderMenu && isFolderSelected();
-	if ((menu && handled
+	if (menu && (handled
 		&& ( count > 0 && (hasVisibleChildren()) )) && // show menu only if selected items are visible
 		!hide_folder_menu)
 	{
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 8ce987e81247375ac1ed865cedc4b15b310232d8..c6eb6b12d1be30adfb21e05e654beae11511d4f5 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -4106,7 +4106,7 @@ LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
 	LLContextMenu* branch = static_cast<LLContextMenu*>(p.branch);
 	if (branch)
 	{
-		mBranchHandle = branch->getHandle();
+		mBranch = branch->getHandle();
 		branch->hide();
 		branch->setParentMenuItem(this);
 	}
@@ -4114,9 +4114,9 @@ LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
 
 LLContextMenuBranch::~LLContextMenuBranch()
 {
-	if (mBranchHandle.get())
+	if (mBranch.get())
 	{
-		mBranchHandle.get()->die();
+		mBranch.get()->die();
 	}
 }
 
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 3933474371e585f7b4420a9a51fc3de8108f297b..bd84e486c96c6f8e2454e98688beb17b24d68c8a 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1352,14 +1352,14 @@ LLScrollListItem* LLScrollListCtrl::getItemByLabel(const std::string& label, BOO
 }
 
 
-BOOL LLScrollListCtrl::selectItemByPrefix(const std::string& target, BOOL case_sensitive)
+BOOL LLScrollListCtrl::selectItemByPrefix(const std::string& target, BOOL case_sensitive, S32 column)
 {
-	return selectItemByPrefix(utf8str_to_wstring(target), case_sensitive);
+	return selectItemByPrefix(utf8str_to_wstring(target), case_sensitive, column);
 }
 
 // Selects first enabled item that has a name where the name's first part matched the target string.
 // Returns false if item not found.
-BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sensitive)
+BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sensitive, S32 column)
 {
 	BOOL found = FALSE;
 
@@ -1374,7 +1374,7 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen
 		{
 			LLScrollListItem* item = *iter;
 			// Only select enabled items with matching names
-			LLScrollListCell* cellp = item->getColumn(getSearchColumn());
+			LLScrollListCell* cellp = item->getColumn(column == -1 ? getSearchColumn() : column);
 			BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE;
 			if (select)
 			{
@@ -1397,7 +1397,7 @@ BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sen
 			LLScrollListItem* item = *iter;
 
 			// Only select enabled items with matching names
-			LLScrollListCell* cellp = item->getColumn(getSearchColumn());
+			LLScrollListCell* cellp = item->getColumn(column == -1 ? getSearchColumn() : column);
 			if (!cellp)
 			{
 				continue;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index ff83b2db8581e2bb1df1e17ddb3bf89d8cea087f..bef7bc72ef48cabbae057c607d7098ce9e7bb317 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -263,8 +263,8 @@ class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
 	virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
 
 	BOOL			selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 );		// FALSE if item not found
-	BOOL			selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE);
-	BOOL			selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE);
+	BOOL			selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE, S32 column = -1);
+	BOOL			selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE, S32 column = -1);
 	LLScrollListItem*  getItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 );
 	const std::string	getSelectedItemLabel(S32 column = 0) const;
 	LLSD			getSelectedValue();
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 3f1728db8847ea8253e1eb2fb5a6eea95fac69fa..cd31b0f73a79bb14e3d96d745dd5b6c10a3f042e 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1447,7 +1447,11 @@ void LLTabContainer::selectLastTab()
 
 void LLTabContainer::selectNextTab()
 {
-	if (mTabList.empty()) return;
+    if (mTabList.size() == 0)
+    {
+        return;
+    }
+
 	BOOL tab_has_focus = FALSE;
 	if (mCurrentTabIdx >= 0 && mTabList[mCurrentTabIdx]->mButton->hasFocus())
 	{
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index 8fb6640ca883f5ecf805a02a52702b806ed3b8be..3fa3744a8724e4a4914b556d671a58d1d53fc88c 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -651,7 +651,7 @@ LLSD LLDXHardware::getDisplayInfo()
     }
 
 LCleanup:
-    if (ret.size() == 0)
+    if (!ret.isMap() || (ret.size() == 0))
     {
         LL_INFOS() << "Failed to get data, cleaning up" << LL_ENDL;
     }
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 580be288efdbfe455e530e0da68672cd093aa119..537342e41a301739ee3b5298d7a8d2eb64fc25f4 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -447,7 +447,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
     // e.g. OS Window for upload something or Input Window...
     // mModifiers instance variable is for insertText: or insertText:replacementRange:  (by Pell Smit)
 	mModifiers = [theEvent modifierFlags];
-    unichar ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
+    NSString *str_no_modifiers = [theEvent charactersIgnoringModifiers];
+    unichar ch = 0;
+    if (str_no_modifiers.length)
+    {
+        ch = [str_no_modifiers characterAtIndex:0];
+    }
     bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, ch);
 
     if (acceptsText &&
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 1badf4a136d08d4418af71473699cfd31ea5ecb4..1828cf39adc9e93d55be45c9e51ffce6a0aadf41 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -55,7 +55,7 @@ void setupCocoa()
             // ie. running './secondlife -set Language fr' would cause a pop-up saying can't open document 'fr'
             // when init'ing the Cocoa App window.
             [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
-        } // @autoreleasepool
+        }
 
 		inited = true;
 	}
@@ -91,10 +91,9 @@ unsigned short *copyFromPBoard()
             NSArray *objToPaste = [pboard readObjectsForClasses:classArray options:[NSDictionary dictionary]];
             str = [objToPaste objectAtIndex:0];
         }
-        NSUInteger len = [str length];
-        unichar* temp = (unichar*)calloc(len+1, sizeof(unichar));
-        [str getCharacters:temp range:NSMakeRange(0, len)];
-        
+        NSUInteger str_len = [str length];
+        unichar* temp = (unichar*)calloc(str_len+1, sizeof(unichar));
+        [str getCharacters:temp range:NSMakeRange(0, str_len)];
         return temp;
     }
 }
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index f8b9de6bd5c1c184eef83e56dcc338b9424b9a60..6b1d8005dcdb7ecc0f3561ca56c056e3ffdd6d26 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1259,9 +1259,10 @@ BOOL LLWindowMacOSX::isClipboardTextAvailable()
 
 BOOL LLWindowMacOSX::pasteTextFromClipboard(LLWString &dst)
 {
-    unsigned short* temp = copyFromPBoard();
-	llutf16string str(temp);
-    free(temp);
+    unsigned short* pboard_data = copyFromPBoard(); // must free returned data
+	llutf16string str(pboard_data);
+    free(pboard_data);
+
 	dst = utf16str_to_wstring(str);
 	if (dst != L"")
 	{
@@ -1298,7 +1299,7 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
 {
 	if (!mSupportedResolutions)
 	{
-		CFArrayRef modes = CGDisplayCopyAllDisplayModes(mDisplay, NULL);
+		CFArrayRef modes = CGDisplayCopyAllDisplayModes(mDisplay, nullptr);
 
 		if(modes != NULL)
 		{
@@ -1337,7 +1338,7 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
 					}
 				}
 			}
-			CFRelease(modes);
+            CFRelease(modes);
 		}
 	}
 
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 8067e8644bf59545e2ee4b03a3943fda8cecf700..9e860a1654b560e77890c09a9a45c8763a400fc3 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -226,6 +226,7 @@ class LLWindowMacOSX : public LLWindow
 	BOOL		mLanguageTextInputAllowed;
 	LLPreeditor*	mPreeditor;
 	
+public:
 	static BOOL	sUseMultGL;
 
 	friend class LLWindowManager;
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 12e41412939763fb74d07f838735c69ed5c3334f..5a33ecbd4c1cb7b4d4dc39127c0edf199755f235 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.9
+6.10
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 38cfe849f84f8e4464d7b74faf011af5fb5c9a1f..dc1a2435884fa518f331820812964623d9930888 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -17396,5 +17396,16 @@
     <key>Value</key>
     <string></string>
   </map>
+  <key>DebugSettingsHideDefault</key>
+  <map>
+    <key>Comment</key>
+    <string>Show non-default settings only in Debug Settings list</string>
+    <key>Persist</key>
+    <integer>0</integer>
+    <key>Type</key>
+    <string>Boolean</string>
+    <key>Value</key>
+    <integer>0</integer>
+  </map>
 </map>
 </llsd>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index da07f195772fb1a241347eefef079c90688af8ae..16e8e10e0ec7877aeeab09c2f946575ab6076c6a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -48,14 +48,12 @@ out vec4 frag_data[3];
 
 vec3 rainbow(float d)
 {
-    // d is the dot product of view and sun directions, so ranging -1.0..1.0
-    // 'interesting' values of d are the range -0.75..-0.825, when view is nearly opposite of sun vec
-    // Rainbox texture mode is GL_REPEAT, so tc of -.75 is equiv to 0.25, -0.825 equiv to 0.175.
-
-    // SL-13629 Rainbow texture has colors within the correct .175...250 range, but order is inverted.
-    // Rather than replace the texture, we mirror and translate the y tc to keep the colors within the
-    // interesting range, but in reversed order:  i.e. d = (1 - d) - 1.575
-    d = clamp(-0.575 - d, 0.0, 1.0);
+    // 'Interesting' values of d are -0.75 .. -0.825, i.e. when view vec nearly opposite of sun vec
+    // Rainbox tex is mapped with REPEAT, so -.75 as tex coord is same as 0.25.  -0.825 -> 0.175. etc.
+    // SL-13629
+    // Unfortunately the texture is inverted, so we need to invert the y coord, but keep the 'interesting'
+    // part within the same 0.175..0.250 range, i.e. d = (1 - d) - 1.575
+    d         = clamp(-0.575 - d, 0.0, 1.0);
 
     // With the colors in the lower 1/4 of the texture, inverting the coords leaves most of it inaccessible.
     // So, we can stretch the texcoord above the colors (ie > 0.25) to fill the entire remaining coordinate
@@ -64,7 +62,7 @@ vec3 rainbow(float d)
     d = clamp(d, 0.0, 0.25) + interior_coord;
 
     float rad = (droplet_radius - 5.0f) / 1024.0f;
-    return pow(texture2D(rainbow_map, vec2(rad, d)).rgb, vec3(1.8)) * moisture_level;
+    return pow(texture2D(rainbow_map, vec2(rad+0.5, d)).rgb, vec3(1.8)) * moisture_level;
 }
 
 vec3 halo22(float d)
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 999aab3a73d34638d686eb405cc6d7f9c5601c58..6db4690bfffddd1de1a31e5f1527a12f75c6d51f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -129,14 +129,13 @@ void main()
     haze_glow = (sun_moon_glow_factor < 1.0) ? 0.0 : (sun_moon_glow_factor * (haze_glow + 0.25));
 
     // Haze color above cloud
-    vec4 color = (blue_horizon * blue_weight * (sunlight + ambient_color) 
-               + haze_horizon * haze_weight * (sunlight * haze_glow + ambient_color));
+    vec4 color = (blue_horizon * blue_weight * (sunlight + ambient_color)
+               + (haze_horizon * haze_weight) * (sunlight * haze_glow + ambient_color));
 
     // Final atmosphere additive
     color *= (1. - combined_haze);
 
     // Increase ambient when there are more clouds
-    // TODO 9/20: DJH what does this do?  max(0,(1-ambient)) will change the color
     vec4 ambient = ambient_color + max(vec4(0), (1. - ambient_color)) * cloud_shadow * 0.5;
 
     // Dim sunlight by cloud shadow percentage
@@ -150,7 +149,7 @@ void main()
     combined_haze = sqrt(combined_haze);  // less atmos opacity (more transparency) below clouds
 
     // At horizon, blend high altitude sky color towards the darker color below the clouds
-    color += (add_below_cloud - color) * (1. - combined_haze);
+    color += (add_below_cloud - color) * (1. - sqrt(combined_haze));
 
     // Haze color above cloud
     vary_HazeColor = color;
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 55310558c731e3342e126c39f7a9a62ab40372d3..f9c816dd49bc1aa2ae0076b0e16ce743d8341c37 100644
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -96,8 +96,7 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
         LLSD dataToPost = LLSD::emptyMap();
         dataToPost[keystr.c_str()] = objectList;
 
-        LLAccountingCostObserver* observer = observerHandle.get();
-        observer = NULL;
+        LLAccountingCostObserver* observer = NULL;
 
         LLSD results = httpAdapter->postAndSuspend(httpRequest, url, dataToPost);
 
diff --git a/indra/newview/llagenthandler.cpp b/indra/newview/llagenthandler.cpp
index 6b086270f2990147cd122561c7ed4fde663594e8..8e0ee8664e46f58877d9789e1f87b4449c38d288 100644
--- a/indra/newview/llagenthandler.cpp
+++ b/indra/newview/llagenthandler.cpp
@@ -40,6 +40,30 @@ class LLAgentHandler : public LLCommandHandler
 	// requires trusted browser to trigger
 	LLAgentHandler() : LLCommandHandler("agent", UNTRUSTED_THROTTLE) { }
 
+    virtual bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type)
+    {
+        if (params.size() < 2)
+        {
+            return true; // don't block, will fail later
+        }
+
+        if (nav_type == NAV_TYPE_CLICKED)
+        {
+            return true;
+        }
+
+        const std::string verb = params[1].asString();
+        if (verb == "about" || verb == "inspect" || verb == "reportAbuse")
+        {
+            return true;
+        }
+        return false;
+    }
+
 	bool handle(const LLSD& params, const LLSD& query_map,
 		LLMediaCtrl* web)
 	{
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index b08ba3fdd044bdacd5c5409ed5291df3a56b1418..d8438b372b27e3cb8681875151d5debd1f2b6883 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -188,18 +188,17 @@
 
 - (bool) romanScript
 {
-    @autoreleasepool
-    {
+    @autoreleasepool {
         // How to add support for new languages with the input window:
         // Simply append this array with the language code (ja for japanese, ko for korean, zh for chinese, etc.)
-        NSArray *nonRomanScript = [[NSArray alloc] initWithObjects:@"ja", @"ko", @"zh-Hant", @"zh-Hans", nil];
+        NSArray* nonRomanScript = @[@"ja", @"ko", @"zh-Hant", @"zh-Hans"];
         if ([nonRomanScript containsObject:currentInputLanguage])
         {
             return false;
         }
-        
-        return true;
     }
+    
+    return true;
 }
 
 #if defined(LL_BUGSPLAT)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 410a0452e86a1c886c2a82d766baa75fa5675ba7..b4dd470f4811c5b6b97b3d3986c9595732f248da 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -155,6 +155,10 @@
 #include "vlc/libvlc_version.h"
 #endif
 
+#if LL_DARWIN
+#include "llwindowmacosx.h"
+#endif
+
 // Third party library includes
 #include <boost/bind.hpp>
 #include <boost/algorithm/string.hpp>
@@ -582,6 +586,7 @@ static void settings_to_globals()
     LLWorldMapView::setScaleSetting(gSavedSettings.getF32("MapScale"));
 	
 #if LL_DARWIN
+    LLWindowMacOSX::sUseMultGL = gSavedSettings.getBOOL("RenderAppleUseMultGL");
 	gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI");
 #endif
 }
@@ -1683,7 +1688,8 @@ bool LLAppViewer::cleanup()
 	{
 		if (!isSecondInstance())
 		{
-			LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
+            std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv");
+			LLSceneMonitor::instance().dumpToFile(dump_path);
 		}
 		LLSceneMonitor::deleteSingleton();
 	}
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 34dd1e870f3f1ae4fef0103c3004997600babea2..4f16a3063aec81c0195a14fc9c78febadec1241b 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -364,11 +364,10 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
 	}
 }
 
-// static
 // Called every frame - send render weight requests to every region
 void LLAvatarRenderInfoAccountant::idle()
 {
-	if (mRenderInfoScanTimer.hasExpired())
+	if (mRenderInfoScanTimer.hasExpired() && !LLApp::isExiting())
 	{
 		LL_DEBUGS("AvatarRenderInfo") << "Scanning regions for render info updates"
 									  << LL_ENDL;
diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp
index 1c69dadb1227041179d32bffe0b6ec6fd4999f5f..7ad06f8eaa41a089c6a54b7bc3ee4aac7a522f87 100644
--- a/indra/newview/llbuycurrencyhtml.cpp
+++ b/indra/newview/llbuycurrencyhtml.cpp
@@ -41,7 +41,7 @@ class LLBuyCurrencyHTMLHandler :
 {
 public:
 	// requests will be throttled from a non-trusted browser
-	LLBuyCurrencyHTMLHandler() : LLCommandHandler( "buycurrencyhtml", UNTRUSTED_ALLOW ) {}
+	LLBuyCurrencyHTMLHandler() : LLCommandHandler( "buycurrencyhtml", UNTRUSTED_THROTTLE) {}
 
 	bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
 	{
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index c9d72ce621ad61a086d9f68d3eb42cb373892222..d42048bf70ab206219665fdc82e564c9674ec534 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -717,11 +717,11 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
 				deleteTrackingData();
 			}
 
-			if(chat_notify)
-			{
-				// Look up the name of this agent for the notification
-				LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload));
-			}
+            if(chat_notify)
+            {
+                // Look up the name of this agent for the notification
+                LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload));
+            }
 		}
 
 		mModifyMask |= LLFriendObserver::ONLINE;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 34bb09c3b9dd96c68228b11a7d606db5967d187c..be9066b672237fa0d39d9ab301464fc72314670a 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -603,38 +603,6 @@ class LLChatHistoryHeader: public LLPanel
 
 	BOOL postBuild()
 	{
-// [AL:SE] - Patch: Menu-Optimization | Checked: 2021-01-05
-//		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-//		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar registrar_enable;
-//
-//		registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2));
-//		registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2));
-//		registrar_enable.add("AvatarIcon.Enable", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemEnabled, this, _2));
-//		registrar_enable.add("AvatarIcon.Visible", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemVisible, this, _2));
-//		registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2));
-//		registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
-//
-//		LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-//		if (menu)
-//		{
-//			mPopupMenuHandleAvatar = menu->getHandle();
-//		}
-//		else
-//		{
-//			LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL;
-//		}
-//
-//		menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-//		if (menu)
-//		{
-//			mPopupMenuHandleObject = menu->getHandle();
-//		}
-//		else
-//		{
-//			LL_WARNS() << " Failed to create menu_object_icon.xml" << LL_ENDL;
-//		}
-// [/AL:SE]
-
 		setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
 
 		setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3a4fbc4c8366173e994e9c424051c84325aa18df..f20cd821750dcf9a1104f79c8b75540a75ad8d3b 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -82,10 +82,10 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p)
 LLSysWellChiclet::~LLSysWellChiclet()
 {
 	mFlashToLitTimer->unset();
-	LLContextMenu* menu_avatar = static_cast<LLContextMenu*>(mContextMenuHandle.get());
-	if (menu_avatar)
+	LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get());
+	if (menu)
 	{
-		menu_avatar->die();
+		menu->die();
 		mContextMenuHandle.markDead();
 	}
 }
@@ -1240,7 +1240,7 @@ void LLInvOfferChiclet::createPopupMenu()
 	LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
 	registrar.add("InvOfferChiclet.Action", boost::bind(&LLInvOfferChiclet::onMenuItemClicked, this, _2));
 
-	auto menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>
+	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>
 		("menu_inv_offer_chiclet.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 	if (menu)
 	{
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp
index 23e2271eae55381e4e42194b58aa8438fbb57764..74f37961c7420043b19edba9df9f6714b98a0225 100644
--- a/indra/newview/llcommandhandler.cpp
+++ b/indra/newview/llcommandhandler.cpp
@@ -39,6 +39,7 @@
 #define THROTTLE_PERIOD    5    // required seconds between throttled commands
 
 static LLCommandDispatcherListener sCommandDispatcherListener;
+const std::string LLCommandHandler::NAV_TYPE_CLICKED = "clicked";
 
 //---------------------------------------------------------------------------
 // Underlying registry for command handlers, not directly accessible.
@@ -64,6 +65,9 @@ class LLCommandHandlerRegistry
 				  bool trusted_browser);
 
 private:
+    void notifySlurlBlocked();
+    void notifySlurlThrottled();
+
 	friend LLSD LLCommandDispatcher::enumerate();
 	std::map<std::string, LLCommandHandlerInfo> mMap;
 };
@@ -96,8 +100,6 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
 										const std::string& nav_type,
 										bool trusted_browser)
 {
-	static bool slurl_blocked = false;
-	static bool slurl_throttled = false;
 	static F64 last_throttle_time = 0.0;
 	F64 cur_time = 0.0;
 	std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd);
@@ -115,44 +117,45 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
 			// block request from external browser, but report as
 			// "handled" because it was well formatted.
 			LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL;
-			if (! slurl_blocked)
-			{
-				if (LLStartUp::getStartupState() >= STATE_BROWSER_INIT)
-				{
-					// Note: commands can arrive before we initialize everything we need for Notification.
-					LLNotificationsUtil::add("BlockedSLURL");
-				}
-				slurl_blocked = true;
-			}
+            notifySlurlBlocked();
 			return true;
 
+        case LLCommandHandler::UNTRUSTED_CLICK_ONLY:
+            if (nav_type == LLCommandHandler::NAV_TYPE_CLICKED
+                && info.mHandler->canHandleUntrusted(params, query_map, web, nav_type))
+            {
+                break;
+            }
+            LL_WARNS_ONCE("SLURL") << "Blocked SLURL click-only command " << cmd << " from untrusted browser" << LL_ENDL;
+            notifySlurlBlocked();
+            return true;
+
 		case LLCommandHandler::UNTRUSTED_THROTTLE:
+			//skip initial request from external browser before STATE_BROWSER_INIT
+			if (LLStartUp::getStartupState() == STATE_FIRST)
+			{
+				return true;
+			}
+            if (!info.mHandler->canHandleUntrusted(params, query_map, web, nav_type))
+            {
+                LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL;
+                notifySlurlBlocked();
+                return true;
+            }
 			// if users actually click on a link, we don't need to throttle it
 			// (throttling mechanism is used to prevent an avalanche of clicks via
 			// javascript
-			if ( nav_type == "clicked" )
+			if (nav_type == LLCommandHandler::NAV_TYPE_CLICKED)
 			{
 				break;
 			}
-			//skip initial request from external browser before STATE_BROWSER_INIT
-			if (LLStartUp::getStartupState() == STATE_FIRST)
-			{
-				return true;
-			}
 			cur_time = LLTimer::getElapsedSeconds();
 			if (cur_time < last_throttle_time + THROTTLE_PERIOD)
 			{
 				// block request from external browser if it happened
 				// within THROTTLE_PERIOD seconds of the last command
 				LL_WARNS_ONCE("SLURL") << "Throttled SLURL command from untrusted browser" << LL_ENDL;
-				if (! slurl_throttled)
-				{
-					if (LLStartUp::getStartupState() >= STATE_BROWSER_INIT)
-					{
-						LLNotificationsUtil::add("ThrottledSLURL");
-					}
-					slurl_throttled = true;
-				}
+                notifySlurlThrottled();
 				return true;
 			}
 			last_throttle_time = cur_time;
@@ -163,6 +166,34 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd,
 	return info.mHandler->handle(params, query_map, web);
 }
 
+void LLCommandHandlerRegistry::notifySlurlBlocked()
+{
+    static bool slurl_blocked = false;
+    if (!slurl_blocked)
+    {
+        if (LLStartUp::getStartupState() >= STATE_BROWSER_INIT)
+        {
+            // Note: commands can arrive before we initialize everything we need for Notification.
+            LLNotificationsUtil::add("BlockedSLURL");
+        }
+        slurl_blocked = true;
+    }
+}
+
+void LLCommandHandlerRegistry::notifySlurlThrottled()
+{
+    static bool slurl_throttled = false;
+    if (!slurl_throttled)
+    {
+        if (LLStartUp::getStartupState() >= STATE_BROWSER_INIT)
+        {
+            // Note: commands can arrive before we initialize everything we need for Notification.
+            LLNotificationsUtil::add("ThrottledSLURL");
+        }
+        slurl_throttled = true;
+    }
+}
+
 //---------------------------------------------------------------------------
 // Automatic registration of commands, runs before main()
 //---------------------------------------------------------------------------
@@ -230,6 +261,7 @@ symbol_info symbols[] =
 {
 	ent(LLCommandHandler::UNTRUSTED_ALLOW),		  // allow commands from untrusted browsers
 	ent(LLCommandHandler::UNTRUSTED_BLOCK),		  // ignore commands from untrusted browsers
+    ent(LLCommandHandler::UNTRUSTED_CLICK_ONLY),  // allow untrusted, but only if clicked
 	ent(LLCommandHandler::UNTRUSTED_THROTTLE)	  // allow untrusted, but only a few per min.
 };
 
diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h
index 1e0895565afc13b94de1ac0db0fdfa7d12289b2a..763e3ee51f3658026305dcdce18e49a8bdf516d1 100644
--- a/indra/newview/llcommandhandler.h
+++ b/indra/newview/llcommandhandler.h
@@ -65,9 +65,12 @@ class LLCommandHandler
 	{
 		UNTRUSTED_ALLOW,       // allow commands from untrusted browsers
 		UNTRUSTED_BLOCK,       // ignore commands from untrusted browsers
+        UNTRUSTED_CLICK_ONLY,  // allow untrusted, but only if clicked
 		UNTRUSTED_THROTTLE     // allow untrusted, but only a few per min.
 	};
 
+    static const std::string NAV_TYPE_CLICKED;
+
 	LLCommandHandler(const char* command, EUntrustedAccess untrusted_access);
 		// Automatically registers object to get called when 
 		// command is executed.  All commands can be processed
@@ -76,6 +79,13 @@ class LLCommandHandler
 		
 	virtual ~LLCommandHandler();
 
+    virtual bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type)
+    { return true; }
+
 	virtual bool handle(const LLSD& params,
 						const LLSD& query_map,
 						LLMediaCtrl* web) = 0;
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index a20600c4ec1b4c5d7166600af506ab6e69204e9f..4fc17d6a30237260eeab68d14e07e774b7a0dfe1 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -3065,7 +3065,7 @@ bool LLEnvironment::loadFromSettings()
         LL_INFOS("ENVIRONMENT") << "Unable to open previous session environment file " << user_filepath << LL_ENDL;
     }
 
-    if (!env_data.isMap() || env_data.size() == 0)
+    if (!env_data.isMap() || (env_data.size() == 0))
     {
         LL_DEBUGS("ENVIRONMENT") << "Empty map loaded from: " << user_filepath << LL_ENDL;
         return false;
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 19765dbf6c51b88ffaba8092b956c273b3aa3117..9b9c155d2b70870280febf529da50c12112296ca 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -595,9 +595,9 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
 
 #elif LL_DARWIN
 
-std::vector<std::string>* LLFilePicker::navOpenFilterProc(ELoadFilter filter) //(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode)
+std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadFilter filter) //(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode)
 {
-    std::vector<std::string> *allowedv = new std::vector< std::string >;
+    std::unique_ptr<std::vector<std::string>> allowedv(new std::vector< std::string >);
     switch(filter)
     {
         case FFLOAD_ALL:
@@ -669,11 +669,10 @@ bool	LLFilePicker::doNavChooseDialog(ELoadFilter filter)
     
 	gViewerWindow->getWindow()->beforeDialog();
     
-    std::unique_ptr<std::vector<std::string>> allowed_types;
-    allowed_types.reset(navOpenFilterProc(filter));
+    std::unique_ptr<std::vector<std::string>> allowed_types = navOpenFilterProc(filter);
     
-    std::unique_ptr<std::vector<std::string>> filev;
-    filev.reset(doLoadDialog(allowed_types.get(), mPickOptions));
+    std::unique_ptr<std::vector<std::string>> filev  = doLoadDialog(allowed_types.get(),
+                                                    mPickOptions);
 
 	gViewerWindow->getWindow()->afterDialog();
 
@@ -759,9 +758,11 @@ bool	LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filena
 	gViewerWindow->getWindow()->beforeDialog();
 
 	// Run the dialog
-    std::unique_ptr<std::string> filev(doSaveDialog(&namestring,
+    std::unique_ptr<std::string> filev = doSaveDialog(&namestring, 
+                 &type,
+                 &creator,
                  &extension,
-                 mPickOptions));
+                 mPickOptions);
 
 	gViewerWindow->getWindow()->afterDialog();
 
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index cb88d31af96a1ae4e692a5acf3a4887ff544791d..8d7ea6a6936cadbfae0f755629e3da4a93ecbb80 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -171,7 +171,7 @@ class LLFilePicker
 	
 	bool doNavChooseDialog(ELoadFilter filter);
 	bool doNavSaveDialog(ESaveFilter filter, const std::string& filename);
-    std::vector<std::string>* navOpenFilterProc(ELoadFilter filter);
+    std::unique_ptr<std::vector<std::string>> navOpenFilterProc(ELoadFilter filter);
 #endif
 
 #if LL_GTK
diff --git a/indra/newview/llfilepicker_mac.h b/indra/newview/llfilepicker_mac.h
index 18e7f5b8f0e020fb66ae0551e443ae142ba4f571..b2fb371afea595150aca1dee82e4a955d0e09724 100644
--- a/indra/newview/llfilepicker_mac.h
+++ b/indra/newview/llfilepicker_mac.h
@@ -39,9 +39,11 @@
 #include <vector>
 
 //void modelessPicker();
-std::vector<std::string>* doLoadDialog(const std::vector<std::string>* allowed_types, 
+std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::string>* allowed_types,
                  unsigned int flags);
-std::string* doSaveDialog(const std::string* file, 
+std::unique_ptr<std::string> doSaveDialog(const std::string* file, 
+                  const std::string* type,
+                  const std::string* creator,
                   const std::string* extension,
                   unsigned int flags);
 enum {
diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm
index 1219e1e277b6c957956e9c383c79a6725e41e7b3..b8fa6481a1a98e6c95c4c6d2a6c6a9e02b82b14e 100644
--- a/indra/newview/llfilepicker_mac.mm
+++ b/indra/newview/llfilepicker_mac.mm
@@ -29,13 +29,13 @@
 #include <iostream>
 #include "llfilepicker_mac.h"
 
-std::vector<std::string>* doLoadDialog(const std::vector<std::string>* allowed_types, 
+std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::string>* allowed_types,
                  unsigned int flags)
 {
-    @autoreleasepool
-    {
+    std::unique_ptr<std::vector<std::string>> outfiles;
+
+    @autoreleasepool {
         int i, result;
-        
         //Aura TODO:  We could init a small window and release it at the end of this routine
         //for a modeless interface.
         
@@ -43,8 +43,7 @@ std::vector<std::string>* doLoadDialog(const std::vector<std::string>* allowed_t
         //NSString *fileName = nil;
         NSMutableArray *fileTypes = nil;
         
-        
-        if (allowed_types && !allowed_types->empty())
+        if ( allowed_types && !allowed_types->empty())
         {
             fileTypes = [[NSMutableArray alloc] init];
             
@@ -64,8 +63,6 @@ std::vector<std::string>* doLoadDialog(const std::vector<std::string>* allowed_t
         [panel setCanChooseFiles: ( (flags & F_FILE)?true:false )];
         [panel setTreatsFilePackagesAsDirectories: ( flags & F_NAV_SUPPORT ) ];
         
-        std::vector<std::string>* outfiles = NULL;
-        
         if (fileTypes)
         {
             [panel setAllowedFileTypes:fileTypes];
@@ -87,25 +84,27 @@ std::vector<std::string>* doLoadDialog(const std::vector<std::string>* allowed_t
             
             if (count > 0)
             {
-                outfiles = new std::vector<std::string>;
+                outfiles.reset(new std::vector<std::string>);
             }
             
             for (i=0; i<count; i++) {
                 NSString *aFile = [[filesToOpen objectAtIndex:i] path];
-                outfiles->emplace_back([aFile UTF8String]);
+                std::string afilestr = std::string([aFile UTF8String]);
+                outfiles->push_back(afilestr);
             }
         }
-        return outfiles;
-    };
+    }
+
+    return outfiles;
 }
 
 
-std::string* doSaveDialog(const std::string* file, 
+std::unique_ptr<std::string> doSaveDialog(const std::string* file,
                   const std::string* extension,
                   unsigned int flags)
 {
-    @autoreleasepool
-    {
+    std::unique_ptr<std::string> outfile;
+    @autoreleasepool {
         NSSavePanel *panel = [NSSavePanel savePanel];
         
         NSString *extensionns = [NSString stringWithCString:extension->c_str() encoding:[NSString defaultCStringEncoding]];
@@ -117,19 +116,19 @@ std::string* doSaveDialog(const std::string* file,
         [panel setAllowedFileTypes:fileType];
         NSString *fileName = [NSString stringWithCString:file->c_str() encoding:[NSString defaultCStringEncoding]];
         
-        std::string *outfile = NULL;
         NSURL* url = [NSURL fileURLWithPath:fileName];
         [panel setNameFieldStringValue: fileName];
         [panel setDirectoryURL: url];
-        if([panel runModal] == NSModalResponseOK)
+        if([panel runModal] ==
+           NSModalResponseOK)
         {
             NSURL* url = [panel URL];
             NSString* p = [url path];
-            outfile = new std::string( [p UTF8String] );
+            outfile.reset(new std::string([p UTF8String]));
             // write the file
         }
-        return outfile;
     }
+    return outfile;
 }
 
 #endif
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 44e508977a40658a5312b5301c43d702c689e18f..a4f0ae95a8a8cc60d48d6dbbb799995f4eeb9466 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -537,7 +537,8 @@ void LLFloater360Capture::capture360Images()
     // We need to convert from the angle getYaw() gives us into something
     // the XMP data field wants (N=0, E=90, S=180, W= 270 etc.)
     mInitialHeadingDeg  = (360 + 90 - (int)(camera->getYaw() * RAD_TO_DEG)) % 360;
-    LL_INFOS("360Capture") << "Recording a heading of " << (int)(mInitialHeadingDeg) << LL_ENDL;
+    LL_INFOS("360Capture") << "Recording a heading of " << (int)(mInitialHeadingDeg)
+        << " Image size: " << (S32)mSourceImageSize << LL_ENDL;
 
     // camera constants for the square, cube map capture image
     camera->setAspect(1.0); // must set aspect ratio first to avoid undesirable clamping of vertical FoV
@@ -587,6 +588,9 @@ void LLFloater360Capture::capture360Images()
     // for each of the 6 directions we shoot...
     for (int i = 0; i < 6; i++)
     {
+        LLAppViewer::instance()->pauseMainloopTimeout();
+        LLViewerStats::instance().getRecording().stop();
+
         // these buffers are where the raw, captured pixels are stored and
         // the first time we use them, we have to make a new one
         if (mRawImages[i] == nullptr)
@@ -624,8 +628,10 @@ void LLFloater360Capture::capture360Images()
         auto duration = std::chrono::duration_cast<std::chrono::duration<double>>(t_end - t_start);
         encode_time_total += duration.count();
 
-        // ping the main loop in case the snapshot process takes a really long
-        // time and we get disconnected
+        LLViewerStats::instance().getRecording().resume();
+        LLAppViewer::instance()->resumeMainloopTimeout();
+        
+        // update main loop timeout state
         LLAppViewer::instance()->pingMainloopTimeout("LLFloater360Capture::capture360Images");
     }
 
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
index 3203cf7816c18ac6277fcfa2d56b4518e7480ab5..d1cd4de88933a5130e6c9a708027b27340c4f600 100644
--- a/indra/newview/llfloateravatar.cpp
+++ b/indra/newview/llfloateravatar.cpp
@@ -48,17 +48,21 @@ LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
 
 LLFloaterAvatar::~LLFloaterAvatar()
 {
-	LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
-	if (avatar_picker)
+	if (mAvatarPicker)
 	{
-		avatar_picker->navigateStop();
-		avatar_picker->clearCache();          //images are reloading each time already
-		avatar_picker->unloadMediaSource();
+		mAvatarPicker->navigateStop();
+        mAvatarPicker->clearCache();          //images are reloading each time already
+        mAvatarPicker->unloadMediaSource();
 	}
 }
 
 BOOL LLFloaterAvatar::postBuild()
 {
+    mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents");
+    if (mAvatarPicker)
+    {
+        mAvatarPicker->clearCache();
+    }
 	enableResizeCtrls(true, true, false);
 
 	LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h
index a965ff54a94cf99832bb74777befcff91fb46fc4..d3508a3e808593499c190709e906fb964a0fe86d 100644
--- a/indra/newview/llfloateravatar.h
+++ b/indra/newview/llfloateravatar.h
@@ -29,6 +29,7 @@
 #define LL_FLOATER_AVATAR_H
 
 #include "llfloater.h"
+class LLMediaCtrl;
 
 class LLFloaterAvatar final :
 	public LLFloater
@@ -38,6 +39,8 @@ class LLFloaterAvatar final :
 	LLFloaterAvatar(const LLSD& key);
 	/*virtual*/	~LLFloaterAvatar();
 	/*virtual*/	BOOL postBuild();
+
+    LLMediaCtrl* mAvatarPicker;
 };
 
 #endif
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 92e747bfa728ab1f734852adea07223541524cc8..f9c9ad912158e912eefc8e08d31d960983b027d5 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -84,7 +84,7 @@ BOOL LLFloaterBump::postBuild()
 	mList->setAllowMultipleSelection(false);
 	mList->setRightMouseDownCallback(boost::bind(&LLFloaterBump::onScrollListRightClicked, this, _1, _2, _3));
 
-	auto menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+	LLContextMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 	if (menu)
 	{
 		mPopupMenuHandle = menu->getHandle();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 76ea05b47dc3b8b3e53f85d6f89ab912fd7edf7f..73531868a8d682f18eaba622322f928b65c577dd 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1743,7 +1743,7 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
 		childSetTextArg("download_weight", "[ST]", tbd);
 		childSetTextArg("server_weight", "[SIM]", tbd);
 		childSetTextArg("physics_weight", "[PH]", tbd);
-		if (!mModelPhysicsFee.isMap() || mModelPhysicsFee.size() == 0)
+		if (!mModelPhysicsFee.isMap() || (mModelPhysicsFee.size() == 0))
 		{
 			childSetTextArg("upload_fee", "[FEE]", tbd);
 		}
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index c2d0261edb140b0dcf7b6252371dde37183bafa3..f77e58aec17ec1b7ece4eae5e92be098471148b8 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -58,8 +58,6 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
 	mDirty(TRUE)
 {
 	mCommitCallbackRegistrar.add("OpenObject.MoveToInventory",	boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
-	mCommitCallbackRegistrar.add("OpenObject.MoveAndWear",		boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
-	mCommitCallbackRegistrar.add("OpenObject.ReplaceOutfit",	boost::bind(&LLFloaterOpenObject::onClickReplace, this));
 	mCommitCallbackRegistrar.add("OpenObject.Cancel",			boost::bind(&LLFloaterOpenObject::onClickCancel, this));
 }
 
@@ -255,18 +253,6 @@ void LLFloaterOpenObject::onClickMoveToInventory()
 	closeFloater();
 }
 
-void LLFloaterOpenObject::onClickMoveAndWear()
-{
-	moveToInventory(true, false);
-	closeFloater();
-}
-
-void LLFloaterOpenObject::onClickReplace()
-{
-	moveToInventory(true, true);
-	closeFloater();
-}
-
 void LLFloaterOpenObject::onClickCancel()
 {
 	closeFloater();
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 2e761f99bfb241c6b8e87732defe356e4bdb47d3..745753316bed0cb5e53af42ec2cf0caa52c20cbc 100644
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -63,8 +63,6 @@ class LLFloaterOpenObject
 	void moveToInventory(bool wear, bool replace = false);
 
 	void onClickMoveToInventory();
-	void onClickMoveAndWear();
-	void onClickReplace();
 	void onClickCancel();
 	static void callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear, bool replace = false);
 	static void callbackMoveInventory(S32 result, void* data);
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 1e46d7a402abf1f4ac1104f0ea1ecc733c79b0fd..03aede94c6718b07110e0b5fc88262ae2375c5a8 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -44,6 +44,7 @@
 #include "llpathfindinglinkset.h"
 #include "llpathfindinglinksetlist.h"
 #include "llpathfindingmanager.h"
+#include "llsearcheditor.h"
 #include "llscrolllistitem.h"
 #include "llsd.h"
 #include "lltextbase.h"
@@ -114,17 +115,13 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
 {
 	mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingLinksetBeaconColor");
 
-	mFilterByName = findChild<LLLineEditor>("filter_by_name");
-	llassert(mFilterByName != NULL);
-	mFilterByName->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
-	mFilterByName->setSelectAllonFocusReceived(true);
-	mFilterByName->setCommitOnFocusLost(true);
-
-	mFilterByDescription = findChild<LLLineEditor>("filter_by_description");
-	llassert(mFilterByDescription != NULL);
-	mFilterByDescription->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
-	mFilterByDescription->setSelectAllonFocusReceived(true);
-	mFilterByDescription->setCommitOnFocusLost(true);
+    mFilterByName = getChild<LLSearchEditor>("filter_by_name");
+    mFilterByName->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
+    mFilterByName->setCommitOnFocusLost(true);
+
+    mFilterByDescription = getChild<LLSearchEditor>("filter_by_description");
+    mFilterByDescription->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this));
+    mFilterByDescription->setCommitOnFocusLost(true);
 
 	mFilterByLinksetUse = findChild<LLComboBox>("filter_by_linkset_use");
 	llassert(mFilterByLinksetUse != NULL);
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index ada0b92c28431f444b62e009991cd432563866d7..f91f52b10ccc1880658cebfc8841390d2db734bd 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -42,6 +42,7 @@ class LLSD;
 class LLTextBase;
 class LLUICtrl;
 class LLVector3;
+class LLSearchEditor;
 
 class LLFloaterPathfindingLinksets final : public LLFloaterPathfindingObjects
 {
@@ -105,8 +106,8 @@ class LLFloaterPathfindingLinksets final : public LLFloaterPathfindingObjects
 	LLPathfindingLinkset::ELinksetUse convertToLinksetUse(LLSD pXuiValue) const;
 	LLSD                              convertToXuiValue(LLPathfindingLinkset::ELinksetUse pLinksetUse) const;
 
-	LLLineEditor     *mFilterByName;
-	LLLineEditor     *mFilterByDescription;
+    LLSearchEditor   *mFilterByName;
+    LLSearchEditor   *mFilterByDescription;
 	LLComboBox       *mFilterByLinksetUse;
 	LLComboBox       *mEditLinksetUse;
 	LLScrollListItem *mEditLinksetUseUnset;
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 43536623b45040c43fafea96487d67f3212d01c2..33e9e790c46cc7927b3a89e6ec1440f0b465d03b 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -47,7 +47,7 @@ class LLSearchHandler : public LLCommandHandler
 {
 public:
 	// requires trusted browser to trigger
-	LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_THROTTLE) { }
+	LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_CLICK_ONLY) { }
 	bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web)
 	{
 		if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("EnableSearch"))
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 211d2a63ab5ad0802cb63f885e6e9284d44de6e1..38b7b7136473f35679b0e747111aba6073b88400 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -2,9 +2,9 @@
  * @file llfloatersettingsdebug.cpp
  * @brief floater for debugging internal viewer settings
  *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
  * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2022, Linden Research, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -27,8 +27,8 @@
 #include "llviewerprecompiledheaders.h"
 #include "llfloatersettingsdebug.h"
 #include "llfloater.h"
+#include "llfiltereditor.h"
 #include "lluictrlfactory.h"
-//#include "llfirstuse.h"
 #include "llcombobox.h"
 // [RLVa:KB] - Patch: RLVa-2.1.0
 #include "llsdserialize.h"
@@ -41,11 +41,10 @@
 
 LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) 
 :	LLFloater(key.asString().empty() ? LLSD("all") : key)
+    mSettingList(NULL)
 {
-	mCommitCallbackRegistrar.add("SettingSelect",	boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1));
 	mCommitCallbackRegistrar.add("CommitSettings",	boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
 	mCommitCallbackRegistrar.add("ClickDefault",	boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
-
 }
 
 LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
@@ -53,59 +52,43 @@ LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
 
 BOOL LLFloaterSettingsDebug::postBuild()
 {
-	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
+    enableResizeCtrls(true, false, true);
 
-	struct f : public LLControlGroup::ApplyFunctor
-	{
-		LLComboBox* combo;
-		f(LLComboBox* c) : combo(c) {}
-		virtual void apply(const std::string& name, LLControlVariable* control)
-		{
-			if (!control->isHiddenFromSettingsEditor())
-			{
-				combo->add(name, (void*)control);
-			}
-		}
-	} func(settings_combo);
+    mComment = getChild<LLTextEditor>("comment_text");
 
-	std::string key = getKey().asString();
-	if (key == "all" || key == "base")
-	{
-		gSavedSettings.applyToAll(&func);
-	}
-	if (key == "all" || key == "account")
-	{
-		gSavedPerAccountSettings.applyToAll(&func);
-	}
+    getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2));
+
+    mSettingList = getChild<LLScrollListCtrl>("setting_list");
+    mSettingList->setCommitOnSelectionChange(TRUE);
+    mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this));
+
+    updateList();
+
+    gSavedSettings.getControl("DebugSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsDebug::updateList, this, false));
 
-	settings_combo->sortByName();
-	settings_combo->updateSelection();
-	mComment = getChild<LLTextEditor>("comment_text");
 	return TRUE;
 }
 
 void LLFloaterSettingsDebug::draw()
 {
-	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
-	LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
-	updateControl(controlp);
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        LLControlVariable* controlp = (LLControlVariable*)first_selected->getUserdata();
+        updateControl(controlp);
+    }
 
 	LLFloater::draw();
 }
 
-//static 
-void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl)
-{
-	LLComboBox* combo_box = (LLComboBox*)ctrl;
-	LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata();
-
-	updateControl(controlp);
-}
-
 void LLFloaterSettingsDebug::onCommitSettings()
 {
-	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
-	LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (!first_selected)
+    {
+        return;
+    }
+    LLControlVariable* controlp = (LLControlVariable*)first_selected->getUserdata();
 
 	if (!controlp)
 	{
@@ -192,19 +175,23 @@ void LLFloaterSettingsDebug::onCommitSettings()
 	  default:
 		break;
 	}
+    updateDefaultColumn(controlp);
 }
 
 // static
 void LLFloaterSettingsDebug::onClickDefault()
 {
-	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
-	LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
-
-	if (controlp)
-	{
-		controlp->resetToDefault(true);
-		updateControl(controlp);
-	}
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        LLControlVariable* controlp = (LLControlVariable*)first_selected->getUserdata();
+        if (controlp)
+        {
+            controlp->resetToDefault(true);
+            updateDefaultColumn(controlp);
+            updateControl(controlp);
+        }
+    }
 }
 
 // we've switched controls, or doing per-frame update, so update spinners, etc.
@@ -223,15 +210,9 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 		return;
 	}
 
-	spinner1->setVisible(FALSE);
-	spinner2->setVisible(FALSE);
-	spinner3->setVisible(FALSE);
-	spinner4->setVisible(FALSE);
-	color_swatch->setVisible(FALSE);
-	getChildView("val_text")->setVisible( FALSE);
-	mComment->setText(LLStringUtil::null);
+    hideUIControls();
 
-	if (controlp)
+	if (controlp && !isSettingHidden(controlp))
 	{
 // [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
 		// If "HideFromEditor" was toggled while the floater is open then we need to manually disable access to the control
@@ -251,9 +232,22 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 
 		//hide combo box only for non booleans, otherwise this will result in the combo box closing every frame
 		getChildView("boolean_combo")->setVisible( type == TYPE_BOOLEAN);
-		
+        getChildView("default_btn")->setVisible(true);
+        getChildView("setting_name_txt")->setVisible(true);
+        getChild<LLTextBox>("setting_name_txt")->setText(controlp->getName());
+        getChild<LLTextBox>("setting_name_txt")->setToolTip(controlp->getName());
+        mComment->setVisible(true);
+
+        std::string old_text = mComment->getText();
+        std::string new_text = controlp->getComment();
+        // Don't setText if not nessesary, it will reset scroll
+        // This is a debug UI that reads from xml, there might
+        // be use cases where comment changes, but not the name
+        if (old_text != new_text)
+        {
+            mComment->setText(controlp->getComment());
+        }
 
-		mComment->setText(controlp->getComment());
 		spinner1->setMaxValue(F32_MAX);
 		spinner2->setMaxValue(F32_MAX);
 		spinner3->setMaxValue(F32_MAX);
@@ -559,3 +553,166 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 	}
 
 }
+
+void LLFloaterSettingsDebug::updateList(bool skip_selection)
+{
+    std::string last_selected;
+    LLScrollListItem* item = mSettingList->getFirstSelected();
+    if (item)
+    {
+        LLScrollListCell* cell = item->getColumn(1);
+        if (cell)
+        {
+            last_selected = cell->getValue().asString();
+         }
+    }
+
+    mSettingList->deleteAllItems();
+    struct f : public LLControlGroup::ApplyFunctor
+    {
+        LLScrollListCtrl* setting_list;
+        LLFloaterSettingsDebug* floater;
+        std::string selected_setting;
+        bool skip_selection;
+        f(LLScrollListCtrl* list, LLFloaterSettingsDebug* floater, std::string setting, bool skip_selection) 
+            : setting_list(list), floater(floater), selected_setting(setting), skip_selection(skip_selection) {}
+        virtual void apply(const std::string& name, LLControlVariable* control)
+        {
+            if (!control->isHiddenFromSettingsEditor() && floater->matchesSearchFilter(name) && !floater->isSettingHidden(control))
+            {
+                LLSD row;
+
+                row["columns"][0]["column"] = "changed_setting";
+                row["columns"][0]["value"] = control->isDefault() ? "" : "*";
+
+                row["columns"][1]["column"] = "setting";
+                row["columns"][1]["value"] = name;
+
+                LLScrollListItem* item = setting_list->addElement(row, ADD_BOTTOM, (void*)control);
+                if (!floater->mSearchFilter.empty() && (selected_setting == name) && !skip_selection)
+                {
+                    std::string lower_name(name);
+                    LLStringUtil::toLower(lower_name);
+                    if (LLStringUtil::startsWith(lower_name, floater->mSearchFilter))
+                    {
+                        item->setSelected(true);
+                    }
+                }
+            }
+        }
+    } func(mSettingList, this, last_selected, skip_selection);
+
+    std::string key = getKey().asString();
+    if (key == "all" || key == "base")
+    {
+        gSavedSettings.applyToAll(&func);
+    }
+    if (key == "all" || key == "account")
+    {
+        gSavedPerAccountSettings.applyToAll(&func);
+    }
+
+
+    if (!mSettingList->isEmpty())
+    {
+        if (mSettingList->hasSelectedItem())
+        {
+            mSettingList->scrollToShowSelected();
+        }
+        else if (!mSettingList->hasSelectedItem() && !mSearchFilter.empty() && !skip_selection)
+        {
+            if (!mSettingList->selectItemByPrefix(mSearchFilter, false, 1))
+            {
+                mSettingList->selectFirstItem();
+            }
+            mSettingList->scrollToShowSelected();
+        }
+    }
+    else
+    {
+        LLSD row;
+
+        row["columns"][0]["column"] = "changed_setting";
+        row["columns"][0]["value"] = "";
+        row["columns"][1]["column"] = "setting";
+        row["columns"][1]["value"] = "No matching settings.";
+
+        mSettingList->addElement(row);
+        hideUIControls();
+    }
+}
+
+void LLFloaterSettingsDebug::onSettingSelect()
+{
+    LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+    if (first_selected)
+    {
+        LLControlVariable* controlp = (LLControlVariable*)first_selected->getUserdata();
+        if (controlp)
+        {
+            updateControl(controlp);
+        }
+    }
+}
+
+void LLFloaterSettingsDebug::setSearchFilter(const std::string& filter)
+{
+    if(mSearchFilter == filter)
+        return;
+    mSearchFilter = filter;
+    LLStringUtil::toLower(mSearchFilter);
+    updateList();
+}
+
+bool LLFloaterSettingsDebug::matchesSearchFilter(std::string setting_name)
+{
+    // If the search filter is empty, everything passes.
+    if (mSearchFilter.empty()) return true;
+
+    LLStringUtil::toLower(setting_name);
+    std::string::size_type match_name = setting_name.find(mSearchFilter);
+
+    return (std::string::npos != match_name);
+}
+
+bool LLFloaterSettingsDebug::isSettingHidden(LLControlVariable* control)
+{
+    static LLCachedControl<bool> hide_default(gSavedSettings, "DebugSettingsHideDefault", false);
+    return hide_default && control->isDefault();
+}
+
+void LLFloaterSettingsDebug::updateDefaultColumn(LLControlVariable* control)
+{
+    if (isSettingHidden(control))
+    {
+        hideUIControls();
+        updateList(true);
+        return;
+    }
+
+    LLScrollListItem* item = mSettingList->getFirstSelected();
+    if (item)
+    {
+        LLScrollListCell* cell = item->getColumn(0);
+        if (cell)
+        {
+            std::string is_default = control->isDefault() ? "" : "*";
+            cell->setValue(is_default);
+        }
+    }
+}
+
+void LLFloaterSettingsDebug::hideUIControls()
+{
+    getChildView("val_spinner_1")->setVisible(false);
+    getChildView("val_spinner_2")->setVisible(false);
+    getChildView("val_spinner_3")->setVisible(false);
+    getChildView("val_spinner_4")->setVisible(false);
+    getChildView("val_color_swatch")->setVisible(false);
+    getChildView("val_text")->setVisible(false);
+    getChildView("default_btn")->setVisible(false);
+    getChildView("boolean_combo")->setVisible(false);
+    getChildView("setting_name_txt")->setVisible(false);
+    mComment->setVisible(false);
+}
+
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index ad7352a56988c1035c7f69cd3ac5e16c0d5ebea7..b3c3493a8f875ae808097673d107d4135bc93483 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -2,9 +2,9 @@
  * @file llfloatersettingsdebug.h
  * @brief floater for debugging internal viewer settings
  *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
  * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2022, Linden Research, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,6 +30,8 @@
 #include "llcontrol.h"
 #include "llfloater.h"
 
+class LLScrollListCtrl;
+
 class LLFloaterSettingsDebug final
 :	public LLFloater
 {
@@ -42,18 +44,31 @@ class LLFloaterSettingsDebug final
 
 	void updateControl(LLControlVariable* control);
 
-	void onSettingSelect(LLUICtrl* ctrl);
 	void onCommitSettings();
 	void onClickDefault();
 
+    bool matchesSearchFilter(std::string setting_name);
+    bool isSettingHidden(LLControlVariable* control);
+
 private:
 	// key - selects which settings to show, one of:
 	// "all", "base", "account", "skin"
 	LLFloaterSettingsDebug(const LLSD& key);
 	virtual ~LLFloaterSettingsDebug();
+
+    void updateList(bool skip_selection = false);
+    void onSettingSelect();
+    void setSearchFilter(const std::string& filter);
+
+    void updateDefaultColumn(LLControlVariable* control);
+    void hideUIControls();
+
+    LLScrollListCtrl* mSettingList;
 	
 protected:
 	class LLTextEditor* mComment;
+
+    std::string mSearchFilter;
 };
 
 #endif //LLFLOATERDEBUGSETTINGS_H
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index c6c24328b46c8816d000b1895db061d7c0fc23e7..441197c3ff937f3a62262601cca33fd15865fc38 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -127,7 +127,7 @@ class LLWorldMapHandler : public LLCommandHandler
 {
 public:
 	// requires trusted browser to trigger
-	LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE ) { }
+	LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_CLICK_ONLY ) { }
 	
 	bool handle(const LLSD& params, const LLSD& query_map,
 				LLMediaCtrl* web)
@@ -164,7 +164,7 @@ class LLMapTrackAvatarHandler : public LLCommandHandler
 {
 public:
 	// requires trusted browser to trigger
-	LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_THROTTLE) 
+	LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_CLICK_ONLY) 
 	{ 
 	}
 	
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index bc3da61c8fa4e395d64bc39c23bd5425692224bb..abe0d3a97891c8825de15106330c79e863dcb391 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -59,7 +59,32 @@ class LLGroupCommandHandler : public LLCommandHandler
 {
 public:
 	// requires trusted browser to trigger
-	LLGroupCommandHandler() : LLCommandHandler("group", UNTRUSTED_THROTTLE) { }
+	LLGroupCommandHandler() : LLCommandHandler("group", UNTRUSTED_CLICK_ONLY) { }
+
+    virtual bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type)
+    {
+        if (params.size() < 1)
+        {
+            return true; // don't block, will fail later
+        }
+
+        if (nav_type == NAV_TYPE_CLICKED)
+        {
+            return true;
+        }
+
+        const std::string verb = params[0].asString();
+        if (verb == "create")
+        {
+            return false;
+        }
+        return true;
+    }
+
 	bool handle(const LLSD& tokens, const LLSD& query_map,
 				LLMediaCtrl* web)
 	{
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 5462397da49c953b4d30cc6f6db788ba1952ac77..f002098653d435241dd3d6470bf329072675100f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2152,7 +2152,6 @@ void LLOutgoingCallDialog::show(const LLSD& key)
 	}
 
 	std::string callee_name = mPayload["session_name"].asString();
-
 	if (callee_name == "anonymous") // obsolete? Likely was part of avaline support
 	{
 		callee_name = getString("anonymous");
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index cdec0552cb048d59f9b89d4dfc203f5d9e693665..42f85c9d461089b59d3a9a3356862b3bd4ef465d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -888,6 +888,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
 			{
 				disabled_items.push_back(std::string("Find Original"));
 			}
+
+            items.push_back(std::string("Cut"));
+            if (!isItemMovable() || !isItemRemovable())
+            {
+                disabled_items.push_back(std::string("Cut"));
+            }
 		}
 		else
 		{
@@ -2296,10 +2302,12 @@ bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const
 
 // [SL:KB] - Patch: Inventory-Links | Checked: 2010-04-12 (Catznip-2.0)
     return (can_copy_as_link)
+        || (mIsLink)
         || item->getPermissions().allowCopyBy(gAgent.getID());
 // [/SL:KB]
 //	static LLCachedControl<bool> inventory_linking(gSavedSettings, "InventoryLinking", true);
 //    return (can_copy_as_link && inventory_linking)
+//        || (mIsLink && inventory_linking)
 //        || item->getPermissions().allowCopyBy(gAgent.getID());
 }
 
@@ -2526,6 +2534,12 @@ BOOL LLFolderBridge::isUpToDate() const
 
 bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const
 {
+    if (can_copy_as_link && !LLFolderType::lookupIsProtectedType(getPreferredType()))
+    {
+        // Can copy and paste unprotected folders as links
+        return true;
+    }
+
 	// Folders are copyable if items in them are, recursively, copyable.
 	
 	// Get the content of the folder
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 2d09f80a4aabb4a80bd519c76ac09cc7d276dc01..7dc41850a1b79013625a1d10322429a8589ae64b 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1477,7 +1477,6 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
                 LLNotificationsUtil::add("MerchantPasteFailed", subs);
                 return false;
             }
-            
             if (copy)
             {
                 // Copy the item
diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h
index d4dd212cc3e4e5fa60faff8049ca03f262f453aa..cf713a69306ec473211c80c2f3b07b5f3ae3f9a3 100644
--- a/indra/newview/llinventorylistitem.h
+++ b/indra/newview/llinventorylistitem.h
@@ -197,6 +197,7 @@ class LLPanelInventoryListItemBase : public LLPanel
 	virtual BOOL handleToolTip( S32 x, S32 y, MASK mask);
 
 	const LLUUID mInventoryItemUUID;
+    bool mHovered;
 
 private:
 
@@ -221,7 +222,6 @@ class LLPanelInventoryListItemBase : public LLPanel
 	LLUIImagePtr	mSelectedImage;
 	LLUIImagePtr	mSeparatorImage;
 
-	bool			mHovered;
 	bool			mSelected;
 	bool			mSeparatorVisible;
 
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index e1b8a3194161c5f08d2b5da8566dce261ee01fe2..c64c50e3f00eb161d8c973d09b89e528e5a13726 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -215,7 +215,7 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
     p.allow_drop = mParams.allow_drop_on_root;
     p.options_menu = "menu_inventory.xml";
 
-	auto fv = LLUICtrlFactory::create<LLFolderView>(p);
+	LLFolderView* fv = LLUICtrlFactory::create<LLFolderView>(p);
 	fv->setCallbackRegistrar(&mCommitCallbackRegistrar);
 	fv->setEnableRegistrar(&mEnableCallbackRegistrar);
 
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index 6588d93ff07ad08771a656e5465424b7a8e678da..e1aac23aa7c7c0dcbae50b623c50ccfb0c4871d4 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -171,8 +171,9 @@ bool LLKeyConflictHandler::isReservedByMenu(const KEY &key, const MASK &mask)
     {
         return false;
     }
-    return (gMenuBarView && gMenuBarView->hasAccelerator(key, mask))
-           || (gLoginMenuBarView && gLoginMenuBarView->hasAccelerator(key, mask));
+    // At the moment controls are only applicable inworld,
+    // ignore gLoginMenuBarView
+    return gMenuBarView && gMenuBarView->hasAccelerator(key, mask);
 }
 
 // static
@@ -182,8 +183,7 @@ bool LLKeyConflictHandler::isReservedByMenu(const LLKeyData &data)
     {
         return false;
     }
-    return (gMenuBarView && gMenuBarView->hasAccelerator(data.mKey, data.mMask))
-           || (gLoginMenuBarView && gLoginMenuBarView->hasAccelerator(data.mKey, data.mMask));
+    return gMenuBarView && gMenuBarView->hasAccelerator(data.mKey, data.mMask);
 }
 
 bool LLKeyConflictHandler::registerControl(const std::string &control_name, U32 index, EMouseClickType mouse, KEY key, MASK mask, bool ignore_mask)
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 64ef1376f49cd224bbd3019b71854619d784243a..5fd8d2902d7df7beba36b03b77a6d10fd554bf45 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -139,7 +139,7 @@
 //                               data copied
 //                               headerReceived() invoked
 //                                 LLSD parsed
-//                                 mMeshHeader, mMeshHeaderSize updated
+//                                 mMeshHeader updated
 //                                 scan mPendingLOD for LOD request
 //                                 push LODRequest to mLODReqQ
 //                             ...
@@ -3976,7 +3976,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
 		//make sure target volume is still valid
 		if (volume->getNumVolumeFaces() <= 0)
 		{
-			LL_WARNS(LOG_MESH) << "Mesh loading returned empty volume.  ID:  " << mesh_params.getSculptID()
+			LL_WARNS(LOG_MESH) << "Mesh loading returned empty volume.  ID:  " << mesh_id
 							   << LL_ENDL;
 		}
 		
@@ -3990,7 +3990,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
 			}
 			else
 			{
-				LL_WARNS(LOG_MESH) << "Couldn't find system volume for mesh " << mesh_params.getSculptID()
+				LL_WARNS(LOG_MESH) << "Couldn't find system volume for mesh " << mesh_id
 								   << LL_ENDL;
 			}
 		}
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 1c015a2c3de3cc025dbdc32389b23c09ace071e7..450e9022424608930ef56d26829b3c8a7fe2477c 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -1928,32 +1928,16 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
                     if (sloppy_ratio < 0)
                     {
                         // Sloppy method didn't work, try with smaller decimation values
-                        S32 size_vertices = 0;
-
-                        for (U32 face_idx = 0; face_idx < base->getNumVolumeFaces(); ++face_idx)
-                        {
-                            const LLVolumeFace &face = base->getVolumeFace(face_idx);
-                            size_vertices += face.mNumVertices;
-                        }
-
-                        // Complex models aren't supposed to get here, they are supposed
-                        // to work on a first try of sloppy due to having more viggle room.
-                        // If they didn't, something is likely wrong, no point locking the
-                        // thread in a long calculation that will fail.
-                        const U32 too_many_vertices = 27000;
-                        if (size_vertices > too_many_vertices)
-                        {
-                            LL_WARNS() << "Sloppy optimization method failed for a complex model " << target_model->getName() << LL_ENDL;
-                        }
-                        else
                         {
                             // Find a decimator that does work
                             F32 sloppy_decimation_step = sqrt((F32)decimation); // example: 27->15->9->5->3
                             F32 sloppy_decimator = indices_decimator / sloppy_decimation_step;
+                            U64Microseconds end_time = LLTimer::getTotalTime() + U64Seconds(5);
 
                             while (sloppy_ratio < 0
                                 && sloppy_decimator > precise_ratio
-                                && sloppy_decimator > 1)// precise_ratio isn't supposed to be below 1, but check just in case
+                                && sloppy_decimator > 1 // precise_ratio isn't supposed to be below 1, but check just in case
+                                && end_time > LLTimer::getTotalTime())
                             {
                                 sloppy_ratio = genMeshOptimizerPerModel(base, target_model, sloppy_decimator, lod_error_threshold, MESH_OPTIMIZER_NO_TOPOLOGY);
                                 sloppy_decimator = sloppy_decimator / sloppy_decimation_step;
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 633cc7287fdfed5f2a54cba1a456341faa341839..7eeab0c439fdcbbe4c6a61534a1a3ce482a4e157 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -112,8 +112,7 @@ LLNetMap::LLNetMap (const Params & p)
 	mParcelImagep(),
 	mClosestAgentToCursor(),
 	mClosestAgentAtLastRightClick(),
-	mToolTipMsg(),
-	mPopupMenuHandle()
+	mToolTipMsg()
 {
 	setScale(gSavedSettings.getF32("MiniMapScale"));
     if (gAgent.isFirstLogin())
@@ -159,13 +158,12 @@ BOOL LLNetMap::postBuild()
     commitRegistrar.add("Minimap.AboutLand", boost::bind(&LLNetMap::popupShowAboutLand, this, _2));
 
 	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+    mPopupMenuHandle = menu->getHandle();
     menu->setItemEnabled("Re-center map", false);
-	mPopupMenuHandle = menu->getHandle();
 
 	mParcelMgrConn = LLViewerParcelMgr::instance().setCollisionUpdateCallback(boost::bind(&LLNetMap::refreshParcelOverlay, this));
 	mParcelOverlayConn = LLViewerParcelOverlay::setUpdateCallback(boost::bind(&LLNetMap::refreshParcelOverlay, this));
-
-    return true;
+	return TRUE;
 }
 
 void LLNetMap::setScale( F32 scale )
@@ -250,10 +248,12 @@ void LLNetMap::draw()
         mCentering = false;
     }
 
-    bool can_recenter_map = !(centered || mCentering || auto_centering);
-	auto menu = (LLMenuGL*)mPopupMenuHandle.get();
-	if(menu) menu->setItemEnabled("Re-center map", can_recenter_map);
-
+    auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
+    if (menu)
+    {
+        bool can_recenter_map = !(centered || mCentering || auto_centering);
+        menu->setItemEnabled("Re-center map", can_recenter_map);
+    }
     updateAboutLandPopupButton();
 
 	// Prepare a scissor region
@@ -740,7 +740,7 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
 
 bool LLNetMap::isMouseOnPopupMenu()
 {
-	auto menu = (LLMenuGL*)mPopupMenuHandle.get();
+    auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
     if (!menu || !menu->isOpen())
     {
         return false;
@@ -748,7 +748,7 @@ bool LLNetMap::isMouseOnPopupMenu()
 
     S32 popup_x;
     S32 popup_y;
-    LLUI::getInstance()->getMousePositionLocal(mPopupMenuHandle.get(), &popup_x, &popup_y);
+    LLUI::getInstance()->getMousePositionLocal(menu, &popup_x, &popup_y);
     // *NOTE: Tolerance is larger than it needs to be because the context menu is offset from the mouse when the menu is opened from certain
     // directions. This may be a quirk of LLMenuGL::showPopup. -Cosmic,2022-03-22
     constexpr S32 tolerance = 10;
@@ -770,7 +770,7 @@ bool LLNetMap::isMouseOnPopupMenu()
 
 void LLNetMap::updateAboutLandPopupButton()
 {
-	auto menu = (LLMenuGL*)mPopupMenuHandle.get();
+    auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
     if (!menu || !menu->isOpen())
     {
         return;
@@ -1323,13 +1323,13 @@ BOOL LLNetMap::handleMouseUp(S32 x, S32 y, MASK mask)
 
 BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
-	auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
-	if (menu)
+    auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
+    if (menu)
 	{
-        mPopupWorldPos = viewPosToGlobal(x, y);
-		menu->buildDrawLabels();
-		menu->updateParent(LLMenuGL::sMenuContainer);
-		menu->setItemEnabled("Stop tracking", LLTracker::isTracking(0));
+		mPopupWorldPos = viewPosToGlobal(x, y);
+        menu->buildDrawLabels();
+        menu->updateParent(LLMenuGL::sMenuContainer);
+        menu->setItemEnabled("Stop Tracking", LLTracker::isTracking(0));
 		LLMenuGL::showPopup(this, menu, x, y);
 	}
 	return TRUE;
@@ -1464,10 +1464,10 @@ void LLNetMap::setZoom(const LLSD &userdata)
 
 void LLNetMap::handleStopTracking (const LLSD& userdata)
 {
-	auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
-	if (menu)
+    auto menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
+    if (menu)
 	{
-		menu->setItemEnabled ("Stop tracking", false);
+        menu->setItemEnabled ("Stop Tracking", false);
 		LLTracker::stopTracking (LLTracker::isTracking(NULL));
 	}
 }
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 76e9e1ca0bc516f175738cd279859af70407aa09..f5eb23b9ec4caee2bb7c500db4badc3354482d00 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -176,7 +176,7 @@ class LLNetMap final : public LLUICtrl
     void setMapOrientation(const LLSD& userdata);
     void popupShowAboutLand(const LLSD& userdata);
 
-	LLHandle<LLView>		mPopupMenuHandle;
+    LLHandle<LLView> mPopupMenuHandle;
 	uuid_vec_t		gmSelected;
 };
 
diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index 151e0d06bfc2bb40a659e2714688e4e3bd21d0e2..e8dfdc8e1ed5864511782c8c717aa7505fe8154e 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -552,9 +552,8 @@ void LLGroupNoticeNotificationListItem::onClickAttachment()
         if (!isAttachmentOpenable(mInventoryOffer->mType)) {
             LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD());
         }
-
         mInventoryOffer->forceResponse(IOR_ACCEPT);
-        mInventoryOffer = nullptr;
+        mInventoryOffer = NULL;
     }
 }
 
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 41de59c1c16b93ce51c8579d88141fea4b0746a9..16b529e5c2b2557240ba1e02945bb06cc80e3201 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1235,7 +1235,7 @@ void LLOutfitGallery::uploadOutfitImage(const std::vector<std::string>& filename
 		checkRemovePhoto(outfit_id);
 		std::string upload_pending_name = outfit_id.asString();
 		std::string upload_pending_desc = "";
-		(void)upload_new_resource(filename, // file
+        upload_new_resource(filename, // file
 			upload_pending_name,
 			upload_pending_desc,
 			0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 3d080006eca030b1f0e5331d00bbb9a3d9936833..64a61ce8b285f870811ee8f1395c5b364a3c3eff 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1745,7 +1745,7 @@ void LLPanelEditWearable::onClickedImportBtn()
 class LLMetricSystemHandler : public LLCommandHandler
 {
 public:
-        LLMetricSystemHandler() : LLCommandHandler("metricsystem", UNTRUSTED_THROTTLE) { }
+        LLMetricSystemHandler() : LLCommandHandler("metricsystem", UNTRUSTED_CLICK_ONLY) { }
 
         bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
         {
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9ebc636b7df5d4a1ded04ffb32bfd56c5c07c180..cfd451908b28e2b35328ff2172e4fc3d284017a5 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -308,6 +308,13 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
     
 	gInventory.removeObserver(this);
 	delete mSavedFolderState;
+
+	auto menu = mMenuAddHandle.get();
+	if(menu)
+	{
+		menu->die();
+		mMenuAddHandle.markDead();
+	}
 }
 
 LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
@@ -1198,13 +1205,12 @@ void LLPanelMainInventory::initListCommandsHandlers()
 	mEnableCallbackRegistrar.add("Inventory.GearDefault.Check", boost::bind(&LLPanelMainInventory::isActionChecked, this, _2));
 	mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2));
 	mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-	mGearMenuButton->setMenu(mMenuGearDefault);
+	mGearMenuButton->setMenu(mMenuGearDefault, LLMenuButton::MP_TOP_LEFT, true);
 	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
 	mMenuAddHandle = menu->getHandle();
 
 	mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-	mVisibilityMenuButton->setMenu(mMenuVisibility);
-	mVisibilityMenuButton->setMenuPosition(LLMenuButton::MP_BOTTOM_LEFT);
+	mVisibilityMenuButton->setMenu(mMenuVisibility, LLMenuButton::MP_BOTTOM_LEFT, true);
 
 	// Update the trash button when selected item(s) get worn or taken off.
 	LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this));
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 176722b3696394aaa3a89fda75a2ebb64ee9ccab..7404dc02ecf6b524549325bfe4cce8058ebec3a4 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -2364,7 +2364,7 @@ bool LLPanelObject::menuEnableItem(const LLSD& userdata)
     }
     else if (command == "params_paste")
     {
-        return mClipboardParams.isMap() && mClipboardParams.size() != 0;
+        return mClipboardParams.isMap() && (mClipboardParams.size() != 0);
     }
     // copy options
     else if (command == "psr_copy")
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 484e48817b6ac53c66ce2b2aa2c21521a44b6978..637be30f046667a772adf506a2c0a87600238483 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1481,7 +1481,8 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mHaveInventory(FALSE),
 	mIsInventoryEmpty(TRUE),
 	mInventoryNeedsUpdate(FALSE),
-	mInventoryViewModel(p.name)
+	mInventoryViewModel(p.name),
+    mShowRootFolder(p.show_root_folder)
 {
 	// Setup context menu callbacks
 	mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
@@ -1733,15 +1734,23 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
 		p.font_highlight_color = item_color;
 
 		LLFolderViewFolder* new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p);
-		new_folder->addToFolder(mFolders);
-		new_folder->toggleOpen();
+
+        if (mShowRootFolder)
+        {
+            new_folder->addToFolder(mFolders);
+            new_folder->toggleOpen();
+        }
 
 		if (!contents.empty())
 		{
-			createViewsForCategory(&contents, inventory_root, new_folder);
+			createViewsForCategory(&contents, inventory_root, mShowRootFolder ? new_folder : mFolders);
 		}
-        // Refresh for label to add item count
-        new_folder->refresh();
+
+        if (mShowRootFolder)
+        {
+            // Refresh for label to add item count
+            new_folder->refresh();
+        }
 	}
 }
 
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index 31488ce2b3b0e47ae2c56048ebe6728e835889ce..6433c517d34996b604b1f1a1f7038deb4424edae 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -48,8 +48,14 @@ class LLViewerObject;
 class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
 {
 public:
-	// dummy param block for template registration purposes
-	struct Params : public LLPanel::Params {};
+    struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+    {
+        Optional<bool> show_root_folder;
+
+        Params()
+            : show_root_folder("show_root_folder", true)
+        {}
+    };
 
 	LLPanelObjectInventory(const Params&);
 	virtual ~LLPanelObjectInventory();
@@ -110,6 +116,7 @@ class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
 	BOOL mIsInventoryEmpty; // 'Empty' label
 	BOOL mInventoryNeedsUpdate; // for idle, set on changed callback
 	LLFolderViewModelInventory	mInventoryViewModel;	
+    bool mShowRootFolder;
 };
 
 #endif // LL_LLPANELOBJECTINVENTORY_H
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 881f535ba857868f3bdde1051e1129e6ad678969..159205fc6f6cfbb59ae9bb0b08021d31b6787033 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -762,7 +762,6 @@ void LLPanelProfileSecondLife::resetData()
 
 void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
 {
-    LLUUID avatar_id = getAvatarId();
     const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
     if ((relationship != NULL || gAgent.isGodlike()) && !getSelfProfile())
     {
@@ -1011,6 +1010,8 @@ void LLPanelProfileSecondLife::fillRightsData()
 
 void LLPanelProfileSecondLife::fillAgeData(const LLDate &born_on)
 {
+    // Date from server comes already converted to stl timezone,
+    // so display it as an UTC + 0
     std::string name_and_date = getString("date_format");
     LLSD args_name;
     args_name["datetime"] = (S32)born_on.secondsSinceEpoch();
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 5d8ece72e415e7d31c6379d03b1e444c1bf99662..ddf9cf61573c08e5d243838be504f8869db67039 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -80,6 +80,30 @@ class LLClassifiedHandler : public LLCommandHandler, public LLAvatarPropertiesOb
 	
 	std::set<LLUUID> mClassifiedIds;
 	std::string mRequestVerb;
+
+    virtual bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type)
+    {
+        if (params.size() < 1)
+        {
+            return true; // don't block, will fail later
+        }
+
+        if (nav_type == NAV_TYPE_CLICKED)
+        {
+            return true;
+        }
+
+        const std::string verb = params[0].asString();
+        if (verb == "create")
+        {
+            return false;
+        }
+        return true;
+    }
     
 	bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
     {
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 4f95a4e80586f62d997269717f90470abc62c015..8a6f3f77742f2f6267f0bde68b447ffe3849731a 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -66,6 +66,30 @@ class LLPickHandler : public LLCommandHandler
     // requires trusted browser to trigger
     LLPickHandler() : LLCommandHandler("pick", UNTRUSTED_THROTTLE) { }
 
+    virtual bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type)
+    {
+        if (params.size() < 1)
+        {
+            return true; // don't block, will fail later
+        }
+
+        if (nav_type == NAV_TYPE_CLICKED)
+        {
+            return true;
+        }
+
+        const std::string verb = params[0].asString();
+        if (verb == "create")
+        {
+            return false;
+        }
+        return true;
+    }
+
     bool handle(const LLSD& params, const LLSD& query_map,
         LLMediaCtrl* web)
     {
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 94d84811a998e8832ccce4503c9676b1f60ebd2b..546b84ca1d21a872f08d7fc8d36cdcd90bd1e96d 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -515,7 +515,7 @@ void LLSceneMonitor::fetchQueryResult()
 }
 
 //dump results to a file _scene_xmonitor_results.csv
-void LLSceneMonitor::dumpToFile(std::string file_name)
+void LLSceneMonitor::dumpToFile(const std::string &file_name)
 {
 	if (!hasResults()) return;
 
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index f325409e71d4ce67f5f041b66a309dcdfb3ab1da..2461ae19710b558c716ab81eed4f82d7874d2995 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -61,7 +61,7 @@ class LLSceneMonitor final : public LLSingleton<LLSceneMonitor>
 	bool needsUpdate() const;
 	
 	const LLTrace::ExtendablePeriodicRecording* getRecording() const {return &mSceneLoadRecording;}
-	void dumpToFile(std::string file_name);
+	void dumpToFile(const std::string &file_name);
 	bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);}
 
 	void reset();
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 834dd455481a4a4b81c9da0b078a486ecb288552..1e5379b06279c0c5acb99854d7b53de1176e2803 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -697,8 +697,8 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
 
         LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
 
-        LLColor4 sunDiffuse = LLColor4(psky->getSunlightColor());
-        LLColor4 moonDiffuse = LLColor4(psky->getMoonlightColor());
+        LLVector4 sunDiffuse = LLVector4(LLVector3(psky->getSunlightColor().mV));
+        LLVector4 moonDiffuse = LLVector4(LLVector3(psky->getMoonlightColor().mV));
 
         shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, sunDiffuse.mV);
         shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, moonDiffuse.mV);
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 9b2d27c47f05baa19824ecb5c94b7078d44ade84..8605b2ae686ad9f78e903f7dff66b28503757e74 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -51,6 +51,10 @@ class SpeakingIndicatorManager final : public LLSingleton<SpeakingIndicatorManag
 	LLSINGLETON(SpeakingIndicatorManager);
 	~SpeakingIndicatorManager();
 	LOG_CLASS(SpeakingIndicatorManager);
+
+protected:
+    void                cleanupSingleton();
+
 public:
 
 	/**
@@ -183,12 +187,16 @@ SpeakingIndicatorManager::SpeakingIndicatorManager()
 
 SpeakingIndicatorManager::~SpeakingIndicatorManager()
 {
-	// Don't use LLVoiceClient::getInstance() here without check
-	// singleton MAY have already been destroyed.
-	if(LLVoiceClient::instanceExists())
-	{
-		LLVoiceClient::getInstance()->removeObserver(this);
-	}
+}
+
+void SpeakingIndicatorManager::cleanupSingleton()
+{
+    // Don't use LLVoiceClient::getInstance() here without a check,
+    // singleton MAY have already been destroyed.
+    if (LLVoiceClient::instanceExists())
+    {
+        LLVoiceClient::getInstance()->removeObserver(this);
+    }
 }
 
 void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 12ec663a938ceb9a9fa08b67865e7eadd9d7a914..17499d84d60298664f19b7fb30ce4610d990eb2d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -284,12 +284,10 @@ void show_first_run_dialog();
 bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
 void set_startup_status(const F32 frac, const std::string& string, const std::string& msg);
 bool login_alert_status(const LLSD& notification, const LLSD& response);
-void login_packet_failed(void**, S32 result);
 void use_circuit_callback(void**, S32 result);
 void register_viewer_callbacks(LLMessageSystem* msg);
 void asset_callback_nothing(const LLUUID&, LLAssetType::EType, void*, S32);
 bool callback_choose_gender(const LLSD& notification, const LLSD& response);
-void init_start_screen(S32 location_id);
 void release_start_screen();
 void reset_login();
 LLSD transform_cert_args(LLPointer<LLCertificate> cert);
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 024f25bc98a2a7f1c8d1f2d30311e5c9fae386c6..bf3f4c1e8891b266d2de877eaa50b47e3ca19616 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -89,6 +89,7 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_opt
 	const LLFontGL* font = make_small_btn ? sFontSmall: sFont; // for block and ignore buttons in script dialog
 	p.name = form_element["name"].asString();
 	p.label = form_element["text"].asString();
+	p.tool_tip = form_element["text"].asString();
 	p.font = font;
 	p.rect.height = BTN_HEIGHT;
 	p.click_callback.function(boost::bind(&LLToastNotifyPanel::onClickButton, userdata));
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index bf76c98ffeacff25e119bdaaf5bf338c8b8f9ee1..9d14a548f9338394606f38554752c31aa86fa5f4 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -44,7 +44,6 @@
 #include "llagent.h"  // HACK for destinations guide on startup
 #include "llfloaterreg.h"  // HACK for destinations guide on startup
 #include "llviewercontrol.h"  // HACK for destinations guide on startup
-#include "llinventorymodel.h" // HACK to disable starter avatars button for NUX
 
 LLToolBarView* gToolBarView = NULL;
 
@@ -358,22 +357,6 @@ bool LLToolBarView::loadToolbars(bool force_default)
 			}
 		}
 	}
-
-    // SL-18581: Don't show the starter avatar toolbar button for NUX users
-    LLViewerInventoryCategory* my_outfits_cat = gInventory.getCategory(gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS));
-    if (gAgent.isFirstLogin()
-        && my_outfits_cat != NULL
-        && my_outfits_cat->getDescendentCount() > 0)
-    {
-        for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++)
-        {
-            if (mToolbars[i])
-            {
-                mToolbars[i]->removeCommand(LLCommandId("avatar"));
-            }
-        }
-    }
-
 	mToolbarsLoaded = true;
 	return true;
 }
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 10f6622ad1062c3ad7fddea855b199ab313927d4..beb5a32c479ed4d6739b5d09f7edc9a3004abc9f 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -287,7 +287,7 @@ class LLTeleportHandler : public LLCommandHandler, public LLEventAPI
 	// inside the app, otherwise a malicious web page could
 	// cause a constant teleport loop.  JC
 	LLTeleportHandler() :
-		LLCommandHandler("teleport", UNTRUSTED_THROTTLE),
+		LLCommandHandler("teleport", UNTRUSTED_CLICK_ONLY),
 		LLEventAPI("LLTeleportHandler", "Low-level teleport API")
 	{
 		LLEventAPI::add("teleport",
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 39dbe7e24ffca63b38251850fa5c306853bc0f43..fd39acf110fa522fb30831f5883cdee7fc5b3a9e 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -202,11 +202,103 @@ const std::string FLOATER_PROFILE("profile");
 class LLFloaterOpenHandler : public LLCommandHandler
 {
 public:
-	// requires trusted browser to trigger
+	// requires trusted browser to trigger or an explicit click
 	LLFloaterOpenHandler() : LLCommandHandler("openfloater", UNTRUSTED_THROTTLE) { }
 
-	bool handle(const LLSD& params, const LLSD& query_map,
-				LLMediaCtrl* web)
+    bool canHandleUntrusted(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web,
+        const std::string& nav_type) override
+    {
+        if (params.size() != 1)
+        {
+            return true; // will fail silently
+        }
+        
+        std::string fl_name = params[0].asString();
+
+        if (nav_type == NAV_TYPE_CLICKED)
+        {
+            const std::list<std::string> blacklist_clicked = {
+                "camera_presets",
+                "delete_pref_preset",
+                "forget_username",
+                "god_tools",
+                "group_picker",
+                "hud",
+                "incoming_call",
+                "linkreplace",
+                "message_critical", // Modal!!! Login specific.
+                "message_tos", // Modal!!! Login specific.
+                "save_pref_preset",
+                "save_camera_preset",
+                "region_restarting",
+                "outfit_snapshot",
+                "upload_anim_bvh",
+                "upload_anim_anim",
+                "upload_image",
+                "upload_model",
+                "upload_script",
+                "upload_sound"
+            };
+            return std::find(blacklist_clicked.begin(), blacklist_clicked.end(), fl_name) == blacklist_clicked.end();
+        }
+        else
+        {
+            const std::list<std::string> blacklist_untrusted = {
+                "360capture",
+                "block_timers",
+                "add_payment_method",
+                "appearance",
+                "associate_listing",
+                "avatar_picker",
+                "camera",
+                "camera_presets",
+                "classified",
+                "add_landmark",
+                "delete_pref_preset",
+                "env_fixed_environmentent_water",
+                "env_fixed_environmentent_sky",
+                "env_edit_extdaycycle",
+                "font_test",
+                "forget_username",
+                "god_tools",
+                "group_picker",
+                "hud",
+                "incoming_call",
+                "linkreplace",
+                "mem_leaking",
+                "marketplace_validation",
+                "message_critical", // Modal!!! Login specific. If this is in use elsewhere, better to create a non modal variant
+                "message_tos", // Modal!!! Login specific.
+                "mute_object_by_name",
+                "publish_classified",
+                "save_pref_preset",
+                "save_camera_preset",
+                "region_restarting",
+                "script_debug",
+                "script_debug_output",
+                "sell_land",
+                "outfit_snapshot",
+                "upload_anim_bvh",
+                "upload_anim_anim",
+                "upload_image",
+                "upload_model",
+                "upload_script",
+                "upload_sound"
+            };
+            return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end();
+        }
+
+
+        return true;
+    }
+
+	bool handle(
+        const LLSD& params,
+        const LLSD& query_map,
+        LLMediaCtrl* web) override
 	{
 		if (params.size() != 1)
 		{
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 5f4b7a3b18549e665b7f4783e18b1284b1939655..07577992a5d7c904510feb06bee6204948b86b66 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1690,12 +1690,22 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
             clicktype = CLICK_DOUBLELEFT;
         }
 
+        // If the first LMB click is handled by the menu, skip the following double click
+        static bool skip_double_click = false;
+        if (clicktype == CLICK_LEFT && down )
+        {
+            skip_double_click = handled;
+        }
 
         if (double_click_sp && down)
         {
             // Consume click.
             // Due to handling, double click that is not handled will be immediately followed by LMB click
         }
+        else if (clicktype == CLICK_DOUBLELEFT && skip_double_click)
+        {
+            handled = true;
+        }
         // If UI handled 'down', it should handle 'up' as well
         // If we handle 'down' not by UI, then we should handle 'up'/'level' regardless of UI
         else if (handled)
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index a72aba8e19008465b3b0be0a46c4597a85dc8c1c..9b7aaed5e7d59dc5d308e8aeabffd93051d39a50 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -262,7 +262,7 @@ class LLInventoryHandler : public LLCommandHandler
 {
 public:
 	// requires trusted browser to trigger
-	LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_THROTTLE) { }
+	LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_CLICK_ONLY) { }
 	
 	bool handle(const LLSD& params, const LLSD& query_map,
 				LLMediaCtrl* web)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 6aa483d47cae5ea84fb86851ad7af17ea4dfd5e7..4a02a2b1a9623e5e8c9462dbd349c47e1e711ec0 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2859,8 +2859,9 @@ void handle_object_show_original()
 }
 
 
-static void init_default_item_label(LLUICtrl* ctrl, const std::string& item_name)
+static void init_default_item_label(LLUICtrl* ctrl)
 {
+	const std::string& item_name = ctrl->getName();
 	auto it = sDefaultItemLabels.find(item_name);
 	if (it == sDefaultItemLabels.end())
 	{
@@ -2905,8 +2906,7 @@ bool enable_object_touch(LLUICtrl* ctrl)
 	}
 // [/RLVa:KB]
 
-	const std::string& item_name = ctrl->getName();
-	init_default_item_label(ctrl, item_name);
+	init_default_item_label(ctrl);
 
 	// Update label based on the node touch name if available.
 	LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
@@ -2916,7 +2916,7 @@ bool enable_object_touch(LLUICtrl* ctrl)
 	}
 	else
 	{
-		ctrl->setValue(get_default_item_label(item_name));
+		ctrl->setValue(get_default_item_label(ctrl->getName()));
 	}
 
 	return new_value;
@@ -5689,6 +5689,7 @@ class LLToolsSelectNextPartFace : public view_listener_t
                     }
                 }
                 LLSelectMgr::getInstance()->selectObjectOnly(to_select, new_te);
+                LLSelectMgr::getInstance()->addAsIndividual(to_select, new_te, false);
             }
             else
             {
@@ -6698,10 +6699,8 @@ bool enable_object_sit(LLUICtrl* ctrl)
 	bool sitting_on_sel = sitting_on_selection();
 	if (!sitting_on_sel)
 	{
-		const std::string& item_name = ctrl->getName();
-
 		// init default labels
-		init_default_item_label(ctrl, item_name);
+		init_default_item_label(ctrl);
 
 		// Update label
 		LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
@@ -6711,7 +6710,7 @@ bool enable_object_sit(LLUICtrl* ctrl)
 		}
 		else
 		{
-			ctrl->setValue(get_default_item_label(item_name));
+			ctrl->setValue(get_default_item_label(ctrl->getName()));
 		}
 	}
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8e0222e13ef717b8fb02d1fa6738a1251fdb913e..5894032e172008442721e007dfc49e450dd399c6 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3588,6 +3588,59 @@ void LLViewerWindow::updateUI()
 		}
 	}
 
+	static LLCachedControl<bool> dump_menu_holder(gSavedSettings, "DumpMenuHolderSize", false);
+	if (dump_menu_holder)
+	{
+		static bool init = false;
+		static LLFrameTimer child_count_timer;
+		static std::vector <std::string> child_vec;
+		if (!init)
+		{
+			child_count_timer.resetWithExpiry(5.f);
+			init = true;
+		}
+		if (child_count_timer.hasExpired())
+		{
+			LL_INFOS() << "gMenuHolder child count: " << gMenuHolder->getChildCount() << LL_ENDL;
+			std::vector<std::string> local_child_vec;
+			LLView::child_list_t child_list = *gMenuHolder->getChildList();
+			for (auto child : child_list)
+			{
+				local_child_vec.emplace_back(child->getName());
+			}
+			if (!local_child_vec.empty() && local_child_vec != child_vec)
+			{
+				std::vector<std::string> out_vec;
+				std::sort(local_child_vec.begin(), local_child_vec.end());
+				std::sort(child_vec.begin(), child_vec.end());
+				std::set_difference(child_vec.begin(), child_vec.end(), local_child_vec.begin(), local_child_vec.end(), std::inserter(out_vec, out_vec.begin()));
+				if (!out_vec.empty())
+				{
+					LL_INFOS() << "gMenuHolder removal diff size: '"<<out_vec.size() <<"' begin_child_diff";
+					for (auto str : out_vec)
+					{
+						LL_CONT << " : " << str;
+					}
+					LL_CONT << " : end_child_diff" << LL_ENDL;
+				}
+
+				out_vec.clear();
+				std::set_difference(local_child_vec.begin(), local_child_vec.end(), child_vec.begin(), child_vec.end(), std::inserter(out_vec, out_vec.begin()));
+				if (!out_vec.empty())
+				{
+					LL_INFOS() << "gMenuHolder addition diff size: '" << out_vec.size() << "' begin_child_diff";
+					for (auto str : out_vec)
+					{
+						LL_CONT << " : " << str;
+					}
+					LL_CONT << " : end_child_diff" << LL_ENDL;
+				}
+				child_vec.swap(local_child_vec);
+			}
+			child_count_timer.resetWithExpiry(5.f);
+		}
+	}
+
 	// only update mouse hover set when UI is visible (since we shouldn't send hover events to invisible UI
 	if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
 	{
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 487e294d54c88397dc1d446c034d1382a4af9be3..4c80c6a849ce02cf7f1bbcbc19945415ff0cde39 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -792,7 +792,10 @@ void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer)
 
 void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer)
 {
-	if (mVoiceModule && mVoiceModule->singletoneInstanceExists()) mVoiceModule->removeObserver(observer);
+    if (mVoiceModule)
+    {
+        mVoiceModule->removeObserver(observer);
+    }
 }
 
 void LLVoiceClient::addObserver(LLFriendObserver* observer)
@@ -802,7 +805,10 @@ void LLVoiceClient::addObserver(LLFriendObserver* observer)
 
 void LLVoiceClient::removeObserver(LLFriendObserver* observer)
 {
-	if (mVoiceModule && mVoiceModule->singletoneInstanceExists()) mVoiceModule->removeObserver(observer);
+    if (mVoiceModule)
+    {
+        mVoiceModule->removeObserver(observer);
+    }
 }
 
 void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)
@@ -812,7 +818,10 @@ void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer)
 
 void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer)
 {
-	if (mVoiceModule && mVoiceModule->singletoneInstanceExists()) mVoiceModule->removeObserver(observer);
+    if (mVoiceModule)
+    {
+        mVoiceModule->removeObserver(observer);
+    }
 }
 
 std::string LLVoiceClient::sipURIFromID(const LLUUID &id)
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 61991dd0d92f9a4929b568856cf08a4df7879d4b..b1b6ff90fb5fb4d763606c9826661b5c5769cabc 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -122,8 +122,6 @@ class LLVoiceModuleInterface
 
 	virtual const LLVoiceVersionInfo& getVersion()=0;
 	
-	virtual bool singletoneInstanceExists()=0;
-	
 	/////////////////////
 	/// @name Tuning
 	//@{
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 7feea83287c9906715d49b0e45e64477d4c149a7..7d1c31f69701182bb8f518b8c310b557ce667f3a 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -5303,11 +5303,6 @@ void LLVivoxVoiceClient::declineInvite(std::string &sessionHandle)
 	}
 }
 
-bool LLVivoxVoiceClient::singletoneInstanceExists()
-{
-	return LLVivoxVoiceClient::instanceExists();
-}
-
 void LLVivoxVoiceClient::leaveNonSpatialChannel()
 {
     LL_DEBUGS("Voice") << "Request to leave spacial channel." << LL_ENDL;
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 0b6b76238251f672befd2d3ada341a1942a24aa8..eb99ae66b9c7745e6b69f50db40adf89541b439d 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -73,8 +73,6 @@ class LLVivoxVoiceClient final : public LLSingleton<LLVivoxVoiceClient>,
 
 	// Returns true if vivox has successfully logged in and is not in error state	
 	virtual bool isVoiceWorking() const override;
-	
-	virtual bool singletoneInstanceExists() override;
 
 	/////////////////////
 	/// @name Tuning
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 1d382c70d099b24c314085ade3e11c3f02652233..73384fbac8f9aad855ad134eb858fc50fcc551db 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -100,8 +100,8 @@ LLSkyTex::LLSkyTex() :
 void LLSkyTex::init(bool isShiny)
 {
     mIsShiny = isShiny;
-	mSkyData = new LLColor4[SKYTEX_RESOLUTION * SKYTEX_RESOLUTION];
-	mSkyDirs = new LLVector3[SKYTEX_RESOLUTION * SKYTEX_RESOLUTION];
+	mSkyData = new LLColor4[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)];
+	mSkyDirs = new LLVector3[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)];
 
 	for (S32 i = 0; i < 2; ++i)
 	{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2ccd50e298e691ab3423f756f766e18283639965..6c3fc361064128e1338425a567b80abce104eefa 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -234,6 +234,7 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
     mColorChanged = FALSE;
 	mSpotLightPriority = 0.f;
 
+	mSkinInfoFailed = false;
 	mSkinInfo = NULL;
 
 	mMediaImplList.resize(getNumTEs());
@@ -880,7 +881,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
 	
 	if (isSculpted())
 	{
-		updateSculptTexture();
+        updateSculptTexture();
 
 		if (mSculptTexture.notNull())
 		{
@@ -1121,6 +1122,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
 				if (mSkinInfo && mSkinInfo->mMeshID != volume_params.getSculptID())
 				{
 					mSkinInfo = NULL;
+					mSkinInfoFailed = false;
 				}
 
 				if (!getVolume()->isMeshAssetLoaded())
@@ -1176,6 +1178,7 @@ void LLVOVolume::updateSculptTexture()
 			mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
 		}
 
+		mSkinInfoFailed = false;
 		mSkinInfo = NULL;
 	}
 	else
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index e2a7c3b13f6e0fdaacacbad3c155e7e9bf720186..7c40877d9894eae7c63ce5f37d870a8a0f3dc168 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -96,17 +96,77 @@ LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item, co
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
+static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelWearableOutfitItem(&typeid(LLPanelWearableOutfitItem::Params), "wearable_outfit_list_item");
+
+LLPanelWearableOutfitItem::Params::Params()
+:   add_btn("add_btn"),
+    remove_btn("remove_btn")
+{
+}
+
+BOOL LLPanelWearableOutfitItem::postBuild()
+{
+    LLPanelWearableListItem::postBuild();
+    
+    LLViewerInventoryItem* inv_item = getItem();
+    mShowWidgets &= (inv_item->getType() != LLAssetType::AT_BODYPART);
+    if(mShowWidgets)
+    {
+        addWidgetToRightSide("add_wearable");
+        addWidgetToRightSide("remove_wearable");
+
+        childSetAction("add_wearable", boost::bind(&LLPanelWearableOutfitItem::onAddWearable, this));
+        childSetAction("remove_wearable", boost::bind(&LLPanelWearableOutfitItem::onRemoveWearable, this));
+
+        setWidgetsVisible(false);
+        reshapeWidgets();
+    }
+    return TRUE;
+}
+
+BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+    if(!mShowWidgets)
+    {
+        return LLPanelWearableListItem::handleDoubleClick(x, y, mask);
+    }
+
+    if(LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID))
+    {
+        onRemoveWearable();
+    }
+    else
+    {
+        onAddWearable();
+    }
+    return TRUE;
+}
+
+void LLPanelWearableOutfitItem::onAddWearable()
+{
+    setWidgetsVisible(false);
+    reshapeWidgets();
+    LLAppearanceMgr::instance().wearItemOnAvatar(mInventoryItemUUID, true, false);
+}
+
+void LLPanelWearableOutfitItem::onRemoveWearable()
+{
+    setWidgetsVisible(false);
+    reshapeWidgets();
+    LLAppearanceMgr::instance().removeItemFromAvatar(mInventoryItemUUID);
+}
 
 // static
 LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryItem* item,
-															 bool worn_indication_enabled)
+															 bool worn_indication_enabled,
+                                                             bool show_widgets)
 {
 	LLPanelWearableOutfitItem* list_item = NULL;
 	if (item)
 	{
-		const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>();
+		const LLPanelWearableOutfitItem::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelWearableOutfitItem>();
 
-		list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled, params);
+		list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled, params, show_widgets);
 		list_item->initFromParams(params);
 		list_item->postBuild();
 	}
@@ -114,11 +174,23 @@ LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryIt
 }
 
 LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item,
-													 bool worn_indication_enabled,
-													 const LLPanelWearableOutfitItem::Params& params)
-: LLPanelInventoryListItemBase(item, params)
+                                                     bool worn_indication_enabled,
+                                                     const LLPanelWearableOutfitItem::Params& params,
+                                                     bool show_widgets)
+: LLPanelWearableListItem(item, params)
 , mWornIndicationEnabled(worn_indication_enabled)
+, mShowWidgets(show_widgets)
 {
+    if(mShowWidgets)
+    {
+        LLButton::Params button_params = params.add_btn;
+        applyXUILayout(button_params, this);
+        addChild(LLUICtrlFactory::create<LLButton>(button_params));
+
+        button_params = params.remove_btn;
+        applyXUILayout(button_params, this);
+        addChild(LLUICtrlFactory::create<LLButton>(button_params));
+    }
 }
 
 // virtual
@@ -131,11 +203,22 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name,
 	// We don't use get_is_item_worn() here because this update is triggered by
 	// an inventory observer upon link in COF beind added or removed so actual
 	// worn status of a linked item may still remain unchanged.
-	if (mWornIndicationEnabled && LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID))
+    bool is_worn = LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID);
+	if (mWornIndicationEnabled && is_worn)
 	{
 		search_label += LLTrans::getString("worn");
 		item_state = IS_WORN;
 	}
+    if(mShowWidgets)
+    {
+        setShowWidget("add_wearable", !is_worn);
+        setShowWidget("remove_wearable", is_worn);
+        if(mHovered)
+        {
+            setWidgetsVisible(true);
+            reshapeWidgets();
+        }
+    }
 
 	LLPanelInventoryListItemBase::updateItem(search_label, item_state);
 }
@@ -638,6 +721,7 @@ static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_i
 LLWearableItemsList::Params::Params()
 :	standalone("standalone", true)
 ,	worn_indication_enabled("worn_indication_enabled", true)
+,   show_item_widgets("show_item_widgets", false)
 {}
 
 LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
@@ -653,6 +737,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
 	}
 	mWornIndicationEnabled = p.worn_indication_enabled;
 	setNoItemsCommentText(LLTrans::getString("LoadingData"));
+    mShowItemWidgets = p.show_item_widgets;
 }
 
 // virtual
@@ -669,7 +754,7 @@ LLPanel* LLWearableItemsList::createNewItem(LLViewerInventoryItem* item)
         return NULL;
     }
 
-    return LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled);
+    return LLPanelWearableOutfitItem::create(item, mWornIndicationEnabled, mShowItemWidgets);
 }
 
 void LLWearableItemsList::updateList(const LLUUID& category_id)
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index bb431bb8d128ac465087349ecb5291ae21ec3c56..4fd056f6546828d5b36d05a1f6a374b2666d6757 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -72,12 +72,23 @@ class LLPanelWearableListItem : public LLPanelInventoryListItemBase
  * Extends LLPanelInventoryListItemBase with handling
  * double click to wear the item.
  */
-class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase
+class LLPanelWearableOutfitItem : public LLPanelWearableListItem
 {
 	LOG_CLASS(LLPanelWearableOutfitItem);
 public:
+    struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params>
+    {
+        Optional<LLButton::Params>   add_btn, remove_btn;
+
+        Params();
+    };
+
+    BOOL postBuild();
+    BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
 	static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item,
-											 bool worn_indication_enabled);
+											 bool worn_indication_enabled,
+                                             bool show_widgets);
 
 	/**
 	 * Updates item name and (worn) suffix.
@@ -85,12 +96,16 @@ class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase
 	/*virtual*/ void updateItem(const std::string& name,
 								EItemState item_state = IS_DEFAULT);
 
+    void onAddWearable();
+    void onRemoveWearable();
+
 protected:
 	LLPanelWearableOutfitItem(LLViewerInventoryItem* item,
-							  bool worn_indication_enabled, const Params& params);
+							  bool worn_indication_enabled, const Params& params, bool show_widgets = false);
 
 private:
 	bool	mWornIndicationEnabled;
+    bool mShowWidgets;
 };
 
 class LLPanelDeletableWearableListItem : public LLPanelWearableListItem
@@ -442,6 +457,7 @@ class LLWearableItemsList final : public LLInventoryItemsList
 	{
 		Optional<bool> standalone;
 		Optional<bool> worn_indication_enabled;
+        Optional<bool> show_item_widgets;
 
 		Params();
 	};
@@ -482,6 +498,7 @@ class LLWearableItemsList final : public LLInventoryItemsList
 
 	bool mIsStandalone;
 	bool mWornIndicationEnabled;
+    bool mShowItemWidgets;
 
 	ESortOrder		mSortOrder;
 
diff --git a/indra/newview/skins/default/textures/icons/add_icon.png b/indra/newview/skins/default/textures/icons/add_icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..cb68ee8e16d59fc379949164be128432622f8cdf
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/add_icon.png differ
diff --git a/indra/newview/skins/default/textures/icons/remove_icon.png b/indra/newview/skins/default/textures/icons/remove_icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e62ee33f49f64c703bf0557cfc683ee5612219f
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/remove_icon.png differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 53004b040d36dc22138902c6c7a82893d714c49e..b0da45a5c2aed86e42a65c6cbaa02b120522bfb5 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -766,6 +766,9 @@ with the same filename but different name
   
   <texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" />
 
+  <texture name="Add_Icon" file_name="icons/add_icon.png" preload="false" />
+  <texture name="Remove_Icon" file_name="icons/remove_icon.png" preload="false" />
+
   <texture name="Web_Profile_Off" file_name="icons/Web_Profile_Off.png" preload="false" />
 
   <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png"  preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml
index eb283a1043d57dc1123ccfdd09efcfee6267606a..889efa061c1a3765a02866a63987bd3425d5b139 100644
--- a/indra/newview/skins/default/xui/en/floater_object_weights.xml
+++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml
@@ -2,7 +2,7 @@
 <floater
  can_close="true"
  can_tear_off="false"
- height="315"
+ height="289"
  help_topic="object_weights"
  layout="topleft"
  name="object_weights"
@@ -320,23 +320,4 @@
      top_delta="0"
      value="Total capacity"
      width="130" />
-    <view_border
-     bevel_style="none"
-     follows="top|left"
-     height="0"
-     layout="topleft"
-     left="10"
-     name="land_impacts_text_border"
-     top_pad="5"
-     width="180"/>
-
-    <text
-     follows="left|top"
-     height="16"
-     layout="topleft"
-     left="10"
-     name="help_SLURL"
-     top_pad="10"
-     value="[secondlife:///app/help/object_weights What is all this?...]"
-     width="180" />
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index 912db80bccc00904990ba07335af9b98b829d288..ec03d7d32cd637d1a6827ce0a65e7f90d5782dd9 100644
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -3,7 +3,7 @@
  legacy_header_height="18"
  can_resize="true"
  default_tab_group="1"
- height="370"
+ height="350"
  layout="topleft"
  min_height="190"
  min_width="285"
@@ -31,62 +31,18 @@
      background_visible="false"
      draw_border="false"
      follows="all"
-     height="240"
+     height="265"
      layout="topleft"
+     show_root_folder="false"
      left="10"
      name="object_contents"
      top_pad="0"
      width="284" />
-  	<view_border
-     bevel_style="none"
-     follows="bottom|left"
-     height="50"
-     highlight_light_color="0.6 0.6 0.6"
-     layout="topleft"
-     left="10"
-     name="border"
-     top_pad="5"
-     width="270"/> 
-  	<text
-  	 follows="bottom|left"
-  	 height="15"
-  	 layout="topleft"
-  	 left="15"
-  	 name="border_note"
-  	 text_color="White"
-  	 top_delta="5">
-  	 	Copy to inventory and wear
-    </text>  
- 	<button
-     follows="bottom|left"
-     height="23"
-     label="Add to outfit"
-     label_selected="Add to outfit"
-     layout="topleft"
- 	 left="15"    
-     name="copy_and_wear_button" 	
- 	 top_pad="3"	
-     width="135">
-        <button.commit_callback
-         function="OpenObject.MoveAndWear" />
-    </button>
-	<button
-     follows="bottom|left"
-     height="23"
-     label="Replace outfit"
-     label_selected="Replace outfit"
-     layout="topleft"
-     left_pad="5"
-     name="copy_and_replace_button"
-     width="120">
-        <button.commit_callback
-         function="OpenObject.ReplaceOutfit" />
-    </button>  
     <button
      follows="bottom|left"
      height="23"
      label="Only copy to inventory"
-     label_selected="Only copy to inventory"
+     label_selected="Copy to inventory"
      layout="topleft"
      left="15"
      name="copy_to_inventory_button"
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index 41384a77b835b259cf37ebac3e9f0be55ca954d8..59117c01782d85513fa74987116c651adc5b1adf 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -82,17 +82,20 @@
         width="62">
       Name
     </text>
-    <line_editor
-        border_style="line"
-        border_thickness="1"
-        follows="left|top"
-        height="20"
-        layout="topleft"
-        left_pad="0"
-        top_pad="-18"
-        max_length_chars="255"
-        name="filter_by_name"
-        width="161" />
+
+    <search_editor
+       follows="left|top"
+       search_button_visible="false"
+       height="20"
+       text_readonly_color="DkGray"
+       label="Objects by Name"
+       layout="topleft"
+       left_pad="0"
+       top_pad="-18"
+       name="filter_by_name"
+       select_on_focus="true"
+       width="161">
+    </search_editor>
     <text
         name="linksets_desc_label"
         height="13"
@@ -108,17 +111,19 @@
         width="88">
       Description
     </text>
-    <line_editor
-        border_style="line"
-        border_thickness="1"
-        follows="left|top"
-        height="20"
-        layout="topleft"
-        left_pad="0"
-        top_pad="-17"
-        max_length_chars="255"
-        name="filter_by_description"
-        width="162" />
+    <search_editor
+       follows="left|top"
+       search_button_visible="false"
+       height="20"
+       text_readonly_color="DkGray"
+       label="Objects by Description"
+       layout="topleft"
+       left_pad="0"
+       top_pad="-17"
+       name="filter_by_description"
+       select_on_focus="true"
+       width="162">
+    </search_editor>
     <combo_box
         height="20"
         layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
index 3ed2bd72061c4e27a4e506c3b6969d58336bd986..e4fda5cd108320022ef3be55fb44b29f5f72ecbb 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
@@ -2,41 +2,79 @@
 <floater
  legacy_header_height="18"
  can_minimize="false"
- height="215"
+ height="360"
+ min_height="367"
  layout="topleft"
  name="settings_debug"
  help_topic="settings_debug"
  title="DEBUG SETTINGS"
- width="350">
-    <combo_box
-     allow_text_entry="true"
-     follows="top|left"
-     height="22"
-     layout="topleft"
-     left="15"
-     max_chars="255"
-     name="settings_combo"
-     top="30"
-     width="320">
-      <combo_box.commit_callback
-       function="SettingSelect" />
-    </combo_box>
-    <text_editor
-     enabled="false"
-     height="60"
-     layout="topleft"
-     left_delta="0"
-     name="comment_text"
-     top_pad="10"
-     width="320"
-     word_wrap="true" />
+ reuse_instance="true"
+ can_resize="true"
+ min_width="550"
+ width="570">
+  <filter_editor
+   follows="left|top|right"
+   height="23"
+   layout="topleft"
+   left="10"
+   right="-10"
+   label="Enter search text"
+   max_length_chars="300"
+   name="filter_input"
+   text_pad_left="10"
+   top="30" />
+  <scroll_list
+   column_padding="0"
+   draw_heading="true"
+   draw_stripes="false"
+   heading_height="23"
+   height="266"
+   layout="topleft"
+   search_column="1"
+   left="10"
+   follows="left|top|bottom"
+   name="setting_list"
+   top_pad="2"
+   width="300">
+    <scroll_list.columns
+     name="changed_setting"
+     relative_width="0.05"  />
+    <scroll_list.columns
+     label="Setting"
+     name="setting" />
+  </scroll_list>
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="16"
+   layout="topleft"
+   name="setting_name_txt"
+   font="SansSerifSmallBold"
+   top_delta="8"
+   left_pad="10"
+   visible="false"
+   use_ellipses="true"
+   text_color="White"
+   width="240">
+    Debug setting name
+  </text>
+  <text_editor
+   enabled="false"
+   height="75"
+   layout="topleft"
+   visible="false"
+   name="comment_text"
+   follows="left|top"
+   width="240"
+   top_delta="20"
+   word_wrap="true" />
   <radio_group
    follows="top|left"
    height="30"
    layout="topleft"
-   left_delta="0"
    name="boolean_combo"
-   top_pad="10"
+   top_pad="15"
    visible="false"
    tab_stop="true" 
    width="100">
@@ -55,21 +93,25 @@
   </radio_group>
     <line_editor
      height="20"
+     follows="top|left"
      layout="topleft"
      left_delta="0"
      name="val_text"
      top_delta="0"
      visible="false"
-     width="300" >
+     width="220" >
       <line_editor.commit_callback
        function="CommitSettings" />
     </line_editor>
     <color_swatch
-     bottom="185"
+     top_delta="0"
+     left_delta="0"
+     follows="top|left"
      can_apply_immediately="true"
      height="55"
      name="val_color_swatch"
      label="Color"
+     visible="false"
      layout="topleft"
      width="37" >
       <color_swatch.commit_callback
@@ -79,10 +121,11 @@
      height="20"
      label="x"
      layout="topleft"
+     follows="top|left"
      left_delta="0"
      max_val="1e+007"
      name="val_spinner_1"
-     top_delta="10"
+     top_delta="5"
      visible="false"
      width="120" >
       <spinner.commit_callback
@@ -92,10 +135,11 @@
      height="20"
      label="x"
      layout="topleft"
-     left_pad="15"
+     follows="top|left"
+     left_delta="0"
      max_val="1e+007"
      name="val_spinner_2"
-     top_delta="0"
+     top_pad="10"
      visible="false"
      width="120">
       <spinner.commit_callback
@@ -105,10 +149,11 @@
      height="20"
      label="x"
      layout="topleft"
-     left="15"
+     follows="top|left"
+     left_delta="0"
      max_val="1e+007"
      name="val_spinner_3"
-     top="160"
+     top_pad="10"
      visible="false"
      width="120">
       <spinner.commit_callback
@@ -118,10 +163,11 @@
      height="20"
      label="x"
      layout="topleft"
-     left_pad="15"
+     follows="top|left"
+     left_delta="0"
      max_val="1e+007"
      name="val_spinner_4"
-     top_delta="0"
+     top_pad="10"
      visible="false"
      width="120" >
       <spinner.commit_callback
@@ -130,12 +176,26 @@
     <button
      height="22"
      label="Reset to default"
+     follows="left|top"
      layout="topleft"
-     left="15"
+     left_delta="0"
      name="default_btn"
-     top="186"
+     visible="false"
+     top_pad="10"
      width="150" >
       <button.commit_callback
        function="ClickDefault" />
     </button>
+    <check_box
+      control_name="DebugSettingsHideDefault"
+      height="16"
+      initial_value="true"
+      label="Show changed settings only"
+      layout="topleft"
+      top_pad="10"
+      left="10"
+      follows="left|bottom"
+      name="hide_default"
+      width="330">
+    </check_box>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
index 2a24c74febd824fa81d29e31faea390b998f90b8..d74dca8b95cd804bc128720ae889d81caf3643e9 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -18,6 +18,7 @@
      follows="all"
      keep_one_selected="true"
      multi_select="true"
+     show_item_widgets="true"
      name="wearable_items_list"
      translate="false"
      standalone="false"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
index b016df876be9c54380c9904b03147cb495d6be0d..9888b4d18faecf21fe88ac3207c4f9be259e6ee0 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
@@ -36,6 +36,7 @@
      left="3"
      multi_select="true"
      name="cof_items_list"
+     show_item_widgets="true"
      standalone="false"
      top="0"
      width="309"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index 5cc7c91187a5f7b92e1ee1eb166d5ab6aa218f62..73be714d92a5ad0dc967abcdd218c3c92024a529 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -300,7 +300,7 @@
     <button
       follows="left|top"
       label="Clear History"
-      tool_tip="Clear login image, last location, teleport history, web and texture cache"
+      tool_tip="Clear search and teleport history, web and texture cache"
       layout="topleft"
       left="30"
       name="clear_cache"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index 551b4778762a98af802aab0183462caf5684a1be..777b37d66675dcae63d5b23bd6906c3a43574810 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -9,9 +9,13 @@
  follows="all"
  layout="topleft"
 >
+  <!--
+  Date from server comes already converted to stl timezone,
+  so display it as an UTC+0
+  -->
    <string 
     name="date_format"
-    value="SL birthdate: [mth,datetime,slt] [day,datetime,slt], [year,datetime,slt]" />
+    value="SL birthdate: [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]" />
    <string
     name="age_format"
     value="[AGE]" />
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 68addf82f01cadf4098a7e969c2e7f5dae561c67..e1e8972feb83037da9085509d13175739f23faff 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4021,7 +4021,7 @@ Please check http://status.secondlifegrid.net to see if there is a known problem
   <string name="Premium_PlusMembership">Premium Plus</string>
   <string name="InternalMembership">Internal</string> <!-- No need to translate -->
 
-  <string name="MembershipUpgradeText">Upgrade to Premium</string>
+  <string name="MembershipUpgradeText">Change membership plan...</string>
   <string name="MembershipPremiumText">My Premium membership</string>
 
   <!-- Question strings for delete items notifications -->
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 1c4822b8d5be373e15eedf18e32c9ca677c2953e..9c80deeafc242e20ed8c496e27f2299406917505 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -6,7 +6,7 @@
   text_pad_left="7"
   select_on_focus="true"
   text_tentative_color="TextFgTentativeColor"
-  highlight_text_field="false"
+  highlight_text_field="true"
   background_image="TextField_Search_Off"
   background_image_disabled="TextField_Search_Disabled"
   background_image_focused="TextField_Search_Active"
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index dc5a07bf4f40bed427dc297869ef542a5ddd13f0..18d99f1ed15151abd29a72cef687838926c2955a 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -7,7 +7,7 @@
   text_pad_right="6" 
   select_on_focus="true"
   text_tentative_color="TextFgTentativeColor"
-  highlight_text_field="false"
+  highlight_text_field="true"
   background_image="TextField_Search_Off"
   background_image_disabled="TextField_Search_Disabled"
   background_image_focused="TextField_Search_Active"
diff --git a/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
new file mode 100644
index 0000000000000000000000000000000000000000..cd84b91b1fd07088322a6740d5623531f4692248
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<inventory_list_item
+  follows="top|right|left"
+  height="20"
+  name="inventory_item"
+  tab_stop="false" 
+  hover_image="ListItem_Over"
+  selected_image="ListItem_Select"
+  separator_image="Wearables_Divider" 
+  width="380">
+  <!-- DEFAULT style for inventory list item -->
+  <default_style
+   font="SansSerifSmall"
+   font.style="NORMAL" />
+
+  <!-- style for inventory list item WORN on avatar -->
+  <worn_style
+   font="SansSerifSmall"
+   font.style="BOLD"
+   color="EmphasisColor" />
+  <item_icon
+    height="16"
+    follows="top|left"
+    image_name="Inv_Object"
+    layout="topleft"
+    left="0"
+    name="item_icon"
+    top="0"
+    width="16" />
+  <item_name
+    follows="left|right"
+    height="20"
+    layout="topleft"
+    left="21"
+    parse_urls="false"
+    use_ellipses="true"
+    name="item_name"
+    text_color="white"
+    top="4"
+    value="..."
+    width="359" />
+    <add_btn
+     name="add_wearable"
+     layout="topleft"
+     follows="top|right"
+     image_unselected="Add_Icon"
+     image_selected="Add_Icon"
+     top="1"
+     left="0"
+     height="16"
+     width="16"
+     tab_stop="false" />
+    <remove_btn
+     name="remove_wearable"
+     layout="topleft"
+     follows="top|right"
+     image_unselected="Remove_Icon"
+     image_selected="Remove_Icon"
+     top="1"
+     left="26"
+     height="16"
+     width="16"
+     tab_stop="false" />
+</inventory_list_item>