diff --git a/.hgtags b/.hgtags
index 797f517d841f093d5a58eba6535c1d5b1272f69d..47413e0553341bd8f4561f665b59a6b43cb13c17 100755
--- a/.hgtags
+++ b/.hgtags
@@ -523,3 +523,5 @@ b280a1c797a3891e68dbc237e73de9cf19f426e9 4.1.1-release
 bfbba2244320dc2ae47758cd7edd8fa3b67dc756 4.1.2-release
 b41e1e7c7876f7656c505f552b5888b4e478f92b 5.0.0-release
 c9ce2295012995e3cf5c57bcffcb4870b94c649f 5.0.1-release
+cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release
+02c24e9f4f7d8aa0de75f27817dda098582f4936 5.0.3-release
diff --git a/autobuild.xml b/autobuild.xml
index a655c7cae2fa3d5a6e37fb1b8d60b04bed2da2de..41bdf287ac5ae0ed81ef24a23708242a06245bd8 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -507,6 +507,60 @@
         <key>version</key>
         <string>1.500564</string>
       </map>
+      <key>dullahan</key>
+      <map>
+        <key>copyright</key>
+        <string>Copyright (c) 2017, Linden Research, Inc.</string>
+        <key>description</key>
+        <string>A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies.</string>
+        <key>license</key>
+        <string>MPL</string>
+        <key>license_file</key>
+        <string>LICENSES/LICENSE.txt</string>
+        <key>name</key>
+        <string>dullahan</string>
+        <key>platforms</key>
+        <map>
+          <key>darwin64</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>66ba275f79d3dfcb6943a9cbe5dd6d94</string>
+              <key>url</key>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3188/7675/dullahan-1.0.620_3.2704.1434.gec3e9ed-darwin64-503177.tar.bz2</string>
+            </map>
+            <key>name</key>
+            <string>darwin64</string>
+          </map>
+          <key>windows</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>fe07cd0dc8d706975850be45e3c1e752</string>
+              <key>url</key>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3190/7682/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows-503177.tar.bz2</string>
+            </map>
+            <key>name</key>
+            <string>windows</string>
+          </map>
+          <key>windows64</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>2385864496065bac20ee35d0afddb84f</string>
+              <key>url</key>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3191/7687/dullahan-1.0.620_3.2704.1434.gec3e9ed-windows64-503177.tar.bz2</string>
+            </map>
+            <key>name</key>
+            <string>windows64</string>
+          </map>
+        </map>
+        <key>version</key>
+        <string>1.0.620_3.2704.1434.gec3e9ed</string>
+      </map>
       <key>elfio</key>
       <map>
         <key>license</key>
@@ -1412,9 +1466,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>2a33d85c5afa07612e8c4f314ab29545</string>
+              <string>4e7fef9c6ae9b7ccf19b7fdb96912b9c</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/478/1016/jpeglib-8c.500387-darwin64-500387.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3152/7571/jpeglib-8c.503140-darwin64-503140.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin64</string>
@@ -1436,9 +1490,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>7d699142394f54a334b4fd203b4c9eea</string>
+              <string>ba9c62863ec338a049de83c24639f57c</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/457/970/jpeglib-8c.500387-linux64-500387.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3151/7568/jpeglib-8c.503140-linux64-503140.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -1448,9 +1502,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>543e25c3819399f37e0453db5eea558a</string>
+              <string>00523662f6a7388377166e9415e113e9</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/497/1062/jpeglib-8c.500387-windows-500387.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3153/7557/jpeglib-8c.503140-windows-503140.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
@@ -1460,16 +1514,16 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>dbc2baf28f83d1646d7e2f66ead2a1a4</string>
+              <string>70ed49ed2317b6dba9af1f186956ac79</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/494/1049/jpeglib-8c.500387-windows64-500387.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/3154/7558/jpeglib-8c.503140-windows64-503140.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
         <key>version</key>
-        <string>8c.500387</string>
+        <string>8c.503140</string>
       </map>
       <key>jsoncpp</key>
       <map>
@@ -2111,76 +2165,6 @@
         <key>version</key>
         <string>0.8.6.318106</string>
       </map>
-      <key>llceflib</key>
-      <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2014, Linden Research, Inc.</string>
-        <key>description</key>
-        <string>LLCefLib implements a headless web browser, rendering modern web content to a memory buffer and providing an API for injecting mouse and keyboard events. It uses the Chromium Embedded Framework (https://bitbucket.org/chromiumembedded/cef)</string>
-        <key>license</key>
-        <string>LGPL</string>
-        <key>license_file</key>
-        <string>LICENSES/LICENSE-source.txt</string>
-        <key>name</key>
-        <string>llceflib</string>
-        <key>platforms</key>
-        <map>
-          <key>darwin</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>2845033912eb947a1401847ece1469ce</string>
-              <key>hash_algorithm</key>
-              <string>md5</string>
-              <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/321153/arch/Darwin/installer/llceflib-1.5.3.321153-darwin-321153.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>darwin</string>
-          </map>
-          <key>darwin64</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>3af1210d90aeb9f4d5deea6020ee0d55</string>
-              <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1611/3591/llceflib-1.6.0.501600-darwin64-501600.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>darwin64</string>
-          </map>
-          <key>windows</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>9d19271829a372e028dd3c75605ded9c</string>
-              <key>hash_algorithm</key>
-              <string>md5</string>
-              <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1518/3437/llceflib-1.6.0.501501-windows-501501.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>windows</string>
-          </map>
-          <key>windows64</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>da1835b11be4442f22fef36820ad46ac</string>
-              <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1517/3434/llceflib-1.6.0.501501-windows64-501501.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>windows64</string>
-          </map>
-        </map>
-        <key>version</key>
-        <string>1.6.0.501600</string>
-      </map>
       <key>llphysicsextensions_source</key>
       <map>
         <key>copyright</key>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 46286f99c16d61cdbe98412f8bbeed496741a463..0fb6110adb5c2b1e32063ccdec40b86a70dd37be 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -213,6 +213,7 @@ Ansariel Hiller
 	STORM-2141
 	MAINT-6953
 	MAINT-7028
+	MAINT-7059
 Aralara Rajal
 Arare Chantilly
 	CHUIBUG-191
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 9cfb7d14c7994d06d1e0163b15e3e1a46b7b78d6..b8e569d3a844886581c7de916388ca5291d0d3c1 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -6,7 +6,7 @@ if (USESYSTEMLIBS)
     set(CEFPLUGIN OFF CACHE BOOL
         "CEFPLUGIN support for the llplugin/llmedia test apps.")
 else (USESYSTEMLIBS)
-    use_prebuilt_binary(llceflib)
+    use_prebuilt_binary(dullahan)
     set(CEFPLUGIN ON CACHE BOOL
         "CEFPLUGIN support for the llplugin/llmedia test apps.")
         set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef)
@@ -16,7 +16,7 @@ if (WINDOWS)
     set(CEF_PLUGIN_LIBRARIES
         libcef.lib
         libcef_dll_wrapper.lib
-        llceflib.lib
+        dullahan.lib
     )
 elseif (DARWIN)
     FIND_LIBRARY(APPKIT_LIBRARY AppKit)
@@ -31,7 +31,7 @@ elseif (DARWIN)
 
     set(CEF_PLUGIN_LIBRARIES
         ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
-        ${ARCH_PREBUILT_DIRS_RELEASE}/libLLCefLib.a
+        ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
         ${APPKIT_LIBRARY}
         ${CEF_LIBRARY}
        )
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index e6407ecf220b0df466bb3542a745df6c1ab415d8..2ddb3edbdd38e2020936a77d7b780c7cea65872e 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1067,7 +1067,15 @@ namespace LLError
 		{
 			return false;
 		}
-		
+
+		// If we hit a logging request very late during shutdown processing,
+		// when either of the relevant LLSingletons has already been deleted,
+		// DO NOT resurrect them.
+		if (Settings::wasDeleted() || Globals::wasDeleted())
+		{
+			return false;
+		}
+
 		SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
 		
 		s->mShouldLogCallCounter++;
@@ -1106,7 +1114,10 @@ namespace LLError
 	std::ostringstream* Log::out()
 	{
 		LogLock lock;
-		if (lock.ok())
+		// If we hit a logging request very late during shutdown processing,
+		// when either of the relevant LLSingletons has already been deleted,
+		// DO NOT resurrect them.
+		if (lock.ok() && ! (Settings::wasDeleted() || Globals::wasDeleted()))
 		{
 			Globals* g = Globals::getInstance();
 
@@ -1116,41 +1127,49 @@ namespace LLError
 				return &g->messageStream;
 			}
 		}
-		
+
 		return new std::ostringstream;
 	}
-	
+
 	void Log::flush(std::ostringstream* out, char* message)
-    {
-       LogLock lock;
-       if (!lock.ok())
-       {
-           return;
-       }
-       
-	   if(strlen(out->str().c_str()) < 128)
-	   {
-		   strcpy(message, out->str().c_str());
-	   }
-	   else
-	   {
-		   strncpy(message, out->str().c_str(), 127);
-		   message[127] = '\0' ;
-	   }
-	   
-	   Globals* g = Globals::getInstance();
-       if (out == &g->messageStream)
-       {
-           g->messageStream.clear();
-           g->messageStream.str("");
-           g->messageStreamInUse = false;
-       }
-       else
-       {
-           delete out;
-       }
-	   return ;
-    }
+	{
+		LogLock lock;
+		if (!lock.ok())
+		{
+			return;
+		}
+
+		// If we hit a logging request very late during shutdown processing,
+		// when either of the relevant LLSingletons has already been deleted,
+		// DO NOT resurrect them.
+		if (Settings::wasDeleted() || Globals::wasDeleted())
+		{
+			return;
+		}
+
+		if(strlen(out->str().c_str()) < 128)
+		{
+			strcpy(message, out->str().c_str());
+		}
+		else
+		{
+			strncpy(message, out->str().c_str(), 127);
+			message[127] = '\0' ;
+		}
+
+		Globals* g = Globals::getInstance();
+		if (out == &g->messageStream)
+		{
+			g->messageStream.clear();
+			g->messageStream.str("");
+			g->messageStreamInUse = false;
+		}
+		else
+		{
+			delete out;
+		}
+		return ;
+	}
 
 	void Log::flush(std::ostringstream* out, const CallSite& site)
 	{
@@ -1159,7 +1178,15 @@ namespace LLError
 		{
 			return;
 		}
-		
+
+		// If we hit a logging request very late during shutdown processing,
+		// when either of the relevant LLSingletons has already been deleted,
+		// DO NOT resurrect them.
+		if (Settings::wasDeleted() || Globals::wasDeleted())
+		{
+			return;
+		}
+
 		Globals* g = Globals::getInstance();
 		SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
 
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 97270e4931d7cfc7a0b7196173abffd94a62c728..a3856e4fc46b71f6c62a3a4e6bd3e8a057996bdd 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -281,7 +281,8 @@ const std::string LLEventPump::ANONYMOUS = std::string();
 
 LLEventPump::LLEventPump(const std::string& name, bool tweak):
     // Register every new instance with LLEventPumps
-    mName(LLEventPumps::instance().registerNew(*this, name, tweak)),
+    mRegistry(LLEventPumps::instance().getHandle()),
+    mName(mRegistry.get()->registerNew(*this, name, tweak)),
     mSignal(new LLStandardSignal()),
     mEnabled(true)
 {}
@@ -292,8 +293,13 @@ LLEventPump::LLEventPump(const std::string& name, bool tweak):
 
 LLEventPump::~LLEventPump()
 {
-    // Unregister this doomed instance from LLEventPumps
-    LLEventPumps::instance().unregister(*this);
+    // Unregister this doomed instance from LLEventPumps -- but only if
+    // LLEventPumps is still around!
+    LLEventPumps* registry = mRegistry.get();
+    if (registry)
+    {
+        registry->unregister(*this);
+    }
 }
 
 // static data member
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 7cff7dfd4537b99d99c0a83f6753c941375b7000..1d51c660ed0d7990c63a4f93c875b2e61597a7f8 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -62,6 +62,7 @@
 #include "lldependencies.h"
 #include "llstl.h"
 #include "llexception.h"
+#include "llhandle.h"
 
 /*==========================================================================*|
 // override this to allow binding free functions with more parameters
@@ -227,7 +228,15 @@ class LLEventPump;
  * LLEventPumps is a Singleton manager through which one typically accesses
  * this subsystem.
  */
-class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>
+// LLEventPumps isa LLHandleProvider only for (hopefully rare) long-lived
+// class objects that must refer to this class late in their lifespan, say in
+// the destructor. Specifically, the case that matters is a possible reference
+// after LLEventPumps::deleteSingleton(). (Lingering LLEventPump instances are
+// capable of this.) In that case, instead of calling LLEventPumps::instance()
+// again -- resurrecting the deleted LLSingleton -- store an
+// LLHandle<LLEventPumps> and test it before use.
+class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>,
+                                  public LLHandleProvider<LLEventPumps>
 {
     LLSINGLETON(LLEventPumps);
 public:
@@ -590,6 +599,9 @@ class LL_COMMON_API LLEventPump: public LLEventTrackable
         return this->listen_impl(name, listener, after, before);
     }
 
+    // must precede mName; see LLEventPump::LLEventPump()
+    LLHandle<LLEventPumps> mRegistry;
+
     std::string mName;
 
 protected:
@@ -817,14 +829,14 @@ class LL_COMMON_API LLListenerWrapperBase
         mConnection(new LLBoundListener)
     {
     }
-	
+
     /// Copy constructor. Copy shared_ptrs to original instance data.
     LLListenerWrapperBase(const LLListenerWrapperBase& that):
         mName(that.mName),
         mConnection(that.mConnection)
     {
     }
-	virtual ~LLListenerWrapperBase() {}
+    virtual ~LLListenerWrapperBase() {}
 
     /// Ask LLEventPump::listen() for the listener name
     virtual void accept_name(const std::string& name) const
diff --git a/indra/llcommon/llhandle.h b/indra/llcommon/llhandle.h
index feb5f418489e5b401eff95591ba4dd0fc31dbd66..570cd330b87ff228e33f938da79ef184c1a41f32 100644
--- a/indra/llcommon/llhandle.h
+++ b/indra/llcommon/llhandle.h
@@ -28,6 +28,7 @@
 #define LLHANDLE_H
 
 #include "llpointer.h"
+#include "llrefcount.h"
 #include "llexception.h"
 #include <stdexcept>
 #include <boost/type_traits/is_convertible.hpp>
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 1b915dfd6e96d927fd520ba58415c52387295049..0d4a1f34f8726d511716d52e10fcb05130a43f75 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -452,6 +452,14 @@ class LLSingleton : public LLSingletonBase
         return sData.mInitState == INITIALIZED;
     }
 
+    // Has this singleton been deleted? This can be useful during shutdown
+    // processing to avoid "resurrecting" a singleton we thought we'd already
+    // cleaned up.
+    static bool wasDeleted()
+    {
+        return sData.mInitState == DELETED;
+    }
+
 private:
     struct SingletonData
     {
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index cb29da8f5fe8d8674229c5d046895f7637d8198d..4048b9a43d0fa13e8fa83c3d5f8ac4170ab3b05f 100644
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -98,6 +98,7 @@ std::string report_kdu_exception(kdu_exception mb)
 }
 } // anonymous namespace
 
+
 class kdc_flow_control {
 	
 public:
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index f63a721c35c9e5d7819ca96eaa60e71e96feae16..274ec50f20da0c524814fc6ad697a35f2ac48db7 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -3697,10 +3697,46 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
 			continue;
 		}
 
-		if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) {
+		if (face.mTypeMask & (LLVolumeFace::CAP_MASK))
+		{
+			LLVector4a* v = (LLVector4a*)face.mPositions;
+			LLVector4a* n = (LLVector4a*)face.mNormals;
+
+			for (U32 j = 0; j < face.mNumIndices / 3; j++)
+			{
+				for (S32 k = 0; k < 3; k++)
+				{
+					S32 index = face.mEdge[j * 3 + k];
+
+					if (index == -1)
+					{
+						// silhouette edge, currently only cubes, so no other conditions
+
+						S32 v1 = face.mIndices[j * 3 + k];
+						S32 v2 = face.mIndices[j * 3 + ((k + 1) % 3)];
+
+						LLVector4a t;
+						mat.affineTransform(v[v1], t);
+						vertices.push_back(LLVector3(t[0], t[1], t[2]));
+
+						norm_mat.rotate(n[v1], t);
+
+						t.normalize3fast();
+						normals.push_back(LLVector3(t[0], t[1], t[2]));
+
+						mat.affineTransform(v[v2], t);
+						vertices.push_back(LLVector3(t[0], t[1], t[2]));
+
+						norm_mat.rotate(n[v2], t);
+						t.normalize3fast();
+						normals.push_back(LLVector3(t[0], t[1], t[2]));
+					}
+				}
+			}
 	
 		}
-		else {
+		else
+		{
 
 			//==============================================
 			//DEBUG draw edge map instead of silhouette edge
@@ -5549,10 +5585,17 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
 	if (!partial_build)
 	{
 		resizeIndices(grid_size*grid_size*6);
+		if (!volume->isMeshAssetLoaded())
+		{
+			mEdge.resize(grid_size*grid_size * 6);
+		}
 
 		U16* out = mIndices;
 
 		S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0};
+
+		int cur_edge = 0;
+
 		for(S32 gx = 0;gx<grid_size;gx++)
 		{
 			
@@ -5563,7 +5606,49 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
 					for(S32 i=5;i>=0;i--)
 					{
 						*out++ = ((gy*(grid_size+1))+gx+idxs[i]);
-					}		
+					}
+
+					S32 edge_value = grid_size * 2 * gy + gx * 2;
+
+					if (gx > 0)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1; // Mark face to higlight it
+					}
+
+					if (gy < grid_size - 1)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					mEdge[cur_edge++] = edge_value;
+
+					if (gx < grid_size - 1)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					if (gy > 0)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					mEdge[cur_edge++] = edge_value;
 				}
 				else
 				{
@@ -5571,8 +5656,50 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
 					{
 						*out++ = ((gy*(grid_size+1))+gx+idxs[i]);
 					}
+
+					S32 edge_value = grid_size * 2 * gy + gx * 2;
+
+					if (gy > 0)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					if (gx < grid_size - 1)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					mEdge[cur_edge++] = edge_value;
+
+					if (gy < grid_size - 1)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					if (gx > 0)
+					{
+						mEdge[cur_edge++] = edge_value;
+					}
+					else
+					{
+						mEdge[cur_edge++] = -1;
+					}
+
+					mEdge[cur_edge++] = edge_value;
 				}
-			}	
+			}
 		}
 	}
 		
diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp
index d2115ee499616aa014cc97bbd0571f011861316b..7e1246f88578549f9b337be08c1ace0aed262b9a 100644
--- a/indra/llmessage/llavatarname.cpp
+++ b/indra/llmessage/llavatarname.cpp
@@ -166,10 +166,10 @@ void LLAvatarName::setExpires(F64 expires)
 	mExpires = LLFrameTimer::getTotalSeconds() + expires;
 }
 
