diff --git a/doc/contributions.txt b/doc/contributions.txt
index ace4faa4f0e8a9095ddf4a5a6974013514f11373..2c1e5487ce73a53a2590c3ac657d7ee13e63eaf6 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -1110,16 +1110,18 @@ Nicky Dasmijn
 	STORM-1937
 	OPEN-187
 	SL-15234
-    STORM-2010
+	STORM-2010
 	STORM-2082
 	MAINT-6665
 	SL-10291
 	SL-10293
 	SL-11061
-    SL-11072
+	SL-11072
 	SL-13141
 	SL-13642
+	SL-14541
 	SL-16438
+	SL-17218
 Nicky Perian
 	OPEN-1
 	STORM-1087
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 028ed2161e81501976ca2a830026d40a60a0b1ef..e8eec04e0fefd52755e16da0cc757828f3ca1ee7 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -30,6 +30,7 @@ set(cmake_SOURCE_FILES
     FindOpenJPEG.cmake
     FindURIPARSER.cmake
     FindXmlRpcEpi.cmake
+    FindZLIBNG.cmake
     FMODSTUDIO.cmake
     FreeType.cmake
     GLEXT.cmake
@@ -86,7 +87,7 @@ set(cmake_SOURCE_FILES
     VisualLeakDetector.cmake
     LibVLCPlugin.cmake
     XmlRpcEpi.cmake
-    ZLIB.cmake
+    ZLIBNG.cmake
     )
 
 source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
diff --git a/indra/cmake/FindZLIBNG.cmake b/indra/cmake/FindZLIBNG.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..6e3c8cdddbfe283f10da559e345655f8dafe055e
--- /dev/null
+++ b/indra/cmake/FindZLIBNG.cmake
@@ -0,0 +1,46 @@
+# -*- cmake -*-
+
+# - Find zlib-ng
+# Find the ZLIB includes and library
+# This module defines
+#  ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc.
+#  ZLIBNG_LIBRARIES, the libraries needed to use zlib.
+#  ZLIBNG_FOUND, If false, do not try to use zlib.
+#
+# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x),
+# because it doesn't look up the version of zlib, resulting in a dramatic
+# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
+#
+# Note: Since this file is only used for standalone, the windows
+# specific parts were left out.
+
+FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h
+  NO_SYSTEM_ENVIRONMENT_PATH
+  )
+
+FIND_LIBRARY(ZLIBNG_LIBRARY z)
+
+if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
+  SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR})
+  SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY})
+  SET(ZLIBNG_FOUND "YES")
+else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
+  SET(ZLIBNG_FOUND "NO")
+endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR)
+
+if (ZLIBNG_FOUND)
+  if (NOT ZLIBNG_FIND_QUIETLY)
+    message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}")
+    SET(ZLIBNG_FIND_QUIETLY TRUE)
+  endif (NOT ZLIBNG_FIND_QUIETLY)
+else (ZLIBNG_FOUND)
+  if (ZLIBNG_FIND_REQUIRED)
+    message(FATAL_ERROR "Could not find ZLIBNG library")
+  endif (ZLIBNG_FIND_REQUIRED)
+endif (ZLIBNG_FOUND)
+
+mark_as_advanced(
+  ZLIBNG_LIBRARY
+  ZLIBNG_INCLUDE_DIR
+  )
+
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 7630d9dcf460577a3fbc6c0c2a140bccaf623b5e..798111560966b54bd35ecc92552433254f3686b2 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -4,7 +4,7 @@ include(APR)
 include(Boost)
 include(EXPAT)
 include(Tracy)
-include(ZLIB)
+include(ZLIBNG)
 
 set(LLCOMMON_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llcommon
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 8813be3bd103a5359a94857dd65a7d72d0725835..4aa8aee7db287c4d7beb55962f39e6f5875440ca 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -9,7 +9,7 @@ include(URIPARSER)
 include(ZLIB)
 
 use_prebuilt_binary(colladadom)
-use_prebuilt_binary(minizip-ng)
+use_prebuilt_binary(minizip-ng) # needed for colladadom
 
 set(LLPRIMITIVE_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llprimitive
diff --git a/indra/cmake/ZLIB.cmake b/indra/cmake/ZLIBNG.cmake
similarity index 81%
rename from indra/cmake/ZLIB.cmake
rename to indra/cmake/ZLIBNG.cmake
index a0f5914a7b4125152c0cd2d11471e51facca4427..770017f0d1bfb3c0781c2cacbe4b44e1f4a0529e 100644
--- a/indra/cmake/ZLIB.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -1,13 +1,13 @@
 # -*- cmake -*-
 
-set(ZLIB_FIND_QUIETLY ON)
-set(ZLIB_FIND_REQUIRED ON)
+set(ZLIBNG_FIND_QUIETLY ON)
+set(ZLIBNG_FIND_REQUIRED ON)
 
 include(Prebuilt)
 include(Linking)
 
 if (USESYSTEMLIBS)
-  include(FindZLIB)
+  include(FindZLIBNG)
 else (USESYSTEMLIBS)
   use_prebuilt_binary(zlib-ng)
   use_prebuilt_binary(minizip-ng)
@@ -16,7 +16,7 @@ else (USESYSTEMLIBS)
       debug ${ARCH_PREBUILT_DIRS_DEBUG}/libminizip.lib
       optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libminizip.lib)
 
-    set(ZLIB_LIBRARIES 
+    set(ZLIBNG_LIBRARIES 
       debug ${ARCH_PREBUILT_DIRS_DEBUG}/zlibd.lib
       optimized ${ARCH_PREBUILT_DIRS_RELEASE}/zlib.lib)
   elseif (LINUX)
@@ -33,11 +33,11 @@ else (USESYSTEMLIBS)
     # second whole-archive load of the archive.  See viewer's
     # CMakeLists.txt for more information.
     #
-    set(ZLIB_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
-    set(ZLIB_LIBRARIES z)
+    set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
+    set(ZLIBNG_LIBRARIES z)
   elseif (DARWIN)
     set(MINIZIP_LIBRARIES minizip)
-    set(ZLIB_LIBRARIES -Wl,-force_load,${ARCH_PREBUILT_DIRS_RELEASE}/libz.a)
+    set(ZLIBNG_LIBRARIES -Wl,-force_load,${ARCH_PREBUILT_DIRS_RELEASE}/libz.a)
   endif (WINDOWS)
-  set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib)
+  set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
 endif (USESYSTEMLIBS)
diff --git a/indra/doxygen/CMakeLists.txt b/indra/doxygen/CMakeLists.txt
index 37d1018b04e3a59f1e891a052602e91022ba05a9..6c4033276640025ecaa253d1ddf3ec1e503f95fb 100644
--- a/indra/doxygen/CMakeLists.txt
+++ b/indra/doxygen/CMakeLists.txt
@@ -1,4 +1,7 @@
 # -*- cmake -*-
+
+cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
+
 project(doxygen)
 
 include(Variables)
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 571ca5f2954e6fe3a9b639e04196d47b93070c5a..be9ae7870438f2498b87c8e4e4070a047ee46d94 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -442,32 +442,6 @@ const std::string LLTexLayerSet::getBodyRegionName() const
 	return mInfo->mBodyRegion; 
 }
 
-
-// virtual
-void LLTexLayerSet::asLLSD(LLSD& sd) const
-{
-	sd["visible"] = LLSD::Boolean(isVisible());
-	LLSD layer_list_sd;
-	layer_list_t::const_iterator layer_iter = mLayerList.begin();
-	layer_list_t::const_iterator layer_end  = mLayerList.end();
-	for(; layer_iter != layer_end; ++layer_iter)
-	{
-		LLSD layer_sd;
-		//LLTexLayerInterface* layer = (*layer_iter);
-		//if (layer)
-		//{
-		//	layer->asLLSD(layer_sd);
-		//}
-		layer_list_sd.append(layer_sd);
-	}
-	LLSD mask_list_sd;
-	LLSD info_sd;
-	sd["layers"] = layer_list_sd;
-	sd["masks"] = mask_list_sd;
-	sd["info"] = info_sd;
-}
-
-
 void LLTexLayerSet::destroyComposite()
 {
 	if( mComposite )
diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h
index bfc0091bdef947992d445d55b46013f531578423..e5aefae248784ff06c5bd78dc1a35e7648b22359 100644
--- a/indra/llappearance/lltexlayer.h
+++ b/indra/llappearance/lltexlayer.h
@@ -220,8 +220,6 @@ class LLTexLayerSet
 
 	static BOOL					sHasCaches;
 
-	virtual void				asLLSD(LLSD& sd) const;
-
 protected:
 	typedef std::vector<LLTexLayerInterface *> layer_list_t;
 	layer_list_t				mLayerList;
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 45ca6ab27532419467f30a19fe5743c4654af6bc..e288fae96d409ac103826d42394af4157e64c8fd 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -11,7 +11,7 @@ include(Boost)
 include(Sentry)
 include(LLSharedLibs)
 include(Copy3rdPartyLibs)
-include(ZLIB)
+include(ZLIBNG)
 include(URIPARSER)
 include(Tracy)
 include(OpenSSL)
@@ -20,7 +20,7 @@ include_directories(
     ${EXPAT_INCLUDE_DIRS}
     ${LLCOMMON_INCLUDE_DIRS}
     ${LLMATH_INCLUDE_DIRS}
-    ${ZLIB_INCLUDE_DIRS}
+    ${ZLIBNG_INCLUDE_DIRS}
     ${URIPARSER_INCLUDE_DIRS}
     ${TRACY_INCLUDE_DIR}
     )
@@ -130,6 +130,7 @@ set(llcommon_HEADER_FILES
     CMakeLists.txt
 
     chrono.h
+    classic_callback.h
     ctype_workaround.h
     fix_macros.h
     indra_constants.h
@@ -297,7 +298,7 @@ target_link_libraries(
     ${APR_LIBRARIES}
     ${EXPAT_LIBRARIES}
     ${OPENSSL_LIBRARIES}
-    ${ZLIB_LIBRARIES}
+    ${ZLIBNG_LIBRARIES}
     ${WINDOWS_LIBRARIES}
     ${BOOST_FIBER_LIBRARY}
     ${BOOST_CONTEXT_LIBRARY}
@@ -358,18 +359,19 @@ if (LL_TESTS)
       ${BOOST_THREAD_LIBRARY} 
       ${BOOST_SYSTEM_LIBRARY}
       ${OPENSSL_LIBRARIES}
-      ${ZLIB_LIBRARIES}
+      ${ZLIBNG_LIBRARIES}
       )
-  LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llcond "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lldate "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lldeadmantimer "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lldependencies "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llerror "" "${test_libs}")
-  LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lleventcoro "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lleventfilter "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llheteromap "" "${test_libs}")
@@ -387,8 +389,8 @@ if (LL_TESTS)
   LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lltrace "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
-  LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llunits "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(threadsafeschedule "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(tuple "" "${test_libs}")
diff --git a/indra/llcommon/classic_callback.cpp b/indra/llcommon/classic_callback.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5674e0a44dac169a6bca5b73f301707759a4dead
--- /dev/null
+++ b/indra/llcommon/classic_callback.cpp
@@ -0,0 +1,16 @@
+/**
+ * @file   classic_callback.cpp
+ * @author Nat Goodspeed
+ * @date   2021-09-23
+ * @brief  Implementation for classic_callback.
+ * 
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Copyright (c) 2021, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+namespace {
+
+const char dummy[] = "cpp file required to build test program";
+
+} // anonymous namespace
diff --git a/indra/llcommon/classic_callback.h b/indra/llcommon/classic_callback.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ad6dbc58fde86d77d461538297c2c9793f61dfb
--- /dev/null
+++ b/indra/llcommon/classic_callback.h
@@ -0,0 +1,292 @@
+/**
+ * @file   classic_callback.h
+ * @author Nat Goodspeed
+ * @date   2016-06-21
+ * @brief  ClassicCallback and HeapClassicCallback
+ *
+ * This header file addresses the problem of passing a method on a C++ object
+ * to an API that requires a classic-C function pointer. Typically such a
+ * callback API accepts a void* pointer along with the function pointer, and
+ * the function pointer signature accepts a void* parameter. The API passes
+ * the caller's pointer value into the callback function so it can find its
+ * data. In C++, there are a few ways to deal with this case:
+ *
+ * - Use a static method with correct signature. If you don't need access to a
+ *   specific instance, that works fine.
+ * - Store the object statically (or store a static pointer to a non-static
+ *   instance). As long as you only care about one instance, that works, but
+ *   starts to get a little icky. As soon as there's more than one pertinent
+ *   instance, fight valiantly against the temptation to stuff the instance
+ *   pointer into a static pointer variable "just for a moment."
+ * - Code a static trampoline callback function that accepts the void* user
+ *   data pointer, casts it to the appropriate class type and calls the actual
+ *   method on that class.
+ *
+ * ClassicCallback encapsulates the last. You need only construct a
+ * ClassicCallback instance somewhere that will survive until the callback is
+ * called, binding the target C++ callable. You then call its get_callback()
+ * and get_userdata() methods to pass an appropriate classic-C function
+ * pointer and void* user data pointer, respectively, to the old-style
+ * callback API. get_callback() synthesizes a static trampoline function
+ * that casts the user data pointer and calls the bound C++ callable.
+ *
+ * $LicenseInfo:firstyear=2016&license=viewerlgpl$
+ * Copyright (c) 2016, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_CLASSIC_CALLBACK_H)
+#define LL_CLASSIC_CALLBACK_H
+
+#include <tuple>
+#include <type_traits>              // std::is_same
+
+/*****************************************************************************
+*   Helpers
+*****************************************************************************/
+
+// find a type in a parameter pack: http://stackoverflow.com/q/17844867/5533635
+// usage: index_of<0, sought_t, PackName...>::value
+template <int idx, typename sought, typename candidate, typename ...rest>
+struct index_of
+{
+  static constexpr int const value =
+      std::is_same<sought, candidate>::value ?
+          idx : index_of<idx + 1, sought, rest...>::value;
+};
+
+// recursion tail
+template <int idx, typename sought, typename candidate>
+struct index_of<idx, sought, candidate>
+{
+  static constexpr int const value =
+      std::is_same<sought, candidate>::value ? idx : -1;
+};
+
+/*****************************************************************************
+*   ClassicCallback
+*****************************************************************************/
+/**
+ * Instantiate ClassicCallback in whatever storage will persist long enough
+ * for the callback to be called. It holds a modern C++ callable, providing a
+ * static function pointer and a USERDATA (default void*) capable of being
+ * passed through a classic-C callback API. When the static function is called
+ * with that USERDATA pointer, ClassicCallback forwards the call to the bound
+ * C++ callable.
+ *
+ * Usage:
+ * @code
+ * // callback signature required by the API of interest
+ * typedef void (*callback_t)(int, const char*, void*, double);
+ * // old-style API that accepts a classic-C callback function pointer
+ * void oldAPI(callback_t callback, void* userdata);
+ * // but I want to pass a lambda that references data local to my function!
+ * // (We don't need to name the void* parameter in the C++ callable;
+ * // ClassicCallback already used it to locate the lambda instance.)
+ * auto ccb{
+ *     makeClassicCallback<callback_t>(
+ *         [=](int n, const char* s, void*, double f){ ... }) };
+ * oldAPI(ccb.get_callback(), ccb.get_userdata());
+ * // If the passed callback is called before oldAPI() returns, we can now
+ * // safely destroy ccb. If the callback might be called later, consider
+ * // HeapClassicCallback instead.
+ * @endcode
+ *
+ * If you have a callable object in hand, and you want to pass that to
+ * ClassicCallback, you may either consume it by passing std::move(object), or
+ * explicitly specify a reference to that object type as the CALLABLE template
+ * parameter:
+ * @code
+ * CallableObject obj;
+ * ClassicCallback<callback_t, void*, CallableObject&> ccb{obj};
+ * @endcode
+ */
+// CALLABLE should either be deduced, e.g. by makeClassicCallback(), or
+// specified explicitly. Its default type is meaningless, coded only so we can
+// provide a useful default for USERDATA.
+template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
+class ClassicCallback
+{
+    typedef ClassicCallback<SIGNATURE, USERDATA, CALLABLE> self_t;
+
+public:
+    /// ClassicCallback binds any modern C++ callable.
+    ClassicCallback(CALLABLE&& callable):
+        mCallable(std::forward<CALLABLE>(callable))
+    {}
+
+    /**
+     * ClassicCallback must not itself be copied or moved! Once you've passed
+     * get_userdata() to some API, this object MUST remain at that address.
+     */
+    // However, we can't yet count on C++17 Class Template Argument Deduction,
+    // which means makeClassicCallback() is still useful, which means we MUST
+    // be able to return one to construct into caller's instance (move ctor).
+    // Possible defense: bool 'referenced' data member set by get_userdata(),
+    // with an llassert_always(! referenced) check in the move constructor.
+    ClassicCallback(ClassicCallback const&) = delete;
+    ClassicCallback(ClassicCallback&&) = default; // delete;
+    ClassicCallback& operator=(ClassicCallback const&) = delete;
+    ClassicCallback& operator=(ClassicCallback&&) = delete;
+
+    /// Call get_callback() to get the necessary function pointer.
+    SIGNATURE get_callback() const
+    {
+        // This declaration is where the compiler instantiates the correct
+        // signature for the call() function template.
+        SIGNATURE callback = call;
+        return callback;
+    }
+
+    /// Call get_userdata() to get the opaque USERDATA pointer to pass
+    /// through the classic-C callback API.
+    USERDATA get_userdata() const
+    {
+        // The USERDATA userdata is of course a pointer to this object.
+        return static_cast<USERDATA>(const_cast<self_t*>(this));
+    }
+
+protected:
+    /**
+     * This call() method accepts one or more callback arguments. It assumes
+     * the first USERDATA parameter is the userdata.
+     */
+    // Note that we're not literally using C++ perfect forwarding here -- it
+    // doesn't work to specify (Args&&... args). But that's okay because we're
+    // dealing with a classic-C callback! It's not going to pass any move-only
+    // types.
+    template <typename... Args>
+    static auto call(Args... args)
+    {
+        auto userdata = extract_userdata(std::forward<Args>(args)...);
+        // cast the userdata param to 'this' and call mCallable
+        return static_cast<self_t*>(userdata)->
+            mCallable(std::forward<Args>(args)...);
+    }
+
+    template <typename... Args>
+    static USERDATA extract_userdata(Args... args)
+    {
+        // Search for the first USERDATA parameter type, then extract that pointer.
+        // extract value from parameter pack: http://stackoverflow.com/a/24710433/5533635
+        return std::get<index_of<0, USERDATA, Args...>::value>(std::forward_as_tuple(args...));
+    }
+
+    CALLABLE mCallable;
+};
+
+/**
+ * Usage:
+ * @code
+ * auto ccb{ makeClassicCallback<classic_callback_signature>(actual_callback) };
+ * @endcode
+ */
+template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
+auto makeClassicCallback(CALLABLE&& callable)
+{
+    return std::move(ClassicCallback<SIGNATURE, USERDATA, CALLABLE>
+                     (std::forward<CALLABLE>(callable)));
+}
+
+/*****************************************************************************
+*   HeapClassicCallback
+*****************************************************************************/
+/**
+ * HeapClassicCallback is like ClassicCallback, with this exception: it MUST
+ * be allocated on the heap because, once the callback has been called, it
+ * deletes itself. This addresses the problem of a callback whose lifespan
+ * must persist beyond the scope in which the callback API is engaged -- but
+ * naturally this callback must be called exactly ONCE.
+ *
+ * Usage:
+ * @code
+ * // callback signature required by the API of interest
+ * typedef void (*callback_t)(int, const char*, void*, double);
+ * // here's the old-style API
+ * void oldAPI(callback_t callback, void* userdata);
+ * // want to call someObjPtr->method() when oldAPI() fires the callback,
+ * // sometime in the future after the enclosing function has returned
+ * auto ccb{
+ *     makeHeapClassicCallback<callback_t>(
+ *         [someObjPtr](int n, const char* s, void*, double f)
+ *         { someObjPtr->method(); }) };
+ * oldAPI(ccb.get_callback(), ccb.get_userdata());
+ * // We don't need a smart pointer for ccb, because it will be deleted once
+ * // oldAPI() calls the bound lambda. HeapClassicCallback is for when the
+ * // callback will be called exactly once. If the classic API might call the
+ * // passed callback more than once -- or might never call it at all --
+ * // manually construct a ClassicCallback on the heap and manage its lifespan
+ * // explicitly.
+ * @endcode
+ */
+template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
+class HeapClassicCallback: public ClassicCallback<SIGNATURE, USERDATA, CALLABLE>
+{
+    typedef ClassicCallback<SIGNATURE, USERDATA, CALLABLE> super;
+    typedef HeapClassicCallback<SIGNATURE, USERDATA, CALLABLE> self_t;
+
+    // This destructor is intentionally private to prevent allocation anywhere
+    // but the heap. (The Design and Evolution of C++, section 11.4.2: Control
+    // of Allocation)
+    ~HeapClassicCallback() {}
+
+public:
+    HeapClassicCallback(CALLABLE&& callable):
+        super(std::forward<CALLABLE>(callable))
+    {}
+
+    // makeHeapClassicCallback() only needs to return a pointer -- not an
+    // instance -- so we can lock down our move constructor too.
+    HeapClassicCallback(HeapClassicCallback&&) = delete;
+
+    /// Replicate get_callback() from the base class because we must
+    /// instantiate OUR call() function template.
+    SIGNATURE get_callback() const
+    {
+        // This declaration is where the compiler instantiates the correct
+        // signature for the call() function template.
+        SIGNATURE callback = call;
+        return callback;
+    }
+
+    /// Replicate get_userdata() from the base class because our call()
+    /// method must be able to reconstitute a pointer to this subclass.
+    USERDATA get_userdata() const
+    {
+        // The USERDATA userdata is of course a pointer to this object.
+        return static_cast<const USERDATA>(const_cast<self_t*>(this));
+    }
+
+private:
+    // call() uses a helper class to delete the HeapClassicCallback when done,
+    // for two reasons. Most importantly, this deletes even if the callback
+    // throws an exception. But also, call() must directly return the callback
+    // result for return-type deduction.
+    struct Destroyer
+    {
+        Destroyer(self_t* p): mPtr(p) {}
+        ~Destroyer() { delete mPtr; }
+
+        self_t* mPtr;
+    };
+
+    template <typename... Args>
+    static auto call(Args... args)
+    {
+        // extract userdata at this level too
+        USERDATA userdata = super::extract_userdata(std::forward<Args>(args)...);
+        // arrange to delete it when we leave by whatever means
+        Destroyer destroy(static_cast<self_t*>(userdata));
+
+        return super::call(std::forward<Args>(args)...);
+    }
+};
+
+template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
+auto makeHeapClassicCallback(CALLABLE&& callable)
+{
+    return new HeapClassicCallback<SIGNATURE, USERDATA, CALLABLE>
+        (std::forward<CALLABLE>(callable));
+}
+
+#endif /* ! defined(LL_CLASSIC_CALLBACK_H) */
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 3a28f521d5474a0d1e512befc6f0b501167f119c..1b3bd4a5c3e9985da32c83626cb70d57b335bd50 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -40,7 +40,7 @@
 #ifdef LL_USESYSTEMLIBS
 # include <zlib.h>
 #else
-# include "zlib/zlib.h"  // for davep's dirty little zip functions
+# include "zlib-ng/zlib.h"  // for davep's dirty little zip functions
 #endif
 
 #if !LL_WINDOWS
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index f277d9270cdfdedf37ad1b4c42343414d8c0cc81..94255960f526127b9d293213224558e750b8d99c 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -32,7 +32,7 @@
 #ifdef LL_USESYSTEMLIBS
 # include <zlib.h>
 #else
-# include "zlib/zlib.h"
+# include "zlib-ng/zlib.h"
 #endif
 
 #include "llprocessor.h"
@@ -467,6 +467,8 @@ LLOSInfo::LLOSInfo() :
 	dotted_version_string << mMajorVer << "." << mMinorVer << "." << mBuild;
 	mOSVersionString.append(dotted_version_string.str());
 
+	mOSBitness = is64Bit() ? 64 : 32;
+	LL_INFOS("LLOSInfo") << "OS bitness: " << mOSBitness << LL_ENDL;
 }
 
 #ifndef LL_WINDOWS
@@ -522,6 +524,11 @@ const std::string& LLOSInfo::getOSVersionString() const
 	return mOSVersionString;
 }
 
+const S32 LLOSInfo::getOSBitness() const
+{
+	return mOSBitness;
+}
+
 //static
 U32 LLOSInfo::getProcessVirtualSizeKB()
 {
@@ -575,6 +582,25 @@ U32 LLOSInfo::getProcessResidentSizeKB()
 	return resident_size;
 }
 
+//static
+bool LLOSInfo::is64Bit()
+{
+#if LL_WINDOWS
+#if defined(_WIN64)
+    return true;
+#elif defined(_WIN32)
+    // 32-bit viewer may be run on both 32-bit and 64-bit Windows, need to elaborate
+    BOOL f64 = FALSE;
+    return IsWow64Process(GetCurrentProcess(), &f64) && f64;
+#else
+    return false;
+#endif
+#else // ! LL_WINDOWS
+    // we only build a 64-bit mac viewer and currently we don't build for linux at all
+    return true; 
+#endif
+}
+
 LLCPUInfo::LLCPUInfo()
 {
 	std::ostringstream out;
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 044381155b896e2eb117c15650742387f2dfb8e0..d8a0729629bc414d203c1923a90eea283effc67a 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -51,6 +51,8 @@ class LL_COMMON_API LLOSInfo final : public LLSingleton<LLOSInfo>
 	const std::string& getOSStringSimple() const;
 
 	const std::string& getOSVersionString() const;
+
+	const S32 getOSBitness() const;
 	
 	S32 mMajorVer;
 	S32 mMinorVer;
@@ -59,6 +61,7 @@ class LL_COMMON_API LLOSInfo final : public LLSingleton<LLOSInfo>
 #ifndef LL_WINDOWS
 	static S32 getMaxOpenFiles();
 #endif
+	static bool is64Bit();
 
 	static U32 getProcessVirtualSizeKB();
 	static U32 getProcessResidentSizeKB();
@@ -66,6 +69,7 @@ class LL_COMMON_API LLOSInfo final : public LLSingleton<LLOSInfo>
 	std::string mOSString;
 	std::string mOSStringSimple;
 	std::string mOSVersionString;
+	S32 mOSBitness;
 };
 
 