-std::string LLAvatarName::getCompleteName(bool use_parentheses) const
+std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const
 {
 	std::string name;
-	if (sUseDisplayNames)
+	if (sUseDisplayNames || force_use_complete_name)
 	{
 		if (mUsername.empty() || mIsDisplayNameDefault)
 		{
@@ -180,7 +180,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses) const
 		else
 		{
 			name = mDisplayName;
-			if(sUseUsernames)
+			if(sUseUsernames || force_use_complete_name)
 			{
 				if(use_parentheses)
 				{
@@ -215,9 +215,9 @@ std::string LLAvatarName::getLegacyName() const
 	return name;
 }
 
-std::string LLAvatarName::getDisplayName() const
+std::string LLAvatarName::getDisplayName(bool force_use_display_name) const
 {
-	if (sUseDisplayNames)
+	if (sUseDisplayNames || force_use_display_name)
 	{
 		return mDisplayName;
 	}
diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h
index 192f43f07c7b24aa0576961d9a81024330a1a620..20f71407976d0b1fdbe32731d31bcab80ab96d29 100644
--- a/indra/llmessage/llavatarname.h
+++ b/indra/llmessage/llavatarname.h
@@ -65,7 +65,7 @@ class LL_COMMON_API LLAvatarName
 	
 	// For normal names, returns "James Linden (james.linden)"
 	// When display names are disabled returns just "James Linden"
-	std::string getCompleteName(bool use_parentheses = true) const;
+	std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const;
 	
 	// Returns "James Linden" or "bobsmith123 Resident" for backwards
 	// compatibility with systems like voice and muting
@@ -75,7 +75,7 @@ class LL_COMMON_API LLAvatarName
 	// "José Sanchez" or "James Linden", UTF-8 encoded Unicode
 	// Takes the display name preference into account. This is truly the name that should 
 	// be used for all UI where an avatar name has to be used unless we truly want something else (rare)
-	std::string getDisplayName() const;
+	std::string getDisplayName(bool force_use_display_name = false) const;
 	
 	// Returns "James Linden" or "bobsmith123 Resident"
 	// Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 848367f8a8da47ceffc82392b628f81b8db42671..8425774d465fcde4df07ab030cfffd0a0b199df2 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1736,6 +1736,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
 	mJumpKey(p.jump_key),
 	mCreateJumpKeys(p.create_jump_keys),
 	mNeedsArrange(FALSE),
+	mAlwaysShowMenu(FALSE),
 	mResetScrollPositionOnShow(true),
 	mShortcutPad(p.shortcut_pad)
 {
@@ -3223,20 +3224,23 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
 
 	menu->setVisible( TRUE );
 
-	//Do not show menu if all menu items are disabled
-	BOOL item_enabled = false;
-	for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin();
-			 itor != menu->getChildList()->end();
-			 ++itor)
+	if(!menu->getAlwaysShowMenu())
 	{
-		LLView *menu_item = (*itor);
-		item_enabled = item_enabled || menu_item->getEnabled();
-	}
+		//Do not show menu if all menu items are disabled
+		BOOL item_enabled = false;
+		for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin();
+				itor != menu->getChildList()->end();
+				++itor)
+		{
+			LLView *menu_item = (*itor);
+			item_enabled = item_enabled || menu_item->getEnabled();
+		}
 
-	if(!item_enabled)
-	{
-		menu->setVisible( FALSE );
-		return;
+		if(!item_enabled)
+		{
+			menu->setVisible( FALSE );
+			return;
+		}
 	}
 
 	// Save click point for detecting cursor moves before mouse-up.
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index c7f7f6848cd7fa186e7564a365f6616af817026d..69f7d2151348951a5fce0e8cabb0d5a132f86ae1 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -531,6 +531,9 @@ class LLMenuGL
 	void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
 	bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
 
+	void setAlwaysShowMenu(BOOL show) { mAlwaysShowMenu = show; }
+	BOOL getAlwaysShowMenu() { return mAlwaysShowMenu; }
+
 	// add a context menu branch
 	BOOL appendContextSubMenu(LLMenuGL *menu);
 
@@ -572,6 +575,8 @@ class LLMenuGL
 	static LLColor4 sDefaultBackgroundColor;
 	static BOOL		sKeyboardMode;
 
+	BOOL			mAlwaysShowMenu;
+
 	LLUIColor		mBackgroundColor;
 	BOOL			mBgVisible;
 	LLHandle<LLView> mParentMenuItem;
diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp
index 8cf72928ffc885579bedc3998c65abe0f0db6b33..2c7e7ab13d8d2c88e531e0a45ae6a563f313aa15 100644
--- a/indra/llui/llradiogroup.cpp
+++ b/indra/llui/llradiogroup.cpp
@@ -54,6 +54,7 @@ class LLRadioCtrl : public LLCheckBoxCtrl
 	/*virtual*/ void setValue(const LLSD& value);
 
 	/*virtual*/ BOOL postBuild();
+	/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
 
 	LLSD getPayload() { return mPayload; }
 
@@ -224,6 +225,22 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
 	return TRUE;
 }
 
+void LLRadioGroup::focusSelectedRadioBtn()
+{
+    if (mSelectedIndex >= 0)
+    {
+        LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
+        if (radio_item->hasTabStop() && radio_item->getEnabled())
+        {
+            radio_item->focusFirstItem(FALSE, FALSE);
+        }
+    }
+    else if (mRadioButtons[0]->hasTabStop() || hasTabStop())
+    {
+        focusFirstItem(FALSE, FALSE);
+    }
+}
+
 BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
 {
 	BOOL handled = FALSE;
@@ -283,19 +300,6 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask)
 	return handled;
 }
 
-BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask)
-{
-	// grab focus preemptively, before child button takes mousecapture
-	// 
-	if (hasTabStop())
-	{
-		focusFirstItem(FALSE, FALSE);
-	}
-
-	return LLUICtrl::handleMouseDown(x, y, mask);
-}
-
-
 // Handle one button being clicked.  All child buttons must have this
 // function as their callback function.
 
@@ -466,6 +470,29 @@ BOOL LLRadioCtrl::postBuild()
 	return TRUE;
 }
 
+BOOL LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+    // Grab focus preemptively, before button takes mousecapture
+    if (hasTabStop() && getEnabled())
+    {
+        focusFirstItem(FALSE, FALSE);
+    }
+    else
+    {
+        // Only currently selected item in group has tab stop as result it is
+        // unclear how focus should behave on click, just let the group handle
+        // focus and LLRadioGroup::onClickButton() will set correct state later
+        // if needed
+        LLRadioGroup* parent = (LLRadioGroup*)getParent();
+        if (parent)
+        {
+            parent->focusSelectedRadioBtn();
+        }
+    }
+
+    return LLCheckBoxCtrl::handleMouseDown(x, y, mask);
+}
+
 LLRadioCtrl::~LLRadioCtrl()
 {
 }
diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h
index 8bd5698538962e7cd4dd642540515eda81916c47..dcb2f43bfecfeec281a646f69c551db04d0ab762 100644
--- a/indra/llui/llradiogroup.h
+++ b/indra/llui/llradiogroup.h
@@ -66,8 +66,6 @@ class LLRadioGroup
 	
 	virtual BOOL postBuild();
 	
-	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-	
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
 
 	void setIndexEnabled(S32 index, BOOL enabled);
@@ -75,6 +73,8 @@ class LLRadioGroup
 	S32 getSelectedIndex() const { return mSelectedIndex; }
 	// set the index value programatically
 	BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE);
+	// foxus child by index if it can get focus
+	void focusSelectedRadioBtn();
 
 	// Accept and retrieve strings of the radio group control names
 	virtual void	setValue(const LLSD& value );
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 0db428105907ef1d331a56b08513b2416a7724eb..5a5260033710318bd9575e37a70abd038e24b23a 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -161,6 +161,7 @@ void LLSpellChecker::refreshDictionaryMap()
 	}
 
 	// Load user installed dictionary information
+	user_filename = user_path + DICT_FILE_USER;
 	llifstream custom_file(user_filename.c_str(), std::ios::binary);
 	if (custom_file.is_open())
 	{
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 701a06a085e60d5ebce68e95f4a63b51ab25b7a1..1b2f09cff597b466dcdf8626d8e23dbb15cbd92f 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -210,6 +210,7 @@ LLTabContainer::Params::Params()
 	label_pad_left("label_pad_left"),
 	tab_position("tab_position"),
 	hide_tabs("hide_tabs", false),
+	hide_scroll_arrows("hide_scroll_arrows", false),
 	tab_padding_right("tab_padding_right"),
 	first_tab("first_tab"),
 	middle_tab("middle_tab"),
@@ -240,6 +241,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
 	mPrevArrowBtn(NULL),
 	mNextArrowBtn(NULL),
 	mIsVertical( p.tab_position == LEFT ),
+	mHideScrollArrows(p.hide_scroll_arrows),
 	// Horizontal Specific
 	mJumpPrevArrowBtn(NULL),
 	mJumpNextArrowBtn(NULL),
@@ -409,7 +411,7 @@ void LLTabContainer::draw()
 
 	setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLSmoothInterpolation::getInterpolant(0.08f)));
 
-	BOOL has_scroll_arrows = !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0));
+	BOOL has_scroll_arrows = !mHideScrollArrows && !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0));
 	if (!mIsVertical)
 	{
 		mJumpPrevArrowBtn->setVisible( has_scroll_arrows );
@@ -517,7 +519,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
 {
 	static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
 	BOOL handled = FALSE;
-	BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden();
+	BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
 
 	if (has_scroll_arrows)
 	{
@@ -591,7 +593,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
 BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
 {
 	BOOL handled = FALSE;
-	BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden();
+	BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden();
 
 	if (has_scroll_arrows)
 	{
@@ -633,7 +635,7 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
 BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
 {
 	BOOL handled = FALSE;
-	BOOL has_scroll_arrows = (getMaxScrollPos() > 0)  && !getTabsHidden();
+	BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0)  && !getTabsHidden();
 
 	S32 local_x = x - getRect().mLeft;
 	S32 local_y = y - getRect().mBottom;
@@ -701,7 +703,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask)
 	{
 		LLTabTuple* firsttuple = getTab(0);
 
-		BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
+		BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0);
 		LLRect clip;
 		if (mIsVertical)
 		{
@@ -826,7 +828,7 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask)
 // virtual
 BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,	BOOL drop,	EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string	&tooltip)
 {
-	BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
+	BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0);
 
 	if(mOpenTabsOnDragAndDrop && !getTabsHidden())
 	{
@@ -1543,7 +1545,7 @@ BOOL LLTabContainer::setTab(S32 which)
 						is_visible = FALSE;
 					}
 				}
-				else if (getMaxScrollPos() > 0)
+				else if (!mHideScrollArrows && getMaxScrollPos() > 0)
 				{
 					if( i < getScrollPos() )
 					{
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 057809dc421e49bff6e79ab9149ded5bc4759841..4a5f08f5d3c6e5e7a7c7f9e44d5f464ad1097f4b 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -83,6 +83,7 @@ class LLTabContainer : public LLPanel
 											label_pad_left;
 
 		Optional<bool>						hide_tabs;
+		Optional<bool>						hide_scroll_arrows;
 		Optional<S32>						tab_padding_right;
 
 		Optional<TabParams>					first_tab,
@@ -262,6 +263,7 @@ class LLTabContainer : public LLPanel
 	
 	S32								mCurrentTabIdx;
 	BOOL							mTabsHidden;
+	BOOL							mHideScrollArrows;
 
 	BOOL							mScrolled;
 	LLFrameTimer					mScrollTimer;
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 20be73928677d920806dc2c492e53269657b19b4..88a5c3a58735695e1ecf3e33c3a9d40761f64bf9 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1522,6 +1522,7 @@ void LLTextBase::reflow()
 		}
 
 		S32 line_height = 0;
+		S32 seg_line_offset = line_count;
 
 		while(seg_iter != mSegments.end())
 		{
@@ -1534,7 +1535,8 @@ void LLTextBase::reflow()
 			S32 character_count = segment->getNumChars(getWordWrap() ? llmax(0, remaining_pixels) : S32_MAX,
 														seg_offset, 
 														cur_index - line_start_index, 
-														S32_MAX);
+														S32_MAX,
+														line_count - seg_line_offset);
 
 			S32 segment_width, segment_height;
 			bool force_newline = segment->getDimensions(seg_offset, character_count, segment_width, segment_height);
@@ -1597,6 +1599,7 @@ void LLTextBase::reflow()
 				}
 				++seg_iter;
 				seg_offset = 0;
+				seg_line_offset = force_newline ? line_count + 1 : line_count;
 			}
 			if (force_newline) 
 			{
@@ -3065,7 +3068,7 @@ LLTextSegment::~LLTextSegment()
 
 bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { width = 0; height = 0; return false;}
 S32	LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; }
-S32	LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return 0; }
+S32	LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 0; }
 void LLTextSegment::updateLayout(const LLTextBase& editor) {}
 F32	LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; }
 bool LLTextSegment::canEdit() const { return false; }
@@ -3335,7 +3338,7 @@ S32	LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset,
 											   round);
 }
 
-S32	LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+S32	LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 {
 	const LLWString &text = getWText();
 
@@ -3352,7 +3355,7 @@ S32	LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
 
 	// if no character yet displayed on this line, don't require word wrapping since
 	// we can just move to the next line, otherwise insist on it so we make forward progress
-	LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) 
+	LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0)
 		? LLFontGL::WORD_BOUNDARY_IF_POSSIBLE 
 		: LLFontGL::ONLY_WORD_BOUNDARIES;
 	
@@ -3490,12 +3493,26 @@ LLInlineViewSegment::~LLInlineViewSegment()
 
 bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
 {
-	if (first_char == 0 && num_chars == 0) 
+	if (first_char == 0 && num_chars == 0)
 	{
-		// we didn't fit on a line, the widget will fall on the next line
-		// so dimensions here are 0
+		// We didn't fit on a line or were forced to new string
+		// the widget will fall on the next line, so width here is 0
 		width = 0;
-		height = 0;
+
+		if (mForceNewLine)
+		{
+			// Chat, string can't be smaller then font height even if it is empty
+			LLStyleSP s(new LLStyle(LLStyle::Params().visible(true)));
+			height = s->getFont()->getLineHeight();
+
+			return true; // new line
+		}
+		else
+		{
+			// height from previous segment in same string will be used, word-wrap
+			height = 0;
+		}
+
 	}
 	else
 	{
@@ -3506,13 +3523,16 @@ bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
 	return false;
 }
 
-S32	LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+S32	LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 {
 	// if putting a widget anywhere but at the beginning of a line
 	// and the widget doesn't fit or mForceNewLine is true
 	// then return 0 chars for that line, and all characters for the next
-	if (line_offset != 0 
-		&& (mForceNewLine || num_pixels < mView->getRect().getWidth())) 
+	if (mForceNewLine && line_ind == 0)
+	{
+		return 0;
+	}
+	else if (line_offset != 0 && num_pixels < mView->getRect().getWidth())
 	{
 		return 0;
 	}
@@ -3565,7 +3585,7 @@ bool LLLineBreakTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& w
 
 	return true;
 }
-S32	LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+S32	LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 {
 	return 1;
 }
@@ -3601,7 +3621,7 @@ bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width
 	return false;
 }
 
-S32	 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+S32	 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 {
 	LLUIImagePtr image = mStyle->getImage();
 	
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 3d3a6ca869678051206ccf633e7dee73e7d061b9..c7b620344519c39d19380bd75e570b4e16443527 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -64,7 +64,19 @@ class LLTextSegment
 
 	virtual bool				getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
 	virtual S32					getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
-	virtual S32					getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+
+	/**
+	* Get number of chars that fit into free part of current line.
+	*
+	* @param num_pixels - maximum width of rect
+	* @param segment_offset - symbol in segment we start processing line from
+	* @param line_offset - symbol in line after which segment starts
+	* @param max_chars - limit of symbols that will fit in current line
+	* @param line_ind - index of not word-wrapped string inside segment for multi-line segments.
+	* Two string separated by word-wrap will have same index.
+	* @return number of chars that will fit into current line
+	*/
+	virtual S32					getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
 	virtual void				updateLayout(const class LLTextBase& editor);
 	virtual F32					draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
 	virtual bool				canEdit() const;
@@ -116,7 +128,7 @@ class LLNormalTextSegment : public LLTextSegment
 
 	/*virtual*/ bool				getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
 	/*virtual*/ S32					getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
-	/*virtual*/ S32					getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+	/*virtual*/ S32					getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
 	/*virtual*/ F32					draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
 	/*virtual*/ bool				canEdit() const { return true; }
 	/*virtual*/ const LLColor4&		getColor() const					{ return mStyle->getColor(); }
@@ -201,7 +213,7 @@ class LLInlineViewSegment : public LLTextSegment
 	LLInlineViewSegment(const Params& p, S32 start, S32 end);
 	~LLInlineViewSegment();
 	/*virtual*/ bool		getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
-	/*virtual*/ S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+	/*virtual*/ S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
 	/*virtual*/ void		updateLayout(const class LLTextBase& editor);
 	/*virtual*/ F32			draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
 	/*virtual*/ bool		canEdit() const { return false; }
@@ -225,7 +237,7 @@ class LLLineBreakTextSegment : public LLTextSegment
 	LLLineBreakTextSegment(S32 pos);
 	~LLLineBreakTextSegment();
 	bool		getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
-	S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+	S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
 	F32			draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
 
 private:
@@ -238,7 +250,7 @@ class LLImageTextSegment : public LLTextSegment
 	LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor);
 	~LLImageTextSegment();
 	bool		getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
-	S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+	S32			getNumChars(S32 num_pixels, S32 segment_offset, S32 char_offset, S32 max_chars, S32 line_ind) const;
 	F32			draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
 
 	/*virtual*/ BOOL	handleToolTip(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index b5a31f51180973148d2d1d99f7b288af77601757..b2118294965cd8fc0fad2da0a054eed8a23e8bab 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -764,7 +764,23 @@ LLUrlEntryAgentCompleteName::LLUrlEntryAgentCompleteName()
 
 std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name)
 {
-	return avatar_name.getCompleteName();
+	return avatar_name.getCompleteName(true, true);
+}
+
+//
+// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g.,
+// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname
+// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname
+//
+LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName()
+{
+	mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname",
+							boost::regex::perl|boost::regex::icase);
+}
+
+std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name)
+{
+	return avatar_name.getLegacyName();
 }
 
 //
@@ -780,7 +796,7 @@ LLUrlEntryAgentDisplayName::LLUrlEntryAgentDisplayName()
 
 std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name)
 {
-	return avatar_name.getDisplayName();
+	return avatar_name.getDisplayName(true);
 }
 
 //
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 413c20a6577168bd3ff0478625fad6af926c5eed..28e99317187e43d7a2958788354a972d57995963 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -269,6 +269,14 @@ class LLUrlEntryAgentCompleteName : public LLUrlEntryAgentName
 	/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
 };
 
+class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName
+{
+public:
+	LLUrlEntryAgentLegacyName();
+private:
+	/*virtual*/ std::string getName(const LLAvatarName& avatar_name);
+};
+
 ///
 /// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g.,
 /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 23c6d5a954cc89dd4a2eb12bf6dc1ab93baf3166..fa6593267a693497afb2d4513de7bfa115d1a831 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -57,6 +57,7 @@ LLUrlRegistry::LLUrlRegistry()
 	mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel();
 	registerUrl(mUrlEntryHTTPLabel);
 	registerUrl(new LLUrlEntryAgentCompleteName());
+	registerUrl(new LLUrlEntryAgentLegacyName());
 	registerUrl(new LLUrlEntryAgentDisplayName());
 	registerUrl(new LLUrlEntryAgentUserName());
 	// LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since 
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 754306b5d2568fa4391fc571e6767c5b482b443f..d28a7f177f4aed795b845fd37411219fcf5bd26a 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1758,7 +1758,7 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
 LLSD LLWindowMacOSX::getNativeKeyData()
 {
 	LLSD result = LLSD::emptyMap();
-#if 1
+
 	if(mRawKeyEvent)
 	{
         result["event_type"] = LLSD::Integer(mRawKeyEvent->mEventType);
@@ -1768,7 +1768,6 @@ LLSD LLWindowMacOSX::getNativeKeyData()
         result["event_umodchars"] = (mRawKeyEvent->mEventUnmodChars) ? LLSD(LLSD::Integer(mRawKeyEvent->mEventUnmodChars)) : LLSD();
         result["event_isrepeat"] = LLSD::Boolean(mRawKeyEvent->mEventRepeat);
 	}
-#endif
 
 	LL_DEBUGS() << "native key data is: " << result << LL_ENDL;
 
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 1c41fadcaf15bb9a2f2abda26d46133265922b44..201fb44847239bb856cf4c1d222264b8c812795d 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -77,7 +77,7 @@ if (WINDOWS)
   set_target_properties(
     media_plugin_cef
     PROPERTIES
-    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT /IGNORE:4099"
+    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
     LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD /IGNORE:4099"
     )
 endif (WINDOWS)
@@ -93,6 +93,9 @@ if (DARWIN)
     LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
   )
 
+  ## turns on C++11 using Cmake
+  target_compile_features(media_plugin_cef PRIVATE cxx_range_for)
+
   add_custom_command(TARGET media_plugin_cef
     POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework"
         "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework"
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index eaba71a6ad018f43792e3a9eadc822a315efcd66..90bdeb082cfb6d392c9d8c567a1ff12d6810c3e4 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -36,10 +36,9 @@
 #include "llpluginmessageclasses.h"
 #include "media_plugin_base.h"
 
-#include "boost/function.hpp"
-#include "boost/bind.hpp"
-#include "llCEFLib.h"
-//#include "volume_catcher.h"
+#include <functional>
+
+#include "dullahan.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 //
@@ -56,7 +55,7 @@ class MediaPluginCEF :
 private:
 	bool init();
 
-	void onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup);
+	void onPageChangedCallback(const unsigned char* pixels, int x, int y, const int width, const int height, bool is_popup);
 	void onCustomSchemeURLCallback(std::string url);
 	void onConsoleMessageCallback(std::string message, std::string source, int line);
 	void onStatusMessageCallback(std::string value);
@@ -67,17 +66,15 @@ class MediaPluginCEF :
 	void onAddressChangeCallback(std::string url);
 	void onNavigateURLCallback(std::string url, std::string target);
 	bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
-	void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle);
+	void onCursorChangedCallback(dullahan::ECursorType type);
 	void onFileDownloadCallback(std::string filename);
 	const std::string onFileDialogCallback();
 
 	void postDebugMessage(const std::string& msg);
 	void authResponse(LLPluginMessage &message);
 
-	LLCEFLib::EKeyboardModifier decodeModifiers(std::string &modifiers);
-	void deserializeKeyboardData(LLSD native_key_data, uint32_t& native_scan_code, uint32_t& native_virtual_key, uint32_t& native_modifiers);
-	void keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data);
-	void unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data);
+	void keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_data);
+	void unicodeInput(LLSD native_key_data);
 
 	void checkEditState();
     void setVolume(F32 vol);
@@ -97,7 +94,7 @@ class MediaPluginCEF :
 	std::string mCachePath;
 	std::string mCookiePath;
 	std::string mPickedFile;
-	LLCEFLib* mLLCEFLib;
+	dullahan* mCEFLib;
 
 	U8 *mPopupBuffer;
 	U32 mPopupW;
@@ -130,7 +127,7 @@ MediaPluginBase(host_send_func, host_user_data)
 	mCachePath = "";
 	mCookiePath = "";
 	mPickedFile = "";
-	mLLCEFLib = new LLCEFLib();
+	mCEFLib = new dullahan();
 
 	mPopupBuffer = NULL;
 	mPopupW = 0;
@@ -164,7 +161,7 @@ void MediaPluginCEF::postDebugMessage(const std::string& msg)
 
 ////////////////////////////////////////////////////////////////////////////////
 //
-void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup)
+void MediaPluginCEF::onPageChangedCallback(const unsigned char* pixels, int x, int y, const int width, const int height, bool is_popup)
 {
 	if( is_popup )
 	{
@@ -252,8 +249,8 @@ void MediaPluginCEF::onLoadStartCallback()
 {
 	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
 	//message.setValue("uri", event.getEventUri());  // not easily available here in CEF - needed?
-	message.setValueBoolean("history_back_available", mLLCEFLib->canGoBack());
-	message.setValueBoolean("history_forward_available", mLLCEFLib->canGoForward());
+	message.setValueBoolean("history_back_available", mCEFLib->canGoBack());
+	message.setValueBoolean("history_forward_available", mCEFLib->canGoForward());
 	sendMessage(message);
 }
 
@@ -261,7 +258,7 @@ void MediaPluginCEF::onLoadStartCallback()
 //
 void MediaPluginCEF::onRequestExitCallback()
 {
-	mLLCEFLib->shutdown();
+	mCEFLib->shutdown();
 
 	LLPluginMessage message("base", "goodbye");
 	sendMessage(message);
@@ -274,8 +271,8 @@ void MediaPluginCEF::onLoadEndCallback(int httpStatusCode)
 	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
 	//message.setValue("uri", event.getEventUri());  // not easily available here in CEF - needed?
 	message.setValueS32("result_code", httpStatusCode);
-	message.setValueBoolean("history_back_available", mLLCEFLib->canGoBack());
-	message.setValueBoolean("history_forward_available", mLLCEFLib->canGoForward());
+	message.setValueBoolean("history_back_available", mCEFLib->canGoBack());
+	message.setValueBoolean("history_forward_available", mCEFLib->canGoForward());
 	sendMessage(message);
 }
 
@@ -358,25 +355,25 @@ const std::string MediaPluginCEF::onFileDialogCallback()
 	return mPickedFile;
 }
 
-void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle)
+void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type)
 {
 	std::string name = "";
 
 	switch (type)
 	{
-		case LLCEFLib::CT_POINTER:
+		case dullahan::CT_POINTER:
 			name = "arrow";
 			break;
-		case LLCEFLib::CT_IBEAM:
+		case dullahan::CT_IBEAM:
 			name = "ibeam";
 			break;
-		case LLCEFLib::CT_NORTHSOUTHRESIZE:
+		case dullahan::CT_NORTHSOUTHRESIZE:
 			name = "splitv";
 			break;
-		case LLCEFLib::CT_EASTWESTRESIZE:
+		case dullahan::CT_EASTWESTRESIZE:
 			name = "splith";
 			break;
-		case LLCEFLib::CT_HAND:
+		case dullahan::CT_HAND:
 			name = "hand";
 			break;
 
@@ -428,7 +425,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			}
 			else if (message_name == "idle")
 			{
-				mLLCEFLib->update();
+				mCEFLib->update();
 
 				// this seems bad but unless the state changes (it won't until we figure out
 				// how to get CEF to tell us if copy/cut/paste is available) then this function
@@ -437,7 +434,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			}
 			else if (message_name == "cleanup")
 			{
-				mLLCEFLib->requestExit();
+				mCEFLib->requestExit();
 			}
 			else if (message_name == "shm_added")
 			{
@@ -479,47 +476,50 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 		{
 			if (message_name == "init")
 			{
-				// event callbacks from LLCefLib
-				mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3, _4, _5, _6));
-				mLLCEFLib->setOnCustomSchemeURLCallback(boost::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, _1));
-				mLLCEFLib->setOnConsoleMessageCallback(boost::bind(&MediaPluginCEF::onConsoleMessageCallback, this, _1, _2, _3));
-				mLLCEFLib->setOnStatusMessageCallback(boost::bind(&MediaPluginCEF::onStatusMessageCallback, this, _1));
-				mLLCEFLib->setOnTitleChangeCallback(boost::bind(&MediaPluginCEF::onTitleChangeCallback, this, _1));
-				mLLCEFLib->setOnLoadStartCallback(boost::bind(&MediaPluginCEF::onLoadStartCallback, this));
-				mLLCEFLib->setOnLoadEndCallback(boost::bind(&MediaPluginCEF::onLoadEndCallback, this, _1));
-				mLLCEFLib->setOnAddressChangeCallback(boost::bind(&MediaPluginCEF::onAddressChangeCallback, this, _1));
-				mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));
-				mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));
-				mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1));
-				mLLCEFLib->setOnFileDialogCallback(boost::bind(&MediaPluginCEF::onFileDialogCallback, this));
-				mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2));
-				mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this));
-
-				LLCEFLib::LLCEFLibSettings settings;
-				settings.initial_width = 1024;
-				settings.initial_height = 1024;
-				// The LLCEFLibSettings struct in the Windows 32-bit
-				// llceflib's build 500907 does not have a page_zoom_factor
-				// member. Set below.
-				//settings.page_zoom_factor = message_in.getValueReal("factor");
-				settings.plugins_enabled = mPluginsEnabled;
-				settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI
-				settings.javascript_enabled = mJavascriptEnabled;
-				settings.cookies_enabled = mCookiesEnabled;
-				settings.cookie_store_path = mCookiePath;
+				// event callbacks from Dullahan
+				mCEFLib->setOnPageChangedCallback(std::bind(&MediaPluginCEF::onPageChangedCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6));
+				mCEFLib->setOnCustomSchemeURLCallback(std::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, std::placeholders::_1));
+				mCEFLib->setOnConsoleMessageCallback(std::bind(&MediaPluginCEF::onConsoleMessageCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+				mCEFLib->setOnStatusMessageCallback(std::bind(&MediaPluginCEF::onStatusMessageCallback, this, std::placeholders::_1));
+				mCEFLib->setOnTitleChangeCallback(std::bind(&MediaPluginCEF::onTitleChangeCallback, this, std::placeholders::_1));
+				mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this));
+				mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1));
+				mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1));
+				mCEFLib->setOnNavigateURLCallback(std::bind(&MediaPluginCEF::onNavigateURLCallback, this, std::placeholders::_1, std::placeholders::_2));
+				mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
+				mCEFLib->setOnFileDownloadCallback(std::bind(&MediaPluginCEF::onFileDownloadCallback, this, std::placeholders::_1));
+				mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialogCallback, this));
+				mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1));
+				mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this));
+
+				dullahan::dullahan_settings settings;
+				settings.accept_language_list = mHostLanguage;
+				settings.background_color = 0xffffff;
 				settings.cache_enabled = true;
 				settings.cache_path = mCachePath;
-				settings.accept_language_list = mHostLanguage;
-				settings.user_agent_substring = mLLCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring);
+				settings.cookie_store_path = mCookiePath;
+				settings.cookies_enabled = mCookiesEnabled;
+				settings.flash_enabled = mPluginsEnabled;
+				settings.flip_mouse_y = false;
+				settings.flip_pixels_y = true;
+				settings.frame_rate = 60;
+				settings.initial_height = 1024;
+				settings.initial_width = 1024;
+				settings.java_enabled = false;
+				settings.javascript_enabled = mJavascriptEnabled;
+				settings.media_stream_enabled = false; // MAINT-6060 - WebRTC media removed until we can add granualrity/query UI
+				settings.plugins_enabled = mPluginsEnabled;
+				settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring);
+				settings.webgl_enabled = true;
 
-				bool result = mLLCEFLib->init(settings);
+				bool result = mCEFLib->init(settings);
 				if (!result)
 				{
 					// if this fails, the media system in viewer will put up a message
 				}
 
 				// now we can set page zoom factor
-				mLLCEFLib->setPageZoom(message_in.getValueReal("factor"));
+				mCEFLib->setPageZoom(message_in.getValueReal("factor"));
 
 				// Plugin gets to decide the texture parameters to use.
 				mDepth = 4;
@@ -563,7 +563,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 					};
 				};
 
-				mLLCEFLib->setSize(mWidth, mHeight);
+				mCEFLib->setSize(mWidth, mHeight);
 
 				LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
 				message.setValue("name", name);
@@ -581,7 +581,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			else if (message_name == "load_uri")
 			{
 				std::string uri = message_in.getValue("uri");
-				mLLCEFLib->navigate(uri);
+				mCEFLib->navigate(uri);
 			}
 			else if (message_name == "set_cookie")
 			{
@@ -592,7 +592,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 				std::string path = message_in.getValue("path");
 				bool httponly = message_in.getValueBoolean("httponly");
 				bool secure = message_in.getValueBoolean("secure");
-				mLLCEFLib->setCookie(uri, name, value, domain, path, httponly, secure);
+				mCEFLib->setCookie(uri, name, value, domain, path, httponly, secure);
 			}
 			else if (message_name == "mouse_event")
 			{
@@ -601,18 +601,16 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 				S32 x = message_in.getValueS32("x");
 				S32 y = message_in.getValueS32("y");
 
-				y = mHeight - y;
-
-				// only even send left mouse button events to LLCEFLib
+				// only even send left mouse button events to the CEF library
 				// (partially prompted by crash in OS X CEF when sending right button events)
 				// we catch the right click in viewer and display our own context menu anyway
 				S32 button = message_in.getValueS32("button");
-				LLCEFLib::EMouseButton btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT;
+				dullahan::EMouseButton btn = dullahan::MB_MOUSE_BUTTON_LEFT;
 
 				if (event == "down" && button == 0)
 				{
-					mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOWN, x, y);
-					mLLCEFLib->setFocus(true);
+					mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_DOWN, x, y);
+					mCEFLib->setFocus();
 
 					std::stringstream str;
 					str << "Mouse down at = " << x << ", " << y;
@@ -620,7 +618,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 				}
 				else if (event == "up" && button == 0)
 				{
-					mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y);
+					mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_UP, x, y);
 
 					std::stringstream str;
 					str << "Mouse up at = " << x << ", " << y;
@@ -628,11 +626,11 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 				}
 				else if (event == "double_click")
 				{
-					mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOUBLE_CLICK, x, y);
+					mCEFLib->mouseButton(btn, dullahan::ME_MOUSE_DOUBLE_CLICK, x, y);
 				}
 				else
 				{
-					mLLCEFLib->mouseMove(x, y);
+					mCEFLib->mouseMove(x, y);
 				}
 			}
 			else if (message_name == "scroll_event")
@@ -642,68 +640,47 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 				const int scaling_factor = 40;
 				y *= -scaling_factor;
 
-				mLLCEFLib->mouseWheel(x, y);
+				mCEFLib->mouseWheel(x, y);
 			}
 			else if (message_name == "text_event")
 			{
-				std::string text = message_in.getValue("text");
-				std::string modifiers = message_in.getValue("modifiers");
 				LLSD native_key_data = message_in.getValueLLSD("native_key_data");
-
-				unicodeInput(text, decodeModifiers(modifiers), native_key_data);
+				unicodeInput(native_key_data);
 			}
 			else if (message_name == "key_event")
 			{
 #if LL_DARWIN
 				std::string event = message_in.getValue("event");
-				S32 key = message_in.getValueS32("key");
                 LLSD native_key_data = message_in.getValueLLSD("native_key_data");
 
-#if 0
-				if (event == "down")
-				{
-					//mLLCEFLib->keyPress(key, true);
-					mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_DOWN, (uint32_t)key, 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0);
-
-				}
-				else if (event == "up")
-				{
-					//mLLCEFLib->keyPress(key, false);
-					mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_UP, (uint32_t)key, 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0);
-				}
-#else
-                // Treat unknown events as key-up for safety.
-                LLCEFLib::EKeyEvent key_event = LLCEFLib::KE_KEY_UP;
+                dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP;
                 if (event == "down")
                 {
-                    key_event = LLCEFLib::KE_KEY_DOWN;
+                    key_event = dullahan::KE_KEY_DOWN;
                 }
                 else if (event == "repeat")
                 {
-                    key_event = LLCEFLib::KE_KEY_REPEAT;
+                    key_event = dullahan::KE_KEY_REPEAT;
                 }
 
-                keyEvent(key_event, key, LLCEFLib::KM_MODIFIER_NONE, native_key_data);
+                keyEvent(key_event, native_key_data);
 
-#endif
 #elif LL_WINDOWS
 				std::string event = message_in.getValue("event");
-				S32 key = message_in.getValueS32("key");
-				std::string modifiers = message_in.getValue("modifiers");
 				LLSD native_key_data = message_in.getValueLLSD("native_key_data");
 
 				// Treat unknown events as key-up for safety.
-				LLCEFLib::EKeyEvent key_event = LLCEFLib::KE_KEY_UP;
+				dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP;
 				if (event == "down")
 				{
-					key_event = LLCEFLib::KE_KEY_DOWN;
+					key_event = dullahan::KE_KEY_DOWN;
 				}
 				else if (event == "repeat")
 				{
-					key_event = LLCEFLib::KE_KEY_REPEAT;
+					key_event = dullahan::KE_KEY_REPEAT;
 				}
 
-				keyEvent(key_event, key, decodeModifiers(modifiers), native_key_data);
+				keyEvent(key_event, native_key_data);
 #endif
 			}
 			else if (message_name == "enable_media_plugin_debugging")
@@ -720,15 +697,15 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			}
 			if (message_name == "edit_cut")
 			{
-				mLLCEFLib->editCut();
+				mCEFLib->editCut();
 			}
 			if (message_name == "edit_copy")
 			{
-				mLLCEFLib->editCopy();
+				mCEFLib->editCopy();
 			}
 			if (message_name == "edit_paste")
 			{
-				mLLCEFLib->editPaste();
+				mCEFLib->editPaste();
 			}
 		}
 		else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
@@ -736,24 +713,24 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			if (message_name == "set_page_zoom_factor")
 			{
 				F32 factor = (F32)message_in.getValueReal("factor");
-				mLLCEFLib->setPageZoom(factor);
+				mCEFLib->setPageZoom(factor);
 			}
 			if (message_name == "browse_stop")
 			{
-				mLLCEFLib->stop();
+				mCEFLib->stop();
 			}
 			else if (message_name == "browse_reload")
 			{
 				bool ignore_cache = true;
-				mLLCEFLib->reload(ignore_cache);
+				mCEFLib->reload(ignore_cache);
 			}
 			else if (message_name == "browse_forward")
 			{
-				mLLCEFLib->goForward();
+				mCEFLib->goForward();
 			}
 			else if (message_name == "browse_back")
 			{
-				mLLCEFLib->goBack();
+				mCEFLib->goBack();
 			}
 			else if (message_name == "cookies_enabled")
 			{
@@ -765,7 +742,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 			}
 			else if (message_name == "show_web_inspector")
 			{
-				mLLCEFLib->showDevTools(true);
+				mCEFLib->showDevTools();
 			}
 			else if (message_name == "plugins_enabled")
 			{
@@ -790,100 +767,39 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
 	}
 }
 
-LLCEFLib::EKeyboardModifier MediaPluginCEF::decodeModifiers(std::string &modifiers)
-{
-	int result = 0;
-
-	if (modifiers.find("shift") != std::string::npos)
-		result |= LLCEFLib::KM_MODIFIER_SHIFT;
-
-	if (modifiers.find("alt") != std::string::npos)
-		result |= LLCEFLib::KM_MODIFIER_ALT;
-
-	if (modifiers.find("control") != std::string::npos)
-		result |= LLCEFLib::KM_MODIFIER_CONTROL;
-
-	if (modifiers.find("meta") != std::string::npos)
-		result |= LLCEFLib::KM_MODIFIER_META;
-
-	return (LLCEFLib::EKeyboardModifier)result;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-void MediaPluginCEF::deserializeKeyboardData(LLSD native_key_data, uint32_t& native_scan_code, uint32_t& native_virtual_key, uint32_t& native_modifiers)
-{
-	native_scan_code = 0;
-	native_virtual_key = 0;
-	native_modifiers = 0;
-
-	if (native_key_data.isMap())
-	{
-#if LL_DARWIN
-		native_scan_code = (uint32_t)(native_key_data["char_code"].asInteger());
-		native_virtual_key = (uint32_t)(native_key_data["key_code"].asInteger());
-		native_modifiers = (uint32_t)(native_key_data["modifiers"].asInteger());
-#elif LL_WINDOWS
-		native_scan_code = (uint32_t)(native_key_data["scan_code"].asInteger());
-		native_virtual_key = (uint32_t)(native_key_data["virtual_key"].asInteger());
-		// TODO: I don't think we need to do anything with native modifiers here -- please verify
-#endif
-	};
-};
-
 ////////////////////////////////////////////////////////////////////////////////
 //
-void MediaPluginCEF::keyEvent(LLCEFLib::EKeyEvent key_event, int key, LLCEFLib::EKeyboardModifier modifiers_x, LLSD native_key_data = LLSD::emptyMap())
+void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_data = LLSD::emptyMap())
 {
 #if LL_DARWIN
-
-    if (!native_key_data.has("event_type") ||
-            !native_key_data.has("event_modifiers") ||
-            !native_key_data.has("event_keycode") ||
-            !native_key_data.has("event_isrepeat"))
-        return;
-
-    uint32_t eventType = native_key_data["event_type"].asInteger();
-    if (!eventType)
-        return;
-    uint32_t eventModifiers = native_key_data["event_modifiers"].asInteger();
-    uint32_t eventKeycode = native_key_data["event_keycode"].asInteger();
-    char eventChars = static_cast<char>(native_key_data["event_chars"].isUndefined() ? 0 : native_key_data["event_chars"].asInteger());
-    char eventUChars = static_cast<char>(native_key_data["event_umodchars"].isUndefined() ? 0 : native_key_data["event_umodchars"].asInteger());
-    bool eventIsRepeat = native_key_data["event_isrepeat"].asBoolean();
-
-    mLLCEFLib->keyboardEventOSX(eventType, eventModifiers, (eventChars) ? &eventChars : NULL,
-                                (eventUChars) ? &eventUChars : NULL, eventIsRepeat, eventKeycode);
-
+	U32 event_modifiers = native_key_data["event_modifiers"].asInteger();
+	U32 event_keycode = native_key_data["event_keycode"].asInteger();
+	U32 event_chars = native_key_data["event_chars"].asInteger();
+	U32 event_umodchars = native_key_data["event_umodchars"].asInteger();
+	bool event_isrepeat = native_key_data["event_isrepeat"].asBoolean();
+
+	mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers, 
+									event_keycode, event_chars, 
+									event_umodchars, event_isrepeat);
 #elif LL_WINDOWS
 	U32 msg = ll_U32_from_sd(native_key_data["msg"]);
 	U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
 	U64 lparam = ll_U32_from_sd(native_key_data["l_param"]);
 
-	mLLCEFLib->nativeKeyboardEvent(msg, wparam, lparam);
+	mCEFLib->nativeKeyboardEventWin(msg, wparam, lparam);
 #endif
 };
 