diff --git a/indra/llcommon/tests/classic_callback_test.cpp b/indra/llcommon/tests/classic_callback_test.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c060775c2418bc4ef3749288eb5ac166d5069f62
--- /dev/null
+++ b/indra/llcommon/tests/classic_callback_test.cpp
@@ -0,0 +1,144 @@
+/**
+ * @file   classic_callback_test.cpp
+ * @author Nat Goodspeed
+ * @date   2021-09-22
+ * @brief  Test ClassicCallback and HeapClassicCallback.
+ * 
+ * $LicenseInfo:firstyear=2021&license=viewerlgpl$
+ * Copyright (c) 2021, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "classic_callback.h"
+// STL headers
+#include <iostream>
+#include <string>
+// std headers
+// external library headers
+// other Linden headers
+#include "../test/lltut.h"
+
+/*****************************************************************************
+*   example callback
+*****************************************************************************/
+// callback_t is part of the specification of someAPI()
+typedef void (*callback_t)(const char*, void*);
+void someAPI(callback_t callback, void* userdata)
+{
+    callback("called", userdata);
+}
+
+// C++ callable I want as the actual callback
+struct MyCallback
+{
+    void operator()(const char* msg, void*)
+    {
+        mMsg = msg;
+    }
+
+    void callback_with_extra(const std::string& extra, const char* msg)
+    {
+        mMsg = extra + ' ' + msg;
+    }
+
+    std::string mMsg;
+};
+
+/*****************************************************************************
+*   example callback accepting several params, and void* userdata isn't first
+*****************************************************************************/
+typedef std::string (*complex_callback)(int, const char*, void*, double);
+std::string otherAPI(complex_callback callback, void* userdata)
+{
+    return callback(17, "hello world", userdata, 3.0);
+}
+
+// struct into which we can capture complex_callback params
+static struct Data
+{
+    void set(int i, const char* s, double f)
+    {
+        mi = i;
+        ms = s;
+        mf = f;
+    }
+
+    void clear() { set(0, "", 0.0); }
+
+    int mi;
+    std::string ms;
+    double mf;
+} sData;
+
+// C++ callable I want to pass
+struct OtherCallback
+{
+    std::string operator()(int num, const char* str, void*, double approx)
+    {
+        sData.set(num, str, approx);
+        return "hello back!";
+    }
+};
+
+/*****************************************************************************
+*   TUT
+*****************************************************************************/
+namespace tut
+{
+    struct classic_callback_data
+    {
+    };
+    typedef test_group<classic_callback_data> classic_callback_group;
+    typedef classic_callback_group::object object;
+    classic_callback_group classic_callbackgrp("classic_callback");
+
+    template<> template<>
+    void object::test<1>()
+    {
+        set_test_name("ClassicCallback");
+        // engage someAPI(MyCallback())
+        auto ccb{ makeClassicCallback<callback_t>(MyCallback()) };
+        someAPI(ccb.get_callback(), ccb.get_userdata());
+        // Unfortunately, with the side effect confined to the bound
+        // MyCallback instance, that call was invisible. Bind a reference to a
+        // named instance by specifying a ref type.
+        MyCallback mcb;
+        ClassicCallback<callback_t, void*, MyCallback&> ccb2(mcb);
+        someAPI(ccb2.get_callback(), ccb2.get_userdata());
+        ensure_equals("failed to call through ClassicCallback", mcb.mMsg, "called");
+
+        // try with HeapClassicCallback
+        mcb.mMsg.clear();
+        auto hcbp{ makeHeapClassicCallback<callback_t>(mcb) };
+        someAPI(hcbp->get_callback(), hcbp->get_userdata());
+        ensure_equals("failed to call through HeapClassicCallback", mcb.mMsg, "called");
+
+        // lambda
+        // The tricky thing here is that a lambda is an unspecified type, so
+        // you can't declare a ClassicCallback<signature, void*, that type>.
+        mcb.mMsg.clear();
+        auto xcb(
+            makeClassicCallback<callback_t>(
+                [&mcb](const char* msg, void*)
+                { mcb.callback_with_extra("extra", msg); }));
+        someAPI(xcb.get_callback(), xcb.get_userdata());
+        ensure_equals("failed to call lambda", mcb.mMsg, "extra called");
+
+        // engage otherAPI(OtherCallback())
+        OtherCallback ocb;
+        // Instead of specifying a reference type for the bound CALLBACK, as
+        // with ccb2 above, you can alternatively move the callable object
+        // into the ClassicCallback (of course AFTER any other reference).
+        // That's why OtherCallback uses external data for its observable side
+        // effect.
+        auto occb{ makeClassicCallback<complex_callback>(std::move(ocb)) };
+        std::string result{ otherAPI(occb.get_callback(), occb.get_userdata()) };
+        ensure_equals("failed to return callback result", result, "hello back!");
+        ensure_equals("failed to set int", sData.mi, 17);
+        ensure_equals("failed to set string", sData.ms, "hello world");
+        ensure_equals("failed to set double", sData.mf, 3.0);
+    }
+} // namespace tut
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index f3b74fa529f6cc442a873da8348884a57f84fbc5..97557d9c268a673b84c1f16de7a0538cbd7b1dd5 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -6,7 +6,7 @@ include(00-Common)
 include(CURL)
 include(OpenSSL)
 include(NGHTTP2)
-include(ZLIB)
+include(ZLIBNG)
 include(LLCoreHttp)
 include(LLAddBuildTest)
 include(LLMessage)
diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt
index d21ffc626b24a04c8d6148145f83c4c49323deb2..0dbbcf11f5d7491efca3658897e7ad44a66528ba 100644
--- a/indra/llimage/CMakeLists.txt
+++ b/indra/llimage/CMakeLists.txt
@@ -10,7 +10,7 @@ include(LLFileSystem)
 include(LLKDU)
 include(LLImageJ2COJ)
 include(WebP)
-include(ZLIB)
+include(ZLIBNG)
 include(LLAddBuildTest)
 include(Tut)
 
@@ -21,7 +21,7 @@ include_directories(
     ${LLFILESYSTEM_INCLUDE_DIRS}
     ${WEBP_INCLUDE_DIRS}
     ${PNG_INCLUDE_DIRS}
-    ${ZLIB_INCLUDE_DIRS}
+    ${ZLIBNG_INCLUDE_DIRS}
     )
 
 set(llimage_SOURCE_FILES
@@ -78,7 +78,7 @@ target_link_libraries(llimage
     ${WEBP_LIBRARIES}
     ${JPEG_LIBRARIES}
     ${PNG_LIBRARIES}
-    ${ZLIB_LIBRARIES}
+    ${ZLIBNG_LIBRARIES}
     readerwriterqueue
     )
 
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 26dfedef6be573a039a6b95a95e979b7fb720c5d..f55467034a0249cf5e2452679527e4c731911f3c 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -457,13 +457,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
         }
         else if ("time" == keyword)
         {
-            S32 when = 0;
+            S32 when{};
             LLStringUtil::convertToS32(value, when);
             entry->mTime = when;
         }
         else if ("flags" == keyword)
         {
-            U32 setting = 0;
+            U32 setting{};
             LLStringUtil::convertToU32(value, setting);
             entry->mFlags = setting;
         }
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 8d392d17c7f3c2f0dc0df06fce89895a41f79870..b31f61507b90af990f05a00fad60dd6239bd3bc9 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -350,7 +350,7 @@ class LLPluginClassMedia final : public LLPluginProcessParentOwner
 	// "init_history" message 
 	void initializeUrlHistory(const LLSD& url_history);
 
-	std::shared_ptr<LLPluginClassMedia> getSharedPrt() { return std::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
+	std::shared_ptr<LLPluginClassMedia> getSharedPtr() { return std::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
 
 protected:
 
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 63b3b6d9b1e03c405f1c51d0353178e7052c45de..83a20c299c67b187bf03046bc0b365e641c67cfd 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -36,7 +36,7 @@
 #ifdef LL_USESYSTEMLIBS
 # include <zlib.h>
 #else
-# include "zlib/zlib.h"
+# include "zlib-ng/zlib.h"
 #endif
 
 std::string model_names[] =
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index b42b34a2b79194f21a20e0191f8e14b3a38c9616..1efb39fc0f39018923d9981eb80b2eb188421ce1 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -53,10 +53,10 @@
 #endif
 
 BOOL gDebugSession = FALSE;
+BOOL gDebugGLSession = FALSE;
 BOOL gHeadlessClient = FALSE;
 BOOL gNonInteractive = FALSE;
 BOOL gGLActive = FALSE;
-BOOL gGLDebugLoggingEnabled = TRUE;
 
 static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
 static const std::string HEADLESS_RENDERER_STRING("Headless");
@@ -76,34 +76,30 @@ void APIENTRY gl_debug_callback(GLenum source,
 	const GLchar* message,
 	GLvoid* userParam)
 {
-	if (gGLDebugLoggingEnabled)
-	{
-
-        if (severity != GL_DEBUG_SEVERITY_HIGH &&
-            severity != GL_DEBUG_SEVERITY_MEDIUM &&
-            severity != GL_DEBUG_SEVERITY_LOW)
-        { //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints)
-            return;
-        }
-
-	    if (severity == GL_DEBUG_SEVERITY_HIGH)
-	    {
-		    LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
-	    }
-	    else
-	    {
-		    LL_WARNS() << "----- GL WARNING -------" << LL_ENDL;
-	    }
-	    LL_WARNS() << "Type: " << std::hex << type << LL_ENDL;
-	    LL_WARNS() << "ID: " << std::hex << id << LL_ENDL;
-	    LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
-	    LL_WARNS() << "Message: " << message << LL_ENDL;
-	    LL_WARNS() << "-----------------------" << LL_ENDL;
-	    if (severity == GL_DEBUG_SEVERITY_HIGH)
-	    {
-		    LL_ERRS() << "Halting on GL Error" << LL_ENDL;
-	    }
+    if (severity != GL_DEBUG_SEVERITY_HIGH &&
+        severity != GL_DEBUG_SEVERITY_MEDIUM &&
+        severity != GL_DEBUG_SEVERITY_LOW)
+    { //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints)
+        return;
     }
+
+	if (severity == GL_DEBUG_SEVERITY_HIGH)
+	{
+		LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
+	}
+	else
+	{
+		LL_WARNS() << "----- GL WARNING -------" << LL_ENDL;
+	}
+	LL_WARNS() << "Type: " << std::hex << type << LL_ENDL;
+	LL_WARNS() << "ID: " << std::hex << id << LL_ENDL;
+	LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
+	LL_WARNS() << "Message: " << message << LL_ENDL;
+	LL_WARNS() << "-----------------------" << LL_ENDL;
+	if (severity == GL_DEBUG_SEVERITY_HIGH)
+	{
+		LL_ERRS() << "Halting on GL Error" << LL_ENDL;
+	}
 }
 
 void parse_glsl_version(S32& major, S32& minor);
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index db32101a3d346f4b6b6b8a393082d7024934fdf2..bb40a809a816e263d1dc830b20b5fd3c6565833f 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -47,6 +47,7 @@
 
 extern BOOL gDebugGL;
 extern BOOL gDebugSession;
+extern BOOL gDebugGLSession;
 extern llofstream gFailLog;
 
 #define LL_GL_ERRS LL_ERRS("RenderState")
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 371bc3501d96aa7c0b10ecc2ac072be891f8b73a..34f4066f7ca850a3751b0d5eebd4c80ef47eb68e 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1360,6 +1360,9 @@ class LLMenuItemBranchDownGL : public LLMenuItemBranchGL
 	virtual BOOL handleKeyHere(KEY key, MASK mask);
 	
 	virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
+    
+    virtual void onFocusLost();
+    virtual void setFocus(BOOL b);
 };
 
 LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const Params& p) :
@@ -1514,6 +1517,21 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
 
 	return handled;
 }
+void LLMenuItemBranchDownGL::onFocusLost()
+{
+    // needed for tab-based selection
+    LLMenuItemBranchGL::onFocusLost();
+    LLMenuGL::setKeyboardMode(FALSE);
+    setHighlight(FALSE);
+}
+
+void LLMenuItemBranchDownGL::setFocus(BOOL b)
+{
+    // needed for tab-based selection
+    LLMenuItemBranchGL::setFocus(b);
+    LLMenuGL::setKeyboardMode(b);
+    setHighlight(b);
+}
 
 BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
 {
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 8fd549eabf774ad8cee129502579375dd26a1a6f..6a431b3cb7b18c50ba3c273275a0d0c24921a7f6 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -466,6 +466,8 @@ class LLTextBase
 	void					setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; }
 	bool					getSkipLinkUnderline() { return mSkipLinkUnderline;  }
 
+    void					setParseURLs(bool parse_urls) { mParseHTML = parse_urls; }
+
 	void					setPlainText(bool value) { mPlainText = value;}
 	bool					getPlainText() const { return mPlainText; }
 
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index 4de34368553814aec20e27c440d804a4268d4110..8fb6640ca883f5ecf805a02a52702b806ed3b8be 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -63,7 +63,7 @@ typedef BOOL ( WINAPI* PfnCoSetProxyBlanket )( IUnknown* pProxy, DWORD dwAuthnSv
                                                RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities );
 
 //Getting the version of graphics controller driver via WMI
-std::string LLDXHardware::getDriverVersionWMI()
+std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
 {
 	std::string mDriverVersion;
 	HRESULT hrCoInitialize = S_OK;
@@ -159,15 +159,68 @@ std::string LLDXHardware::getDriverVersionWMI()
 		{
 			break;               // If quantity less then 1.
 		}
+        
+        if (vendor != GPU_ANY)
+        {
+            VARIANT vtCaptionProp;
+            // Might be preferable to check "AdapterCompatibility" here instead of caption.
+            hr = pclsObj->Get(L"Caption", 0, &vtCaptionProp, 0, 0);
+
+            if (FAILED(hr))
+            {
+                LL_WARNS("AppInit") << "Query for Caption property failed." << " Error code = 0x" << hr << LL_ENDL;
+                pSvc->Release();
+                pLoc->Release();
+                CoUninitialize();
+                return std::string();               // Program has failed.
+            }
+
+            // use characters in the returned driver version
+            BSTR caption(vtCaptionProp.bstrVal);
+
+            //convert BSTR to std::string
+            std::wstring ws(caption, SysStringLen(caption));
+            std::string caption_str(ws.begin(), ws.end());
+            LLStringUtil::toLower(caption_str);
+
+            bool found = false;
+            switch (vendor)
+            {
+            case GPU_INTEL:
+                found = caption_str.find("intel") != std::string::npos;
+                break;
+            case GPU_NVIDIA:
+                found = caption_str.find("nvidia") != std::string::npos;
+                break;
+            case GPU_AMD:
+                found = caption_str.find("amd") != std::string::npos
+                        || caption_str.find("ati ") != std::string::npos
+                        || caption_str.find("radeon") != std::string::npos;
+                break;
+            default:
+                break;
+            }
 
-		VARIANT vtProp;
+            if (found)
+            {
+                VariantClear(&vtCaptionProp);
+            }
+            else
+            {
+                VariantClear(&vtCaptionProp);
+                pclsObj->Release();
+                continue;
+            }
+        }
 
-		// Get the value of the Name property
-		hr = pclsObj->Get(L"DriverVersion", 0, &vtProp, 0, 0);
+        VARIANT vtVersionProp;
+
+		// Get the value of the DriverVersion property
+		hr = pclsObj->Get(L"DriverVersion", 0, &vtVersionProp, 0, 0);
 
 		if (FAILED(hr))
 		{
-			LL_WARNS("AppInit") << "Query for name property failed." << " Error code = 0x" << hr << LL_ENDL;
+			LL_WARNS("AppInit") << "Query for DriverVersion property failed." << " Error code = 0x" << hr << LL_ENDL;
 			pSvc->Release();
 			pLoc->Release();
 			CoUninitialize();
@@ -175,7 +228,7 @@ std::string LLDXHardware::getDriverVersionWMI()
 		}
 
 		// use characters in the returned driver version
-		BSTR driverVersion(vtProp.bstrVal);
+		BSTR driverVersion(vtVersionProp.bstrVal);
 
 		//convert BSTR to std::string
 		std::wstring ws(driverVersion, SysStringLen(driverVersion));
@@ -188,10 +241,19 @@ std::string LLDXHardware::getDriverVersionWMI()
 		}
 		else if (mDriverVersion != str)
 		{
-			LL_WARNS("DriverVersion") << "Different versions of drivers. Version of second driver : " << str << LL_ENDL;
+            if (vendor == GPU_ANY)
+            {
+                // Expected from systems with gpus from different vendors
+                LL_INFOS("DriverVersion") << "Multiple video drivers detected. Version of second driver: " << str << LL_ENDL;
+            }
+            else
+            {
+                // Not Expected!
+                LL_WARNS("DriverVersion") << "Multiple video drivers detected from same vendor. Version of second driver : " << str << LL_ENDL;
+            }
 		}
 
-		VariantClear(&vtProp);
+		VariantClear(&vtVersionProp);
 		pclsObj->Release();
 	}
 
diff --git a/indra/llwindow/lldxhardware.h b/indra/llwindow/lldxhardware.h
index e4f0736b6b9081e8c422f2d3fa52f054afd8d667..b3e5b1c59e76332435175b2b6c7ffdcf28d79a47 100644
--- a/indra/llwindow/lldxhardware.h
+++ b/indra/llwindow/lldxhardware.h
@@ -88,7 +88,15 @@ class LLDXHardware
 	// vram_only TRUE does a "light" probe.
 	BOOL updateVRAM();
 
-	std::string getDriverVersionWMI();
+    // WMI can return multiple GPU drivers
+    // specify which one to output
+    typedef enum {
+        GPU_INTEL,
+        GPU_NVIDIA,
+        GPU_AMD,
+        GPU_ANY
+    } EGPUVendor;
+	std::string getDriverVersionWMI(EGPUVendor vendor);
 
 	S32 getVRAM() const { return mVRAM; }
 
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 061d9590fa07e6a4a79d614bfc03326eaa507647..1327d7ea874f28153eeb39960b0df341fbcc8b79 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3189,8 +3189,20 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
                 if (raw->header.dwType == RIM_TYPEMOUSE)
                 {
                     LLMutexLock lock(&window_imp->mRawMouseMutex);
-                    window_imp->mRawMouseDelta.mX += raw->data.mouse.lLastX;
-                    window_imp->mRawMouseDelta.mY -= raw->data.mouse.lLastY;
+
+                    S32 speed;
+                    const S32 DEFAULT_SPEED(10);
+                    SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0);
+                    if (speed == DEFAULT_SPEED)
+                    {
+                        window_imp->mRawMouseDelta.mX += raw->data.mouse.lLastX;
+                        window_imp->mRawMouseDelta.mY -= raw->data.mouse.lLastY;
+                    }
+                    else
+                    {
+                        window_imp->mRawMouseDelta.mX += round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
+                        window_imp->mRawMouseDelta.mY -= round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
+                    }
                 }
             }
         }
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 67ba5beb0b11b02251b85029885e07f2b9cce88c..5b03807e69d63c0ffb90fc538314093e8d2009d2 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -58,7 +58,7 @@ include(UnixInstall)
 include(ViewerMiscLibs)
 include(ViewerManager)
 include(VisualLeakDetector)
-include(ZLIB)
+include(ZLIBNG)
 include(URIPARSER)
 
 if( LLPHYSICSEXTENSIONS_SRC_DIR )
@@ -2153,13 +2153,13 @@ endif (WINDOWS)
 #
 # We generally want the newest version of the library to provide all symbol
 # resolution.  To that end, when using static archives, the *_PRELOAD_ARCHIVES
-# variables, PNG_PRELOAD_ARCHIVES and ZLIB_PRELOAD_ARCHIVES, get the archives
+# variables, PNG_PRELOAD_ARCHIVES and ZLIBNG_PRELOAD_ARCHIVES, get the archives
 # dumped into the target binary and runtime lookup will find the most
 # modern version.
 
 target_link_libraries(${VIEWER_BINARY_NAME}
     ${PNG_PRELOAD_ARCHIVES}
-    ${ZLIB_PRELOAD_ARCHIVES}
+    ${ZLIBNG_PRELOAD_ARCHIVES}
     ${URIPARSER_PRELOAD_ARCHIVES}
     ${GOOGLE_PERFTOOLS_LIBRARIES}
     ${LLAUDIO_LIBRARIES}
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 826f5ce030e080c48cef80aae0c10216f954a285..09a7391e4e373ff475cb5093c88cbbbc7210dc27 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.6.0
+6.6.1
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index dd2b656ce3e4fc052566ad2e75c22e89edf2995a..e16a5c7e76014ece4bdc11a137a51c10aa9803e8 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -55,7 +55,7 @@
     <key>debugsession</key>
     <map>
       <key>desc</key>
-      <string>Run as if RenderDebugGL is TRUE, but log errors until end of session.</string>
+      <string>Run as if RenderDebugGLSession is TRUE, but log errors until end of session.</string>
       <key>map-to</key>
       <string>DebugSession</string>
     </map>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index acc20e79f4ff65abb441ff064f78d9c0910e5709..2825993b4976235ac8c65aa3e155eb7804cc7eac 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4214,7 +4214,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>http://events.secondlife.com/viewer/embed/event/</string>
+      <string>http://events.[GRID]/viewer/embed/event/[EVENT_ID]</string>
     </map>
     <key>FastCacheFetchEnabled</key>
     <map>
@@ -9068,6 +9068,17 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>UpdateRememberPasswordSetting</key>
+    <map>
+      <key>Comment</key>
+      <string>Save 'rememeber password' setting for current user.</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
   <key>OctreeMaxNodeCapacity</key>
   <map>
     <key>Comment</key>
@@ -9585,10 +9596,10 @@
       <key>Value</key>
       <real>0.5</real>
     </map>
-    <key>RenderDebugGL</key>
+    <key>RenderDebugGLSession</key>
     <map>
       <key>Comment</key>
-      <string>Enable strict GL debugging.</string>
+      <string>Enable strict GL debugging on the start of next session.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6db28ad8707180902f1c7eb42667856fbafc64fb..c1962a7cd6fba9b936af5dadf3a15c633ff01d22 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -750,6 +750,12 @@ void LLAgent::moveYaw(F32 mag, bool reset_view)
 		setControlFlags(AGENT_CONTROL_YAW_NEG);
 	}
 
+    U32 mask = AGENT_CONTROL_YAW_POS | AGENT_CONTROL_YAW_NEG;
+    if ((getControlFlags() & mask) == mask)
+    {
+        gAgentCamera.setYawKey(0);
+    }
+
     if (reset_view)
 	{
         gAgentCamera.resetView(mMovementResetCamera);
@@ -2111,6 +2117,27 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32
 	//
 
 	gAgentCamera.updateLookAt(mouse_x, mouse_y);
+
+    // When agent has no parents, position updates come from setPositionAgent()
+    // But when agent has a parent (ex: is seated), position remains unchanged
+    // relative to parent and no parent's position update trigger
+    // setPositionAgent().
+    // But EEP's sky track selection still needs an update if agent has a parent
+    // and parent moves (ex: vehicles).
+    if (isAgentAvatarValid()
+        && gAgentAvatarp->getParent()
+        && !mOnPositionChanged.empty()
+        )
+    {
+        LLVector3d new_position = getPositionGlobal();
+        if ((mLastTestGlobal - new_position).lengthSquared() > 1.0)
+        {
+            // If the position has changed by more than 1 meter since the last time we triggered.
+            // filters out some noise. 
+            mLastTestGlobal = new_position;
+            mOnPositionChanged(mFrameAgent.getOrigin(), new_position);
+        }
+    }
 }
 
 // friends and operators
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 40d8f48c991c194bb7d1a4169ec74972db6008d5..ae07bff59a77203a51bbcd6b63f89f5fe678e789 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -424,10 +424,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
 	const LLQuaternion obj_rot = object->getRenderRotation();
 	const LLVector3 obj_pos = object->getRenderPosition();
 
-	BOOL is_avatar = object->isAvatar();
 	// if is avatar - don't do any funk heuristics to position the focal point
 	// see DEV-30589
-	if (is_avatar)
+	if (object->isAvatar() || (object->isAnimatedObject() && object->getControlAvatar()))
 	{
 		return original_focus_point - obj_pos;
 	}
@@ -554,7 +553,6 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
 	// or keep the focus point in the object middle when (relatively) far
 	// NOTE: leave focus point in middle of avatars, since the behavior you want when alt-zooming on avatars
 	// is almost always "tumble about middle" and not "spin around surface point"
-	if (!is_avatar) 
 	{
 		LLVector3 obj_rel = original_focus_point - obj_pos;
 		
@@ -1477,7 +1475,7 @@ void LLAgentCamera::updateCamera()
 			static const LLCachedControl<F32> cam_pos_smoothing(gSavedSettings, "CameraPositionSmoothing");
 			F32 smoothing = LLSmoothInterpolation::getInterpolant(cam_pos_smoothing * SMOOTHING_HALF_LIFE, FALSE);
 					
-			if (!mFocusObject)  // we differentiate on avatar mode 
+			if (mFocusOnAvatar && !mFocusObject) // we differentiate on avatar mode 
 			{
 				// for avatar-relative focus, we smooth in avatar space -
 				// the avatar moves too jerkily w/r/t global space to smooth there.
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 6b6cfbbbdee13ad19c5c45d4c165464ea478e190..4903fbd935309d4b08fbdc8eaec19b34bc0a0389 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -37,6 +37,7 @@
 #include "llgesturemgr.h"
 #include "llinventorybridge.h"
 #include "llinventoryfunctions.h"
+#include "llinventorymodelbackgroundfetch.h"
 #include "llinventoryobserver.h"
 #include "llinventorypanel.h"
 #include "lllocaltextureobject.h"
@@ -2082,6 +2083,14 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
 		return;
 	}
 
+    if (!item->isFinished())
+    {
+        LL_WARNS() << "Tried to edit wearable that isn't loaded" << LL_ENDL;
+        // Restart fetch or put item to the front
+        LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false);
+        return;
+    }
+
 	LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id);
 	if (!wearable)
 	{
@@ -2095,6 +2104,18 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
 		return;
 	}
 
+    S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE);
+    S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR);
+    S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES);
+    S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN);
+    if (!shape_count || !hair_count || !eye_count || !skin_count)
+    {
+        // Don't let user edit wearables if avatar is cloud due to missing parts.
+        // Let user edit wearables if avatar is cloud due to missing textures.
+        LL_WARNS() << "Cannot modify wearable. Avatar is cloud and missing parts." << LL_ENDL;
+        return;
+    }
+
 	const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
 	LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
 	LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c13ea9dfdded518a85fa94a9c02868066cf520e0..b11189b73c70d9e6a286beff95eece49daaf2ad7 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -590,7 +590,7 @@ static void settings_modify()
 // [/RLVa:KB]
     LLVOSurfacePatch::sLODFactor        = gSavedSettings.getF32("RenderTerrainLODFactor");
     LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor;  // square lod factor to get exponential range of [1,4]
-    gDebugGL       = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
+    gDebugGL       = gDebugGLSession || gDebugSession;
     gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
 }
 
@@ -1135,7 +1135,8 @@ bool LLAppViewer::init()
 	gGLActive = FALSE;
 
 #if LL_RELEASE_FOR_DOWNLOAD && !defined(LL_LINUX)
-    if (!gSavedSettings.getBOOL("CmdLineSkipUpdater"))
+    // Skip updater if this is a non-interactive instance
+    if (!gSavedSettings.getBOOL("CmdLineSkipUpdater") && !gNonInteractive)
     {
         LLProcess::Params updater;
         updater.desc = "updater process";
@@ -2752,6 +2753,15 @@ bool LLAppViewer::initConfiguration()
 		ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
 	}
 
+    if (gSavedSettings.getBOOL("RenderDebugGLSession"))
+    {
+        gDebugGLSession = TRUE;
+        gDebugGL = TRUE;
+        // gDebugGL can cause excessive logging
+        // so it's limited to a single session
+        gSavedSettings.setBOOL("RenderDebugGLSession", FALSE);
+    }
+
 	const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
 	if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
 	{
@@ -3133,6 +3143,11 @@ bool LLAppViewer::isUpdaterMissing()
     return mUpdaterNotFound;
 }
 
+bool LLAppViewer::waitForUpdater()
+{
+    return !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !mUpdaterNotFound && !gNonInteractive;
+}
+
 void LLAppViewer::writeDebugInfo(bool isStatic)
 {
 #if LL_WINDOWS && LL_BUGSPLAT
@@ -3240,7 +3255,28 @@ LLSD LLAppViewer::getViewerInfo() const
 	info["GRAPHICS_CARD"] = ll_safe_string((const char*)(glGetString(GL_RENDERER)));
 
 #if LL_WINDOWS
-	std::string drvinfo = gDXHardware.getDriverVersionWMI();
+    std::string drvinfo;
+
+    if (gGLManager.mIsIntel)
+    {
+        drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_INTEL);
+    }
+    else if (gGLManager.mIsNVIDIA)
+    {
+        drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_NVIDIA);
+    }
+    else if (gGLManager.mIsAMD)
+    {
+        drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_AMD);
+    }
+
+    if (drvinfo.empty())
+    {
+        // Generic/substitute windows driver? Unknown vendor?
+        LL_WARNS("DriverVersion") << "Vendor based driver search failed, searching for any driver" << LL_ENDL;
+        drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_ANY);
+    }
+
 	if (!drvinfo.empty())
 	{
 		info["GRAPHICS_DRIVER_VERSION"] = drvinfo;
@@ -4838,13 +4874,18 @@ void LLAppViewer::idle()
 		}
 	}
 
+
+    // Update layonts, handle mouse events, tooltips, e t c
+    // updateUI() needs to be called even in case viewer disconected
+    // since related notification still needs handling and allows
+    // opening chat.
+    gViewerWindow->updateUI();
+
 	if (gDisconnected)
     {
 		return;
     }
 
-    gViewerWindow->updateUI();
-
 	if (gTeleportDisplay)
     {
 		return;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index e842c29e4e9aabd732a5730af2ea63bef9119d47..8bb290754e5581019a2a38d2bf4b94901d346521 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -105,6 +105,7 @@ class LLAppViewer : public LLApp
 	bool logoutRequestSent() { return mLogoutRequestSent; }
 	bool isSecondInstance() { return mSecondInstance; }
     bool isUpdaterMissing(); // In use by tests
+    bool waitForUpdater();
 
 	void writeDebugInfo(bool isStatic=true);
 
diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp
index bb9ab0f45351cf1a525db10fe101d06e96ec07c4..cbd3f6af2cc627adf98cf206f4f2612e5a89d7a1 100644
--- a/indra/newview/llaudiosourcevo.cpp
+++ b/indra/newview/llaudiosourcevo.cpp
@@ -34,6 +34,7 @@
 #include "llmutelist.h"
 #include "llviewercontrol.h"
 #include "llviewerparcelmgr.h"
+#include "llvoavatarself.h"
 
 LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp)
 	:	LLAudioSource(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX), 