-void MediaPluginCEF::unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboardModifier modifiers, LLSD native_key_data = LLSD::emptyMap())
+void MediaPluginCEF::unicodeInput(LLSD native_key_data = LLSD::emptyMap())
 {
 #if LL_DARWIN
-	//mLLCEFLib->keyPress(utf8str[0], true);
-	//mLLCEFLib->keyboardEvent(LLCEFLib::KE_KEY_DOWN, (uint32_t)(utf8str[0]), 0, LLCEFLib::KM_MODIFIER_NONE, 0, 0, 0);
-    if (!native_key_data.has("event_chars") || !native_key_data.has("event_umodchars") ||
-            !native_key_data.has("event_keycode") || !native_key_data.has("event_modifiers"))
-        return;
-    uint32_t unicodeChar = native_key_data["event_chars"].asInteger();
-    uint32_t unmodifiedChar = native_key_data["event_umodchars"].asInteger();
-    uint32_t keyCode = native_key_data["event_keycode"].asInteger();
-    uint32_t rawmodifiers = native_key_data["event_modifiers"].asInteger();
-
-    mLLCEFLib->injectUnicodeText(unicodeChar, unmodifiedChar, keyCode, rawmodifiers);
-
+	// code to send keys here doesn't seem to be required for Darwin - in fact,
+	// not having reliable key event type info here means we don't know what to send anyway
 #elif LL_WINDOWS
 	U32 msg = ll_U32_from_sd(native_key_data["msg"]);
 	U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
 	U64 lparam = ll_U32_from_sd(native_key_data["l_param"]);
-	mLLCEFLib->nativeKeyboardEvent(msg, wparam, lparam);
+	mCEFLib->nativeKeyboardEventWin(msg, wparam, lparam);
 #endif
 };
 
@@ -891,9 +807,9 @@ void MediaPluginCEF::unicodeInput(const std::string &utf8str, LLCEFLib::EKeyboar
 //
 void MediaPluginCEF::checkEditState()
 {
-	bool can_cut = mLLCEFLib->editCanCut();
-	bool can_copy = mLLCEFLib->editCanCopy();
-	bool can_paste = mLLCEFLib->editCanPaste();
+	bool can_cut = mCEFLib->editCanCut();
+	bool can_copy = mCEFLib->editCanCopy();
+	bool can_paste = mCEFLib->editCanPaste();
 
 	if ((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste))
 	{
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 72159f9f69dc7b6fabd4fa2edfd05da094c19a48..d3e92430694521c89b55144405cf222c30d46d1a 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -78,7 +78,7 @@ if (WINDOWS)
   set_target_properties(
     media_plugin_libvlc
     PROPERTIES
-    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT"
+    LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT"
     )
 endif (WINDOWS)
 
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7a897172c25b90401a72959103ce11e00501a469..51f3d3332b6c0e34f1d562def52b8459875722d7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1608,18 +1608,6 @@
     <real>60.0</real>
   </map>
 
-  <key>CameraAspectRatio</key>
-  <map>
-    <key>Comment</key>
-    <string>Camera aspect ratio for DoF effect</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>1.5</real>
-  </map>
-
   <key>CertStore</key>
     <map>
       <key>Comment</key>
@@ -5388,7 +5376,7 @@
     <key>LeftClickShowMenu</key>
     <map>
       <key>Comment</key>
-      <string>Left click opens pie menu (FALSE = left click touches or grabs object)</string>
+      <string>Unused obsolete setting</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -11813,6 +11801,17 @@
       <key>Value</key>
       <integer>75</integer>
     </map>
+    <key>AbuseReportScreenshotDelay</key>
+    <map>
+      <key>Comment</key>
+      <string>Time delay before taking screenshot to avoid UI artifacts.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>F32</string>
+      <key>Value</key>
+      <real>0.3</real>
+    </map>
     <key>SpeedTest</key>
     <map>
       <key>Comment</key>
@@ -14733,6 +14732,7 @@
 	      <string>snapshot</string>
 	      <string>postcard</string>
 	      <string>mini_map</string>
+	      <string>beacons</string>
       </array>
     </map>
     <key>LandmarksSortedByDate</key>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index eee13fb28e87b73164935290ced150892a438294..92e61d2e867ca487bb6d2cb8b7c6626aeb320f71 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -348,5 +348,49 @@
         <key>Value</key>
              <integer>1</integer>
         </map>
+      <key>ModelUploadFolder</key>
+      <map>
+        <key>Comment</key>
+        <string>All model uploads will be stored in this directory (UUID)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string></string>
+      </map>
+      <key>TextureUploadFolder</key>
+      <map>
+        <key>Comment</key>
+        <string>All image(texture) uploads will be stored in this directory (UUID)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string></string>
+      </map>
+      <key>SoundUploadFolder</key>
+      <map>
+        <key>Comment</key>
+        <string>All sound uploads will be stored in this directory (UUID)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string></string>
+      </map>
+      <key>AnimationUploadFolder</key>
+      <map>
+        <key>Comment</key>
+        <string>All animation uploads will be stored in this directory (UUID)</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string></string>
+      </map>
     </map>
 </llsd>
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index fee6e451ec5686887067f8850afb3883507e3320..fe1b35767ed0e084ce82a8edc897105d52a624c9 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -90,7 +90,7 @@ InstProgressFlags smooth colored		# New colored smooth look
 SetOverwrite on							# Overwrite files by default
 AutoCloseWindow true					# After all files install, close window
 
-InstallDir "$PROGRAMFILES\${INSTNAME}"
+InstallDir "%%$PROGRAMFILES%%\${INSTNAME}"
 InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
 UninstallText $(UninstallTextMsg)
 DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
@@ -136,6 +136,7 @@ FunctionEnd
 ;; entry to the language ID selector below
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 Function .onInit
+%%ENGAGEREGISTRY%%
 Call CheckCPUFlags							# Make sure we have SSE2 support
 Call CheckWindowsVersion					# Don't install On unsupported systems
     Push $0
@@ -194,6 +195,7 @@ FunctionEnd
 ;; Prep Uninstaller Section
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 Function un.onInit
+%%ENGAGEREGISTRY%%
 # Read language from registry and set for uninstaller. Key will be removed on successful uninstall
 	ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
     IfErrors lbl_end
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index cfb09d329b055104f824a6a2e48cf42d9776adc5..7d0d39e22a7dbb68032eca10296fde1de23a4097 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2050,7 +2050,10 @@ void LLAgent::endAnimationUpdateUI()
 			{
 				skip_list.insert(LLFloaterReg::findInstance("mini_map"));
 			}
-
+			if (LLFloaterReg::findInstance("beacons"))
+			{
+				skip_list.insert(LLFloaterReg::findInstance("beacons"));
+			}
 			LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
 			LLFloaterIMContainer::floater_list_t conversations;
 			im_box->getDetachedConversationFloaters(conversations);
@@ -2172,6 +2175,7 @@ void LLAgent::endAnimationUpdateUI()
 #else // Use this for now
 		LLFloaterView::skip_list_t skip_list;
 		skip_list.insert(LLFloaterReg::findInstance("mini_map"));
+		skip_list.insert(LLFloaterReg::findInstance("beacons"));
 		gFloaterView->pushVisibleAll(FALSE, skip_list);
 #endif
 
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index fc4be98fbd46ed01bc812c58e76fe3a6c3f3c2cb..feb981217d723f584b1decd556c3aa339e7009fb 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1227,11 +1227,12 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable)
 		return;
 	}
 
+	U32 use_count = 0;
 	for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin();
-		 iter != getFoundList().end(); ++iter)
+		iter != getFoundList().end(); ++iter)
 	{
 		LLFoundData& data = *iter;
-		if(wearable->getAssetID() == data.mAssetID)
+		if (wearable->getAssetID() == data.mAssetID)
 		{
 			// Failing this means inventory or asset server are corrupted in a way we don't handle.
 			if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType))
@@ -1240,9 +1241,48 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable)
 				break;
 			}
 
-			data.mWearable = wearable;
+			if (use_count == 0)
+			{
+				data.mWearable = wearable;
+				use_count++;
+			}
+			else
+			{
+				LLViewerInventoryItem* wearable_item = gInventory.getItem(data.mItemID);
+				if (wearable_item && wearable_item->isFinished() && wearable_item->getPermissions().allowModifyBy(gAgentID))
+				{
+					// We can't edit and do some other interactions with same asset twice, copy it
+					// Note: can't update incomplete items. Usually attached from previous viewer build, but
+					// consider adding fetch and completion callback
+					LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(wearable, wearable->getName());
+					data.mWearable = new_wearable;
+					data.mAssetID = new_wearable->getAssetID();
+
+					// Update existing inventory item
+					wearable_item->setAssetUUID(new_wearable->getAssetID());
+					wearable_item->setTransactionID(new_wearable->getTransactionID());
+					gInventory.updateItem(wearable_item, LLInventoryObserver::INTERNAL);
+					wearable_item->updateServer(FALSE);
+
+					use_count++;
+				}
+				else
+				{
+					// Note: technically a bug, LLViewerWearable can identify only one item id at a time,
+					// yet we are tying it to multiple items here.
+					// LLViewerWearable need to support more then one item.
+					LL_WARNS() << "Same LLViewerWearable is used by multiple items! " << wearable->getAssetID() << LL_ENDL;
+					data.mWearable = wearable;
+				}
+			}
 		}
 	}
+
+	if (use_count > 1)
+	{
+		LL_WARNS() << "Copying wearable, multiple asset id uses! " << wearable->getAssetID() << LL_ENDL;
+		gInventory.notifyObservers();
+	}
 }
 
 static void onWearableAssetFetch(LLViewerWearable* wearable, void* data)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7c9d37a64c4460b00972d5bd3c4fae84bed6e183..242266eac5b621d561bde9c060fc677c9e594635 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -124,10 +124,8 @@
 #include "llcoros.h"
 #include "llexception.h"
 #if !LL_LINUX
-#include "cef/llceflib.h"
-#if LL_WINDOWS
+#include "cef/dullahan.h"
 #include "vlc/libvlc_version.h"
-#endif // LL_WINDOWS
 #endif // LL_LINUX
 
 // Third party library includes
@@ -330,10 +328,10 @@ BOOL				gDisconnected = FALSE;
 // used to restore texture state after a mode switch
 LLFrameTimer	gRestoreGLTimer;
 BOOL			gRestoreGL = FALSE;
-BOOL			gUseWireframe = FALSE;
+bool			gUseWireframe = FALSE;
 
 //use for remember deferred mode in wireframe switch
-BOOL			gInitialDeferredModeForWireframe = FALSE;
+bool			gInitialDeferredModeForWireframe = FALSE;
 
 // VFS globals - see llappviewer.h
 LLVFS* gStaticVFS = NULL;
@@ -732,8 +730,7 @@ LLAppViewer::LLAppViewer()
 LLAppViewer::~LLAppViewer()
 {
 	delete mSettingsLocationList;
-	LLViewerEventRecorder::deleteSingleton();
-	
+
 	destroyMainloopTimeout();
     
 	// If we got to this destructor somehow, the app didn't hang.
@@ -1217,7 +1214,8 @@ bool LLAppViewer::init()
         boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1),
         boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS));
 
-	showReleaseNotesIfRequired();
+	// TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement
+	// some other protection to make sure we don't use network before initializng proxy
 
 	/*----------------------------------------------------------------------*/
 	// nat 2016-06-29 moved the following here from the former mainLoop().
@@ -1471,11 +1469,9 @@ bool LLAppViewer::frame()
 				ms_sleep(500);
 			}
 
-			const F64Milliseconds max_idle_time = llmin(.005f*10.f*(F32Milliseconds)gFrameTimeSeconds, F32Milliseconds(5)); // 5 ms a second
 			idleTimer.reset();
 			S32 total_work_pending = 0;
 			S32 total_io_pending = 0;	
-			while(1)
 			{
 				S32 work_pending = 0;
 				S32 io_pending = 0;
@@ -1499,11 +1495,7 @@ bool LLAppViewer::frame()
 
 				total_work_pending += work_pending ;
 				total_io_pending += io_pending ;
-				
-				if (!work_pending || idleTimer.getElapsedTimeF64() >= max_idle_time)
-				{
-					break;
-				}
+
 			}
 			gMeshRepo.update() ;
 			
@@ -2099,6 +2091,10 @@ bool LLAppViewer::cleanup()
 	// realtime, or might throw an exception.
 	LLSingletonBase::cleanupAll();
 
+	// The logging subsystem depends on an LLSingleton. Any logging after
+	// LLSingletonBase::deleteAll() won't be recorded.
+	LL_INFOS() << "Goodbye!" << LL_ENDL;
+
 	// This calls every remaining LLSingleton's deleteSingleton() method.
 	// No class destructor should perform any cleanup that might take
 	// significant realtime, or throw an exception.
@@ -2111,8 +2107,6 @@ bool LLAppViewer::cleanup()
 	// probably useful to be able to log that order.
 	LLSingletonBase::deleteAll();
 
-	LL_INFOS() << "Goodbye!" << LL_ENDL;
-
 	removeDumpDir();
 
 	// return 0;
@@ -3157,20 +3151,28 @@ LLSD LLAppViewer::getViewerInfo() const
 	}
 
 #if !LL_LINUX
-	info["LLCEFLIB_VERSION"] = LLCEFLIB_VERSION;
+	std::ostringstream cef_ver_codec;
+	cef_ver_codec << "Dullahan: ";
+	cef_ver_codec << DULLAHAN_VERSION_MAJOR;
+	cef_ver_codec << ".";
+	cef_ver_codec << DULLAHAN_VERSION_MINOR;
+	cef_ver_codec << ".";
+	cef_ver_codec << DULLAHAN_VERSION_BUILD;
+	cef_ver_codec << " - CEF: ";
+	cef_ver_codec << CEF_VERSION;
+	info["LIBCEF_VERSION"] = cef_ver_codec.str();
 #else
-	info["LLCEFLIB_VERSION"] = "Undefined";
-
+	info["LIBCEF_VERSION"] = "Undefined";
 #endif
 
-#if LL_WINDOWS
-	std::ostringstream ver_codec;
-	ver_codec << LIBVLC_VERSION_MAJOR;
-	ver_codec << ".";
-	ver_codec << LIBVLC_VERSION_MINOR;
-	ver_codec << ".";
-	ver_codec << LIBVLC_VERSION_REVISION;
-	info["LIBVLC_VERSION"] = ver_codec.str();
+#if !LL_LINUX
+	std::ostringstream vlc_ver_codec;
+	vlc_ver_codec << LIBVLC_VERSION_MAJOR;
+	vlc_ver_codec << ".";
+	vlc_ver_codec << LIBVLC_VERSION_MINOR;
+	vlc_ver_codec << ".";
+	vlc_ver_codec << LIBVLC_VERSION_REVISION;
+	info["LIBVLC_VERSION"] = vlc_ver_codec.str();
 #else
 	info["LIBVLC_VERSION"] = "Undefined";
 #endif
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 91d79c4260e9d50b17807853bfef8949e911c90d..702f7efa21e4177b7aed80b97f4bf1092c9e600d 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -253,8 +253,6 @@ class LLAppViewer : public LLApp
     void sendLogoutRequest();
     void disconnectViewer();
 
-	void showReleaseNotesIfRequired();
-	
 	// *FIX: the app viewer class should be some sort of singleton, no?
 	// Perhaps its child class is the singleton and this should be an abstract base.
 	static LLAppViewer* sInstance; 
@@ -371,8 +369,8 @@ extern BOOL		gDisconnected;
 
 extern LLFrameTimer	gRestoreGLTimer;
 extern BOOL			gRestoreGL;
-extern BOOL		gUseWireframe;
-extern BOOL		gInitialDeferredModeForWireframe;
+extern bool		gUseWireframe;
+extern bool		gInitialDeferredModeForWireframe;
 
 // VFS globals - gVFS is for general use
 // gStaticVFS is read-only and is shipped w/ the viewer
diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h
index 0f7fa41c3206efd93356a7db8d79ede41d9bd6cd..96af8d898e6d89e10f375f2689a6a95192dda701 100644
--- a/indra/newview/llblocklist.h
+++ b/indra/newview/llblocklist.h
@@ -67,6 +67,8 @@ class LLBlockList: public LLFlatListViewEx, public LLMuteListObserver
 	void sortByType();
 	void refresh();
 
+	U32 getMuteListSize() { return mMuteListSize; }
+
 private:
 
 	void addNewItem(const LLMute* mute);
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index ffc235bdbf5145b0c2ac4b9ba2537fe0c1431422..86e23e7c83c5e4af85c62856b6bf55448a138a82 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -369,8 +369,13 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
 
 	bool is_p2p   = LLIMModel::LLIMSession::P2P_SESSION == stype;
 	bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype;
+	bool is_group_member = is_group && gAgent.isInGroup(selected_id, TRUE);
 
-	if ("can_im" == command_name || "can_view_profile" == command_name)
+	if ("can_im" == command_name)
+	{
+		return is_p2p || is_group_member;
+	}
+	else if ("can_view_profile" == command_name)
 	{
 		return is_p2p || is_group;
 	}