@@ -141,11 +142,36 @@ void LLAudioSourceVO::updateMute()
 	LLVector3d pos_global = getPosGlobal();
 
 	F32 cutoff = mObjectp->getSoundCutOffRadius();
-	if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off
-		|| !LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
-	{
-		mute = true;
-	}
+    // Object can specify radius at which it turns off
+    // consider cutoff below 0.1m as 'cutoff off'
+    if (cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff))
+    {
+        mute = true;
+    }
+    // check if parcel allows sounds to pass border
+    else if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
+    {
+        if (isAgentAvatarValid() && gAgentAvatarp->getParent())
+        {
+            // Check if agent is riding this object
+            // Agent can ride something out of region border and canHearSound
+            // will treat object as not being part of agent's parcel.
+            LLViewerObject *sound_root = (LLViewerObject*)mObjectp->getRoot();
+            LLViewerObject *agent_root = (LLViewerObject*)gAgentAvatarp->getRoot();
+            if (sound_root != agent_root)
+            {
+                mute = true;
+            }
+            else
+            {
+                LL_INFOS() << "roots identical" << LL_ENDL;
+            }
+        }
+        else
+        {
+            mute = true;
+        }
+    }
 
 	if (!mute)
 	{
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index d7148cb823d4f5d8caf32f0f3832e446398edc1a..6f329b22d3f808cf8e6f1f11d860cd2c6a761ce8 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -600,9 +600,15 @@ class LLChatHistoryHeader: public LLPanel
 		mTimeBoxTextBox = getChild<LLTextBox>("time_box");
 
 		mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
-		llassert(mInfoCtrl != NULL);
-		mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
-		mInfoCtrl->setVisible(FALSE);
+        if (mInfoCtrl)
+        {
+            mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
+            mInfoCtrl->setVisible(FALSE);
+        }
+        else
+        {
+            LL_ERRS() << "Failed to create an interface element due to missing or corrupted file inspector_info_ctrl.xml" << LL_ENDL;
+        }
 
 		return LLPanel::postBuild();
 	}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 02d86dbc7f268ee4da128acc0c0747545e9f88fe..3f026cd8378ce7e1c23628b71603d97d03d9ef48 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -68,7 +68,6 @@
 #pragma GCC diagnostic ignored "-Wuninitialized"
 #endif
 
-extern BOOL gGLDebugLoggingEnabled;
 #define LL_MAX_INDICES_COUNT 1000000
 
 static LLStaticHashedString sTextureIndexIn("texture_index_in");
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 3bd231ac8e410d2176b7155f7c437bdce848e886..682dd296cd2f1c14b9eb5fa5bf1e8c030e277a92 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -772,6 +772,14 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
 	    }
 	    LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
 		mGetPrevItems = false;
+
+		if (LLFavoritesOrderStorage::instance().isStorageUpdateNeeded())
+		{
+			if (!mItemsChangedTimer.getStarted())
+			{
+				mItemsChangedTimer.start();
+			}
+		}
 	}
 
 	const LLButton::Params& button_params = getButtonParams();
@@ -1607,7 +1615,7 @@ void LLFavoritesOrderStorage::destroyClass()
 		file.close();
 		LLFile::remove(filename);
 	}
-	if(mSaveOnExit)
+	if(mSaveOnExit || gSavedSettings.getBOOL("UpdateRememberPasswordSetting"))
 	{
 	    LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
 	}
@@ -1651,7 +1659,6 @@ void LLFavoritesOrderStorage::load()
 			llifstream in_file;
 			in_file.open(filename.c_str());
 			LLSD fav_llsd;
-			LLSD user_llsd;
 			if (in_file.is_open())
 			{
 				LLSDSerialize::fromXML(fav_llsd, in_file);
@@ -1661,12 +1668,12 @@ void LLFavoritesOrderStorage::load()
 				in_file.close();
 				if (fav_llsd.isMap() && fav_llsd.has(gAgentUsername))
 				{
-					user_llsd = fav_llsd[gAgentUsername];
+					mStorageFavorites = fav_llsd[gAgentUsername];
 
 					S32 index = 0;
 					bool needs_validation = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin");
-					for (LLSD::array_iterator iter = user_llsd.beginArray();
-						iter != user_llsd.endArray(); ++iter)
+					for (LLSD::array_iterator iter = mStorageFavorites.beginArray();
+						iter != mStorageFavorites.endArray(); ++iter)
 					{
 						// Validation
 						LLUUID fv_id = iter->get("id").asUUID();
@@ -1972,7 +1979,7 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
 		}
 	}
 
-	if((items != mPrevFavorites) || name_changed || pref_changed)
+	if((items != mPrevFavorites) || name_changed || pref_changed || gSavedSettings.getBOOL("UpdateRememberPasswordSetting"))
 	{
 	    std::string filename = getStoredFavoritesFilename();
 		if (!filename.empty())
@@ -1993,6 +2000,12 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
 			LLSD user_llsd;
 			S32 fav_iter = 0;
 			mMissingSLURLs.clear();
+
+            LLSD save_pass;
+            save_pass["save_password"] = gSavedSettings.getBOOL("RememberPassword");
+            user_llsd[fav_iter] = save_pass;
+            fav_iter++;
+
 			for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
 			{
 				LLSD value;
@@ -2063,6 +2076,23 @@ void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(BOOL show)
 	}
 }
 
+bool LLFavoritesOrderStorage::isStorageUpdateNeeded()
+{
+	if (!mRecreateFavoriteStorage)
+	{
+		for (LLSD::array_iterator iter = mStorageFavorites.beginArray();
+			iter != mStorageFavorites.endArray(); ++iter)
+		{
+			if (mFavoriteNames[iter->get("id").asUUID()] != iter->get("name").asString())
+			{
+				mRecreateFavoriteStorage = true;
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
 void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id)
 {
 	if (mTargetLandmarkId.isNull()) return;
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 2ccb39c1bff608633d6e2289580718ae6eb060be..2fb9f8411ca329dec650b6a421cdcc00ce98166d 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -226,8 +226,11 @@ class LLFavoritesOrderStorage final : public LLSingleton<LLFavoritesOrderStorage
 	BOOL saveFavoritesRecord(bool pref_changed = false);
 	void showFavoritesOnLoginChanged(BOOL show);
 
-	LLInventoryModel::item_array_t mPrevFavorites;
+	bool isStorageUpdateNeeded();
 
+	LLInventoryModel::item_array_t mPrevFavorites;
+	LLSD mStorageFavorites;
+	bool mRecreateFavoriteStorage;
 
 	const static S32 NO_INDEX;
 	static bool mSaveOnExit;
@@ -254,7 +257,6 @@ class LLFavoritesOrderStorage final : public LLSingleton<LLFavoritesOrderStorage
 	slurls_map_t mSLURLs;
 	std::set<LLUUID> mMissingSLURLs;
 	bool mIsDirty;
-	bool mRecreateFavoriteStorage;
 
 	struct IsNotInFavorites
 	{
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index e21fcd89f3ad1b1c806cd65dd481b491f952f5ed..dcc4af3f041f63a992289c92f264d10d9e91c9bf 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -386,7 +386,8 @@ void LLVolumeImplFlexible::doIdleUpdate()
 						U64 throttling_delay = (virtual_frame_num + id) % update_period;
 
 						if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
-							|| (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
+							|| (mLastFrameNum + update_period < virtual_frame_num) // missed virtual frame
+							|| mLastFrameNum > virtual_frame_num) // overflow
 						{
 							// We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
 							// If happened too late, subtract throttling_delay (it is zero otherwise)
@@ -787,10 +788,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
 
 	volume->updateRelativeXform();
 
-	if (mRenderRes > -1)
-	{
-		doFlexibleUpdate();
-	}
+	doFlexibleUpdate();
 	
 	// Object may have been rotated, which means it needs a rebuild.  See SL-47220
 	BOOL	rotated = FALSE;
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 4dedc6259724b47b29ccbf45f9acf938351bcd62..829d6d20ec93e7193052fe44cf11cc576d094134 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -292,7 +292,7 @@ void LLFloaterJoystick::refreshListOfDevices()
         std::string desc = LLViewerJoystick::getInstance()->getDescription();
         if (!desc.empty())
         {
-            LLSD value = LLSD::Integer(1);
+            LLSD value = LLSD::Integer(1); // value for selection
             addDevice(desc, value);
             mHasDeviceList = true;
         }
@@ -392,6 +392,9 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
 
     LLSD value = self->mJoysticksCombo->getValue();
     bool joystick_enabled = true;
+    // value is 0 for no device,
+    // 1 for a device on Mac (single device, no list support yet)
+    // binary packed guid for a device on windows (can have multiple devices)
     if (value.isInteger())
     {
         // ndof already has a device selected, we are just setting it enabled or disabled
@@ -400,7 +403,7 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
     else
     {
         LLViewerJoystick::getInstance()->initDevice(value);
-        // else joystick is enabled, because combobox holds id of device
+        // else joystick is enabled, because combobox holds id of the device
         joystick_enabled = true;
     }
     gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled);
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 21e373303e88377c727d0f20b5cef8981c355a11..d1e8b95f274350d67e1910a34490aaf86ab9981c 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -452,7 +452,8 @@ BOOL LLPanelLandGeneral::postBuild()
 
 	mEditDesc = getChild<LLTextEditor>("Description");
 	mEditDesc->setCommitOnFocusLost(TRUE);
-	mEditDesc->setCommitCallback(onCommitAny, this);	
+	mEditDesc->setCommitCallback(onCommitAny, this);
+    mEditDesc->setContentTrusted(false);
 	// No prevalidate function - historically the prevalidate function was broken,
 	// allowing residents to put in characters like U+2661 WHITE HEART SUIT, so
 	// preserve that ability.
@@ -749,6 +750,7 @@ void LLPanelLandGeneral::refresh()
 		BOOL can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
 		mEditName->setEnabled(can_edit_identity);
 		mEditDesc->setEnabled(can_edit_identity);
+        mEditDesc->setParseURLs(!can_edit_identity);
 
 		BOOL can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS);
 		mBtnSetGroup->setEnabled(can_edit_agent_only && !parcel->getIsGroupOwned());
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index a11770cd3be3db852afea8ae7ce693a54cf0f861..d654f9dbd4436e855d3342f18e2381e1c7d68c0f 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -2111,6 +2111,8 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
 	
 	LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
 	region_landtype->setText(region->getLocalizedSimProductName());
+
+    getChild<LLButton>("reset_covenant")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate()));
 	
 	// let the parent class handle the general data collection. 
 	bool rv = LLPanelRegionInfo::refreshFromRegion(region);
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index 67841d991a8441ca882c9c5f8ea901ef042625d6..aa818c6488228d60859f7b3a328fe69f462001cb 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -28,16 +28,17 @@
 #include "llinspectobject.h"
 
 // Viewer
+#include "llagent.h"            // To standup
 #include "llfloatersidepanelcontainer.h"
 #include "llinspect.h"
 #include "llmediaentry.h"
-#include "llnotificationsutil.h"	// *TODO: Eliminate, add LLNotificationsUtil wrapper
 #include "llselectmgr.h"
 #include "llslurl.h"
 #include "llviewermenu.h"		// handle_object_touch(), handle_buy()
 #include "llviewermedia.h"
 #include "llviewermediafocus.h"
 #include "llviewerobjectlist.h"	// to select the requested object
+#include "llvoavatarself.h"
 // [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c)
 #include "rlvactions.h"
 #include "rlvcommon.h"
@@ -652,7 +653,31 @@ void LLInspectObject::onClickTouch()
 
 void LLInspectObject::onClickSit()
 {
-	handle_object_sit_or_stand();
+    bool is_sitting = false;
+    if (mObjectSelection)
+    {
+        LLSelectNode* node = mObjectSelection->getFirstRootNode();
+        if (node && node->mValid)
+        {
+            LLViewerObject* root_object = node->getObject();
+            if (root_object
+                && isAgentAvatarValid()
+                && gAgentAvatarp->isSitting()
+                && gAgentAvatarp->getRoot() == root_object)
+            {
+                is_sitting = true;
+            }
+        }
+    }
+
+    if (is_sitting)
+    {
+        gAgent.standUp();
+    }
+    else
+    {
+        handle_object_sit(mObjectID);
+    }
 	closeFloater();
 }
 
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index bb339305cec290bc030fac4d2896d17e38641226..570e087b8cd4ef886afd3bab6a5964b09ca0e264 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -291,7 +291,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
 	mRequestData["options"] = requested_options;
 	mRequestData["http_params"] = http_params;
 #if LL_RELEASE_FOR_DOWNLOAD
-    mRequestData["wait_for_updater"] = !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !LLAppViewer::instance()->isUpdaterMissing();
+    mRequestData["wait_for_updater"] = LLAppViewer::instance()->waitForUpdater();
 #else
     mRequestData["wait_for_updater"] = false;
 #endif
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 2272f4c1d8d260e95eeeb4b16f47700f35c603ed..696d28f8959177c9811c1cebc5bf74cefd00a9af 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -100,6 +100,7 @@ BOOL LLPanelGroupGeneral::postBuild()
 		mEditCharter->setCommitCallback(onCommitAny, this);
 		mEditCharter->setFocusReceivedCallback(boost::bind(onFocusEdit, _1, this));
 		mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this));
+        mEditCharter->setContentTrusted(false);
 	}
 
 	// Options
@@ -648,7 +649,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
 
 	if (mEditCharter)
 	{
-		mEditCharter->setText(gdatap->mCharter);
+        mEditCharter->setParseURLs(!mAllowEdit || !can_change_ident);
+        mEditCharter->setText(gdatap->mCharter);
 	}
 	
 	resetDirty();
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 9510dee6bf425c539a60021f8c014113591e4899..4a151edd05d1985cb0048e8e47a39c4a0c4f34b5 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -90,44 +90,6 @@ LLPointer<LLCredential> load_user_credentials(std::string &user_key)
     }
 }
 
-// keys are lower case to be case insensitive so they are not always
-// identical to names which retain user input, like:
-// "AwEsOmE Resident" -> "awesome_resident"
-std::string get_user_key_from_name(const std::string &username)
-{
-    std::string key = username;
-    LLStringUtil::trim(key);
-    LLStringUtil::toLower(key);
-    if (!LLGridManager::getInstance()->isInSecondlife())
-    {
-        size_t separator_index = username.find_first_of(" ");
-        if (separator_index == username.npos)
-        {
-            // CRED_IDENTIFIER_TYPE_ACCOUNT
-            return key;
-        }
-    }
-    // CRED_IDENTIFIER_TYPE_AGENT
-    size_t separator_index = username.find_first_of(" ._");
-    std::string first = username.substr(0, separator_index);
-    std::string last;
-    if (separator_index != username.npos)
-    {
-        last = username.substr(separator_index + 1, username.npos);
-        LLStringUtil::trim(last);
-    }
-    else
-    {
-        // ...on Linden grids, single username users as considered to have
-        // last name "Resident"
-        // *TODO: Make login.cgi support "account_name" like above
-        last = "resident";
-    }
-
-    key = first + "_" + last;
-    return key;
-}
-
 class LLLoginLocationAutoHandler : public LLCommandHandler
 {
 public:
@@ -324,10 +286,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 	username_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
 	username_combo->setKeystrokeOnEsc(TRUE);
 
-    {
-        LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
-        remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this));
-    }
+
+    LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
+    remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this));
+    getChild<LLCheckBoxCtrl>("remember_password")->setCommitCallback(boost::bind(&LLPanelLogin::onRememberPasswordCheck, this));
 }
 
 void LLPanelLogin::addFavoritesToStartLocation()
@@ -400,10 +362,22 @@ void LLPanelLogin::addFavoritesToStartLocation()
 		combo->addSeparator();
 		LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL;
 		LLSD user_llsd = iter->second;
+        bool update_password_setting = true;
 		for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
 			iter1 != user_llsd.endArray(); ++iter1)
 		{
-			std::string label = (*iter1)["name"].asString();
+            if ((*iter1).has("save_password"))
+            {
+                bool save_password = (*iter1)["save_password"].asBoolean();
+                gSavedSettings.setBOOL("RememberPassword", save_password);
+                if (!save_password)
+                {
+                    getChild<LLButton>("connect_btn")->setEnabled(false);
+                }
+                update_password_setting = false;
+            }
+
+            std::string label = (*iter1)["name"].asString();
 			std::string value = (*iter1)["slurl"].asString();
 			if(label != "" && value != "")
 			{
@@ -415,6 +389,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
 				}
 			}
 		}
+        if (update_password_setting)
+        {
+            gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
+        }
 		break;
 	}
 	if (combo->getValue().asString().empty())
@@ -530,21 +508,12 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem
         LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL;
         return;
     }
-    if (sInstance->mFirstLoginThisInstall)
-    {
-        LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
-        remember_check->setValue(remember_psswrd);
-        // no list to populate
-        setFields(credential);
-    }
-    else
-    {
-        sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
-        LLUICtrl* remember_password = sInstance->getChild<LLUICtrl>("remember_password");
-        remember_password->setValue(remember_user && remember_psswrd);
-        remember_password->setEnabled(remember_user);
-        sInstance->populateUserList(credential);
-    }
+
+    sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
+    LLUICtrl* remember_password = sInstance->getChild<LLUICtrl>("remember_password");
+    remember_password->setValue(remember_user && remember_psswrd);
+    remember_password->setEnabled(remember_user);
+    sInstance->populateUserList(credential);
 }
 
 //static
@@ -655,39 +624,6 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
 	LL_INFOS("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
 	// determine if the username is a first/last form or not.
 	size_t separator_index = username.find_first_of(' ');
-	if (separator_index == username.npos
-		&& !LLGridManager::getInstance()->isInSecondlife())
-	{
-		LL_INFOS("Credentials", "Authentication") << "account: " << username << LL_ENDL;
-		// single username, so this is a 'clear' identifier
-		identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT;
-		identifier["account_name"] = username;
-		
-		if (LLPanelLogin::sInstance->mPasswordModified)
-		{
-			// password is plaintext
-			authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
-			authenticator["secret"] = password;
-		}
-        else
-        {
-            credential = load_user_credentials(username);
-            if (credential.notNull())
-            {
-                authenticator = credential->getAuthenticator();
-                if (authenticator.emptyMap())
-                {
-                    // Likely caused by user trying to log in to non-system grid
-                    // with unsupported name format, just retry
-                    LL_WARNS() << "Authenticator failed to load for: " << username << LL_ENDL;
-                    // password is plaintext
-                    authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
-                    authenticator["secret"] = password;
-                }
-            }
-        }
-	}
-	else
 	{
 		// Be lenient in terms of what separators we allow for two-word names
 		// and allow legacy users to login with firstname.lastname
@@ -738,16 +674,9 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
 		}
 	}
 	credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator);
-    if (!sInstance->mFirstLoginThisInstall)
-    {
-        remember_psswrd = sInstance->getChild<LLUICtrl>("remember_password")->getValue();
-        remember_user = sInstance->getChild<LLUICtrl>("remember_name")->getValue();
-    }
-    else
-    {
-        remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
-        remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me'
-    }
+
+    remember_psswrd = sInstance->getChild<LLUICtrl>("remember_password")->getValue();
+    remember_user = sInstance->getChild<LLUICtrl>("remember_name")->getValue();
 }
 
 
@@ -1133,17 +1062,18 @@ void LLPanelLogin::onUserListCommit(void*)
 }
 
 // static
-// At the moment only happens if !mFirstLoginThisInstall
 void LLPanelLogin::onRememberUserCheck(void*)
 {
-    if (sInstance && !sInstance->mFirstLoginThisInstall)
+    if (sInstance)
     {
         LLCheckBoxCtrl* remember_name(sInstance->getChild<LLCheckBoxCtrl>("remember_name"));
         LLCheckBoxCtrl* remember_psswrd(sInstance->getChild<LLCheckBoxCtrl>("remember_password"));
         LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo"));
 
         bool remember = remember_name->getValue().asBoolean();
-        if (user_combo->getCurrentIndex() != -1 && !remember)
+        if (!sInstance->mFirstLoginThisInstall
+            && user_combo->getCurrentIndex() != -1
+            && !remember)
         {
             remember = true;
             remember_name->setValue(true);
@@ -1157,6 +1087,14 @@ void LLPanelLogin::onRememberUserCheck(void*)
     }
 }
 
+void LLPanelLogin::onRememberPasswordCheck(void*)
+{
+    if (sInstance)
+    {
+        gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
+    }
+}
+
 // static
 void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
 {
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index d4663e49f51e64dcd9854e5ff22aaddd3ea054fb..ef7d36e29f64581ac64b5afab089b6a585a5a2a6 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -105,6 +105,7 @@ class LLPanelLogin final :
 	static void onUserNameTextEnty(void*);
 	static void onUserListCommit(void*);
 	static void onRememberUserCheck(void*);
+    static void onRememberPasswordCheck(void*);
 	static void onPassKey(LLLineEditor* caller, void* user_data);
 
 	static void connectCallback(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 230dbf64ff68e30b4c5c2bb537bcb90517a89c89..91b3bffc6a1fab1f4713118f19ec7e98a94f792d 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -765,7 +765,7 @@ std::string LLPathfindingManager::getRetrieveObjectLinksetsURLForCurrentRegion()
 
 std::string LLPathfindingManager::getChangeObjectLinksetsURLForCurrentRegion() const
 {
-	return getCapabilityURLForCurrentRegion(CAP_SERVICE_SET_OBJECT_LINKSETS);
+    return getCapabilityURLForCurrentRegion(CAP_SERVICE_SET_OBJECT_LINKSETS);
 }
 
 std::string LLPathfindingManager::getTerrainLinksetsURLForCurrentRegion() const
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 1e15f27026b1ae15c99ab19bf7e1d0653fa05354..6e00a127a95eda5b96ba1eddbfcc1829739699a0 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -123,7 +123,7 @@ class LLPathfindingManager final : public LLSingleton<LLPathfindingManager>
 	std::string getNavMeshStatusURLForRegion(LLViewerRegion *pRegion) const;
 	std::string getRetrieveNavMeshURLForRegion(LLViewerRegion *pRegion) const;
 	std::string getRetrieveObjectLinksetsURLForCurrentRegion() const;
-	std::string getChangeObjectLinksetsURLForCurrentRegion() const;
+    std::string getChangeObjectLinksetsURLForCurrentRegion() const;
 	std::string getTerrainLinksetsURLForCurrentRegion() const;
 	std::string getCharactersURLForCurrentRegion() const;
 	std::string	getAgentStateURLForRegion(LLViewerRegion *pRegion) const;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 3071b0cde07083b13004172d26573595b9d5325a..8b89eef300539f449338dbb97a07163b9d24d75f 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -347,9 +347,6 @@ BOOL LLPreviewGesture::postBuild()
 	LLTextBox* text;
 	LLCheckBoxCtrl* check;
 
-	edit = getChild<LLLineEditor>("name");
-	edit->setKeystrokeCallback(onKeystrokeCommit, this);
-
 	edit = getChild<LLLineEditor>("desc");
 	edit->setKeystrokeCallback(onKeystrokeCommit, this);
 
@@ -482,9 +479,6 @@ BOOL LLPreviewGesture::postBuild()
 	{
 		getChild<LLUICtrl>("desc")->setValue(item->getDescription());
 		getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
-		
-		getChild<LLUICtrl>("name")->setValue(item->getName());
-		getChild<LLLineEditor>("name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
 	}
 
 	return LLPreview::postBuild();
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index d71b7690530612780e7fd6cf3d088fc844125fe2..39187a73886d4e121e17e7d8c71b5dc5688521fc 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -1041,12 +1041,39 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n
     std::set<std::string> framenames;
     std::set<std::string> notfound;
 
+    // expected and correct folder sctructure is to have
+    // three folders in widnlight's root: days, water, skies 
     std::string base_path(gDirUtilp->getDirName(path));
     std::string water_path(base_path);
     std::string sky_path(base_path);
+    std::string day_path(base_path);
 
     gDirUtilp->append(water_path, "water");
     gDirUtilp->append(sky_path, "skies");
+    gDirUtilp->append(day_path, "days");
+
+    if (!gDirUtilp->fileExists(day_path))
+    {
+        LL_WARNS("SETTINGS") << "File " << name << ".xml is not in \"days\" folder." << LL_ENDL;
+    }
+
+    if (!gDirUtilp->fileExists(water_path))
+    {
+        LL_WARNS("SETTINGS") << "Failed to find accompaniying water folder for file " << name
+            << ".xml. Falling back to using default folder" << LL_ENDL;
+
+        water_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
+        gDirUtilp->append(water_path, "water");
+    }
+
+    if (!gDirUtilp->fileExists(sky_path))
+    {
+        LL_WARNS("SETTINGS") << "Failed to find accompaniying skies folder for file " << name
+            << ".xml. Falling back to using default folder" << LL_ENDL;
+
+        sky_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
+        gDirUtilp->append(sky_path, "skies");
+    }
 
     newsettings[SETTING_NAME] = name;
 
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 1db6a7c1dd5089781c335489ce298bcdc400af3b..5d1003f037aaf7708a386654f8e560d746fc307b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1129,6 +1129,7 @@ bool idle_startup()
 	{
 		// Generic failure message
 		std::ostringstream emsg;
+		emsg << LLTrans::getString("LoginFailedHeader") << "\n";
 		if(LLLoginInstance::getInstance()->authFailure())
 		{
 			LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): "
@@ -1141,11 +1142,37 @@ bool idle_startup()
 			std::string message_id = response["message_id"];
 			std::string message; // actual string to show the user
 
-			if(!message_id.empty() && LLTrans::findString(message, message_id, response["message_args"]))
-			{
-				// message will be filled in with the template and arguments
-			}
-			else if(!message_response.empty())
+            bool localized_by_id = false;
+            if(!message_id.empty())
+            {
+                LLSD message_args = response["message_args"];
+                if (message_args.has("TIME")
+                    && (message_id == "LoginFailedAcountSuspended"
+                        || message_id == "LoginFailedAccountMaintenance"))
+                {
+                    LLDate date;
+                    std::string time_string;
+                    if (date.fromString(message_args["TIME"].asString()))
+                    {
+                        LLSD args;
+                        args["datetime"] = (S32)date.secondsSinceEpoch();
+                        LLTrans::findString(time_string, "LocalTime", args);
+                    }
+                    else
+                    {
+                        time_string = message_args["TIME"].asString() + " " + LLTrans::getString("PacificTime");
+                    }
+
+                    message_args["TIME"] = time_string;
+                }
+                // message will be filled in with the template and arguments
+                if (LLTrans::findString(message, message_id, message_args))
+                {
+                    localized_by_id = true;
+                }
+            }
+
+            if(!localized_by_id && !message_response.empty())
 			{
 				// *HACK: "no_inventory_host" sent as the message itself.
 				// Remove this clause when server is sending message_id as well.
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index b52cf0b698a94b5c617de39a78809847f337ebe0..66090dfd6c6f7cdf67964bb18467724ac376d97f 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -510,13 +510,6 @@ static bool handleRenderBumpChanged(const LLSD& newval)
 	return true;
 }
 
-static bool handleRenderDebugGLChanged(const LLSD& newvalue)
-{
-	gDebugGL = newvalue.asBoolean() || gDebugSession;
-	gGL.clearErrors();
-	return true;
-}
-
 static bool handleRenderDebugPipelineChanged(const LLSD& newvalue)
 {
 	gDebugPipeline = newvalue.asBoolean();
@@ -731,7 +724,6 @@ void settings_setup_listeners()
 	gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
     gSavedSettings.getControl("RenderVSyncEnable")->getSignal()->connect(boost::bind(&handleVSyncChanged, _2));
 	gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
-	gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
 	gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));
 	gSavedSettings.getControl("RenderResolutionDivisor")->getValidateSignal()->connect(boost::bind(&validateRenderResolutionDivisor, _2));
 	gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2));
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0c73f27f54ec1789ee477a3a000955e47b6039f8..78cf3f61055404d654ad7b0f3c78c74113d1d602 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -408,9 +408,25 @@ void initialize_menus();
 void set_merchant_SLM_menu()
 {
     // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool
-    gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible((BOOL)LLGridManager::getInstance()->isInSecondlife());
+	bool in_sl = LLGridManager::getInstance()->isInSecondlife();
+    gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible((BOOL)in_sl);
     LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
-    gToolBarView->enableCommand(command->id(), LLGridManager::getInstance()->isInSecondlife());
+    gToolBarView->enableCommand(command->id(), in_sl);
+
+	if(in_sl)
+	{
+	    const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
+	    if (marketplacelistings_id.isNull())
+	    {
+	        U32 mkt_status = LLMarketplaceData::instance().getSLMStatus();
+	        bool is_merchant = (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) || (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MIGRATED_MERCHANT);
+	        if (is_merchant)
+	        {
+	            gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true);
+	            LL_WARNS("SLM") << "Creating the marketplace listings folder for a merchant" << LL_ENDL;
+	        }
+	    }
+	}
 }
 
 void check_merchant_status(bool force)
@@ -4184,29 +4200,15 @@ bool is_object_sittable()
 	}
 }
 