@@ -380,7 +385,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata)
 	}
 	else if ("can_call"	== command_name)
 	{
-		return (is_p2p || is_group) && LLAvatarActions::canCall();
+		return (is_p2p || is_group_member) && LLAvatarActions::canCall();
 	}
 	else if ("add_rem_friend"		== command_name ||
 			 "can_invite_to_group"	== command_name ||
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index f0331f20d85c6b23d6eedf566856a7c0c81eaab7..314b859cea2e3eef926a96d9d0f890be7e952e1f 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -63,10 +63,10 @@ class LLExpanderSegment : public LLTextSegment
 	{ 
 		return start_offset;
 	}
-	/*virtual*/ S32		getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const 
+	/*virtual*/ S32		getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 	{ 
 		// require full line to ourselves
-		if (line_offset == 0) 
+		if (line_offset == 0)
 		{
 			// print all our text
 			return getEnd() - getStart(); 
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7039e48e74a328b8f466092fab12e84b6941f4c1..7007c58b3c82408bd68b3b82aab02b4b6149fc9c 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1505,15 +1505,21 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve
 
 bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata)
 {
+	const LLConversationItem *conversation_item = getCurSelectedViewModelItem();
+	if(!conversation_item)
+	{
+		return false;
+	}
+
 	const std::string& item = userdata.asString();
 
 	if ("show_mute" == item)
 	{
-		return !isMuted(getCurSelectedViewModelItem()->getUUID());
+		return !isMuted(conversation_item->getUUID());
 	}
 	else if ("show_unmute" == item)
 	{
-		return isMuted(getCurSelectedViewModelItem()->getUUID());
+		return isMuted(conversation_item->getUUID());
 	}
 
 	return true;
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index e9af22d3364bbe1e6bddcd92cc2b4a123e20ee84..981d837b8a7bdc9061c1012b545926a0402ac263 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -304,6 +304,13 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)
 {
 	// Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater
 	LLFloaterIMSessionTab::restoreFloater();
+	if (app_quitting)
+	{
+		// We are starting and closing floater in "expanded" state
+		// Update expanded (restored) rect and position for use in next session
+		forceReshape();
+		storeRectControl();
+	}
 }
 
 // virtual
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7f952d4dd4479706844e2d09d25e58fe2fde286e..a340cd1143ebf129ebf77bd282f345e109084d06 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2029,7 +2029,6 @@ void LLPanelLandOptions::refresh()
 	else
 	{
 		// something selected, hooray!
-		LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
 
 		// Display options
 		BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
@@ -2045,9 +2044,8 @@ void LLPanelLandOptions::refresh()
 		mCheckGroupObjectEntry	->set( parcel->getAllowGroupObjectEntry() ||  parcel->getAllowAllObjectEntry());
 		mCheckGroupObjectEntry	->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
 		
-		BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE;
 		mCheckSafe			->set( !parcel->getAllowDamage() );
-		mCheckSafe			->setEnabled( can_change_options && region_damage );
+		mCheckSafe			->setEnabled( can_change_options );
 
 		mCheckFly			->set( parcel->getAllowFly() );
 		mCheckFly			->setEnabled( can_change_options );
@@ -2127,6 +2125,7 @@ void LLPanelLandOptions::refresh()
 			
 			// they can see the checkbox, but its disposition depends on the 
 			// state of the region
+			LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
 			if (regionp)
 			{
 				if (regionp->getSimAccess() == SIM_ACCESS_PG)
@@ -2448,6 +2447,7 @@ void LLPanelLandAccess::refresh()
 			mListAccess->deleteAllItems();
 			S32 count = parcel->mAccessList.size();
 			getChild<LLUICtrl>("AllowedText")->setTextArg("[COUNT]", llformat("%d",count));
+			getChild<LLUICtrl>("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
 			getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
 			getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
@@ -2495,6 +2495,7 @@ void LLPanelLandAccess::refresh()
 			mListBanned->deleteAllItems();
 			S32 count = parcel->mBanList.size();
 			getChild<LLUICtrl>("BanCheck")->setTextArg("[COUNT]", llformat("%d",count));
+			getChild<LLUICtrl>("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
 
 			getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
 			getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index f6ff83eaf4842c5c9c3eba8f032ac9e745f30b4c..5cf16f3ad6d821984fd66cd5c71791acafadf391 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -329,7 +329,7 @@ void LLFloaterPathfindingObjects::handleUpdateObjectList(LLPathfindingManager::r
 	}
 }
 
-void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
+void LLFloaterPathfindingObjects::rebuildObjectsScrollList(bool update_if_needed)
 {
 	if (!mHasObjectsToBeSelected)
 	{
@@ -355,7 +355,14 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
 	{
 		buildObjectsScrollList(mObjectList);
 
-		mObjectsScrollList->selectMultiple(mObjectsToBeSelected);
+		if(mObjectsScrollList->selectMultiple(mObjectsToBeSelected) == 0)
+		{
+			if(update_if_needed && mRefreshListButton->getEnabled())
+			{
+				requestGetObjects();
+				return;
+			}
+		}
 		if (mHasObjectsToBeSelected)
 		{
 			mObjectsScrollList->scrollToShowSelected();
@@ -484,7 +491,7 @@ void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects()
 	}
 	else
 	{
-		rebuildObjectsScrollList();
+		rebuildObjectsScrollList(true);
 		if (isMinimized())
 		{
 			setMinimized(FALSE);
diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h
index 4024e15fd63ee1a6e25a9203f72acbdbea02cfbe..752f741959d4b8fd0c37fe7ee341ec449beb80ec 100644
--- a/indra/newview/llfloaterpathfindingobjects.h
+++ b/indra/newview/llfloaterpathfindingobjects.h
@@ -80,7 +80,7 @@ class LLFloaterPathfindingObjects : public LLFloater
 	void                               handleNewObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList);
 	void                               handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList);
 
-	void                               rebuildObjectsScrollList();
+	void                               rebuildObjectsScrollList(bool update_if_needed = false);
 	virtual void                       buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr);
 	void                               addObjectToScrollList(const LLPathfindingObjectPtr pObjectPr, const LLSD &pScrollListItemData);
 
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 100ee5ab72dd49cb3a64a5fb01dcd12276794586..df4bc043e5c671042df2f24ad9d19a7186bd207d 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -467,6 +467,11 @@ BOOL LLFloaterPreference::postBuild()
 
 	gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
 
+	gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this));
+	gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this));
+	gSavedPerAccountSettings.getControl("SoundUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeSoundFolder, this));
+	gSavedPerAccountSettings.getControl("AnimationUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeAnimationFolder, this));
+
 	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
 	if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
 		tabcontainer->selectFirstTab();
@@ -501,6 +506,7 @@ BOOL LLFloaterPreference::postBuild()
 	fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView());
 	fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView());
 
+
 	return TRUE;
 }
 
@@ -742,7 +748,12 @@ void LLFloaterPreference::onOpen(const LLSD& key)
 
 	// Display selected maturity icons.
 	onChangeMaturity();
-	
+
+	onChangeModelFolder();
+	onChangeTextureFolder();
+	onChangeSoundFolder();
+	onChangeAnimationFolder();
+
 	// Load (double-)click to walk/teleport settings.
 	updateClickActionControls();
 	
@@ -1979,6 +1990,63 @@ void LLFloaterPreference::onChangeMaturity()
 	getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
 }
 
+std::string get_category_path(LLUUID cat_id)
+{
+    LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+    std::string localized_cat_name;
+    if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
+    {
+        localized_cat_name = cat->getName();
+    }
+
+    if (cat->getParentUUID().notNull())
+    {
+        return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
+    }
+    else
+    {
+        return localized_cat_name;
+    }
+}
+
+std::string get_category_path(LLFolderType::EType cat_type)
+{
+    LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type);
+    return get_category_path(cat_id);
+}
+
+void LLFloaterPreference::onChangeModelFolder()
+{
+    if (gInventory.isInventoryUsable())
+    {
+        getChild<LLTextBox>("upload_models")->setText(get_category_path(LLFolderType::FT_OBJECT));
+    }
+}
+
+void LLFloaterPreference::onChangeTextureFolder()
+{
+    if (gInventory.isInventoryUsable())
+    {
+        getChild<LLTextBox>("upload_textures")->setText(get_category_path(LLFolderType::FT_TEXTURE));
+    }
+}
+
+void LLFloaterPreference::onChangeSoundFolder()
+{
+    if (gInventory.isInventoryUsable())
+    {
+        getChild<LLTextBox>("upload_sounds")->setText(get_category_path(LLFolderType::FT_SOUND));
+    }
+}
+
+void LLFloaterPreference::onChangeAnimationFolder()
+{
+    if (gInventory.isInventoryUsable())
+    {
+        getChild<LLTextBox>("upload_animation")->setText(get_category_path(LLFolderType::FT_ANIMATION));
+    }
+}
+
 // FIXME: this will stop you from spawning the sidetray from preferences dialog on login screen
 // but the UI for this will still be enabled
 void LLFloaterPreference::onClickBlockList()
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index fa0c09e97a7c901723c132d47bb3205b9ae52a8b..ea199cf034c37a67459aab1b339e865405b47400 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -161,6 +161,10 @@ class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver,
 	void onCommitMusicEnabled();
 	void applyResolution();
 	void onChangeMaturity();
+	void onChangeModelFolder();
+	void onChangeTextureFolder();
+	void onChangeSoundFolder();
+	void onChangeAnimationFolder();
 	void onClickBlockList();
 	void onClickProxySettings();
 	void onClickTranslationSettings();
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 275554540e587f533e9889e56cc5765b97e4fe29..515c2b0c4bddc2dafb5d8b9af8b9ba90bc9a8e44 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -35,6 +35,7 @@
 #include "llassetstorage.h"
 #include "llavatarnamecache.h"
 #include "llcachename.h"
+#include "llcallbacklist.h"
 #include "llcheckboxctrl.h"
 #include "llfontgl.h"
 #include "llimagebmp.h"
@@ -211,7 +212,7 @@ BOOL LLFloaterReporter::postBuild()
 	// grab the user's name
 	std::string reporter = LLSLURL("agent", gAgent.getID(), "inspect").getSLURLString();
 	getChild<LLUICtrl>("reporter_field")->setValue(reporter);
-	
+
 	center();
 
 	return TRUE;
@@ -837,8 +838,9 @@ void LLFloaterReporter::takeScreenshot(bool use_prev_screenshot)
 	}
 }
 
-void LLFloaterReporter::onOpen(const LLSD& key)
+void LLFloaterReporter::takeNewSnapshot()
 {
+	childSetEnabled("send_btn", true);
 	mImageRaw = new LLImageRaw;
 	const S32 IMAGE_WIDTH = 1024;
 	const S32 IMAGE_HEIGHT = 768;
@@ -867,10 +869,18 @@ void LLFloaterReporter::onOpen(const LLSD& key)
 			}
 		}
 	}
-
 	takeScreenshot();
 }
 
+
+void LLFloaterReporter::onOpen(const LLSD& key)
+{
+	childSetEnabled("send_btn", false);
+	//Time delay to avoid UI artifacts. MAINT-7067
+	doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
+
+}
+
 void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response)
 {
 	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index e5232268c093346f3d3aaedb218d1fa11f08d02b..decc01be98424f1c09b6b9a514a368553ecc8c9c 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -107,6 +107,8 @@ class LLFloaterReporter
 
 	void onLoadScreenshotDialog(const LLSD& notification, const LLSD& response);
 
+	void takeNewSnapshot();
+
 private:
 	static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null, const LLUUID& experience_id = LLUUID::null);
 
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 6c17f62c1e862729d5d416781857c1c679244731..468537e6599cdd912f9532a3d59cc4a40e042dd3 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -34,6 +34,7 @@
 #include "llrect.h"
 #include "llerror.h"
 #include "llstring.h"
+#include "llvoavatarself.h"
 #include "message.h"
 
 // project include
@@ -80,6 +81,36 @@ BOOL LLFloaterScriptDebug::postBuild()
 	return FALSE;
 }
 
+void LLFloaterScriptDebug::setVisible(BOOL visible)
+{
+	if(visible)
+	{
+		LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null);
+		if (floater_output == NULL)
+		{
+			floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE));
+			if (floater_output)
+			{
+				addFloater(floater_output, false);
+			}
+		}
+
+	}
+	LLMultiFloater::setVisible(visible);
+}
+
+void LLFloaterScriptDebug::closeFloater(bool app_quitting/* = false*/)
+{
+	if(app_quitting)
+	{
+		LLMultiFloater::closeFloater(app_quitting);
+	}
+	else
+	{
+		setVisible(false);
+	}
+}
+
 LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
 {
 	LLMultiFloater* host = LLFloaterReg::showTypedInstance<LLMultiFloater>("script_debug", LLSD());
@@ -105,7 +136,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
 
 	if (objectp)
 	{
-		objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+		if(objectp->isHUDAttachment())
+		{
+			((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+		}
+		else
+		{
+			objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI));
+		}
 		floater_label = llformat("%s(%.0f, %.0f, %.0f)",
 						user_name.c_str(),
 						objectp->getPositionRegion().mV[VX],
@@ -117,7 +155,6 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
 		floater_label = user_name;
 	}
 
-	addOutputWindow(LLUUID::null);
 	addOutputWindow(source_id);
 
 	// add to "All" floater
diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h
index 6d9d1eb5000286db2622d9d45e7395ef4072b47a..8c08b234f39b4fcfb3277e4c74689b1bf59958b8 100644
--- a/indra/newview/llfloaterscriptdebug.h
+++ b/indra/newview/llfloaterscriptdebug.h
@@ -38,7 +38,10 @@ class LLFloaterScriptDebug : public LLMultiFloater
 	LLFloaterScriptDebug(const LLSD& key);
 	virtual ~LLFloaterScriptDebug();
 	virtual BOOL postBuild();
+	virtual void setVisible(BOOL visible);
     static void show(const LLUUID& object_id);
+
+    /*virtual*/ void closeFloater(bool app_quitting = false);
 	static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id);
 
 protected:
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d89fa03c1aad0689ff745bcc8a6b1ce082a039c9..83f268818e219f24f0e434d7f32bd93e61ea4c60 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -546,7 +546,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
 		// convenience.
 		if(gAgent.isGodlike())
 		{
-			getChild<LLUICtrl>("spin z")->setValue(LLSD(200.f));
+			getChild<LLUICtrl>("teleport_coordinate_z")->setValue(LLSD(200.f));
 		}
 		// Don't re-request info if we already have it or we won't have it in time to teleport
 		if (mTrackedStatus != LLTracker::TRACKING_AVATAR || name != mTrackedAvatarName)
@@ -1375,7 +1375,7 @@ void LLFloaterWorldMap::teleport()
 		&& av_tracker.haveTrackingInfo() )
 	{
 		pos_global = av_tracker.getGlobalPos();
-		pos_global.mdV[VZ] = getChild<LLUICtrl>("spin z")->getValue();
+		pos_global.mdV[VZ] = getChild<LLUICtrl>("teleport_coordinate_z")->getValue();
 	}
 	else if ( LLTracker::TRACKING_LANDMARK == tracking_status)
 	{
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 2405c3a1a3630ca31c92a2c6550f3eeba31ee27d..2e9332c3552b2f61d1b95c1cb6d985090261be13 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2703,7 +2703,7 @@ void LLIMMgr::addMessage(
 
 		// Logically it would make more sense to reject the session sooner, in another area of the
 		// code, but the session has to be established inside the server before it can be left.
-		if (LLMuteList::getInstance()->isMuted(other_participant_id) && !from_linden)
+		if (LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden)
 		{
 			LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL;
 			if(!gIMMgr->leaveSession(new_session_id))
@@ -3011,14 +3011,20 @@ void LLIMMgr::inviteToSession(
 	payload["question_type"] = question_type;
 
 	//ignore invites from muted residents
-	if (LLMuteList::getInstance()->isMuted(caller_id) && !is_linden)
+	if (!is_linden)
 	{
-		if (voice_invite && "VoiceInviteQuestionDefault" == question_type)
+		if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagVoiceChat)
+			&& voice_invite && "VoiceInviteQuestionDefault" == question_type)
 		{
 			LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL;
 			LLIncomingCallDialog::processCallResponse(1, payload);
+			return;
+		}
+		else if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagAll & ~LLMute::flagVoiceChat))
+		{
+			LL_INFOS() << "Rejecting session invite from initiating muted resident " << caller_name << LL_ENDL;
+			return;
 		}
-		return;
 	}
 
 	LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1de579d4c3bb1a7c3739e803499beba7328bbe6e..b7f5424f255c03132f7a6e9b1a902b60bcf84dc5 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3789,6 +3789,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
 		disabled_items.push_back(std::string("New Gesture"));
 		disabled_items.push_back(std::string("New Clothes"));
 		disabled_items.push_back(std::string("New Body Parts"));
+		disabled_items.push_back(std::string("upload_def"));
 	}
 	if (favorites == mUUID)
 	{
@@ -3815,6 +3816,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
 		disabled_items.push_back(std::string("New Gesture"));
 		disabled_items.push_back(std::string("New Clothes"));
 		disabled_items.push_back(std::string("New Body Parts"));
+		disabled_items.push_back(std::string("upload_def"));
     }
     if (marketplace_listings_id == mUUID)
     {
@@ -3864,6 +3866,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
                     items.push_back(std::string("New Gesture"));
                     items.push_back(std::string("New Clothes"));
                     items.push_back(std::string("New Body Parts"));
+                    items.push_back(std::string("upload_def"));
                 }
 			}
 			getClipboardEntries(false, items, disabled_items, flags);
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index e995c138b4e77305198ab1455f1e523bb8de3232..1433ea36bf0e743e8de29ea071b421ffcf3c1293 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -40,6 +40,7 @@
 #include "llinventorybridge.h"
 #include "llviewerfoldertype.h"
 #include "llradiogroup.h"
+#include "llstartup.h"
 
 // linden library includes
 #include "llclipboard.h"
@@ -132,8 +133,10 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
 	}
 
 	// when applying a filter, matching folders get their contents downloaded first
+	// but make sure we are not interfering with pre-download
 	if (isNotDefault()
-		&& !gInventory.isCategoryComplete(folder_id))
+		&& !gInventory.isCategoryComplete(folder_id)
+		&& LLStartUp::getStartupState() > STATE_WEARABLES_WAIT)
 	{
 		LLInventoryModelBackgroundFetch::instance().start(folder_id);
 	}
@@ -307,7 +310,11 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
 			if (is_hidden_if_empty)
 			{
 				// Force the fetching of those folders so they are hidden if they really are empty...
-				gInventory.fetchDescendentsOf(object_id);
+				// But don't interfere with startup download
+				if (LLStartUp::getStartupState() > STATE_WEARABLES_WAIT)
+				{
+					gInventory.fetchDescendentsOf(object_id);
+				}
 
 				LLInventoryModel::cat_array_t* cat_array = NULL;
 				LLInventoryModel::item_array_t* item_array = NULL;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 503fa28a335f3a950077f12361026324d1f8f29a..287fa4c45ba5c083ee208fc58deba9cdcb6e8706 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -515,6 +515,42 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe
 	return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getRootFolderID());
 }
 
+const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type)
+{
+    LLUUID cat_id;
+    switch (preferred_type)
+    {
+    case LLFolderType::FT_OBJECT:
+    {
+        cat_id = LLUUID(gSavedPerAccountSettings.getString("ModelUploadFolder"));
+        break;
+    }
+    case LLFolderType::FT_TEXTURE:
+    {
+        cat_id = LLUUID(gSavedPerAccountSettings.getString("TextureUploadFolder"));
+        break;
+    }
+    case LLFolderType::FT_SOUND:
+    {
+        cat_id = LLUUID(gSavedPerAccountSettings.getString("SoundUploadFolder"));
+        break;
+    }
+    case LLFolderType::FT_ANIMATION:
+    {
+        cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder"));
+        break;
+    }
+    default:
+        break;
+    }
+    
+    if (cat_id.isNull() || !getCategory(cat_id))
+    {
+        cat_id = findCategoryUUIDForTypeInRoot(preferred_type, true, getRootFolderID());
+    }
+    return cat_id;
+}
+
 const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder)
 {
 	return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getLibraryRootFolderID());
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 826d1f880d76db5c845450e46f3808d49637df6c..dee176917247751d64d4cb7af48082a3a5b8cf16 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -287,6 +287,9 @@ class LLInventoryModel
 	//    will search in the user's library folder instead of "My Inventory"
 	const LLUUID findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, 
 												bool create_folder = true);
+	// Returns user specified category for uploads, returns default id if there are no
+	// user specified one or it does not exist, creates default category if it is missing.
+	const LLUUID findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type);
 	
 	// Get whatever special folder this object is a child of, if any.
 	const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6a27c0fe216038349c725b39bd659b6dd5a358ad..bd15ba4975099219695b607060da72a048309eec 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -167,7 +167,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
 	mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
 	mCommitCallbackRegistrar.add("Inventory.Share",  boost::bind(&LLAvatarActions::shareWithAvatars, this));
-
+	mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2));
 }
 
 LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
@@ -1190,6 +1190,27 @@ bool LLInventoryPanel::beginIMSession()
 	return true;
 }
 
+void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
+{
+    const std::string param = userdata.asString();
+    if (param == "model")
+    {
+        gSavedPerAccountSettings.setString("ModelUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+    }
+    else if (param == "texture")
+    {
+        gSavedPerAccountSettings.setString("TextureUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+    }
+    else if (param == "sound")
+    {
+        gSavedPerAccountSettings.setString("SoundUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+    }
+    else if (param == "animation")
+    {
+        gSavedPerAccountSettings.setString("AnimationUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+    }
+}
+
 bool LLInventoryPanel::attachObject(const LLSD& userdata)
 {
 	// Copy selected item UUIDs to a vector.
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index b69edd8b9374402ca03593006d3a6798b7fb0fab..5cb9dde47a8adcab857c592f0eea5bc2cf57d780 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -201,6 +201,7 @@ class LLInventoryPanel : public LLPanel
 	void doToSelected(const LLSD& userdata);
 	void doCreate(const LLSD& userdata);
 	bool beginIMSession();
+	void fileUploadLocation(const LLSD& userdata);
 	bool attachObject(const LLSD& userdata);
 	static void idle(void* user_data);
 
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 39f3c0f113971034d1fd5daf00934bca7a68f47a..eca34c0d4d47ae1bf7521ee1175b370bd1ddfba9 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -168,7 +168,6 @@ LLPointer<LLCredential> LLLoginHandler::loadSavedUserLoginInfo()
 		authenticator["algorithm"] = "md5";
 		authenticator["secret"] = md5pass;
 		// yuck, we'll fix this with mani's changes.
-		gSavedSettings.setBOOL("AutoLogin", TRUE);
 		return gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), 
 													   identifier, authenticator);
 	}
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 9dacae2c4eff711ccd89fa7d9ebfeb7a00b28bee..1a533dace7113070a157b0ef28c195cd44556582 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2030,8 +2030,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
 	LLSD result;
 
 	LLSD res;
-	result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
-	result["texture_folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE);
+	result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT);
+	result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE);
 	result["asset_type"] = "mesh";
 	result["inventory_type"] = "object";
 	result["description"] = "(No Description)";
@@ -3536,11 +3536,11 @@ void LLMeshRepository::notifyLoadedMeshes()
 			// Handle addition of texture, if any.
 			if ( data.mResponse.has("new_texture_folder_id") )
 			{
-				const LLUUID& folder_id = data.mResponse["new_texture_folder_id"].asUUID();
+				const LLUUID& new_folder_id = data.mResponse["new_texture_folder_id"].asUUID();
 
-				if ( folder_id.notNull() )
+				if ( new_folder_id.notNull() )
 				{
-					LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE);
+					LLUUID parent_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE);
 
 					std::string name;
 					// Check if the server built a different name for the texture folder
@@ -3555,7 +3555,7 @@ void LLMeshRepository::notifyLoadedMeshes()
 
 					// Add the category to the internal representation
 					LLPointer<LLViewerInventoryCategory> cat = 
-						new LLViewerInventoryCategory(folder_id, parent_id, 
+						new LLViewerInventoryCategory(new_folder_id, parent_id, 
 							LLFolderType::FT_NONE, name, gAgent.getID());
 					cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN);
 
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 81ed2963e607f87bb9ef98086b04e1db98d54826..25ae4774fce8a07e3f22e5a4701e9e5498640f0e 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -141,6 +141,9 @@ void LLPanelBlockedList::updateButtons()
 	bool hasSelected = NULL != mBlockedList->getSelectedItem();
 	getChildView("unblock_btn")->setEnabled(hasSelected);
 	getChildView("blocked_gear_btn")->setEnabled(hasSelected);
+
+	getChild<LLUICtrl>("block_limit")->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize()));
+	getChild<LLUICtrl>("block_limit")->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit")));
 }
 
 void LLPanelBlockedList::unblockItem()
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index ec2d37c30de5d1d7dbdfc364d0ac8fa8f02a7b3d..ad600358dd53038839f0b18d6bad1714ff299571 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -649,7 +649,7 @@ void LLPanelFace::getState()
 	updateUI();
 }
 
-void LLPanelFace::updateUI()
+void LLPanelFace::updateUI(bool force_set_values /*false*/)
 { //set state of UI to match state of texture entry(ies)  (calls setEnabled, setValue, etc, but NOT setVisible)
 	LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
 
@@ -1025,7 +1025,14 @@ void LLPanelFace::updateUI()
 			getChildView("shinyScaleV")->setEnabled(editable && specmap_id.notNull());
 			getChildView("bumpyScaleV")->setEnabled(editable && normmap_id.notNull());
 
-			getChild<LLUICtrl>("TexScaleV")->setValue(diff_scale_t);
+			if (force_set_values)
+			{
+				getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(diff_scale_t);
+			}
+			else
+			{
+				getChild<LLSpinCtrl>("TexScaleV")->setValue(diff_scale_t);
+			}
 			getChild<LLUICtrl>("shinyScaleV")->setValue(norm_scale_t);
 			getChild<LLUICtrl>("bumpyScaleV")->setValue(spec_scale_t);
 
@@ -1235,8 +1242,17 @@ void LLPanelFace::updateUI()
 				BOOL repeats_tentative = !identical_repeats;
 
 				getChildView("rptctrl")->setEnabled(identical_planar_texgen ? FALSE : enabled);
-				getChild<LLUICtrl>("rptctrl")->setValue(editable ? repeats : 1.0f);
-				getChild<LLUICtrl>("rptctrl")->setTentative(LLSD(repeats_tentative));
+				LLSpinCtrl* rpt_ctrl = getChild<LLSpinCtrl>("rptctrl");
+				if (force_set_values)
+				{
+					//onCommit, previosly edited element updates related ones
+					rpt_ctrl->forceSetValue(editable ? repeats : 1.0f);
+				}
+				else
+				{
+					rpt_ctrl->setValue(editable ? repeats : 1.0f);
+				}
+				rpt_ctrl->setTentative(LLSD(repeats_tentative));
 			}
 		}
 