-
 // only works on pie menu
-void handle_object_sit_or_stand()
+void handle_object_sit(LLViewerObject *object, const LLVector3 &offset)
 {
-	LLPickInfo pick = LLToolPie::getInstance()->getPick();
-	LLViewerObject *object = pick.getObject();;
-	if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
-	{
-		return;
-	}
-
-	if (sitting_on_selection())
-	{
-		gAgent.standUp();
-		return;
-	}
-
 	// get object selection offset 
 
 //	if (object && object->getPCode() == LL_PCODE_VOLUME)
 // [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
 	if ( (object && object->getPCode() == LL_PCODE_VOLUME) && 
-		 ((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, pick.mObjectOffset))) )
+		 ((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, offset))) )
 // [/RLVa:KB]
 	{
 // [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
@@ -4220,6 +4222,7 @@ void handle_object_sit_or_stand()
 			gRlvHandler.setSitSource(gAgent.getPositionGlobal());
 		}
 // [/RLVa:KB]
+	{
 
 		gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
 		gMessageSystem->nextBlockFast(_PREHASH_AgentData);
@@ -4227,12 +4230,42 @@ void handle_object_sit_or_stand()
 		gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
 		gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
 		gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
-		gMessageSystem->addVector3Fast(_PREHASH_Offset, pick.mObjectOffset);
+		gMessageSystem->addVector3Fast(_PREHASH_Offset, offset);
 
 		object->getRegion()->sendReliableMessage();
 	}
 }
 
+void handle_object_sit_or_stand()
+{
+    LLPickInfo pick = LLToolPie::getInstance()->getPick();
+    LLViewerObject *object = pick.getObject();
+    if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
+    {
+        return;
+    }
+
+    if (sitting_on_selection())
+    {
+        gAgent.standUp();
+        return;
+    }
+
+    handle_object_sit(object, pick.mObjectOffset);
+}
+
+void handle_object_sit(const LLUUID& object_id)
+{
+    LLViewerObject* obj = gObjectList.findObject(object_id);
+    if (!obj)
+    {
+        return;
+    }
+
+    LLVector3 offset(0, 0, 0);
+    handle_object_sit(obj, offset);
+}
+
 void near_sit_down_point(BOOL success, void *)
 {
 	if (success)
@@ -6461,6 +6494,24 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
 	}
 };
 
+class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
+		if (avatar)
+		{
+			avatar->resetSkeleton(true);
+		}
+		else
+		{
+			gAgentAvatarp->resetSkeleton(true);
+		}
+		return true;
+	}
+};
+
+
 class LLAvatarAddContact : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
@@ -9836,6 +9887,7 @@ void initialize_menus()
 	view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
 	view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton");
 	view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
+	view_listener_t::addMenu(new LLAvatarResetSelfSkeletonAndAnimations(), "Avatar.ResetSelfSkeletonAndAnimations");
 	enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
     enable.add("Avatar.IsPicksTabOpen", boost::bind(&picks_tab_visible));
 
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index e27c9d69da6aed91df402db4bafe9ae38837692a..8566ff8fea945e60a15e73a01fa070069a99ebc6 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -139,6 +139,7 @@ void handle_save_snapshot(void *);
 void handle_toggle_flycam();
 
 void handle_object_sit_or_stand();
+void handle_object_sit(const LLUUID& object_id);
 void handle_give_money_dialog();
 bool enable_pay_object();
 bool enable_buy_object();
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index dba9b9fa8a5fbd86bbb8588ac9f548dc72cdfbfd..0055794db675358bd43bca2ac68a5c3af73c1d14 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -257,13 +257,13 @@ void LLFilePickerReplyThread::notify(const std::vector<std::string>& filenames)
 
 LLMediaFilePicker::LLMediaFilePicker(LLPluginClassMedia* plugin, LLFilePicker::ELoadFilter filter, bool get_multiple)
     : LLFilePickerThread(filter, get_multiple),
-    mPlugin(plugin->getSharedPrt())
+    mPlugin(plugin->getSharedPtr())
 {
 }
 
 LLMediaFilePicker::LLMediaFilePicker(LLPluginClassMedia* plugin, LLFilePicker::ESaveFilter filter, const std::string &proposed_name)
     : LLFilePickerThread(filter, proposed_name),
-    mPlugin(plugin->getSharedPrt())
+    mPlugin(plugin->getSharedPtr())
 {
 }
 
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ebc26f26218fcd0e06fdb32ab43f7dc7aea8259c..a2427337fd3ee65f21700e4559f4265b25505c06 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3656,6 +3656,13 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
 	// trigger a control event.
 	U32 control_flags = gAgent.getControlFlags();
 
+    // Rotation into both directions should cancel out
+    U32 mask = AGENT_CONTROL_YAW_POS | AGENT_CONTROL_YAW_NEG;
+    if ((control_flags & mask) == mask)
+    {
+        control_flags &= ~mask;
+    }
+
 	MASK	key_mask = gKeyboard->currentMask(TRUE);
 
 	if (key_mask & MASK_ALT || key_mask & MASK_CONTROL)
@@ -6230,15 +6237,15 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
 				if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit)
 					continue;
 
-                if (script_perm.question == "JoinAnExperience")
-                { // Some experience only permissions do not have an explicit permission bit.  Add them here.
-                    script_question += "    " + LLTrans::getString("ForceSitAvatar") + "\n";
+                if (LLTrans::getString(script_perm.question).empty())
+                {
+                    continue;
                 }
 
 				script_question += "    " + LLTrans::getString(script_perm.question) + "\n";
 			}
 		}
-	
+
 		args["QUESTIONS"] = script_question;
 
 		if (known_questions != questions)
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 0d6b689e43554435713d021c3bde3ed41602fbb7..9d6c473157444817b99f3de3f69d74bd900595e3 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -72,7 +72,7 @@
 #ifdef LL_USESYSTEMLIBS
 #include <zlib.h>
 #else
-#include "zlib/zlib.h"
+#include "zlib-ng/zlib.h"
 #endif
 #include "object_flags.h"
 
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 04aacc3cd82cc47ad0b9289c6c1d7dc6aa272bd0..314d55b3a593f7b0c8a5735b6cb78fedce1389e1 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -506,6 +506,7 @@ void send_viewer_stats(bool include_preferences)
 	system["os"] = LLOSInfo::instance().getOSStringSimple();
 	system["cpu"] = gSysCPU.getCPUString();
 	system["address_size"] = ADDRESS_SIZE;
+	system["os_bitness"] = LLOSInfo::instance().getOSBitness();
 	unsigned char MACAddress[MAC_ADDRESS_BYTES];
 	LLUUID::getNodeID(MACAddress);
 	std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 692a1c339a0604c0b232a1f74afc38739ca5c08f..f774c112565ba1514968d0a0c64ea98e5b72d65a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2271,6 +2271,7 @@ void LLViewerWindow::initWorldUI()
 	gStatusBar->setShape(status_bar_container->getLocalRect());
 	// sync bg color with menu bar
 	gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
+    // add InBack so that gStatusBar won't be drawn over menu
 	status_bar_container->addChildInBack(gStatusBar);
 	status_bar_container->setVisible(TRUE);
 
@@ -3253,6 +3254,11 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
 
 void LLViewerWindow::handleScrollHWheel(S32 clicks)
 {
+    if (LLAppViewer::instance()->quitRequested())
+    {
+        return;
+    }
+    
     LLUI::resetMouseIdleTimer();
 
     LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index a5068477fb86578b8eac62a5fca2ecc6403c2947..1fb4a9642df7ab78fc61ffe702f332afa5d3e7b7 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -659,9 +659,7 @@ void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time)
 void LLVOSky::forceSkyUpdate()
 {
     mForceUpdate = TRUE;
-
-    m_lastAtmosphericsVars = AtmosphericsVars();
-
+    m_lastAtmosphericsVars = {};
     mCubeMapUpdateStage = -1;
 }
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 89444ff94525183315a5b0ebfd740542ef6cedd0..7275e19f9f45d37a51f5a711fac2755f268a17c1 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -111,8 +111,6 @@ S32 LLVOVolume::mRenderComplexity_current = 0;
 LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
 LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
 
-extern BOOL gGLDebugLoggingEnabled;
-
 // Implementation class of LLMediaDataClientObject.  See llmediadataclient.h
 class LLMediaDataClientObjectImpl final : public LLMediaDataClientObject
 {
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 33616f4375de4fe5a914b499a381820f33aed33e..87946345ca86030922c7de1192e1ec43a9338911 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -11179,24 +11179,48 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
 	{
 		markVisible(avatar->mDrawable, viewer_camera);
 
+        if (preview_avatar)
+        {
+            // Only show rigged attachments for preview
 #if SLOW_ATTACHMENT_LIST
-		for (const auto& attach_pair : avatar->mAttachmentPoints)
-		{
-			LLViewerJointAttachment *attachment = attach_pair.second;
-			for (LLViewerObject* attached_object : attachment->mAttachedObjects)
-			{
-				if (attached_object)
+			for (const auto& attach_pair : avatar->mAttachmentPoints)
+            {
+				LLViewerJointAttachment *attachment = attach_pair.second;
+				for (LLViewerObject* attached_object : attachment->mAttachedObjects)
+                {
 #else
-		for(auto attachment_iter = avatar->mAttachedObjectsVector.begin(), attachment_end = avatar->mAttachedObjectsVector.end();
-			attachment_iter != attachment_end;++attachment_iter)
-		{{
-				if (LLViewerObject* attached_object = attachment_iter->first)
+			for(auto attachment_iter = avatar->mAttachedObjectsVector.begin(), attachment_end = avatar->mAttachedObjectsVector.end();
+				attachment_iter != attachment_end;++attachment_iter)
+			{{
+				LLViewerObject* attached_object = attachment_iter->first
 #endif
-				{
-					markVisible(attached_object->mDrawable->getSpatialBridge(), viewer_camera);
-				}
-			}
-		}
+                    if (attached_object && attached_object->isRiggedMesh())
+                    {
+                        markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+                    }
+                }
+            }
+        }
+        else
+        {
+            LLVOAvatar::attachment_map_t::iterator iter;
+            for (iter = avatar->mAttachmentPoints.begin();
+                iter != avatar->mAttachmentPoints.end();
+                ++iter)
+            {
+                LLViewerJointAttachment *attachment = iter->second;
+                for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+                    attachment_iter != attachment->mAttachedObjects.end();
+                    ++attachment_iter)
+                {
+                    LLViewerObject* attached_object = attachment_iter->get();
+                    if (attached_object)
+                    {
+                        markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+                    }
+                }
+            }
+        }
 	}
 
 	stateSort(viewer_camera, result);
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index dec8376955f65c961c54c0f2bce5a1977554022a..5365ea9059b238edaa1a897ae7ffcdc4acbddf8a 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -635,8 +635,7 @@ with the same filename but different name
 
   <texture name="login_sl_logo"  file_name="windows/login_sl_logo.png" preload="true" />
   <texture name="login_sl_logo_small"  file_name="windows/login_sl_logo_small.png" preload="true" />
-  <texture name="first_login_image_left"  file_name="windows/first_login_image_left.png" preload="true" />
-  <texture name="first_login_image_right"  file_name="windows/first_login_image_right.png" preload="true" />
+  <texture name="first_login_image"  file_name="windows/first_login_image.jpg" preload="true" />
 
   <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" />
   <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="false" />
diff --git a/indra/newview/skins/default/textures/windows/first_login_image.jpg b/indra/newview/skins/default/textures/windows/first_login_image.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..30f31341edc886fa2c0b23f6b4cb442495fcff17
Binary files /dev/null and b/indra/newview/skins/default/textures/windows/first_login_image.jpg differ
diff --git a/indra/newview/skins/default/textures/windows/first_login_image_left.png b/indra/newview/skins/default/textures/windows/first_login_image_left.png
deleted file mode 100644
index 77904d7d1288e123016e1d4f4c19a3c607336a8f..0000000000000000000000000000000000000000
Binary files a/indra/newview/skins/default/textures/windows/first_login_image_left.png and /dev/null differ
diff --git a/indra/newview/skins/default/textures/windows/first_login_image_right.png b/indra/newview/skins/default/textures/windows/first_login_image_right.png
deleted file mode 100644
index 35ecce9c0703486c9f9f08378bcd0aff354c01d2..0000000000000000000000000000000000000000
Binary files a/indra/newview/skins/default/textures/windows/first_login_image_right.png and /dev/null differ
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 814305c1bc230461d41b52da57f31687bd244be6..5f1bf73f261bfcd5cdef7511dbf01f5d194bfb74 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -106,7 +106,7 @@
 	<string name="LoginFailedNoNetwork">
 		Netværksfejl: Kunne ikke etablere forbindelse, check venligst din netværksforbindelse.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Login fejlede.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index d89794ff49653c259ae466a530870c37cee58e9c..d9f5e35568bf360928cd120bfffc83f9e7dc8a19 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -186,7 +186,7 @@ Voice-Server-Version: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Netzwerkfehler: Verbindung konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Netzwerkverbindung.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Anmeldung fehlgeschlagen
 	</string>
 	<string name="Quit">
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 8419d7d5a7f493388cf288460dac3e0abe80c389..aeacf36b05fea6a87e8efe10776c4abee5843497 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -164,6 +164,7 @@
              left_pad="2"
              name="Description"
              spellcheck="true"
+             parse_urls="true"
              top_delta="0"
              width="365"
              word_wrap="true" />
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 9885e37cea6d26fe3a09b69b7b77b9b4c5638c2d..842184de883cea353f714d0ebc0f86c4eee72980 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -8,6 +8,16 @@
  tab_stop="false" 
  name="main_view"
  width="1024">
+
+  <!-- At the moment layout_stack is not an LLUICtrl,
+  but Tab requires focus_root to function and focus_root
+  functionality is implemented in LLUICtrl -->
+  <panel follows="all"
+         height="768"
+         name="menu_tab_wrapper"
+         mouse_opaque="false"
+         focus_root="true"
+         top="0">
   <layout_stack border_size="0"
                 follows="all"
                 mouse_opaque="false"
@@ -18,12 +28,12 @@
     <layout_panel mouse_opaque="true"
               follows="left|right|top"
               name="status_bar_container"
-              tab_stop="false"
               height="19"
               left="0"
               top="0"
               width="1024"
               auto_resize="false"
+              default_tab_group="1"
               visible="true">
       <view mouse_opaque="false"
             follows="all"
@@ -31,13 +41,13 @@
             left="0"
             top="0"
             width="1024"
+            tab_group="1"
             height="19"/>
     </layout_panel>
     <layout_panel auto_resize="false"
                   height="34"
                   mouse_opaque="false"
                   name="nav_bar_container"
-                  tab_stop="false"
                   width="1024"
                   visible="false"/>
     <layout_panel auto_resize="true"  
@@ -99,6 +109,7 @@
              tab_stop="false"/>
     </layout_panel>
   </layout_stack>
+  </panel> <!--menu_tab_wrapper-->
  
   <panel top="0"
         follows="all"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 21244cc9166547bafac35d4f7f233d9834f9e63b..bac43013ab9c70d770c59fbb3085720d621801f5 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -482,6 +482,20 @@
          parameter="gestures" />
       </menu_item_check>
       <menu_item_separator/>
+      <menu_item_call 
+       label="Reset skeleton"
+       layout="topleft"
+       name="Reset Skeleton">
+        <menu_item_call.on_click
+         function="Avatar.ResetSkeleton" />
+      </menu_item_call>
+      <menu_item_call 
+       label="Reset skeleton and animations"
+       layout="topleft"
+       name="Reset Skeleton And Animations">
+        <menu_item_call.on_click
+         function="Avatar.ResetSelfSkeletonAndAnimations" />
+      </menu_item_call>
       <menu_item_call
        label="Undeform Me"
        name="Undeform Me">
@@ -3501,14 +3515,14 @@ function="World.EnvPreset"
           <menu_item_separator />
 
           <menu_item_check
-             label="Debug GL"
+             label="Start Debug GL on next run"
              name="Debug GL">
                 <menu_item_check.on_check
                  function="CheckControl"
-                 parameter="RenderDebugGL" />
+                 parameter="RenderDebugGLSession" />
                 <menu_item_check.on_click
                  function="ToggleControl"
-                 parameter="RenderDebugGL" />
+                 parameter="RenderDebugGLSession" />
             </menu_item_check>
             <menu_item_check
              label="Debug Pipeline"
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 27a6ab289b0da46f7ee26d3a0aeff4abd9299923..9585aa483e3cb3bda67ddf91d909a481e6f748be 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -95,6 +95,7 @@ Hover your mouse over the options for more help.
      layout="topleft"
      max_length="511"
      name="charter"
+     parse_urls="true"
      top="105"
      right="-4"
     bg_readonly_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml
index 5568ccb7928635b35c67ff12868c4fcabebf83f6..d36c83d292e342c4da499cc773bce9557e49588c 100644
--- a/indra/newview/skins/default/xui/en/panel_login_first.xml
+++ b/indra/newview/skins/default/xui/en/panel_login_first.xml
@@ -98,7 +98,7 @@
           auto_resize="false"
           follows="left|right|top"
           name="widget_container"
-          width="532"
+          width="730"
           left="0"
           top="0"
           height="80">
@@ -106,7 +106,7 @@
             allow_text_entry="true"
             follows="left|bottom"
             height="32"
-            left="2"
+            left="42"
             label="Username"
             combo_editor.font="SansSerifLarge"
             max_chars="128"
@@ -126,7 +126,7 @@
             follows="left|top"
             width="200"
             height="32"
-            left="220"
+            left="262"
             max_length_chars="16"
             name="password_edit"
             label="Password"
@@ -145,42 +145,58 @@
             label_color="White"
             font="SansSerifLarge"
             name="connect_btn"
-            left="432"
-            width="100"
+  	        left_pad="15"
+            width="120"
             height="32"
             top="0" />
+          <text
+            follows="left|top"
+            font="SansSerifLarge"
+            font.style="BOLD"
+            text_color="EmphasisColor"
+            height="34"
+            name="sign_up_text"
+            left_pad="10"
+            top="0"
+            width="200"
+            valign="center">
+            Sign up
+          </text>
           <check_box
-            control_name="RememberPassword"
             follows="left|top"
             font="SansSerifLarge"
-            left="0"
+            left="42"
             top="32"
             height="24"
             label="Remember me"
+            word_wrap="down"
             check_button.bottom="3"
-            name="remember_check"
-            width="145" />
-          <text
+            name="remember_name"
+            tool_tip="Already remembered user can be forgotten from Me &gt; Preferences &gt; Advanced &gt; Remembered Usernames."
+            width="198" />
+          <check_box
+            control_name="RememberPassword"
             follows="left|top"
             font="SansSerifLarge"
             text_color="EmphasisColor"
-            height="16"
-            name="forgot_password_text"
-            left="219"
-            top="34"
-            width="200">
-            Forgotten password
-          </text>
+            height="24"
+            left="262"
+            bottom_delta="0"
+            label="Remember password"
+            word_wrap="down"
+            check_button.bottom="3"
+            name="remember_password"
+            width="198" />
           <text
             follows="left|top"
             font="SansSerifLarge"
             text_color="EmphasisColor"
             height="16"
-            name="sign_up_text"
-            left="432"
+            name="forgot_password_text"
+            left="492"
             top="34"
             width="200">
-            Sign up
+            Forgotten password
           </text>
         </layout_panel>
         <layout_panel
@@ -216,24 +232,17 @@
           auto_resize="false"
           follows="left|right|top"
           name="images_container"
-          width="832"
+          width="675"
           left="0"
           top="0"
           height="500">
           <icon
-            height="400"
-            width="400"
-            image_name="first_login_image_left"
+            height="450"
+            width="675"
+            image_name="first_login_image"
             left="0"
             name="image_left"
             top="0" />
-          <icon
-            height="400"
-            width="400"
-            image_name="first_login_image_right"
-            left_pad="32"
-            name="image_right"
-            top="0" />
         </layout_panel>
         <layout_panel
           height="100"
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 11f79b6753b9bbb159533f144c0f6bc1cee8df60..8e9c86f12cd25e6324699fd3ab21f57bdd794024 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -4,7 +4,6 @@
  background_visible="true"
  bg_opaque_color="MouseGray"
  follows="left|top|right"
- focus_root="true" 
  height="34"
  layout="topleft"
  name="navigation_bar"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 93fdced3cc3f586dfe1861f20735190d9708bc21..9f37ff066aa6cb4a38f707d306535374869c6c3f 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -11,7 +11,6 @@
  mouse_opaque="false"
  name="status"
  top="19"
- tab_stop="false"
  width="1000">
     <panel.string
      name="packet_loss_tooltip">
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4076d0e03086615a7880d7dd55cac3561986035e..b05bdfae817b2c2deeb88f75b6f12d122a5121d9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -86,6 +86,7 @@ Voice Server Version: [VOICE_VERSION]
 	</string>
 	<string name="AboutTraffic">Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)</string>
 	<string name="AboutTime">[month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second,datetime,slt]</string>
+  <string name="LocalTime">[month, datetime, local] [day, datetime, local] [year, datetime, local] [hour, datetime, local]:[min, datetime, local]:[second,datetime, local]</string>
 	<string name="ErrorFetchingServerReleaseNotesURL">Error fetching server release notes URL.</string>
 	<string name="BuildConfiguration">Build Configuration</string>
 	
@@ -128,7 +129,7 @@ Voice Server Version: [VOICE_VERSION]
 	<string name="CertAllocationFailure">Failed to allocate openssl memory for certificate.</string>
 
 	<string name="LoginFailedNoNetwork">Network error: Could not establish connection, please check your network connection.</string>
-	<string name="LoginFailed">Login failed.</string>
+	<string name="LoginFailedHeader">Login failed.</string>
 	<string name="Quit">Quit</string>
 	
 	<string name="AgniGridLabel">Second Life Main Grid (Agni)</string>
@@ -138,6 +139,8 @@ Voice Server Version: [VOICE_VERSION]
 	<string name="LoginFailedViewerNotPermitted">
     The viewer you are using can no longer access [CURRENT_GRID]. Please visit the following page to download a new viewer:
 https://www.alchemyviewer.org/pages/downloads.html</string>
+	<string name="LoginFailed">Grid emergency login failure.
+If you feel this is an error, please contact support.</string>
 	<string name="LoginIntermediateOptionalUpdateAvailable">Optional viewer update available: [VERSION]</string>
 	<string name="LoginFailedRequiredUpdate">Required viewer update: [VERSION]</string>
 	<string name="LoginFailedAlreadyLoggedIn">This agent is already logged in.
@@ -161,15 +164,18 @@ Logins are currently restricted to [GRID_ADMIN] employees only.</string>
 People with free accounts will not be able to access [CURRENT_GRID] during this time, to make room for those who have paid for [CURRENT_GRID].</string>
 	<string name="LoginFailedComputerProhibited">[CURRENT_GRID] cannot be accessed from this computer.
 If you feel this is an error, please contact support.</string>
+  <!--'Pacific time' placeholder for [TIME] in case time from server can't be decoded-->
+  <string name="PacificTime">Pacific Time</string>
 	<string name="LoginFailedAcountSuspended">Your account is not accessible until
-[TIME] Pacific Time.</string>
+[TIME].
+If you feel this is an error, please contact support.</string>
 	<string name="LoginFailedAccountDisabled">We are unable to complete your request at this time.
 Please contact [CURRENT_GRID] support for assistance.</string>
 	<string name="LoginFailedTransformError">Data inconsistency found during login.
 Please contact [CURRENT_GRID] support.</string>
 	<string name="LoginFailedAccountMaintenance">Your account is undergoing minor maintenance.
 Your account is not accessible until
-[TIME] Pacific Time.
+[TIME].
 If you feel this is an error, please contact [CURRENT_GRID] support.</string>
 	<string name="LoginFailedPendingLogoutFault">Request for logout responded with a fault from simulator.</string>
 	<string name="LoginFailedPendingLogout">The system is logging you out right now.
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 4cdb8b004fc65e425e3954a7d7eb0122fa5f1756..9b9e7fd34b055f2936a3ee7ecdc46763fdf317f3 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -178,7 +178,7 @@ Versión del servidor de voz: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Error de red: no se ha podido conectar; por favor, revisa tu conexión a internet.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Error en el inicio de sesión.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 20343c749de412622189200d8c55cfbdedfb019d..5d3e1c18fae96b130227325405bcee47b7693567 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -187,7 +187,7 @@ Voice Server Version: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Erreur réseau : impossible d&apos;établir la connexion. Veuillez vérifier votre connexion réseau.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Échec de la connexion.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index 0465e701cf5071afcc4b6c0ace652bb83a7a650d..dac649718b6df6414bf1c3a842b7dd0442670e6a 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -183,7 +183,7 @@ Versione server voce: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Errore di rete: Non è stato possibile stabilire un collegamento, controlla la tua connessione.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Accesso non riuscito.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index bcf083b906148fd056dca622b7c9f0d9790b6a2e..ac3de2ebebcdc945c2497049acd55a1b05202078 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -186,7 +186,7 @@ LOD ä¿‚æ•°: [LOD_FACTOR]
 	<string name="LoginFailedNoNetwork">
 		ネットワークエラー:接続を確立できませんでした。お使いのネットワーク接続をご確認ください。
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		ログインに失敗しました。
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index 5ae15967650989f64e166bc0d802934356a6e94a..875d3a294b5772bd2e4f4e99b93fed63778e093f 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -143,7 +143,7 @@ Wersja serwera głosu (Voice Server): [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Błąd sieci: Brak połączenia z siecią, sprawdź status swojego połączenia internetowego.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Logowanie nie powiodło się.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index d95e6b55eacc360c15853a97ee92735e57b79571..2bc2b5f275056527b0257d1d2233a392926b052c 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -178,7 +178,7 @@ Versão do servidor de voz: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Erro de rede: Falha de conexão: verifique sua conexão à internet.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Falha do login.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index f15f0dd6ad4b81cdfce5dd59a5c99df69a7a9483..f504cb2dec57debcee489a30480b1eca8284e750 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -187,7 +187,7 @@ SLURL: &lt;nolink&gt;[SLURL]&lt;/nolink&gt;
 	<string name="LoginFailedNoNetwork">
 		Ошибка сети: не удалось установить соединение. Проверьте подключение к сети.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Ошибка входа.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml
index 21614679c3d3d18c313e4ca3eb3c6dc68e23c490..a6d8d43dd15aa79d960329a9721b02c02cb90e28 100644
--- a/indra/newview/skins/default/xui/tr/strings.xml
+++ b/indra/newview/skins/default/xui/tr/strings.xml
@@ -187,7 +187,7 @@ Ses Sunucusu Sürümü: [VOICE_VERSION]
 	<string name="LoginFailedNoNetwork">
 		Ağ hatası: Bağlantı kurulamadı, lütfen ağ bağlantınızı kontrol edin.
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		Oturum açılamadı.
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml
index 234c9e29813800972c9413d57a177069837e4670..2e4aba2239bcb8736bdc4456b6ff6c8f7f741eb9 100644
--- a/indra/newview/skins/default/xui/zh/strings.xml
+++ b/indra/newview/skins/default/xui/zh/strings.xml
@@ -187,7 +187,7 @@ LibVLC版本:[LIBVLC_VERSION]N]
 	<string name="LoginFailedNoNetwork">
 		網路錯誤:無法建立連線,請檢查網路連線是否正常。
 	</string>
-	<string name="LoginFailed">
+	<string name="LoginFailedHeader">
 		登入失敗。
 	</string>
 	<string name="Quit">
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index c2c56a07177d939c172043c9450ccdcf15d0a8a9..b3622193e0573bdf6bbdccd972d1d3d7e0cd1255 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -234,6 +234,7 @@ bool llHashedUniqueID(unsigned char* id)
 #include "../llappviewer.h"
 void LLAppViewer::forceQuit(void) {}
 bool LLAppViewer::isUpdaterMissing() { return true; }
+bool LLAppViewer::waitForUpdater() { return false; }
 LLAppViewer * LLAppViewer::sInstance = 0;
 
 //-----------------------------------------------------------------------------