@@ -1974,6 +1990,8 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata )
 {
 	LLPanelFace* self = (LLPanelFace*) userdata;
 	self->sendTextureInfo();
+	// vertical scale and repeats per meter depends on each other, so force set on changes
+	self->updateUI(true);
 }
 
 // Commit the number of repeats per meter
@@ -2038,6 +2056,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
 			llassert(false);
 		break;
 	}
+	// vertical scale and repeats per meter depends on each other, so force set on changes
+	self->updateUI(true);
 }
 
 struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 9823e84cd9e2bdf514eac5959c2de4a52e92e555..078995e78770d7929406b8199eb6bf113b1b391e 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -152,7 +152,8 @@ class LLPanelFace : public LLPanel
 	// Make UI reflect state of currently selected material (refresh)
 	// and UI mode (e.g. editing normal map v diffuse map)
 	//
-	void updateUI();
+	// @param force_set_values forces spinners to set value even if they are focused
+	void updateUI(bool force_set_values = false);
 
 	// Convenience func to determine if all faces in selection have
 	// identical planar texgen settings during edits
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c4211d550806ab77b16d9729cb991061e2423e73..640962033696e90b9b2f29e7b298b21726d85e7b 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1519,6 +1519,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing));
 	mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing));
 	mCommitCallbackRegistrar.add("Inventory.Share",  boost::bind(&LLAvatarActions::shareWithAvatars, this));
+	mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&do_nothing));
 }
 
 // Destroys the object
@@ -1849,6 +1850,7 @@ void LLPanelObjectInventory::refresh()
 			if(mTaskUUID != object->mID)
 			{
 				mTaskUUID = object->mID;
+				mAttachmentUUID = object->getAttachmentItemID();
 				make_request = TRUE;
 
 				// This is a new object so pre-emptively clear the contents
@@ -1858,6 +1860,16 @@ void LLPanelObjectInventory::refresh()
 				// Register for updates from this object,
 				registerVOInventoryListener(object,NULL);
 			}
+			else if (mAttachmentUUID != object->getAttachmentItemID())
+			{
+				mAttachmentUUID = object->getAttachmentItemID();
+				if (mAttachmentUUID.notNull())
+				{
+					// Server unsubsribes viewer (deselects object) from property
+					// updates after "ObjectAttach" so we need to resubscribe
+					LLSelectMgr::getInstance()->sendSelect();
+				}
+			}
 
 			// Based on the node information, we may need to dirty the
 			// object inventory and get it again.
@@ -1888,6 +1900,7 @@ void LLPanelObjectInventory::refresh()
 void LLPanelObjectInventory::clearInventoryTask()
 {
 	mTaskUUID = LLUUID::null;
+	mAttachmentUUID = LLUUID::null;
 	removeVOInventoryListener();
 	clearContents();
 }
diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h
index 3de49242accf08ad6eedff7422159acff06900ef..d700c8f4cfb73bf96edce26ec1c45912a1c246ab 100644
--- a/indra/newview/llpanelobjectinventory.h
+++ b/indra/newview/llpanelobjectinventory.h
@@ -105,6 +105,7 @@ class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
 	LLFolderView* mFolders;
 	
 	LLUUID mTaskUUID;
+	LLUUID mAttachmentUUID;
 	BOOL mHaveInventory;
 	BOOL mIsInventoryEmpty;
 	BOOL mInventoryNeedsUpdate;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 5d43c386123403af07e9dc9bb8dea09708c96709..ed942fc7fc52c42acee0cf76ff1f601db4ba7221 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -304,7 +304,11 @@ BOOL LLPanelPlaces::postBuild()
 	enable_registrar.add("Places.OverflowMenu.Enable",  boost::bind(&LLPanelPlaces::onOverflowMenuItemEnable, this, _2));
 
 	mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-	if (!mPlaceMenu)
+	if (mPlaceMenu)
+	{
+		mPlaceMenu->setAlwaysShowMenu(TRUE);
+	}
+	else
 	{
 		LL_WARNS() << "Error loading Place menu" << LL_ENDL;
 	}
@@ -1006,7 +1010,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
 			 mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
 	{
 		mLandmarkInfo->setVisible(visible);
-
+		mPlaceProfile->setVisible(FALSE);
 		if (visible)
 		{
 			mLandmarkInfo->resetLocation();
@@ -1014,8 +1018,6 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
 			LLRect rect = getRect();
 			LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
 			mLandmarkInfo->reshape(new_rect.getWidth(), new_rect.getHeight());
-
-			mPlaceProfile->setVisible(FALSE);
 		}
 		else
 		{
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 0bcd8a9e63cfa21b1bd797ea46ef869d4430d40a..5f413fc3c0d64c1f25c44ca7cbb0bb434bb9a145 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -566,11 +566,16 @@ void LLPanelPrimMediaControls::updateShape()
 			}
 		}
 		
-		// MAINT-1392 If this is a HUD always set it visible, but hide each control if user has no perms.
-		// When setting it invisible it won't receive any mouse messages anymore
+		// Web plugins and HUD may have media controls invisible for user, but still need scroll mouse events.
+		// LLView checks for visibleEnabledAndContains() and won't pass events to invisible panel, so instead
+		// of hiding whole panel hide each control instead (if user has no perms).
+		// Note: It might be beneficial to keep panel visible for all plugins to make behavior consistent, but 
+		// for now limiting change to cases that need events.
 
-		if( !is_hud )
+		if (!is_hud && (!media_plugin || media_plugin->pluginSupportsMediaTime()))
+		{
 			setVisible(enabled);
+		}
 		else
 		{
 			if( !hasPermsControl )
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index be8bde09f8672f5bd0894a15720f3d61b1f3d4b2..ebf9153da9da2289f8655d0e002c0cda2304cd24 100644
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -57,7 +57,6 @@ class LLPanelSnapshotPostcard
 	LLPanelSnapshotPostcard();
 	/*virtual*/ BOOL postBuild();
 	/*virtual*/ void onOpen(const LLSD& key);
-	/*virtual*/ S32	notify(const LLSD& info);
 
 private:
 	/*virtual*/ std::string getWidthSpinnerName() const		{ return "postcard_snapshot_width"; }
@@ -79,7 +78,6 @@ class LLPanelSnapshotPostcard
 	void onSend();
 
 	bool mHasFirstMsgFocus;
-	std::string mAgentEmail;
 };
 
 static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard");
@@ -108,36 +106,9 @@ BOOL LLPanelSnapshotPostcard::postBuild()
 // virtual
 void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
 {
-	// pick up the user's up-to-date email address
-	if (mAgentEmail.empty())
-	{
-		gAgent.sendAgentUserInfoRequest();
-
-		std::string name_string;
-		LLAgentUI::buildFullname(name_string);
-		getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
-	}
-
 	LLPanelSnapshot::onOpen(key);
 }
 
-// virtual
-S32 LLPanelSnapshotPostcard::notify(const LLSD& info)
-{
-	if (!info.has("agent-email"))
-	{
-		llassert(info.has("agent-email"));
-		return 0;
-	}
-
-	if (mAgentEmail.empty())
-	{
-		mAgentEmail = info["agent-email"].asString();
-	}
-
-	return 1;
-}
-
 // virtual
 void LLPanelSnapshotPostcard::updateControls(const LLSD& info)
 {
@@ -190,7 +161,6 @@ void LLPanelSnapshotPostcard::sendPostcard()
     if (!url.empty())
     {
         LLResourceUploadInfo::ptr_t uploadInfo(new LLPostcardUploadInfo(
-            mAgentEmail,
             getChild<LLUICtrl>("name_form")->getValue().asString(),
             getChild<LLUICtrl>("to_form")->getValue().asString(),
             getChild<LLUICtrl>("subject_form")->getValue().asString(),
@@ -253,12 +223,6 @@ void LLPanelSnapshotPostcard::onSend()
 		return;
 	}
 
-	if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))
-	{
-		LLNotificationsUtil::add("PromptSelfEmail");
-		return;
-	}
-
 	std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString());
 	if(subject.empty() || !mHasFirstMsgFocus)
 	{
diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp
index 2e639b56ebfcf49c5f39668f3c6053149425f00a..d5775042c186bac9eddba6a122f70d1a4a846660 100644
--- a/indra/newview/llpostcard.cpp
+++ b/indra/newview/llpostcard.cpp
@@ -40,11 +40,10 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-LLPostcardUploadInfo::LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
+LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
         std::string subject, std::string message, LLVector3d globalPosition,
         LLPointer<LLImageFormatted> image, invnUploadFinish_f finish) :
     LLBufferedAssetUploadInfo(LLUUID::null, image, finish),
-    mEmailFrom(emailFrom),
     mNameFrom(nameFrom),
     mEmailTo(emailTo),
     mSubject(subject),
@@ -58,7 +57,6 @@ LLSD LLPostcardUploadInfo::generatePostBody()
     LLSD postcard = LLSD::emptyMap();
     postcard["pos-global"] = mGlobalPosition.getValue();
     postcard["to"] = mEmailTo;
-    postcard["from"] = mEmailFrom;
     postcard["name"] = mNameFrom;
     postcard["subject"] = mSubject;
     postcard["msg"] = mMessage;
diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h
index 24157be636ddb3ed6d0ff5234a0a387cee15e1f8..1e932ae03ff8ddde6b5c2c94131b81d8cf1949f8 100644
--- a/indra/newview/llpostcard.h
+++ b/indra/newview/llpostcard.h
@@ -53,13 +53,12 @@ class LLPostCard
 class LLPostcardUploadInfo : public LLBufferedAssetUploadInfo
 {
 public:
-    LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
+    LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
         std::string subject, std::string message, LLVector3d globalPosition,
         LLPointer<LLImageFormatted> image, invnUploadFinish_f finish);
 
     virtual LLSD generatePostBody();
 private:
-    std::string mEmailFrom;
     std::string mNameFrom;
     std::string mEmailTo;
     std::string mSubject;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index dd934ce6b8f79f2c8aba0d6d4bbc21491b21567b..ee7c22800aa811c9c282008c9c4e2969643fa5ee 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4416,6 +4416,9 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace)
 			SEND_ONLY_ROOTS );
 		if (!build_mode)
 		{
+			// After "ObjectAttach" server will unsubscribe us from properties updates
+			// so either deselect objects or resend selection after attach packet reaches server
+			// In case of build_mode LLPanelObjectInventory::refresh() will deal with selection
 			deselectAll();
 		}
 	}
@@ -7101,7 +7104,7 @@ F32 LLObjectSelection::getSelectedLinksetCost()
 		LLSelectNode* node = *iter;
 		LLViewerObject* object = node->getObject();
 		
-		if (object)
+		if (object && !object->isAttachment())
 		{
 			LLViewerObject* root = static_cast<LLViewerObject*>(object->getRoot());
 			if (root)
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index a32ed258f84f86b554d65a10819cdb5c6cac3a33..3e95811bb8bdb34af38f038e19e4124266369532 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -421,6 +421,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab
 	{
 		// Save changes if closing.
 		mEditWearable->saveChanges();
+		mEditWearable->setWearable(NULL);
 		LLAppearanceMgr::getInstance()->updateIsDirty();
 		if (change_state)
 		{
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 12cbff888d39cb7c1c916059b07342ddf72dbea1..af2173dd171da620bbbca184ad885fcf9bd700ef 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -779,23 +779,7 @@ void LLSidepanelItemInfo::onCommitName()
 	{
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 		new_item->rename(labelItemName->getText());
-		if(mObjectID.isNull())
-		{
-			new_item->updateServer(FALSE);
-			gInventory.updateItem(new_item);
-			gInventory.notifyObservers();
-		}
-		else
-		{
-			LLViewerObject* object = gObjectList.findObject(mObjectID);
-			if(object)
-			{
-				object->updateInventory(
-					new_item,
-					TASK_INVENTORY_ITEM_KEY,
-					false);
-			}
-		}
+		onCommitChanges(new_item);
 	}
 }
 
@@ -816,23 +800,7 @@ void LLSidepanelItemInfo::onCommitDescription()
 		LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
 
 		new_item->setDescription(labelItemDesc->getText());
-		if(mObjectID.isNull())
-		{
-			new_item->updateServer(FALSE);
-			gInventory.updateItem(new_item);
-			gInventory.notifyObservers();
-		}
-		else
-		{
-			LLViewerObject* object = gObjectList.findObject(mObjectID);
-			if(object)
-			{
-				object->updateInventory(
-					new_item,
-					TASK_INVENTORY_ITEM_KEY,
-					false);
-			}
-		}
+		onCommitChanges(new_item);
 	}
 }
 
@@ -908,23 +876,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
 			flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
 		}
 		new_item->setFlags(flags);
-		if(mObjectID.isNull())
-		{
-			new_item->updateServer(FALSE);
-			gInventory.updateItem(new_item);
-			gInventory.notifyObservers();
-		}
-		else
-		{
-			LLViewerObject* object = gObjectList.findObject(mObjectID);
-			if(object)
-			{
-				object->updateInventory(
-					new_item,
-					TASK_INVENTORY_ITEM_KEY,
-					false);
-			}
-		}
+		onCommitChanges(new_item);
 	}
 	else
 	{
@@ -1008,25 +960,7 @@ void LLSidepanelItemInfo::updateSaleInfo()
 		}
 
 		new_item->setSaleInfo(sale_info);
-		if(mObjectID.isNull())
-		{
-			// This is in the agent's inventory.
-			new_item->updateServer(FALSE);
-			gInventory.updateItem(new_item);
-			gInventory.notifyObservers();
-		}
-		else
-		{
-			// This is in an object's contents.
-			LLViewerObject* object = gObjectList.findObject(mObjectID);
-			if(object)
-			{
-				object->updateInventory(
-					new_item,
-					TASK_INVENTORY_ITEM_KEY,
-					false);
-			}
-		}
+		onCommitChanges(new_item);
 	}
 	else
 	{
@@ -1035,6 +969,45 @@ void LLSidepanelItemInfo::updateSaleInfo()
 	}
 }
 
+void LLSidepanelItemInfo::onCommitChanges(LLPointer<LLViewerInventoryItem> item)
+{
+    if (item.isNull())
+    {
+        return;
+    }
+
+    if (mObjectID.isNull())
+    {
+        // This is in the agent's inventory.
+        item->updateServer(FALSE);
+        gInventory.updateItem(item);
+        gInventory.notifyObservers();
+    }
+    else
+    {
+        // This is in an object's contents.
+        LLViewerObject* object = gObjectList.findObject(mObjectID);
+        if (object)
+        {
+            object->updateInventory(
+                item,
+                TASK_INVENTORY_ITEM_KEY,
+                false);
+
+            if (object->isSelected())
+            {
+                // Since object is selected (build floater is open) object will
+                // receive properties update, detect serial mismatch, dirty and
+                // reload inventory, meanwhile some other updates will refresh it.
+                // So mark dirty early, this will prevent unnecessary changes
+                // and download will be triggered by LLPanelObjectInventory - it
+                // prevents flashing in content tab and some duplicated request.
+                object->dirtyInventory();
+            }
+        }
+    }
+}
+
 LLViewerInventoryItem* LLSidepanelItemInfo::findItem() const
 {
 	LLViewerInventoryItem* item = NULL;
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index 2e24e58a2add2c35ca20b0332f38607fd6a9fad0..74cf7afe3530707e6c3fc9d5ad0b7dbfacac168f 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -89,6 +89,7 @@ class LLSidepanelItemInfo : public LLSidepanelInventorySubpanel
 	void 						onCommitSaleInfo();
 	void 						onCommitSaleType();
 	void 						updateSaleInfo();
+	void 						onCommitChanges(LLPointer<LLViewerInventoryItem> item);
 };
 
 #endif // LL_LLSIDEPANELITEMINFO_H
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 50f4c7854ebb9a3beb84f6f6f7ef9841d1bf54a9..19ec03f8375ebb126564d02d5743fe4a034f35aa 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -256,6 +256,7 @@ boost::scoped_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats:
 
 void login_show();
 void login_callback(S32 option, void* userdata);
+void show_release_notes_if_required();
 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);
@@ -682,10 +683,17 @@ bool idle_startup()
 		}
 		else if (gSavedSettings.getBOOL("AutoLogin"))  
 		{
+			// Log into last account
 			gRememberPassword = TRUE;
 			gSavedSettings.setBOOL("RememberPassword", TRUE);                                                      
 			show_connect_box = false;    			
 		}
+		else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
+		{
+			// Console provided login&password
+			gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
+			show_connect_box = false;
+		}
 		else 
 		{
 			gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
@@ -709,6 +717,7 @@ bool idle_startup()
 		set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str());
 		display_startup();
 		// LLViewerMedia::initBrowser();
+		show_release_notes_if_required();
 		LLStartUp::setStartupState( STATE_LOGIN_SHOW );
 		return FALSE;
 	}
@@ -2246,6 +2255,22 @@ void login_callback(S32 option, void *userdata)
 	}
 }
 
+/**
+* Check if user is running a new version of the viewer.
+* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting.
+*/
+void show_release_notes_if_required()
+{
+    if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion
+        && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds
+        && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
+        && !gSavedSettings.getBOOL("FirstLoginThisInstall"))
+    {
+        LLSD info(LLAppViewer::instance()->getViewerInfo());
+        LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+    }
+}
+
 void show_first_run_dialog()
 {
 	LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 9e54c521b59c320ba501c2dbf166eb6dd1c67f0b..10a9dee4157bad47f115a3d793c5606a59331557 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -50,6 +50,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL()
 ,	mCapabilityURL(std::string())
 ,	mFilePath(LL_PATH_APP_SETTINGS)
 ,	mSyntaxId(LLUUID())
+,	mInitialized(false)
 {
 	loadDefaultKeywordsIntoLLSD();
 	mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this));
@@ -179,6 +180,7 @@ void LLSyntaxIdLSL::cacheFile(const std::string &fileSpec, const LLSD& content_r
 //-----------------------------------------------------------------------------
 void LLSyntaxIdLSL::initialize()
 {
+	if(mInitialized) return;
 	if (mSyntaxId.isNull())
 	{
 		loadDefaultKeywordsIntoLLSD();
@@ -213,6 +215,7 @@ void LLSyntaxIdLSL::initialize()
 		LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL;
 		loadDefaultKeywordsIntoLLSD();
 	}
+	mInitialized = true;
 }
 
 //-----------------------------------------------------------------------------
@@ -303,6 +306,7 @@ void LLSyntaxIdLSL::handleRegionChanged()
 	{
 		buildFullFileSpec();
 		fetchKeywordsFile(mFullFileSpec);
+		mInitialized = false;
 	}
 }
 
diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h
index 1360b3e042efc43b716d67d5341179ef00714e55..caddba5527949384d333072611edfcad79b1f91c 100644
--- a/indra/newview/llsyntaxid.h
+++ b/indra/newview/llsyntaxid.h
@@ -65,6 +65,7 @@ class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL>
 	ELLPath			mFilePath;
 	LLUUID			mSyntaxId;
 	LLSD			mKeywordsXml;
+	bool 			mInitialized;
 	
 public:
 	void initialize();
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index e17651dc911a11e2fb8fc5892711e5f9dda01f02..e79ce55854c90173c41247c376f531bd78f0f184 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -338,56 +338,41 @@ BOOL LLToolPie::handleLeftClickPick()
 
 	// If left-click never selects or spawns a menu
 	// Eat the event.
-	if (!gSavedSettings.getBOOL("LeftClickShowMenu"))
+
+	// mouse already released
+	if (!mMouseButtonDown)
 	{
-		// mouse already released
-		if (!mMouseButtonDown)
-		{
-			return true;
-		}
+		return true;
+	}
 
-		while( object && object->isAttachment() && !object->flagHandleTouch())
+	while (object && object->isAttachment() && !object->flagHandleTouch())
+	{
+		// don't pick avatar through hud attachment
+		if (object->isHUDAttachment())
 		{
-			// don't pick avatar through hud attachment
-			if (object->isHUDAttachment())
-			{
-				break;
-			}
-			object = (LLViewerObject*)object->getParent();
+			break;
 		}
-		if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk"))
-		{
-			// we left clicked on avatar, switch to focus mode
-			mMouseButtonDown = false;
-			LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
-			gViewerWindow->hideCursor();
-			LLToolCamera::getInstance()->setMouseCapture(TRUE);
-			LLToolCamera::getInstance()->pickCallback(mPick);
-			gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
+		object = (LLViewerObject*)object->getParent();
+	}
+	if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk"))
+	{
+		// we left clicked on avatar, switch to focus mode
+		mMouseButtonDown = false;
+		LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
+		gViewerWindow->hideCursor();
+		LLToolCamera::getInstance()->setMouseCapture(TRUE);
+		LLToolCamera::getInstance()->pickCallback(mPick);
+		gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
 
-			return TRUE;
-		}
+		return TRUE;
+	}
 	//////////
 	//	// Could be first left-click on nothing
 	//	LLFirstUse::useLeftClickNoHit();
 	/////////
-		
-		// Eat the event
-		return LLTool::handleMouseDown(x, y, mask);
-	}
-
-	if (gAgent.leftButtonGrabbed())
-	{
-		// if the left button is grabbed, don't put up the pie menu
-		return LLTool::handleMouseDown(x, y, mask);
-	}
-
-	// Can't ignore children here.
-	LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
 
-	// Spawn pie menu
-	LLTool::handleRightMouseDown(x, y, mask);
-	return TRUE;
+	// Eat the event
+	return LLTool::handleMouseDown(x, y, mask);
 }
 
 BOOL LLToolPie::useClickAction(MASK mask, 
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index cafaf8645a391dd621e17dbf3e4dd2d494c5a6bd..49d29c0e4e766c85d935c25bb23ed6a131732225 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -307,10 +307,9 @@ void LLResourceUploadInfo::assignDefaults()
         mDescription = "(No Description)";
     }
 
-    mFolderId = gInventory.findCategoryUUIDForType(
+    mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
         (mDestinationFolderType == LLFolderType::FT_NONE) ?
         (LLFolderType::EType)mAssetType : mDestinationFolderType);
-
 }
 
 std::string LLResourceUploadInfo::getDisplayName() const
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index a0bb689c902e1870b0f7af8cb9ca7a765aa40178..d9d66ef254602000a7583a24bf8f597189640340 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -506,7 +506,7 @@ bool handleVelocityInterpolate(const LLSD& newvalue)
 
 bool handleForceShowGrid(const LLSD& newvalue)
 {
-	LLPanelLogin::updateServer( );
+	LLPanelLogin::updateLocationSelectorsVisibility();
 	return true;
 }
 
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index dddfb6745e48887d7b0c27a6800c834eb58fc2c2..2a126c9f01adfc50f83d122d430961214bb5e04f 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -706,7 +706,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL
 bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const
 {
 	return (region && region->getAllowDamage())
-		&& (parcel && parcel->getAllowDamage());
+		|| (parcel && parcel->getAllowDamage());
 }
 
 BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 09cdfe130908011c704bf3961a74a1ae43a6897d..9e09971ced3cb2ebe7eece7b605f38434817d85a 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -191,7 +191,7 @@ class LLEmbeddedItemSegment : public LLTextSegment
 		return false;
 	}
 
-	/*virtual*/ S32				getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const 
+	/*virtual*/ S32				getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const
 	{
 		// always draw at beginning of line
 		if (line_offset == 0)
@@ -1105,10 +1105,6 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwch
 			openEmbeddedSound( item, wc );
 			return TRUE;
 
-		case LLAssetType::AT_NOTECARD:
-			openEmbeddedNotecard( item, wc );
-			return TRUE;
-
 		case LLAssetType::AT_LANDMARK:
 			openEmbeddedLandmark( item, wc );
 			return TRUE;
@@ -1117,6 +1113,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwch
 			openEmbeddedCallingcard( item, wc );
 			return TRUE;
 
+		case LLAssetType::AT_NOTECARD:
 		case LLAssetType::AT_LSL_TEXT:
 		case LLAssetType::AT_CLOTHING:
 		case LLAssetType::AT_OBJECT:
@@ -1182,11 +1179,6 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLPointer<LLInventoryItem> item_p
 	}
 }
 
-void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc )
-{
-	copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
-}
-
 void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc )
 {
 	if(item && !item->getCreatorUUID().isNull())
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 477119d4f2468d4ba7b645daf4a555c09c64f86e..33cfca4f902a6888d9264a81f54fd7845558dc31 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -105,7 +105,6 @@ class LLViewerTextEditor : public LLTextEditor
 	void			openEmbeddedTexture( LLInventoryItem* item, llwchar wc );
 	void			openEmbeddedSound( LLInventoryItem* item, llwchar wc );
 	void			openEmbeddedLandmark( LLPointer<LLInventoryItem> item_ptr, llwchar wc );
-	void			openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
 	void			openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc);
 	void			showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
 	void			showUnsavedAlertDialog( LLInventoryItem* item );
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 96a1beffbc326354a47cf26765220df5b853087c..8888879b8a93c7d71a1e44dbf4a764849f166a70 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -118,6 +118,9 @@ extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
 const F32 MAX_HOVER_Z = 2.0;
 const F32 MIN_HOVER_Z = -2.0;
 
+const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f;
+const F32 MAX_ATTACHMENT_COMPLEXITY = 1.0e6f;
+
 using namespace LLAvatarAppearanceDefines;
 
 //-----------------------------------------------------------------------------
@@ -9056,10 +9059,10 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 						const LLVOVolume* volume = drawable->getVOVolume();
 						if (volume)
 						{
-                            U32 attachment_total_cost = 0;
-                            U32 attachment_volume_cost = 0;
-                            U32 attachment_texture_cost = 0;
-                            U32 attachment_children_cost = 0;
+                            F32 attachment_total_cost = 0;
+                            F32 attachment_volume_cost = 0;
+                            F32 attachment_texture_cost = 0;
+                            F32 attachment_children_cost = 0;
 
 							attachment_volume_cost += volume->getRenderCost(textures);
 
@@ -9083,7 +9086,6 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 								// add the cost of each individual texture in the linkset
 								attachment_texture_cost += volume_texture->second;
 							}
-
                             attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
                             LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
                                                    << " total: " << attachment_total_cost
@@ -9092,7 +9094,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
                                                    << ", " << volume->numChildren()
                                                    << " children: " << attachment_children_cost
                                                    << LL_ENDL;
-                            cost += attachment_total_cost;
+                            // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
+                            cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY);
 						}
 					}
 				}
diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp
index 21428857672697aedea7e4f8ddf95c38f0a338fd..c8879e73ebad1597da3488eeb00a931ea826f613 100644
--- a/indra/newview/llwlanimator.cpp
+++ b/indra/newview/llwlanimator.cpp
@@ -155,17 +155,28 @@ F64 LLWLAnimator::getDayTime()
 
 		// we're not solving the non-linear equation that determines sun phase
 		// we're just linearly interpolating between the major points
-		if (phase <= 5.0 / 4.0) {
+
+		if (phase <= 5.0 / 4.0)
+		{
+			// mDayTime from 0.33 to 0.75 (6:00 to 21:00)
 			mDayTime = (1.0 / 3.0) * phase + (1.0 / 3.0);
 		}
+		else if (phase > 7.0 / 4.0)
+		{
+			// maximum value for phase is 2
+			// mDayTime from 0.25 to 0.33 (3:00 to 6:00)
+			mDayTime = (1.0 / 3.0) - (1.0 / 3.0) * (2 - phase);
+		}
 		else
 		{
+			// phase == 3/2 is where day restarts (24:00)
+			// mDayTime from 0.75 to 0.999 and 0 to 0.25 (21:00 to 03:00)
 			mDayTime = phase - (1.0 / 2.0);
-		}
 
-		if(mDayTime > 1)
-		{
-			mDayTime--;
+			if(mDayTime > 1)
+			{
+				mDayTime--;
+			}
 		}
 
 		return mDayTime;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 26b71f70bbdb154b5de21ef15b34ff5c73b7fbc9..c38dafee536ddc0bbbc5a9ba39d96f004a9ce77a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7766,12 +7766,10 @@ void LLPipeline::renderBloom(bool for_snapshot, F32 zoom_factor, int subfield)
 			F32 fov = LLViewerCamera::getInstance()->getView();
 		
 			const F32 default_fov = CameraFieldOfView * F_PI/180.f;
-			//const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
 		
 			//F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
 		
 			F32 dv = 2.f*default_focal_length * tanf(default_fov/2.f);
-			//F32 dh = 2.f*default_focal_length * tanf(default_fov*default_aspect_ratio/2.f);
 
 			F32 focal_length = dv/(2*tanf(fov/2.f));
 		 
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 779b168ae01fc2b829d1668662220ad5d3fdf5ba..7654f0dcd6bdc36c994ad1903809069e0afcc7e6 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -24,7 +24,7 @@ Grafik kort: [GRAPHICS_CARD]
 
 J2C Decoder Version: [J2C_VERSION]
 Audio Driver Version: [AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF Version: [LLCEFLIB_VERSION]
+CEF Version: [LIBCEF_VERSION]
 LibVLC Version: [LIBVLC_VERSION]
 Voice Server Version: [VOICE_VERSION]
 	</floater.string>
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index 4a2cbcc81f84ca512c44334a71b02bbd18e01ab0..de20ed88a30f4325de6dd8ce76232cf3e174bd94 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -38,7 +38,7 @@
 		Grafikinitialisierung fehlgeschlagen. Bitte aktualisieren Sie Ihren Grafiktreiber.
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ Erstellungszeit VFS (Cache): [VFS_TIME]
 	<string name="AboutLibs">
 		J2C-Decoderversion: [J2C_VERSION]
 Audiotreiberversion: [AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF-Version: [LLCEFLIB_VERSION]
+CEF-Version: [LIBCEF_VERSION]
 LibVLC-Version: [LIBVLC_VERSION]
 Voice-Server-Version: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 8391bacf51e167e6496d32e4a25840bc182b1c67..a137770e2668a03c2ed8481ed7521605add094ce 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -2014,7 +2014,7 @@ Only large parcels can be listed in search.
              name="AllowedText"
              top="0"
              width="230">
-                Allowed Residents ([COUNT])
+                Allowed Residents ([COUNT], max [MAX])
             </text>
             <name_list
              column_padding="0"
@@ -2063,7 +2063,7 @@ Only large parcels can be listed in search.
              name="BanCheck"
              top="0"
              width="200">
-                Banned Residents ([COUNT])
+                Banned Residents ([COUNT], max [MAX])
             </text>
             <name_list
              column_padding="0"
diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml
index bea35e5fc17becd6b09444d84d1b70811aad6eca..63334e2b241aa385862d527a8957c68db10f16ff 100644
--- a/indra/newview/skins/default/xui/en/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/en/floater_inspect.xml
@@ -27,21 +27,21 @@
      tool_tip="Select an object from this list to highlight it in-world"
      top="20">
         <scroll_list.columns
-         dynamic_width="true"
+         relative_width="0.25"
          label="Object Name"
          name="object_name" />
         <scroll_list.columns
-         dynamic_width="true"
+         relative_width="0.25"
          label="Owner Name"
          name="owner_name" />
         <scroll_list.columns
-         dynamic_width="true"
+         relative_width="0.25"
          label="Creator Name"
          name="creator_name" />
         <scroll_list.columns
+         relative_width="0.25"
          label="Creation Date"
-         name="creation_date"
-         width="150" />
+         name="creation_date" />
 		 <scroll_list.commit_callback
 		   function="Inspect.SelectObject" />
     </scroll_list>
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 52d03cc432b6c3115ee15626c2e14e13ee926a8c..00d70556b414ead87ead8f9d652d1b2193d4e198 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -290,7 +290,7 @@
       layout="topleft"
       left="0"
       height="67"
-      width="1010">
+      width="1070">
     <text
         name="linksets_actions_label"
         height="13"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index 9a9101e0da1f71e9f54012634d8a457562c4fe25..5ca527ad2053542e42f2ab27d01788105a9bc1c2 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -120,6 +120,13 @@
          layout="topleft"
          help_topic="preferences_advanced1_tab"
          name="advanced1" />
+        <panel
+         class="panel_preference"
+         filename="panel_preferences_uploads.xml"
+         label="Uploads"
+         layout="topleft"
+         help_topic="preferences_uploads_tab"
+         name="uploads" />
     </tab_container>
 
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
index b53698a9f21939e71580096955a59f6d03016e35..62cce3a1e377c76c2b6c03fcb4e659d0738e1a2b 100644
--- a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
@@ -7,6 +7,7 @@
          save_rect="true"
          save_visibility="true"
          title="SCENE LOAD STATISTICS"
+         min_width="250"
          width="400">
     <scroll_container follows="top|left|bottom|right"
                       bottom="400"
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug.xml b/indra/newview/skins/default/xui/en/floater_script_debug.xml
index 53d4925214266a50e122f1b5eed6b3356b12aae8..cd88048d6b8e1f599cf280acc90f849336e8c6c7 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug.xml
@@ -7,6 +7,7 @@
  help_topic="script_debug_floater"
  save_rect="true"
  title="Script Warning/Error"
+ reuse_instance="true"
  width="450">
     <tab_container
      follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index be9b93837a45a153d465e87911b6e42045467a6c..e4f735740b7c15b836ae79bf7d00cf6078f26e10 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -8,6 +8,7 @@
          save_rect="true"
          save_visibility="true"
          title="STATISTICS"
+         min_width="250"
          width="270">
   <scroll_container follows="all"
                     height="380"
diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
index b08d21e8f4bbcbb46e4f0076034ee899603fd1cb..c1458977ca15713a98265f44ca65e8ee015003a0 100644
--- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
@@ -5,8 +5,7 @@
  name="menu_gesture_gear"
  visible="false">
     <menu_item_call
-     font="SansSerifBold"
-     label="Add/Remove from Favorites"
+     label="Activate/Deactivate selected gesture"
      layout="topleft"
      name="activate">
         <on_click
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 5b8a9413bf3f5e1defdba1228b08143137d51316..e1f9269c70b70ad567af95e1cf256e88d845540b 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -321,6 +321,43 @@
              parameter="eyes" />
         </menu_item_call>
     </menu>
+    <menu
+     label="Use as default for"
+     layout="topleft"
+     name="upload_def">
+      <menu_item_call
+       label="Image uploads"
+       layout="topleft"
+       name="Image uploads">
+        <menu_item_call.on_click
+         function="Inventory.FileUploadLocation"
+         parameter="texture" />
+      </menu_item_call>
+      <menu_item_call
+       label="Sound uploads"
+       layout="topleft"
+       name="Sound uploads">
+        <menu_item_call.on_click
+         function="Inventory.FileUploadLocation"
+         parameter="sound" />
+      </menu_item_call>
+      <menu_item_call
+       label="Animation uploads"
+       layout="topleft"
+       name="Animation uploads">
+        <menu_item_call.on_click
+         function="Inventory.FileUploadLocation"
+         parameter="animation" />
+      </menu_item_call>
+      <menu_item_call
+       label="Model uploads"
+       layout="topleft"
+       name="Model uploads">
+        <menu_item_call.on_click
+         function="Inventory.FileUploadLocation"
+         parameter="model" />
+      </menu_item_call>
+    </menu>
     <menu
      label="Change Type"
      layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index a39ee5fddd8d2a9f6fdd37adb2230ed472f91c29..8cd0c415f43626216938b41a76c82074655811e5 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -20,6 +20,18 @@
              function="Floater.Toggle"
              parameter="preferences" />
         </menu_item_call>
+        <menu_item_check
+         label="Show Grid Picker"
+         name="Show Grid Picker"
+         visible="false" 
+         shortcut="control|shift|G">
+        <on_check
+         function="CheckControl"
+         parameter="ForceShowGrid" />
+        <on_click
+         function="ToggleControl"
+         parameter="ForceShowGrid" />
+        </menu_item_check>
         <menu_item_separator />
         <menu_item_call
          label="Exit [APP_NAME]"
@@ -287,18 +299,6 @@
            parameter="4" />
         </menu_item_check>
       </menu>
-     <menu_item_check
-        label="Show Grid Picker"
-        name="Show Grid Picker"
-        visible="false" 
-        shortcut="control|shift|G">
-        <on_check
-         function="CheckControl"
-         parameter="ForceShowGrid" />
-        <on_click
-         function="ToggleControl"
-         parameter="ForceShowGrid" />
-      </menu_item_check>
       <menu_item_call
         label="Show Notifications Console"
         name="Show Notifications Console"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index f911c2da7bdea55b59762fd7e2ca8b3072115dbe..332d79e1eac64c47009426e149f7211e7f369458 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -447,6 +447,13 @@
              function="Floater.Toggle"
              parameter="mini_map" />
         </menu_item_check>
+        <menu_item_call
+             label="Events"
+             name="Events">
+            <menu_item_call.on_click
+             function="Advanced.ShowURL"
+             parameter="http://events.secondlife.com"/>
+        </menu_item_call>
         <menu_item_check
         label="Search..."
         name="Search"
@@ -1018,6 +1025,16 @@
            label="Scripts"
            name="Scripts"
            tear_off="true">
+          <menu_item_check
+             label="Script warnings/errors..."
+             name="Script debug">
+            <menu_item_check.on_check
+             function="Floater.IsOpen"
+             parameter="script_debug" />
+            <menu_item_check.on_click
+             function="Floater.ToggleOrBringToFront"
+             parameter="script_debug" />
+          </menu_item_check>
           <menu_item_call
              label="Recompile Scripts (Mono)"
              name="Mono">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 512deed054cf1f8edf852c53a61f90c0fe5a8db3..c4190a49407a61785637f1c800cf63d040aa2367 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4031,7 +4031,7 @@ An update was downloaded. It will be installed during restart.
  icon="alertmodal.tga"
  name="UpdateCheckError"
  type="alertmodal">
-An error occured while checking for update.
+An error occurred while checking for update.
 Please try again later.
     <tag>confirm</tag>
     <usetemplate
@@ -9849,29 +9849,29 @@ Eject failed because you don't have admin permission for that parcel.
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectParcelFull"
+   name="CMOParcelFull"
    type="notify">
    <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because the parcel is full.
+Can't move object '[O]' to
+[P] in region [R] because the parcel is full.
   </notification>
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectParcelPerms"
+   name="CMOParcelPerms"
    type="notify">
    <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel.
+Can't move object '[O]' to
+[P] in region [R] because your objects are not allowed on this parcel.
   </notification>
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectParcelResources"
+   name="CMOParcelResources"
    type="notify">
    <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel.
+Can't move object '[O]' to
+[P] in region [R] because there are not enough resources for this object on this parcel.
   </notification>
 
   <notification
@@ -9884,29 +9884,29 @@ Copy failed because you lack access to that parcel.
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectRegionVersion"
+   name="CMORegionVersion"
    type="notify">
-   <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing.
+    <tag>fail</tag>
+    Can't move object '[O]' to
+    [P] in region [R] because the other region is running an older version which does not support receiving this object via region crossing.
   </notification>
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectNavMesh"
+   name="CMONavMesh"
    type="notify">
    <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries.
+Can't move object '[O]' to
+[P] in region [R] because you cannot modify the navmesh across region boundaries.
   </notification>
 
   <notification
    icon="alertmodal.tga"
-   name="CantMoveObjectWTF"
+   name="CMOWTF"
    type="notify">
    <tag>fail</tag>
-Can't move object '[OBJECT_NAME]' to
-[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE])
+Can't move object '[O]' to
+[P] in region [R] because of an unknown reason. ([F])
   </notification>
 
   <notification
diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
index 53d0252215e0b485b07749669523ee648064bd7b..574e5f3cbcb7a90896e5027a22db493ccfce01ff 100644
--- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
@@ -90,13 +90,26 @@
           top_delta="0"
           width="31"/>
      </panel>
+     <text
+          type="string"
+          length="1"
+          follows="left|top|right"
+          height="14"
+          layout="topleft"
+          right="-10"
+          top_pad="4"
+          left="3"
+          use_ellipses="true"
+          name="block_limit">
+          [COUNT] entries in your block list, and the limit is [LIMIT].
+      </text>
     <block_list
      follows="all"
-     height="273"
+     height="255"
      layout="topleft"
      left="3"
      name="blocked"
      tool_tip="List of currently blocked Residents"
-     top="31"
+     top_pad="4"
   	 right="-1"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index ff0714adbbc64d355e282612bc5831c97f3f0d04..eeb930485e1250b27c1f36d2f2a9e02db7416101 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -26,10 +26,11 @@
      layout="topleft"
      left="5"
      name="appearance_tabs"
-     tab_min_width="150"
+     tab_min_width="100"
      tab_height="30"
      tab_position="top"
      halign="center"
+     hide_scroll_arrows="true"
      top="8"
      width="315">
          <panel
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
new file mode 100644
index 0000000000000000000000000000000000000000..487da54fdf293d516bef211ae23c3f6563847c38
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<panel
+ border="true"
+ follows="all"
+ height="408"
+ label="Uploads"
+ layout="topleft"
+ left="102"
+ name="uploads"
+ top="1"
+ width="517">
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="12"
+   layout="topleft"
+   left="33"
+   name="title"
+   top_pad="10"
+   width="250">
+    Current destination folders for uploads
+  </text>
+
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="12"
+   layout="topleft"
+   left="37"
+   name="title_models"
+   top_pad="17"
+   width="100">
+    Images
+  </text>
+  <text
+   type="string"
+   use_ellipses="true"
+   follows="left|top"
+   height="23"
+   layout="topleft"
+   font.style="BOLD"
+   left="37"
+   name="upload_textures"
+   top_pad="5"
+   width="350" />
+  
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="12"
+   layout="topleft"
+   left="37"
+   name="title_sounds"
+   top_pad="7"
+   width="100">
+    Sounds
+  </text>
+  <text
+   type="string"
+   use_ellipses="true"
+   follows="left|top"
+   height="23"
+   layout="topleft"
+   font.style="BOLD"
+   left="37"
+   name="upload_sounds"
+   top_pad="5"
+   width="350" />
+  
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="12"
+   layout="topleft"
+   left="37"
+   name="title_animation"
+   top_pad="7"
+   width="100">
+    Animations
+  </text>
+  <text
+   type="string"
+   use_ellipses="true"
+   follows="left|top"
+   height="23"
+   layout="topleft"
+   font.style="BOLD"
+   left="37"
+   name="upload_animation"
+   top_pad="5"
+   width="350" />
+
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="12"
+   layout="topleft"
+   left="37"
+   name="title_animation"
+   top_pad="7"
+   width="100">
+    Models
+  </text>
+  <text
+   type="string"
+   use_ellipses="true"
+   follows="left|top"
+   height="23"
+   layout="topleft"
+   font.style="BOLD"
+   left="37"
+   name="upload_models"
+   top_pad="5"
+   width="350" />
+
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="30"
+   layout="topleft"
+   font.style="ITALIC"
+   left="33"
+   name="upload_help"
+   top_pad="6"
+   width="387">
+    To change a destination folder, right click on it in inventory and choose
+ "Use as default for"
+  </text>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 6b3422d8926035cde535030987754426a3e707e7..2ae78901f60cf3d77429f686e81b048cee88d626 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -61,7 +61,7 @@ VFS (cache) creation time: [VFS_TIME]
 	<string name="AboutLibs">
 J2C Decoder Version: [J2C_VERSION]
 Audio Driver Version: [AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF Version: [LLCEFLIB_VERSION]
+CEF Version: [LIBCEF_VERSION]
 LibVLC Version: [LIBVLC_VERSION]
 Voice Server Version: [VOICE_VERSION]
 	</string>
@@ -3815,7 +3815,7 @@ Abuse Report</string>
   <string name="Male - Laugh">Male - Laugh</string>
   <string name="Male - Repulsed">Male - Repulsed</string>
   <string name="Male - Shrug">Male - Shrug</string>
-  <string name="Male - Stick tougue out">Male - Stick tougue out</string>
+  <string name="Male - Stick tougue out">Male - Stick tongue out</string>
   <string name="Male - Wow">Male - Wow</string>
 
   <string name="Female - Chuckle">Female - Chuckle</string>
@@ -3834,7 +3834,7 @@ Abuse Report</string>
   <string name="Female - Please">Female - Please</string>
   <string name="Female - Repulsed">Female - Repulsed</string>
   <string name="Female - Shrug">Female - Shrug</string>
-  <string name="Female - Stick tougue out">Female - Stick tougue out</string>
+  <string name="Female - Stick tougue out">Female - Stick tongue out</string>
   <string name="Female - Wow">Female - Wow</string>
 
   <string name="/bow">/bow</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 61ec046649d85ddced12ac0f6810beb9a2af34a4..674be597535c98e5c46382b214d9374a8d679e10 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -133,7 +133,7 @@
     name="damage_text"
 	width="35"
 	height="18"
-	top="17"
+	top="18"
     follows="right|top"
 	halign="right"
 	font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 192d32c267496bba7e30d4820c2557001a59016c..765226e6bdaac7a463c33717c8b833cc92fb9df8 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -29,7 +29,7 @@
 		Error de inicialización de gráficos. Actualiza tu controlador de gráficos.
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -70,8 +70,8 @@ Tiempo de creación de VFS (caché): [VFS_TIME]
 	<string name="AboutLibs">
 		Versión de J2C Decoder: [J2C_VERSION]
 Versión de Audio Driver: [AUDIO_DRIVER_VERSION]
-Versión de LLCEFLib/CEF: [LLCEFLIB_VERSION]
-Versión de LibVLC: [LLCEFLIB_VERSION]
+Versión de CEF: [LIBCEF_VERSION]
+Versión de LibVLC: [LIBVLC_VERSION]
 Versión de Voice Server: [VOICE_VERSION]
 	</string>
 	<string name="AboutTraffic">
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 40a41b93abb4844b71ef92a7f2a05d3f2df2b6e3..7c1d05bb83ac15e43842924353d33ed3f9a4d9e8 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -38,7 +38,7 @@
 		Échec d&apos;initialisation des graphiques. Veuillez mettre votre pilote graphique à jour.
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [Notes de version]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ Durée de création VFS (cache) : [VFS_TIME]
 	<string name="AboutLibs">
 		Version J2C Decoder : [J2C_VERSION]
 Version Audio Driver : [AUDIO_DRIVER_VERSION]
-Version LLCEFLib/CEF : [LLCEFLIB_VERSION]
+Version CEF : [LIBCEF_VERSION]
 Version LibVLC : [LIBVLC_VERSION]
 Version serveur vocal : [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index 8246f91d17eac6b6277799498e737fc51bcd784f..e6edfb6de42a4494270fa6df41302d03259552f1 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -35,7 +35,7 @@
 		Inizializzazione grafica non riuscita. Aggiorna il driver della scheda grafica!
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -76,7 +76,7 @@ Data/ora creazione VFS (cache): [VFS_TIME]
 	<string name="AboutLibs">
 		Versione J2C Decoder: [J2C_VERSION]
 Versione Driver audio: [AUDIO_DRIVER_VERSION]
-Versione LLCEFLib/CEF: [LLCEFLIB_VERSION]
+Versione CEF: [LIBCEF_VERSION]
 Versione LibVLC: [LIBVLC_VERSION]
 Versione Server voice: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 586b8ab2d357d9c6fdb3c4870dc6adea3a787e61..92b62c9c2fbb086c40f68917329ac9f380d22324 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -38,7 +38,7 @@
 		グラフィックを初期化できませんでした。グラフィックドライバを更新してください。
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ VFS(キャッシュ)作成時間: [VFS_TIME]
 	<string name="AboutLibs">
 		J2C デコーダバージョン:[J2C_VERSION]
 オーディオドライババージョン:[AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF バージョン: [LLCEFLIB_VERSION]
+CEF バージョン: [LIBCEF_VERSION]
 LibVLC バージョン: [LIBVLC_VERSION]
 ボイスサーバーバージョン:[VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index e9dd18043d698c0a5c07a28f2fd16fd8b27af40d..9aece1221d781a95cf99182997d37ec4dfdad929 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -43,7 +43,7 @@ Wersja OpenGL: [OPENGL_VERSION]
 
 Wersja dekodera J2C: [J2C_VERSION]
 Wersja sterownika dźwięku (Audio Driver): [AUDIO_DRIVER_VERSION]
-Wersja LLCEFLib/CEF: [LLCEFLIB_VERSION]
+Wersja CEF: [LIBCEF_VERSION]
 Wersja LibVLC: [LIBVLC_VERSION]
 Wersja serwera głosu (Voice Server): [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index 207b4e709707464024c9d4699ee45aa3461c5e37..94b69634d40c4b77f42db007fe3c6fa535ce68ba 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -29,7 +29,7 @@
 		Falha na inicialização dos gráficos. Atualize seu driver gráfico!
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -70,7 +70,7 @@ Tempo de criação de VFS (cache): [VFS_TIME]
 	<string name="AboutLibs">
 		Versão do J2C Decoder: [J2C_VERSION]
 Versão do driver de áudio: [AUDIO_DRIVER_VERSION]
-Versão de LLCEFLib/CEF: [LLCEFLIB_VERSION]
+Versão de CEF: [LIBCEF_VERSION]
 Versão da LibVLC: [LIBVLC_VERSION]
 Versão do servidor de voz: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index e44d63b3b97d421c28a14353e0cb1e3a23311b76..7a003b536a52167a6901e0aa8dfee7f03908f82b 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -38,7 +38,7 @@
 		Ошибка инициализации графики. Обновите графический драйвер!
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ SLURL: &lt;nolink&gt;[SLURL]&lt;/nolink&gt;
 	<string name="AboutLibs">
 		Версия декодера J2C: [J2C_VERSION]
 Версия драйвера звука: [AUDIO_DRIVER_VERSION]
-Версия LLCEFLib/CEF: [LLCEFLIB_VERSION]
+Версия CEF: [LIBCEF_VERSION]
 Версия LibVLC: [LIBVLC_VERSION]
 Версия голосового сервера: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml
index 7b4bf1fca6344bd7163f5fbccb5da036f322611d..53b95d69dd2693bd55c6ca034ccb74ab7ea40162 100644
--- a/indra/newview/skins/default/xui/tr/strings.xml
+++ b/indra/newview/skins/default/xui/tr/strings.xml
@@ -38,7 +38,7 @@
 		Grafik başlatma başarılamadı. Lütfen grafik sürücünüzü güncelleştirin!
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ VFS (önbellek) oluşturma zamanı: [VFS_TIME]
 	<string name="AboutLibs">
 		J2C Kod Çözücü Sürümü: [J2C_VERSION]
 Ses Sürücüsü Sürümü: [AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF Sürümü: [LLCEFLIB_VERSION]
+CEF Sürümü: [LIBCEF_VERSION]
 LibVLC Sürümü: [LIBVLC_VERSION]
 Ses Sunucusu Sürümü: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml
index ec08c9f91e31d0f378cc8fbf7e73abf5e9aac942..51a108126b5c576c081972c5d9918d310d8eebea 100644
--- a/indra/newview/skins/default/xui/zh/strings.xml
+++ b/indra/newview/skins/default/xui/zh/strings.xml
@@ -38,7 +38,7 @@
 		顯像初始化失敗。 請更新你的顯像卡驅動程式!
 	</string>
 	<string name="AboutHeader">
-		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL])
+		[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL])
 [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]]
 	</string>
 	<string name="BuildConfig">
@@ -79,7 +79,7 @@ VFS(快取)建立時間:[VFS_TIME]
 	<string name="AboutLibs">
 		J2C 解碼器版本: [J2C_VERSION]
 音效驅動程式版本: [AUDIO_DRIVER_VERSION]
-LLCEFLib/CEF版本:[LLCEFLIB_VERSION]
+CEF版本:[LIBCEF_VERSION]
 LibVLC版本:[LIBVLC_VERSION]N]
 語音伺服器版本: [VOICE_VERSION]
 	</string>
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 35d63c33fc8d428ab139f405a9b4b0ade2e6e9e0..0506fc553eaa95c9b97f9d8a52ced08d8412fd10 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -450,11 +450,10 @@ def construct(self):
                 self.path("libcef.dll")
                 self.path("libEGL.dll")
                 self.path("libGLESv2.dll")
-                self.path("llceflib_host.exe")
+                self.path("dullahan_host.exe")
                 self.path("natives_blob.bin")
                 self.path("snapshot_blob.bin")
                 self.path("widevinecdmadapter.dll")
-                self.path("wow_helper.exe")
                 self.end_prefix()
         else:
         # CEF runtime files - not debug (release, relwithdebinfo etc.)
@@ -464,11 +463,10 @@ def construct(self):
                 self.path("libcef.dll")
                 self.path("libEGL.dll")
                 self.path("libGLESv2.dll")
-                self.path("llceflib_host.exe")
+                self.path("dullahan_host.exe")
                 self.path("natives_blob.bin")
                 self.path("snapshot_blob.bin")
                 self.path("widevinecdmadapter.dll")
-                self.path("wow_helper.exe")
                 self.end_prefix()
 
         # MSVC DLLs needed for CEF and have to be in same directory as plugin
@@ -636,6 +634,13 @@ def package_finish(self):
             Caption "%(caption)s"
             """
 
+        if(self.args['arch'].lower() == 'x86_64'):
+            engage_registry="SetRegView 64"
+            program_files="$PROGRAMFILES64"
+        else:
+            engage_registry="SetRegView 32"
+            program_files="$PROGRAMFILES32"
+
         tempfile = "secondlife_setup_tmp.nsi"
         # the following replaces strings in the nsi template
         # it also does python-style % substitution
@@ -644,6 +649,8 @@ def package_finish(self):
                 "%%SOURCE%%":self.get_src_prefix(),
                 "%%INST_VARS%%":inst_vars_template % substitution_strings,
                 "%%INSTALL_FILES%%":self.nsi_file_commands(True),
+                "%%$PROGRAMFILES%%":program_files,
+                "%%ENGAGEREGISTRY%%":engage_registry,
                 "%%DELETE_FILES%%":self.nsi_file_commands(False)})
 
         # We use the Unicode version of NSIS, available from
@@ -859,26 +866,32 @@ def path_optional(src, dst):
                         except OSError as err:
                             print "Can't symlink %s -> %s: %s" % (src, dst, err)
 
-                # LLCefLib helper apps go inside SLPlugin.app
+                # Dullahan helper apps go inside SLPlugin.app
                 if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"):
-                    for helperappfile in ('LLCefLib Helper.app',
-                                          'LLCefLib Helper EH.app'):
+                    for helperappfile in ('DullahanHelper.app'):
                         self.path2basename(relpkgdir, helperappfile)
 
                     pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework');
                     # Putting a Frameworks directory under Contents/MacOS
-                    # isn't canonical, but the path baked into LLCefLib
-                    # Helper.app/Contents/MacOS/LLCefLib Helper is:
+                    # isn't canonical, but the path baked into Dullahan
+                    # Helper.app/Contents/MacOS/DullahanHelper is:
                     # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
                     # (notice, not @executable_path/../Frameworks/etc.)
                     # So we'll create a symlink (below) from there back to the
                     # Frameworks directory nested under SLPlugin.app.
                     helperframeworkpath = \
-                        self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/'
+                        self.dst_path_of('DullahanHelper.app/Contents/MacOS/'
                                          'Frameworks/Chromium Embedded Framework.framework')
 
                     self.end_prefix()
 
+                    # the helper app needs to have it's @executable_path modified to point to the 
+                    # same location we drop the CEF framework shortcut
+                    helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper')
+                    self.run_command('install_name_tool -change '
+                                     '"@executable_path/Chromium Embedded Framework" '
+                                     '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath)
+
                 # SLPlugin plugins
                 if self.prefix(src="", dst="llplugin"):
                     self.path2basename("../media_plugins/cef/" + self.args['configuration'],
@@ -894,8 +907,8 @@ def path_optional(src, dst):
                         self.end_prefix()
 
                     # copy LibVLC plugins folder
-                    if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="plugins"):
-                        self.path( "lib*_plugin.dylib" )
+                    if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"):
+                        self.path( "*.dylib" )
                         self.path( "plugins.dat" )
                         self.end_prefix()
 
@@ -938,7 +951,7 @@ def path_optional(src, dst):
                     # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework
                     origin, target = pluginframeworkpath, frameworkpath
                     symlinkf(target, origin)
-                    # from SLPlugin.app/Contents/Frameworks/LLCefLib
+                    # from SLPlugin.app/Contents/Frameworks/Dullahan
                     # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded
                     # Framework.framework back to
                     # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework
diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py
index 9b795f45fd878139c531a338f9c210a61605878d..77bf731ae60e8be463565eba3bbcc5bcb463304d 100644
--- a/scripts/content_tools/anim_tool.py
+++ b/scripts/content_tools/anim_tool.py
@@ -406,8 +406,13 @@ def add_joint(self, name, priority):
     def delete_joint(self, name):
         j = self.find_joint(name)
         if j:
+            if args.verbose:
+                print "removing joint", name
             anim.joints.remove(j)
             anim.num_joints = len(self.joints)
+        else:
+            if args.verbose:
+                print "joint not found to remove", name
 
     def summary(self):
         nj = len(self.joints)
@@ -500,9 +505,9 @@ def resolve_joints(names, skel_tree, lad_tree):
         for elt in all_elts:
             if elt.get("name") is None:
                 continue
-            print elt.get("name"),"hud",elt.get("hud")
+            #print elt.get("name"),"hud",elt.get("hud")
             if args.no_hud and elt.get("hud"):
-                print "skipping hud joint", elt.get("name")
+                #print "skipping hud joint", elt.get("name")
                 continue
             if elt.get("name") in names or elt.tag in names:
                 matches.append(elt.get("name"))
@@ -532,6 +537,8 @@ def resolve_joints(names, skel_tree, lad_tree):
     parser.add_argument("--lad", help="name of the avatar_lad file", default= os.path.join(path_to_skel,"avatar_lad.xml"))
     parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values")
     parser.add_argument("--no_hud", help="omit hud joints from list of attachments", action="store_true")
+    parser.add_argument("--base_priority", help="set base priority", type=int)
+    parser.add_argument("--joint_priority", help="set joint priority for all joints", type=int)
     parser.add_argument("infilename", help="name of a .anim file to input")
     parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output")
     args = parser.parse_args()
@@ -591,6 +598,13 @@ def resolve_joints(names, skel_tree, lad_tree):
         if args.set_version:
             anim.version = args.set_version[0]
             anim.sub_version = args.set_version[1]
+        if args.base_priority is not None:
+            print "set base priority",args.base_priority
+            anim.base_priority = args.base_priority
+        if args.joint_priority is not None:
+            print "set joint priority",args.joint_priority
+            for joint in anim.joints:
+                joint.joint_priority = args.joint_priority
         if args.dump:
             anim.dump(args.dump)
         if args.summary: