diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1dd2c1d5dfac635a030bc9730d96214aa9a58dd6..4785273b78b582fb166ad6280009db971e374a5a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -5,25 +5,23 @@ on:
   pull_request:
   push:
     branches: ["main", "release/*", "project/*"]
-    tags: ["Second_Life_*"]
+    tags: ["Second_Life*"]
 
 jobs:
   build:
     strategy:
       matrix:
         runner: [windows-large, macos-12-xl]
-        configuration: [Release, ReleaseOS]
-        python-version: ["3.11"]
+        configuration: [Release]
         include:
           - runner: macos-12-xl
             developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer"
-        exclude:
-          - runner: macos-12-xl
-            configuration: ReleaseOS
     runs-on: ${{ matrix.runner }}
     outputs:
       viewer_channel: ${{ steps.build.outputs.viewer_channel }}
       viewer_version: ${{ steps.build.outputs.viewer_version }}
+      viewer_branch:  ${{ steps.which-branch.outputs.branch }}
+      relnotes:       ${{ steps.which-branch.outputs.relnotes }}
       imagename: ${{ steps.build.outputs.imagename }}
     env:
       AUTOBUILD_ADDRSIZE: 64
@@ -33,12 +31,13 @@ jobs:
       AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
       AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
       AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables
+      # Direct autobuild to store vcs_url, vcs_branch and vcs_revision in
+      # autobuild-package.xml.
+      AUTOBUILD_VCS_INFO: "true"
       AUTOBUILD_VSVER: "170"
       DEVELOPER_DIR: ${{ matrix.developer_dir }}
       # Ensure that Linden viewer builds engage Bugsplat.
       BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
-      BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
-      BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
       build_coverity: false
       build_log_dir: ${{ github.workspace }}/.logs
       build_viewer: true
@@ -62,15 +61,15 @@ jobs:
           ref: ${{ github.event.pull_request.head.sha || github.sha }}
 
       - name: Setup python
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
-          python-version: ${{ matrix.python-version }}
+          python-version: "3.11"
 
       - name: Checkout build variables
         uses: actions/checkout@v4
         with:
           repository: secondlife/build-variables
-          ref: viewer
+          ref: master
           path: .build-variables
 
       - name: Checkout master-message-template
@@ -83,7 +82,7 @@ jobs:
         run: pip3 install autobuild llsd
 
       - name: Cache autobuild packages
-        uses: actions/cache@v3
+        uses: actions/cache@v4
         id: cache-installables
         with:
           path: .autobuild-installables
@@ -96,10 +95,17 @@ jobs:
         if: runner.os == 'Windows'
         run: choco install nsis-unicode
 
+      - name: Determine source branch
+        id: which-branch
+        uses: secondlife/viewer-build-util/which-branch@v2
+        with:
+          token: ${{ github.token }}
+
       - name: Build
         id: build
         shell: bash
         env:
+          AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }}
           RUNNER_OS: ${{ runner.os }}
         run: |
           # set up things the viewer's build.sh script expects
@@ -150,7 +156,7 @@ jobs:
           }
           repo_branch()
           {
-            git -C "$1" branch | grep '^* ' | cut -c 3-
+            echo "$AUTOBUILD_VCS_BRANCH"
           }
           record_dependencies_graph()
           {
@@ -170,16 +176,22 @@ jobs:
           # seen before, so numerous tests don't know about it.
           [[ "$arch" == "MINGW6" ]] && arch=CYGWIN
           export AUTOBUILD="$(which autobuild)"
-          # Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a
-          # viewer channel "Second Life Project Shiny" (ignoring "#hash",
-          # needed to disambiguate tags).
-          if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]]
-          then viewer_channel="${GITHUB_REF_NAME%#*}"
-               export viewer_channel="${viewer_channel//_/ }"
-          else export viewer_channel="Second Life Test"
+
+          # determine the viewer channel from the branch name
+          branch=$AUTOBUILD_VCS_BRANCH
+          IFS='/' read -ra ba <<< $branch
+          prefix=${ba[0]}
+          if [ "$prefix" == "project" ]; then
+              IFS='_' read -ra prj <<< "${ba[1]}"
+              # uppercase first letter of each word
+              export viewer_channel="Second Life Project ${prj[*]^}"
+          elif  [[ "$prefix" == "release" || "$prefix" == "main" ]];
+          then
+              export viewer_channel="Second Life Release"
+          else
+              export viewer_channel="Second Life Test"
           fi
           echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT"
-
           # On windows we need to point the build to the correct python
           # as neither CMake's FindPython nor our custom Python.cmake module
           # will resolve the correct interpreter location.
@@ -214,7 +226,7 @@ jobs:
 
       - name: Upload executable
         if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: "${{ steps.build.outputs.artifact }}-app"
           path: |
@@ -224,7 +236,7 @@ jobs:
       # artifact for that too.
       - name: Upload symbol file
         if: matrix.configuration != 'ReleaseOS'
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: "${{ steps.build.outputs.artifact }}-symbols"
           path: |
@@ -232,7 +244,7 @@ jobs:
 
       - name: Upload metadata
         if: matrix.configuration != 'ReleaseOS'
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: "${{ steps.build.outputs.artifact }}-metadata"
           # emitted by build.sh, possibly multiple lines
@@ -240,7 +252,7 @@ jobs:
             ${{ steps.build.outputs.metadata }}
 
       - name: Upload physics package
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         # should only be set for viewer-private
         if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv
         with:
@@ -250,23 +262,36 @@ jobs:
             ${{ steps.build.outputs.physicstpv }}
 
   sign-and-package-windows:
+    env:
+      AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
+      AZURE_CERT_NAME:     ${{ secrets.AZURE_CERT_NAME }}
+      AZURE_CLIENT_ID:     ${{ secrets.AZURE_CLIENT_ID }}
+      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+      AZURE_TENANT_ID:     ${{ secrets.AZURE_TENANT_ID }}
     needs: build
     runs-on: windows
     steps:
       - name: Sign and package Windows viewer
-        uses: secondlife/viewer-build-util/sign-pkg-windows@v1
+        if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
+        uses: secondlife/viewer-build-util/sign-pkg-windows@v2
         with:
-          vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}"
-          cert_name: "${{ secrets.AZURE_CERT_NAME }}"
-          client_id: "${{ secrets.AZURE_CLIENT_ID }}"
-          client_secret: "${{ secrets.AZURE_CLIENT_SECRET }}"
-          tenant_id: "${{ secrets.AZURE_TENANT_ID }}"
+          vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
+          cert_name: "${{ env.AZURE_CERT_NAME }}"
+          client_id: "${{ env.AZURE_CLIENT_ID }}"
+          client_secret: "${{ env.AZURE_CLIENT_SECRET }}"
+          tenant_id: "${{ env.AZURE_TENANT_ID }}"
 
   sign-and-package-mac:
+    env:
+      NOTARIZE_CREDS_MACOS:        ${{ secrets.NOTARIZE_CREDS_MACOS }}
+      SIGNING_CERT_MACOS:          ${{ secrets.SIGNING_CERT_MACOS }}
+      SIGNING_CERT_MACOS_IDENTITY: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
+      SIGNING_CERT_MACOS_PASSWORD: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
     needs: build
     runs-on: macos-latest
     steps:
       - name: Unpack Mac notarization credentials
+        if: env.NOTARIZE_CREDS_MACOS
         id: note-creds
         shell: bash
         run: |
@@ -274,7 +299,7 @@ jobs:
           # USERNAME="..."
           # PASSWORD="..."
           # TEAM_ID="..."
-          eval "${{ secrets.NOTARIZE_CREDS_MACOS }}"
+          eval "${{ env.NOTARIZE_CREDS_MACOS }}"
           echo "::add-mask::$USERNAME"
           echo "::add-mask::$PASSWORD"
           echo "::add-mask::$TEAM_ID"
@@ -286,86 +311,99 @@ jobs:
           [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]]
 
       - name: Sign and package Mac viewer
-        uses: secondlife/viewer-build-util/sign-pkg-mac@v1
+        if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team
+        uses: secondlife/viewer-build-util/sign-pkg-mac@v2
         with:
           channel: ${{ needs.build.outputs.viewer_channel }}
           imagename: ${{ needs.build.outputs.imagename }}
-          cert_base64: ${{ secrets.SIGNING_CERT_MACOS }}
-          cert_name: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
-          cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
+          cert_base64: ${{ env.SIGNING_CERT_MACOS }}
+          cert_name: ${{ env.SIGNING_CERT_MACOS_IDENTITY }}
+          cert_pass: ${{ env.SIGNING_CERT_MACOS_PASSWORD }}
           note_user: ${{ steps.note-creds.outputs.note_user }}
           note_pass: ${{ steps.note-creds.outputs.note_pass }}
           note_team: ${{ steps.note-creds.outputs.note_team }}
 
   post-windows-symbols:
+    env:
+      BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
+      BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
     needs: build
     runs-on: ubuntu-latest
     steps:
       - name: Post Windows symbols
-        uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
+        if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+        uses: secondlife/viewer-build-util/post-bugsplat-windows@v2
         with:
-          username: ${{ secrets.BUGSPLAT_USER }}
-          password: ${{ secrets.BUGSPLAT_PASS }}
+          username: ${{ env.BUGSPLAT_USER }}
+          password: ${{ env.BUGSPLAT_PASS }}
           database: "SecondLife_Viewer_2018"
           channel: ${{ needs.build.outputs.viewer_channel }}
           version: ${{ needs.build.outputs.viewer_version }}
 
   post-mac-symbols:
+    env:
+      BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
+      BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
     needs: build
     runs-on: ubuntu-latest
     steps:
       - name: Post Mac symbols
-        uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
+        if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+        uses: secondlife/viewer-build-util/post-bugsplat-mac@v2
         with:
-          username: ${{ secrets.BUGSPLAT_USER }}
-          password: ${{ secrets.BUGSPLAT_PASS }}
+          username: ${{ env.BUGSPLAT_USER }}
+          password: ${{ env.BUGSPLAT_PASS }}
           database: "SecondLife_Viewer_2018"
           channel: ${{ needs.build.outputs.viewer_channel }}
           version: ${{ needs.build.outputs.viewer_version }}
 
   release:
-    needs: [sign-and-package-windows, sign-and-package-mac]
+    needs: [build, sign-and-package-windows, sign-and-package-mac]
     runs-on: ubuntu-latest
-    if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
+      # Build with a tag like "Second_Life#abcdef0" to generate a release page (used for builds we are planning to deploy).
+    if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')
     steps:
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
-          name: Windows-installer
+          pattern: "*-installer"
 
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
-          name: macOS-installer
-
-      - uses: actions/download-artifact@v3
-        with:
-          name: Windows-metadata
-
-      - name: Rename windows metadata 
+          pattern: "*-metadata"
+      
+      - name: Rename metadata
         run: |
-          mv autobuild-package.xml Windows-autobuild-package.xml
-          mv newview/viewer_version.txt Windows-viewer_version.txt
-
-      - uses: actions/download-artifact@v3
-        with:
-          name: macOS-metadata
-
-      - name: Rename macOS metadata 
-        run: |
-          mv autobuild-package.xml macOS-autobuild-package.xml
-          mv newview/viewer_version.txt macOS-viewer_version.txt
+          cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml
+          cp Windows-metadata/newview/viewer_version.txt Windows-viewer_version.txt
+          cp macOS-metadata/autobuild-package.xml macOS-autobuild-package.xml
+          cp macOS-metadata/newview/viewer_version.txt macOS-viewer_version.txt
 
       # forked from softprops/action-gh-release
-      - uses: secondlife-3p/action-gh-release@v1
+      - name: Create GitHub release
+        id: release
+        uses: secondlife-3p/action-gh-release@v1
         with:
-          # name the release page for the build number so we can find it
-          # easily (analogous to looking up a codeticket build page)
-          name: "v${{ github.run_id }}"
+          # name the release page for the branch
+          name: "${{ needs.build.outputs.viewer_branch }}"
+          # SL-20546: want the channel and version to be visible on the
+          # release page
+          body: |
+            Build ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+            ${{ needs.build.outputs.viewer_channel }}
+            ${{ needs.build.outputs.viewer_version }}
+            ${{ needs.build.outputs.relnotes }}
           prerelease: true
           generate_release_notes: true
-          # the only reason we generate a GH release is to post build products
+          target_commitish: ${{ github.sha }}
+          previous_tag: release
+          append_body: true
           fail_on_unmatched_files: true
           files: |
-            *.dmg 
-            *.exe
+            macOS-installer/*.dmg 
+            Windows-installer/*.exe
             *-autobuild-package.xml
             *-viewer_version.txt
+
+      - name: post release URL
+        run: |
+          echo "::notice::Release ${{ steps.release.outputs.url }}"
diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml
index b4b25658899015682f0826cdd176cc4b36f2d8e9..3f4bf21864972e71c804b900af5ae70e3dba81eb 100644
--- a/.github/workflows/cla.yaml
+++ b/.github/workflows/cla.yaml
@@ -19,7 +19,7 @@ jobs:
           PERSONAL_ACCESS_TOKEN: ${{ secrets.SHARED_CLA_TOKEN }}
         with:
           branch: main
-          path-to-document: https://github.com/secondlife/cla/blob/master/CLA.md
+          path-to-document: https://github.com/secondlife/cla/blob/main/CLA.md
           path-to-signatures: signatures.json
           remote-organization-name: secondlife
           remote-repository-name: cla-signatures
diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml
index 35ac41420ca582f2bfe5f3633f516e09298e2dc6..e44e22358945c8507dd0b6242674273bacf058c2 100644
--- a/.github/workflows/stale.yaml
+++ b/.github/workflows/stale.yaml
@@ -17,7 +17,8 @@ jobs:
         with:
           stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
           days-before-stale: 30
-          days-before-close: 7 
+          days-before-close: 7
+          days-before-issue-close: -1
           exempt-pr-labels: blocked,must,should,keep
           stale-pr-label: stale
       - name: Print outputs
diff --git a/BuildParams b/BuildParams
deleted file mode 100644
index dda25e3e63686694990dd7d6b00ec2c2f09fd8ea..0000000000000000000000000000000000000000
--- a/BuildParams
+++ /dev/null
@@ -1,73 +0,0 @@
-# BuildParams
-#
-# Please refer to:
-#  https://wiki.secondlife.com/wiki/Automated_Build_System
-
-# Variants (NOTE: 'Release' must be last for uploads to work correctly)
-variants = "RelWithDebInfo Release"
-
-# Use Public Upload Locations
-public_build = true
-build_docs = true
-
-# enable Doxygen building on Linux for TeamCity (it can be done manually on any platform)
-build_Linux_Doxygen = true
-
-# Need viewer-build-variables as well as other shared repositories
-buildscripts_shared_more_NAMEs="build_secrets build_variables git_hooks"
-
-# Python 3 / SL-15742
-BUILDSCRIPTS_PY3 = "true"
-
-################################################################
-####      Examples of how to set the viewer_channel         ####
-#
-# To build a Release or Release candidate in build bingo:
-#    bingo.viewer_channel = "Second Life Release"
-#
-# To build a Beta for the 'Bingo' project in build bingo:
-#    bingo.viewer_channel = "Second Life Beta Bingo"
-#
-# To build a Project viewer for the 'Bingo' project in build bingo:
-#    bingo.viewer_channel = "Second Life Project Bingo"
-#
-# If left unset, viewer_channel defaults to 'Second Life Test',
-# which is appropriate for individual developer builds.
-#
-# All Linden Lab builds (and only Linden Lab builds)
-# should use a viewer_channel that begins with "Second Life"
-################################################################
-viewer_channel = "Second Life Test"
-
-
-################################################################
-# Special packaging parameters.
-# These parameters can be used to create additional packages
-# which identify themselves in a distinct way with either
-# a sourceid (sent to web services) or a channel name (sent to login)
-# the default sourceid should always be a null string:
-sourceid = ""
-# the additional_packages variable is a blank separated list of package prefixes:
-# additional_packages = ""
-# to set the special values for a package, create variables using each prefix:
-#   additional_packages = "Foo Bar"
-#   Foo_sourceid = "bingo"
-#   Foo_viewer_channel_suffix = "Foo"
-#   Bar_sourceid = "bongo"
-#   Bar_viewer_channel_suffix = "Bar"
-# the viewer_channel_suffix is prefixed by a blank and then appended to the viewer_channel
-# for the package in a setting that overrides the compiled-in value
-################################################################
-additional_packages = "EDU"
-Linux.additional_packages = ""
-
-# The EDU package allows us to create a separate release channel whose expirations
-# are synchronized as much as possible with the academic year
-EDU_sourceid = ""
-EDU_viewer_channel_suffix = "edu"
-
-# Notifications - to configure email notices use the TeamCity parameter
-# setting screen for your project or build configuration to set the
-# environment variable 'email' to a space-separated list of email addresses
-email=""
-
diff --git a/autobuild.xml b/autobuild.xml
index 625fe7244906790f7a464b4cce8a03b8c41b744f..ac31336b262be6ee0f17b1dbb93a367fde16643b 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1,20 +1,14 @@
 <?xml version="1.0" ?>
 <llsd>
 <map>
+    <key>version</key>
+    <string>1.3</string>
+    <key>type</key>
+    <string>autobuild</string>
     <key>installables</key>
     <map>
       <key>SDL</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 1997-2012 Sam Lantinga</string>
-        <key>description</key>
-        <string>Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.</string>
-        <key>license</key>
-        <string>lgpl</string>
-        <key>license_file</key>
-        <string>LICENSES/SDL.txt</string>
-        <key>name</key>
-        <string>SDL</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -30,21 +24,21 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>lgpl</string>
+        <key>license_file</key>
+        <string>LICENSES/SDL.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1997-2012 Sam Lantinga</string>
         <key>version</key>
         <string>1.2.15</string>
+        <key>name</key>
+        <string>SDL</string>
+        <key>description</key>
+        <string>Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.</string>
       </map>
       <key>apr_suite</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</string>
-        <key>description</key>
-        <string>Apache portable runtime project</string>
-        <key>license</key>
-        <string>apache</string>
-        <key>license_file</key>
-        <string>LICENSES/apr_suite.txt</string>
-        <key>name</key>
-        <string>apr_suite</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -88,21 +82,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>apache</string>
+        <key>license_file</key>
+        <string>LICENSES/apr_suite.txt</string>
+        <key>copyright</key>
+        <string>Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</string>
         <key>version</key>
         <string>1.7.2-e935465</string>
+        <key>name</key>
+        <string>apr_suite</string>
+        <key>description</key>
+        <string>Apache portable runtime project</string>
       </map>
       <key>boost</key>
       <map>
-        <key>copyright</key>
-        <string>(see individual source files)</string>
-        <key>description</key>
-        <string>Boost C++ Libraries</string>
-        <key>license</key>
-        <string>boost 1.0</string>
-        <key>license_file</key>
-        <string>LICENSES/boost.txt</string>
-        <key>name</key>
-        <string>boost</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -134,21 +128,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>boost 1.0</string>
+        <key>license_file</key>
+        <string>LICENSES/boost.txt</string>
+        <key>copyright</key>
+        <string>(see individual source files)</string>
         <key>version</key>
         <string>1.81-09d25a7</string>
+        <key>name</key>
+        <string>boost</string>
+        <key>description</key>
+        <string>Boost C++ Libraries</string>
       </map>
       <key>bugsplat</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2003-2017, BugSplat</string>
-        <key>description</key>
-        <string>Bugsplat crash reporting package</string>
-        <key>license</key>
-        <string>Proprietary</string>
-        <key>license_file</key>
-        <string>LICENSES/BUGSPLAT_LICENSE.txt</string>
-        <key>name</key>
-        <string>bugsplat</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -180,19 +174,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Proprietary</string>
+        <key>license_file</key>
+        <string>LICENSES/BUGSPLAT_LICENSE.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2003-2017, BugSplat</string>
         <key>version</key>
         <string>4.0.3.0-527603a</string>
+        <key>name</key>
+        <string>bugsplat</string>
+        <key>description</key>
+        <string>Bugsplat crash reporting package</string>
       </map>
       <key>colladadom</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2006 Sony Computer Entertainment Inc.</string>
-        <key>license</key>
-        <string>SCEA</string>
-        <key>license_file</key>
-        <string>LICENSES/collada.txt</string>
-        <key>name</key>
-        <string>colladadom</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -224,19 +220,19 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>SCEA</string>
+        <key>license_file</key>
+        <string>LICENSES/collada.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2006 Sony Computer Entertainment Inc.</string>
         <key>version</key>
         <string>2.3.ab0c124</string>
+        <key>name</key>
+        <string>colladadom</string>
       </map>
       <key>cubemaptoequirectangular</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2017 Jaume Sanchez Elias, http://www.clicktorelease.com</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/CUBEMAPTOEQUIRECTANGULAR_LICENSE.txt</string>
-        <key>name</key>
-        <string>cubemaptoequirectangular</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -280,21 +276,19 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/CUBEMAPTOEQUIRECTANGULAR_LICENSE.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2017 Jaume Sanchez Elias, http://www.clicktorelease.com</string>
         <key>version</key>
         <string>1.1.0</string>
+        <key>name</key>
+        <string>cubemaptoequirectangular</string>
       </map>
       <key>curl</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 1996 - 2014, Daniel Stenberg, (daniel@haxx.se).</string>
-        <key>description</key>
-        <string>Library for transferring data specified with URL syntax</string>
-        <key>license</key>
-        <string>curl</string>
-        <key>license_file</key>
-        <string>LICENSES/curl.txt</string>
-        <key>name</key>
-        <string>curl</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -338,21 +332,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>curl</string>
+        <key>license_file</key>
+        <string>LICENSES/curl.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 1996 - 2014, Daniel Stenberg, (daniel@haxx.se).</string>
         <key>version</key>
         <string>7.54.1-5a4a82d</string>
+        <key>name</key>
+        <string>curl</string>
+        <key>description</key>
+        <string>Library for transferring data specified with URL syntax</string>
       </map>
       <key>dbus_glib</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) Red Hat Inc.</string>
-        <key>description</key>
-        <string>D-Bus bindings for glib</string>
-        <key>license</key>
-        <string>Academic Free License v. 2.1</string>
-        <key>license_file</key>
-        <string>LICENSES/dbus-glib.txt</string>
-        <key>name</key>
-        <string>dbus_glib</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -368,21 +362,21 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Academic Free License v. 2.1</string>
+        <key>license_file</key>
+        <string>LICENSES/dbus-glib.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) Red Hat Inc.</string>
         <key>version</key>
         <string>0.76</string>
+        <key>name</key>
+        <string>dbus_glib</string>
+        <key>description</key>
+        <string>D-Bus bindings for glib</string>
       </map>
       <key>dictionaries</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2014 Apache OpenOffice software</string>
-        <key>description</key>
-        <string>Spell checking dictionaries to bundled into the viewer</string>
-        <key>license</key>
-        <string>various open source</string>
-        <key>license_file</key>
-        <string>LICENSES/dictionaries.txt</string>
-        <key>name</key>
-        <string>dictionaries</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -400,21 +394,21 @@
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>various open source</string>
+        <key>license_file</key>
+        <string>LICENSES/dictionaries.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2014 Apache OpenOffice software</string>
         <key>version</key>
         <string>None</string>
+        <key>name</key>
+        <string>dictionaries</string>
+        <key>description</key>
+        <string>Spell checking dictionaries to bundled into the viewer</string>
       </map>
       <key>dullahan</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2017, Linden Research, Inc.</string>
-        <key>description</key>
-        <string>A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies.</string>
-        <key>license</key>
-        <string>MPL</string>
-        <key>license_file</key>
-        <string>LICENSES/LICENSE.txt</string>
-        <key>name</key>
-        <string>dullahan</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -446,23 +440,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MPL</string>
+        <key>license_file</key>
+        <string>LICENSES/LICENSE.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2017, Linden Research, Inc.</string>
         <key>version</key>
         <string>1.14.0.202310131404_118.4.1_g3dd6078_chromium-118.0.5993.54</string>
+        <key>name</key>
+        <string>dullahan</string>
+        <key>description</key>
+        <string>A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies.</string>
       </map>
       <key>emoji_shortcodes</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://github.com/secondlife/3p-emoji-shortcodes</string>
-        <key>copyright</key>
-        <string>Copyright 2017-2019 Miles Johnson.</string>
-        <key>description</key>
-        <string>Emoji shortcodes</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/emojibase-license.txt</string>
-        <key>name</key>
-        <string>emoji_shortcodes</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -490,21 +482,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/emojibase-license.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2017-2019 Miles Johnson.</string>
         <key>version</key>
         <string>6.1.0.579438</string>
+        <key>name</key>
+        <string>emoji_shortcodes</string>
+        <key>canonical_repo</key>
+        <string>https://github.com/secondlife/3p-emoji-shortcodes</string>
+        <key>description</key>
+        <string>Emoji shortcodes</string>
       </map>
       <key>expat</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.</string>
-        <key>description</key>
-        <string>Expat is an XML parser library written in C</string>
-        <key>license</key>
-        <string>expat</string>
-        <key>license_file</key>
-        <string>LICENSES/expat.txt</string>
-        <key>name</key>
-        <string>expat</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -550,21 +544,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>expat</string>
+        <key>license_file</key>
+        <string>LICENSES/expat.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.</string>
         <key>version</key>
         <string>2.1.1.1f36d02</string>
+        <key>name</key>
+        <string>expat</string>
+        <key>description</key>
+        <string>Expat is an XML parser library written in C</string>
       </map>
       <key>fmodstudio</key>
       <map>
-        <key>copyright</key>
-        <string>FMOD Studio by Firelight Technologies Pty Ltd.</string>
-        <key>description</key>
-        <string>FMOD Studio API</string>
-        <key>license</key>
-        <string>fmod</string>
-        <key>license_file</key>
-        <string>LICENSES/fmodstudio.txt</string>
-        <key>name</key>
-        <string>fmodstudio</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -616,21 +610,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>fmod</string>
+        <key>license_file</key>
+        <string>LICENSES/fmodstudio.txt</string>
+        <key>copyright</key>
+        <string>FMOD Studio by Firelight Technologies Pty Ltd.</string>
         <key>version</key>
         <string>2.02.13.578928</string>
+        <key>name</key>
+        <string>fmodstudio</string>
+        <key>description</key>
+        <string>FMOD Studio API</string>
       </map>
       <key>fontconfig</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 2000,2001,2002,2003,2004,2006,2007 Keith Packard, 2005 Patrick Lam, 2009 Roozbeh Pournader, 2008,2009 Red Hat, Inc., 2008 Danilo Å egan, 2012 Google, Inc.</string>
-        <key>description</key>
-        <string>Fontconfig is a library for configuring and customizing font access.</string>
-        <key>license</key>
-        <string>bsd</string>
-        <key>license_file</key>
-        <string>LICENSES/fontconfig.txt</string>
-        <key>name</key>
-        <string>fontconfig</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -646,21 +640,21 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>bsd</string>
+        <key>license_file</key>
+        <string>LICENSES/fontconfig.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 2000,2001,2002,2003,2004,2006,2007 Keith Packard, 2005 Patrick Lam, 2009 Roozbeh Pournader, 2008,2009 Red Hat, Inc., 2008 Danilo Å egan, 2012 Google, Inc.</string>
         <key>version</key>
         <string>2.11.0</string>
+        <key>name</key>
+        <string>fontconfig</string>
+        <key>description</key>
+        <string>Fontconfig is a library for configuring and customizing font access.</string>
       </map>
       <key>freetype</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string>
-        <key>description</key>
-        <string>Font rendering library</string>
-        <key>license</key>
-        <string>FreeType</string>
-        <key>license_file</key>
-        <string>LICENSES/freetype.txt</string>
-        <key>name</key>
-        <string>freetype</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -720,21 +714,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>FreeType</string>
+        <key>license_file</key>
+        <string>LICENSES/freetype.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string>
         <key>version</key>
         <string>2.12.1.557becd</string>
+        <key>name</key>
+        <string>freetype</string>
+        <key>description</key>
+        <string>Font rendering library</string>
       </map>
       <key>glext</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2007-2010 The Khronos Group Inc.</string>
-        <key>description</key>
-        <string>glext headers define function prototypes and constants for OpenGL extensions</string>
-        <key>license</key>
-        <string>Copyright (c) 2007-2010 The Khronos Group Inc.</string>
-        <key>license_file</key>
-        <string>LICENSES/glext.txt</string>
-        <key>name</key>
-        <string>glext</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -752,21 +746,21 @@
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Copyright (c) 2007-2010 The Khronos Group Inc.</string>
+        <key>license_file</key>
+        <string>LICENSES/glext.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2007-2010 The Khronos Group Inc.</string>
         <key>version</key>
         <string>68</string>
+        <key>name</key>
+        <string>glext</string>
+        <key>description</key>
+        <string>glext headers define function prototypes and constants for OpenGL extensions</string>
       </map>
       <key>glh_linear</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2000 Cass Everitt</string>
-        <key>description</key>
-        <string>glh - is a platform-indepenedent C++ OpenGL helper library</string>
-        <key>license</key>
-        <string>BSD</string>
-        <key>license_file</key>
-        <string>LICENSES/glh-linear.txt</string>
-        <key>name</key>
-        <string>glh_linear</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -784,21 +778,21 @@
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>BSD</string>
+        <key>license_file</key>
+        <string>LICENSES/glh-linear.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2000 Cass Everitt</string>
         <key>version</key>
         <string>None</string>
+        <key>name</key>
+        <string>glh_linear</string>
+        <key>description</key>
+        <string>glh - is a platform-indepenedent C++ OpenGL helper library</string>
       </map>
       <key>googlemock</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2008, Google Inc.</string>
-        <key>description</key>
-        <string>a library for writing and using C++ mock classes</string>
-        <key>license</key>
-        <string>BSD</string>
-        <key>license_file</key>
-        <string>LICENSES/gmock.txt</string>
-        <key>name</key>
-        <string>googlemock</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -830,19 +824,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>BSD</string>
+        <key>license_file</key>
+        <string>LICENSES/gmock.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2008, Google Inc.</string>
         <key>version</key>
         <string>1.7.0.2b109d4</string>
+        <key>name</key>
+        <string>googlemock</string>
+        <key>description</key>
+        <string>a library for writing and using C++ mock classes</string>
       </map>
       <key>gstreamer</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;</string>
-        <key>license</key>
-        <string>LGPL</string>
-        <key>license_file</key>
-        <string>LICENSES/gstreamer.txt</string>
-        <key>name</key>
-        <string>gstreamer</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -858,19 +854,19 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>LGPL</string>
+        <key>license_file</key>
+        <string>LICENSES/gstreamer.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;</string>
         <key>version</key>
         <string>0.10.6.314267</string>
+        <key>name</key>
+        <string>gstreamer</string>
       </map>
       <key>gtk-atk-pango-glib</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (various, see sources)</string>
-        <key>license</key>
-        <string>lgpl</string>
-        <key>license_file</key>
-        <string>LICENSES/gtk-atk-pango-glib.txt</string>
-        <key>name</key>
-        <string>gtk-atk-pango-glib</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -886,21 +882,19 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>lgpl</string>
+        <key>license_file</key>
+        <string>LICENSES/gtk-atk-pango-glib.txt</string>
+        <key>copyright</key>
+        <string>Copyright (various, see sources)</string>
         <key>version</key>
         <string>0.1</string>
+        <key>name</key>
+        <string>gtk-atk-pango-glib</string>
       </map>
       <key>havok-source</key>
       <map>
-        <key>copyright</key>
-        <string>Uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.</string>
-        <key>description</key>
-        <string>Havok source code for libs and demos</string>
-        <key>license</key>
-        <string>havok</string>
-        <key>license_file</key>
-        <string>LICENSES/havok.txt</string>
-        <key>name</key>
-        <string>havok-source</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -948,23 +942,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>havok</string>
+        <key>license_file</key>
+        <string>LICENSES/havok.txt</string>
+        <key>copyright</key>
+        <string>Uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.</string>
         <key>version</key>
         <string>2012.1-2</string>
+        <key>name</key>
+        <string>havok-source</string>
+        <key>description</key>
+        <string>Havok source code for libs and demos</string>
       </map>
       <key>icu4c</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-icu4c</string>
-        <key>copyright</key>
-        <string>Copyright (c) 1995-2011 International Business Machines Corporation and others &lt;http://source.icu-project.org&gt;</string>
-        <key>description</key>
-        <string>ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.</string>
-        <key>license</key>
-        <string>ICU, permissive non-copyleft free software license</string>
-        <key>license_file</key>
-        <string>LICENSES/icu.txt</string>
-        <key>name</key>
-        <string>icu4c</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -996,19 +988,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>ICU, permissive non-copyleft free software license</string>
+        <key>license_file</key>
+        <string>LICENSES/icu.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 1995-2011 International Business Machines Corporation and others &lt;http://source.icu-project.org&gt;</string>
         <key>version</key>
         <string>4.8.1-7d08d82</string>
+        <key>name</key>
+        <string>icu4c</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-icu4c</string>
+        <key>description</key>
+        <string>ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.</string>
       </map>
       <key>jpegencoderbasic</key>
       <map>
-        <key>copyright</key>
-        <string>Andreas Ritter, www.bytestrom.eu, 11/2009</string>
-        <key>license</key>
-        <string>NONE</string>
-        <key>license_file</key>
-        <string>LICENSES/JPEG_ENCODER_BASIC_LICENSE.txt</string>
-        <key>name</key>
-        <string>jpegencoderbasic</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1052,21 +1048,19 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>NONE</string>
+        <key>license_file</key>
+        <string>LICENSES/JPEG_ENCODER_BASIC_LICENSE.txt</string>
+        <key>copyright</key>
+        <string>Andreas Ritter, www.bytestrom.eu, 11/2009</string>
         <key>version</key>
         <string>1.0</string>
+        <key>name</key>
+        <string>jpegencoderbasic</string>
       </map>
       <key>jpeglib</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.</string>
-        <key>description</key>
-        <string>JPEG encoding, decoding library</string>
-        <key>license</key>
-        <string>jpeglib</string>
-        <key>license_file</key>
-        <string>LICENSES/jpeglib.txt</string>
-        <key>name</key>
-        <string>jpeglib</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1112,21 +1106,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>jpeglib</string>
+        <key>license_file</key>
+        <string>LICENSES/jpeglib.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.</string>
         <key>version</key>
         <string>8c.7846234</string>
+        <key>name</key>
+        <string>jpeglib</string>
+        <key>description</key>
+        <string>JPEG encoding, decoding library</string>
       </map>
       <key>jsoncpp</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2007-2010 Baptiste Lepilleur</string>
-        <key>description</key>
-        <string>jsoncpp is an implementation of a JSON (http://json.org) reader and writer in C++.</string>
-        <key>license</key>
-        <string>public domain</string>
-        <key>license_file</key>
-        <string>LICENSES/jsoncpp.txt</string>
-        <key>name</key>
-        <string>jsoncpp</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1172,21 +1166,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>public domain</string>
+        <key>license_file</key>
+        <string>LICENSES/jsoncpp.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2007-2010 Baptiste Lepilleur</string>
         <key>version</key>
         <string>0.5.0.bc46e62</string>
+        <key>name</key>
+        <string>jsoncpp</string>
+        <key>description</key>
+        <string>jsoncpp is an implementation of a JSON (http://json.org) reader and writer in C++.</string>
       </map>
       <key>kdu</key>
       <map>
-        <key>copyright</key>
-        <string>Kakadu software</string>
-        <key>description</key>
-        <string>JPEG2000 library by Kakadu</string>
-        <key>license</key>
-        <string>Kakadu</string>
-        <key>license_file</key>
-        <string>LICENSES/kdu.txt</string>
-        <key>name</key>
-        <string>kdu</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1238,21 +1232,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Kakadu</string>
+        <key>license_file</key>
+        <string>LICENSES/kdu.txt</string>
+        <key>copyright</key>
+        <string>Kakadu software</string>
         <key>version</key>
         <string>7.10.4.539108</string>
+        <key>name</key>
+        <string>kdu</string>
+        <key>description</key>
+        <string>JPEG2000 library by Kakadu</string>
       </map>
       <key>libhunspell</key>
       <map>
-        <key>copyright</key>
-        <string>See hunspell.txt</string>
-        <key>description</key>
-        <string>Spell checking library</string>
-        <key>license</key>
-        <string>LGPL</string>
-        <key>license_file</key>
-        <string>LICENSES/hunspell.txt</string>
-        <key>name</key>
-        <string>libhunspell</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1298,21 +1292,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>LGPL</string>
+        <key>license_file</key>
+        <string>LICENSES/hunspell.txt</string>
+        <key>copyright</key>
+        <string>See hunspell.txt</string>
         <key>version</key>
         <string>1.3.2.650fb94</string>
+        <key>name</key>
+        <string>libhunspell</string>
+        <key>description</key>
+        <string>Spell checking library</string>
       </map>
       <key>libndofdev</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2007, 3Dconnexion, Inc. - All rights reserved.</string>
-        <key>description</key>
-        <string>3DConnexion SDK</string>
-        <key>license</key>
-        <string>BSD</string>
-        <key>license_file</key>
-        <string>LICENSES/libndofdev.txt</string>
-        <key>name</key>
-        <string>libndofdev</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1344,21 +1338,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>BSD</string>
+        <key>license_file</key>
+        <string>LICENSES/libndofdev.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2007, 3Dconnexion, Inc. - All rights reserved.</string>
         <key>version</key>
         <string>0.1.8e9edc7</string>
+        <key>name</key>
+        <string>libndofdev</string>
+        <key>description</key>
+        <string>3DConnexion SDK</string>
       </map>
       <key>libpng</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson</string>
-        <key>description</key>
-        <string>PNG Reference library</string>
-        <key>license</key>
-        <string>libpng</string>
-        <key>license_file</key>
-        <string>LICENSES/libpng.txt</string>
-        <key>name</key>
-        <string>libpng</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1402,21 +1396,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>libpng</string>
+        <key>license_file</key>
+        <string>LICENSES/libpng.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson</string>
         <key>version</key>
         <string>1.6.38-ca06e99</string>
+        <key>name</key>
+        <string>libpng</string>
+        <key>description</key>
+        <string>PNG Reference library</string>
       </map>
       <key>libuuid</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2004-2008 The OSSP Project &lt;http://www.ossp.org/&gt;</string>
-        <key>description</key>
-        <string>OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique Identifier (UUID). </string>
-        <key>license</key>
-        <string>UUID</string>
-        <key>license_file</key>
-        <string>LICENSES/uuid.txt</string>
-        <key>name</key>
-        <string>libuuid</string>
         <key>platforms</key>
         <map>
           <key>linux64</key>
@@ -1432,21 +1426,21 @@
             <string>linux64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>UUID</string>
+        <key>license_file</key>
+        <string>LICENSES/uuid.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2004-2008 The OSSP Project &lt;http://www.ossp.org/&gt;</string>
         <key>version</key>
         <string>1.6.2</string>
+        <key>name</key>
+        <string>libuuid</string>
+        <key>description</key>
+        <string>OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique Identifier (UUID). </string>
       </map>
       <key>libxml2</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 1998-2012 Daniel Veillard.  All Rights Reserved.</string>
-        <key>description</key>
-        <string>Libxml2 is the XML C parser and toolkit developed for the Gnome project.</string>
-        <key>license</key>
-        <string>mit</string>
-        <key>license_file</key>
-        <string>LICENSES/libxml2.txt</string>
-        <key>name</key>
-        <string>libxml2</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1492,21 +1486,21 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>mit</string>
+        <key>license_file</key>
+        <string>LICENSES/libxml2.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1998-2012 Daniel Veillard.  All Rights Reserved.</string>
         <key>version</key>
         <string>2.9.4.7476681</string>
+        <key>name</key>
+        <string>libxml2</string>
+        <key>description</key>
+        <string>Libxml2 is the XML C parser and toolkit developed for the Gnome project.</string>
       </map>
       <key>llappearance_utility</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2000-2012, Linden Research, Inc.</string>
-        <key>description</key>
-        <string>Linden Lab appearance utility for server-side avatar baking services.</string>
-        <key>license</key>
-        <string>Proprietary</string>
-        <key>license_file</key>
-        <string>LICENSES/llappearanceutility.txt</string>
-        <key>name</key>
-        <string>llappearance_utility</string>
         <key>platforms</key>
         <map>
           <key>linux</key>
@@ -1522,20 +1516,21 @@
             <string>linux</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Proprietary</string>
+        <key>license_file</key>
+        <string>LICENSES/llappearanceutility.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2000-2012, Linden Research, Inc.</string>
         <key>version</key>
         <string>0.0.1</string>
+        <key>name</key>
+        <string>llappearance_utility</string>
+        <key>description</key>
+        <string>Linden Lab appearance utility for server-side avatar baking services.</string>
       </map>
       <key>llca</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
-      </string>
-        <key>license</key>
-        <string>mit</string>
-        <key>license_file</key>
-        <string>LICENSES/ca-license.txt</string>
-        <key>name</key>
-        <string>llca</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -1553,19 +1548,20 @@
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>mit</string>
+        <key>license_file</key>
+        <string>LICENSES/ca-license.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
+      </string>
         <key>version</key>
         <string>202310121530.0</string>
+        <key>name</key>
+        <string>llca</string>
       </map>
       <key>llphysicsextensions_source</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2010, Linden Research, Inc.</string>
-        <key>license</key>
-        <string>internal</string>
-        <key>license_file</key>
-        <string>LICENSES/llphysicsextensions.txt</string>
-        <key>name</key>
-        <string>llphysicsextensions_source</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1617,19 +1613,19 @@
             <string>windows64</string>
           </map>
         </map>
-        <key>version</key>
-        <string>1.0.565768</string>
-      </map>
-      <key>llphysicsextensions_stub</key>
-      <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2010, Linden Research, Inc.</string>
         <key>license</key>
         <string>internal</string>
         <key>license_file</key>
         <string>LICENSES/llphysicsextensions.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2010, Linden Research, Inc.</string>
+        <key>version</key>
+        <string>1.0.565768</string>
         <key>name</key>
-        <string>llphysicsextensions_stub</string>
+        <string>llphysicsextensions_source</string>
+      </map>
+      <key>llphysicsextensions_stub</key>
+      <map>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1669,19 +1665,19 @@
             <string>windows</string>
           </map>
         </map>
+        <key>license</key>
+        <string>internal</string>
+        <key>license_file</key>
+        <string>LICENSES/llphysicsextensions.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2010, Linden Research, Inc.</string>
         <key>version</key>
         <string>1.0.542456</string>
+        <key>name</key>
+        <string>llphysicsextensions_stub</string>
       </map>
       <key>llphysicsextensions_tpv</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2010, Linden Research, Inc.</string>
-        <key>license</key>
-        <string>internal</string>
-        <key>license_file</key>
-        <string>LICENSES/HavokSublicense.pdf</string>
-        <key>name</key>
-        <string>llphysicsextensions_tpv</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1721,17 +1717,19 @@
             <string>windows</string>
           </map>
         </map>
+        <key>license</key>
+        <string>internal</string>
+        <key>license_file</key>
+        <string>LICENSES/HavokSublicense.pdf</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2010, Linden Research, Inc.</string>
         <key>version</key>
         <string>1.0.561752</string>
+        <key>name</key>
+        <string>llphysicsextensions_tpv</string>
       </map>
       <key>mesa</key>
       <map>
-        <key>license</key>
-        <string>mesa</string>
-        <key>license_file</key>
-        <string>LICENSES/mesa.txt</string>
-        <key>name</key>
-        <string>mesa</string>
         <key>platforms</key>
         <map>
           <key>linux</key>
@@ -1747,23 +1745,17 @@
             <string>linux</string>
           </map>
         </map>
+        <key>license</key>
+        <string>mesa</string>
+        <key>license_file</key>
+        <string>LICENSES/mesa.txt</string>
         <key>version</key>
         <string>7.11.1.297294</string>
+        <key>name</key>
+        <string>mesa</string>
       </map>
       <key>meshoptimizer</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-meshoptimizer</string>
-        <key>copyright</key>
-        <string>Copyright (c) 2016-2021 Arseny Kapoulkine</string>
-        <key>description</key>
-        <string>Meshoptimizer. Mesh optimization library.</string>
-        <key>license</key>
-        <string>meshoptimizer</string>
-        <key>license_file</key>
-        <string>LICENSES/meshoptimizer.txt</string>
-        <key>name</key>
-        <string>meshoptimizer</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1795,23 +1787,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>meshoptimizer</string>
+        <key>license_file</key>
+        <string>LICENSES/meshoptimizer.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2016-2021 Arseny Kapoulkine</string>
         <key>version</key>
         <string>160</string>
+        <key>name</key>
+        <string>meshoptimizer</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-meshoptimizer</string>
+        <key>description</key>
+        <string>Meshoptimizer. Mesh optimization library.</string>
       </map>
       <key>mikktspace</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-mikktspace</string>
-        <key>copyright</key>
-        <string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
-        <key>description</key>
-        <string>Mikktspace Tangent Generator</string>
-        <key>license</key>
-        <string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
-        <key>license_file</key>
-        <string>mikktspace.txt</string>
-        <key>name</key>
-        <string>mikktspace</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1851,23 +1843,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
+        <key>license_file</key>
+        <string>mikktspace.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
         <key>version</key>
         <string>1</string>
+        <key>name</key>
+        <string>mikktspace</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-mikktspace</string>
+        <key>description</key>
+        <string>Mikktspace Tangent Generator</string>
       </map>
       <key>minizip-ng</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-minizip-ng</string>
-        <key>copyright</key>
-        <string>This project uses the zlib license. Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
-        <key>description</key>
-        <string>minizip-ng is a zip manipulation library. Based on work of Gilles Vollant.</string>
-        <key>license</key>
-        <string>minizip-ng</string>
-        <key>license_file</key>
-        <string>LICENSES/minizip-ng.txt</string>
-        <key>name</key>
-        <string>minizip-ng</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1913,23 +1905,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>minizip-ng</string>
+        <key>license_file</key>
+        <string>LICENSES/minizip-ng.txt</string>
+        <key>copyright</key>
+        <string>This project uses the zlib license. Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
         <key>version</key>
         <string>3.0.2.3e9876e</string>
+        <key>name</key>
+        <string>minizip-ng</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-minizip-ng</string>
+        <key>description</key>
+        <string>minizip-ng is a zip manipulation library. Based on work of Gilles Vollant.</string>
       </map>
       <key>nanosvg</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-nanosvg</string>
-        <key>copyright</key>
-        <string>Copyright (c) 2013-14 Mikko Mononen</string>
-        <key>description</key>
-        <string>NanoSVG is a simple single-header-file SVG parser and rasterizer</string>
-        <key>license</key>
-        <string>Zlib</string>
-        <key>license_file</key>
-        <string>LICENSES/nanosvg.txt</string>
-        <key>name</key>
-        <string>nanosvg</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -1969,22 +1961,23 @@
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Zlib</string>
+        <key>license_file</key>
+        <string>LICENSES/nanosvg.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2013-14 Mikko Mononen</string>
         <key>version</key>
         <string>2022.09.27</string>
+        <key>name</key>
+        <string>nanosvg</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-nanosvg</string>
+        <key>description</key>
+        <string>NanoSVG is a simple single-header-file SVG parser and rasterizer</string>
       </map>
       <key>nghttp2</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
-Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
-        <key>description</key>
-        <string>Library providing HTTP 2 support for libcurl</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/nghttp2.txt</string>
-        <key>name</key>
-        <string>nghttp2</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2030,23 +2023,24 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
-        <key>source_type</key>
-        <string>hg</string>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/nghttp2.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
+Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
         <key>version</key>
         <string>1.40.0.b1526c6</string>
+        <key>name</key>
+        <string>nghttp2</string>
+        <key>description</key>
+        <string>Library providing HTTP 2 support for libcurl</string>
+        <key>source_type</key>
+        <string>hg</string>
       </map>
       <key>nvapi</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright © 2012 NVIDIA Corporation.  All rights reserved.</string>
-        <key>description</key>
-        <string>NVAPI provides an interface to NVIDIA devices.</string>
-        <key>license</key>
-        <string>NVIDIA Corporation Software License Agreement – NVAPI SDK</string>
-        <key>license_file</key>
-        <string>LICENSES/NVAPI_SDK_License_Agreement.pdf</string>
-        <key>name</key>
-        <string>nvapi</string>
         <key>platforms</key>
         <map>
           <key>windows64</key>
@@ -2064,21 +2058,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>NVIDIA Corporation Software License Agreement – NVAPI SDK</string>
+        <key>license_file</key>
+        <string>LICENSES/NVAPI_SDK_License_Agreement.pdf</string>
+        <key>copyright</key>
+        <string>Copyright © 2012 NVIDIA Corporation.  All rights reserved.</string>
         <key>version</key>
         <string>352.aac0e19</string>
+        <key>name</key>
+        <string>nvapi</string>
+        <key>description</key>
+        <string>NVAPI provides an interface to NVIDIA devices.</string>
       </map>
       <key>ogg_vorbis</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2002, Xiph.org Foundation</string>
-        <key>description</key>
-        <string>Audio encoding library</string>
-        <key>license</key>
-        <string>ogg-vorbis</string>
-        <key>license_file</key>
-        <string>LICENSES/ogg-vorbis.txt</string>
-        <key>name</key>
-        <string>ogg_vorbis</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2122,96 +2116,96 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>ogg-vorbis</string>
+        <key>license_file</key>
+        <string>LICENSES/ogg-vorbis.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2002, Xiph.org Foundation</string>
         <key>version</key>
         <string>1.3.3-1.3.6.e4101b6</string>
+        <key>name</key>
+        <string>ogg_vorbis</string>
+        <key>description</key>
+        <string>Audio encoding library</string>
       </map>
       <key>open-libndofdev</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2008, Jan Ciger (jan.ciger (at) gmail.com)</string>
-        <key>description</key>
-        <string>Open Source replacement for 3DConnection SDK</string>
         <key>license</key>
         <string>BSD</string>
         <key>license_file</key>
         <string>LICENSES/libndofdev.txt</string>
-        <key>name</key>
-        <string>open-libndofdev</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2008, Jan Ciger (jan.ciger (at) gmail.com)</string>
         <key>version</key>
         <string>0.3</string>
+        <key>name</key>
+        <string>open-libndofdev</string>
+        <key>description</key>
+        <string>Open Source replacement for 3DConnection SDK</string>
       </map>
       <key>openal</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 1999-2007 by authors.</string>
-        <key>description</key>
-        <string>OpenAL Soft is a software implementation of the OpenAL 3D audio API.</string>
-        <key>license</key>
-        <string>LGPL2</string>
-        <key>license_file</key>
-        <string>LICENSES/openal-soft.txt</string>
-        <key>name</key>
-        <string>openal</string>
         <key>platforms</key>
         <map>
-          <key>darwin64</key>
+          <key>linux64</key>
           <map>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>4edaef5f03a1122eae8467c4a04d9caccaaaf847</string>
+              <string>e0fbc4874acc4167a6e2b6489fbb8258d98fd665</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-darwin64-18e315c.tar.zst</string>
+              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-linux64-18e315c.tar.zst</string>
             </map>
             <key>name</key>
-            <string>darwin64</string>
+            <string>linux64</string>
           </map>
-          <key>linux64</key>
+          <key>windows64</key>
           <map>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>e0fbc4874acc4167a6e2b6489fbb8258d98fd665</string>
+              <string>6ae3b5310eb1988741bc55416681ca9d64f76f85</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-linux64-18e315c.tar.zst</string>
+              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-windows64-18e315c.tar.zst</string>
             </map>
             <key>name</key>
-            <string>linux64</string>
+            <string>windows64</string>
           </map>
-          <key>windows64</key>
+          <key>darwin64</key>
           <map>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>6ae3b5310eb1988741bc55416681ca9d64f76f85</string>
+              <string>4edaef5f03a1122eae8467c4a04d9caccaaaf847</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-windows64-18e315c.tar.zst</string>
+              <string>https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-darwin64-18e315c.tar.zst</string>
             </map>
             <key>name</key>
-            <string>windows64</string>
+            <string>darwin64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>LGPL2</string>
+        <key>license_file</key>
+        <string>LICENSES/openal-soft.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1999-2007 by authors.</string>
         <key>version</key>
         <string>1.23.1</string>
+        <key>name</key>
+        <string>openal</string>
+        <key>description</key>
+        <string>OpenAL Soft is a software implementation of the OpenAL 3D audio API.</string>
       </map>
       <key>openjpeg</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium; Copyright (c) 2002-2007, Professor Benoit Macq; Copyright (c) 2001-2003, David Janssens; Copyright (c) 2002-2003, Yannick Verschueren; Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe; Copyright (c) 2005, Herve Drolon, FreeImage Team; Copyright (c) 2006-2007, Parvatha Elangovan; Copyright (c) 2008, Jerome Fimes, Communications &amp; Systemes &lt;jerome.fimes@c-s.fr&gt;; Copyright (c) 2010-2011, Kaori Hagihara; Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France; Copyright (c) 2012, CS Systemes d'Information, France;</string>
-        <key>description</key>
-        <string>The OpenJPEG library is an open-source JPEG 2000 codec written in C language.</string>
-        <key>license</key>
-        <string>BSD</string>
-        <key>license_file</key>
-        <string>LICENSES/openjpeg.txt</string>
-        <key>name</key>
-        <string>openjpeg</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2257,21 +2251,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>BSD</string>
+        <key>license_file</key>
+        <string>LICENSES/openjpeg.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium; Copyright (c) 2002-2007, Professor Benoit Macq; Copyright (c) 2001-2003, David Janssens; Copyright (c) 2002-2003, Yannick Verschueren; Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe; Copyright (c) 2005, Herve Drolon, FreeImage Team; Copyright (c) 2006-2007, Parvatha Elangovan; Copyright (c) 2008, Jerome Fimes, Communications &amp; Systemes &lt;jerome.fimes@c-s.fr&gt;; Copyright (c) 2010-2011, Kaori Hagihara; Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France; Copyright (c) 2012, CS Systemes d'Information, France;</string>
         <key>version</key>
         <string>2.5.0.ea12248</string>
+        <key>name</key>
+        <string>openjpeg</string>
+        <key>description</key>
+        <string>The OpenJPEG library is an open-source JPEG 2000 codec written in C language.</string>
       </map>
       <key>openssl</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved; Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)</string>
-        <key>description</key>
-        <string>Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) Library</string>
-        <key>license</key>
-        <string>openssl</string>
-        <key>license_file</key>
-        <string>LICENSES/openssl.txt</string>
-        <key>name</key>
-        <string>openssl</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2317,21 +2311,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>openssl</string>
+        <key>license_file</key>
+        <string>LICENSES/openssl.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved; Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)</string>
         <key>version</key>
         <string>1.1.1q.de53f55</string>
+        <key>name</key>
+        <string>openssl</string>
+        <key>description</key>
+        <string>Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) Library</string>
       </map>
       <key>pcre</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 1997-2014 University of Cambridge; Copyright(c) 2009-2014 Zoltan Herczeg; Copyright (c) 2007-2012, Google Inc.</string>
-        <key>description</key>
-        <string>PCRE Perl-compatible regular expression library</string>
-        <key>license</key>
-        <string>bsd</string>
-        <key>license_file</key>
-        <string>LICENSES/pcre-license.txt</string>
-        <key>name</key>
-        <string>pcre</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2375,21 +2369,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>bsd</string>
+        <key>license_file</key>
+        <string>LICENSES/pcre-license.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 1997-2014 University of Cambridge; Copyright(c) 2009-2014 Zoltan Herczeg; Copyright (c) 2007-2012, Google Inc.</string>
         <key>version</key>
         <string>8.35.979fd86</string>
+        <key>name</key>
+        <string>pcre</string>
+        <key>description</key>
+        <string>PCRE Perl-compatible regular expression library</string>
       </map>
       <key>slvoice</key>
       <map>
-        <key>copyright</key>
-        <string>2010 Vivox, including audio coding using Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)</string>
-        <key>description</key>
-        <string>Vivox SDK components</string>
-        <key>license</key>
-        <string>Mixed</string>
-        <key>license_file</key>
-        <string>LICENSES/vivox_licenses.txt</string>
-        <key>name</key>
-        <string>slvoice</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2437,19 +2431,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Mixed</string>
+        <key>license_file</key>
+        <string>LICENSES/vivox_licenses.txt</string>
+        <key>copyright</key>
+        <string>2010 Vivox, including audio coding using Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)</string>
         <key>version</key>
         <string>4.10.0000.32327.5fc3fe7c.571099</string>
+        <key>name</key>
+        <string>slvoice</string>
+        <key>description</key>
+        <string>Vivox SDK components</string>
       </map>
       <key>threejs</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright © 2010-2021 three.js authors</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/THREEJS_LICENSE.txt</string>
-        <key>name</key>
-        <string>threejs</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2493,23 +2489,19 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/THREEJS_LICENSE.txt</string>
+        <key>copyright</key>
+        <string>Copyright © 2010-2021 three.js authors</string>
         <key>version</key>
         <string>0.132.2</string>
+        <key>name</key>
+        <string>threejs</string>
       </map>
       <key>tinygltf</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
-        <key>copyright</key>
-        <string>// Copyright (c) 2015 - Present Syoyo Fujita, Aurélien Chatelain and many contributors.</string>
-        <key>description</key>
-        <string>tinygltf import library</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/tinygltf_license.txt</string>
-        <key>name</key>
-        <string>tinygltf</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -2525,27 +2517,27 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/tinygltf_license.txt</string>
+        <key>copyright</key>
+        <string>// Copyright (c) 2015 - Present Syoyo Fujita, Aurélien Chatelain and many contributors.</string>
+        <key>version</key>
+        <string>v2.5.0</string>
+        <key>name</key>
+        <string>tinygltf</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
+        <key>description</key>
+        <string>tinygltf import library</string>
         <key>source</key>
         <string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
         <key>source_type</key>
         <string>git</string>
-        <key>version</key>
-        <string>v2.5.0</string>
       </map>
       <key>tracy</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-tracy</string>
-        <key>copyright</key>
-        <string>Copyright (c) 2017-2022, Bartosz Taudul (wolf@nereid.pl)</string>
-        <key>description</key>
-        <string>Tracy Profiler Library</string>
-        <key>license</key>
-        <string>bsd</string>
-        <key>license_file</key>
-        <string>LICENSES/tracy_license.txt</string>
-        <key>name</key>
-        <string>tracy</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2575,25 +2567,27 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>bsd</string>
+        <key>license_file</key>
+        <string>LICENSES/tracy_license.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2017-2022, Bartosz Taudul (wolf@nereid.pl)</string>
+        <key>version</key>
+        <string>v0.8.1.578241</string>
+        <key>name</key>
+        <string>tracy</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-tracy</string>
+        <key>description</key>
+        <string>Tracy Profiler Library</string>
         <key>source</key>
         <string>https://bitbucket.org/lindenlab/3p-tracy</string>
         <key>source_type</key>
         <string>git</string>
-        <key>version</key>
-        <string>v0.8.1.578241</string>
       </map>
       <key>tut</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2002-2006 Vladimir Dyuzhev, Copyright 2007 Denis Kononenko, Copyright 2008-2009 Michał Rzechonek</string>
-        <key>description</key>
-        <string>TUT is a small and portable unit test framework for C++.</string>
-        <key>license</key>
-        <string>bsd</string>
-        <key>license_file</key>
-        <string>LICENSES/tut.txt</string>
-        <key>name</key>
-        <string>tut</string>
         <key>platforms</key>
         <map>
           <key>common</key>
@@ -2611,21 +2605,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>common</string>
           </map>
         </map>
+        <key>license</key>
+        <string>bsd</string>
+        <key>license_file</key>
+        <string>LICENSES/tut.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2002-2006 Vladimir Dyuzhev, Copyright 2007 Denis Kononenko, Copyright 2008-2009 Michał Rzechonek</string>
         <key>version</key>
         <string>2008.11.30</string>
+        <key>name</key>
+        <string>tut</string>
+        <key>description</key>
+        <string>TUT is a small and portable unit test framework for C++.</string>
       </map>
       <key>uriparser</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 2007, Weijia Song &lt;songweijia@gmail.com&gt;, Sebastian Pipping &lt;webmaster@hartwork.org&gt;</string>
-        <key>description</key>
-        <string>uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode and is licensed under the New BSD license.</string>
-        <key>license</key>
-        <string>New BSD license</string>
-        <key>license_file</key>
-        <string>LICENSES/uriparser.txt</string>
-        <key>name</key>
-        <string>uriparser</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2671,21 +2665,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>New BSD license</string>
+        <key>license_file</key>
+        <string>LICENSES/uriparser.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 2007, Weijia Song &lt;songweijia@gmail.com&gt;, Sebastian Pipping &lt;webmaster@hartwork.org&gt;</string>
         <key>version</key>
         <string>0.9.4</string>
+        <key>name</key>
+        <string>uriparser</string>
+        <key>description</key>
+        <string>uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode and is licensed under the New BSD license.</string>
       </map>
       <key>viewer-fonts</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright 2016-2022 Brad Erickson CC-BY-4.0/MIT, Copyright 2016-2022 Twitter, Inc. CC-BY-4.0, Copyright 2013 Joe Loughry and Terence Eden MIT</string>
-        <key>description</key>
-        <string>Viewer fonts</string>
-        <key>license</key>
-        <string>Various open source</string>
-        <key>license_file</key>
-        <string>LICENSES/fonts.txt</string>
-        <key>name</key>
-        <string>viewer-fonts</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2713,21 +2707,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Various open source</string>
+        <key>license_file</key>
+        <string>LICENSES/fonts.txt</string>
+        <key>copyright</key>
+        <string>Copyright 2016-2022 Brad Erickson CC-BY-4.0/MIT, Copyright 2016-2022 Twitter, Inc. CC-BY-4.0, Copyright 2013 Joe Loughry and Terence Eden MIT</string>
         <key>version</key>
         <string>1.579464</string>
+        <key>name</key>
+        <string>viewer-fonts</string>
+        <key>description</key>
+        <string>Viewer fonts</string>
       </map>
       <key>viewer-manager</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2000-2012, Linden Research, Inc.</string>
-        <key>description</key>
-        <string>Linden Lab Viewer Management Process suite.</string>
-        <key>license</key>
-        <string>viewerlgpl</string>
-        <key>license_file</key>
-        <string>LICENSE</string>
-        <key>name</key>
-        <string>viewer-manager</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2773,23 +2767,25 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>viewerlgpl</string>
+        <key>license_file</key>
+        <string>LICENSE</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2000-2012, Linden Research, Inc.</string>
+        <key>version</key>
+        <string>3.0-08bf5ee</string>
+        <key>name</key>
+        <string>viewer-manager</string>
+        <key>description</key>
+        <string>Linden Lab Viewer Management Process suite.</string>
         <key>source</key>
         <string>https://bitbucket.org/lindenlab/vmp-standalone</string>
         <key>source_type</key>
         <string>hg</string>
-        <key>version</key>
-        <string>3.0-08bf5ee</string>
       </map>
       <key>vlc-bin</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright (C) 1998-2016 VLC authors and VideoLAN</string>
-        <key>license</key>
-        <string>GPL2</string>
-        <key>license_file</key>
-        <string>LICENSES/vlc.txt</string>
-        <key>name</key>
-        <string>vlc-bin</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2821,23 +2817,79 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>GPL2</string>
+        <key>license_file</key>
+        <string>LICENSES/vlc.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1998-2016 VLC authors and VideoLAN</string>
         <key>version</key>
         <string>3.0.16.c219a5d</string>
+        <key>name</key>
+        <string>vlc-bin</string>
       </map>
-      <key>vulkan_gltf</key>
+      <key>xmlrpc-epi</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-vulkan-gltf-pbr</string>
-        <key>copyright</key>
-        <string>Copyright (c) 2018 Sascha Willems</string>
-        <key>description</key>
-        <string>Vulkan GLTF Sample Implementation</string>
+        <key>platforms</key>
+        <map>
+          <key>darwin64</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>aa12611374876196b3ebb6bda8d419a697217b8b</string>
+              <key>hash_algorithm</key>
+              <string>sha1</string>
+              <key>url</key>
+              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-darwin64-8a05acf.tar.zst</string>
+            </map>
+            <key>name</key>
+            <string>darwin64</string>
+          </map>
+          <key>linux64</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>ad0c8b41ee4b4de216382bec46ee1c25962a3f12</string>
+              <key>hash_algorithm</key>
+              <string>sha1</string>
+              <key>url</key>
+              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-linux64-8a05acf.tar.zst</string>
+            </map>
+            <key>name</key>
+            <string>linux64</string>
+          </map>
+          <key>windows64</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>e53fd38c14b8c47c7c84dead8a1b211bb8be170c</string>
+              <key>hash_algorithm</key>
+              <string>sha1</string>
+              <key>url</key>
+              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-windows64-8a05acf.tar.zst</string>
+            </map>
+            <key>name</key>
+            <string>windows64</string>
+          </map>
+        </map>
         <key>license</key>
-        <string>Copyright (c) 2018 Sascha Willems</string>
+        <string>xmlrpc-epi</string>
         <key>license_file</key>
-        <string>LICENSES/vulkan_gltf.txt</string>
+        <string>LICENSES/xmlrpc-epi.txt</string>
+        <key>copyright</key>
+        <string>Copyright: (C) 2000 Epinions, Inc.</string>
+        <key>version</key>
+        <string>0.54.1.8a05acf</string>
         <key>name</key>
-        <string>vulkan_gltf</string>
+        <string>xmlrpc-epi</string>
+        <key>description</key>
+        <string>XMLRPC Library</string>
+      </map>
+      <key>vulkan_gltf</key>
+      <map>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2877,21 +2929,23 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>Copyright (c) 2018 Sascha Willems</string>
+        <key>license_file</key>
+        <string>LICENSES/vulkan_gltf.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2018 Sascha Willems</string>
         <key>version</key>
         <string>1</string>
+        <key>name</key>
+        <string>vulkan_gltf</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-vulkan-gltf-pbr</string>
+        <key>description</key>
+        <string>Vulkan GLTF Sample Implementation</string>
       </map>
       <key>webrtc</key>
       <map>
-        <key>canonical_repo</key>
-        <string>https://github.com/secondlife/3p-webrtc-build</string>
-        <key>copyright</key>
-        <string>Copyright (c) 2011, The WebRTC project authors. All rights reserved.</string>
-        <key>license</key>
-        <string>MIT</string>
-        <key>license_file</key>
-        <string>LICENSES/webrtc-license.txt</string>
-        <key>name</key>
-        <string>webrtc</string>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
@@ -2901,11 +2955,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
               <key>creds</key>
               <string>github</string>
               <key>hash</key>
-              <string>21e31d2c2fffdb59d8f50b80db079f86f2df2483</string>
+              <string>e89de3c1352589be64fd838f9b4c06927a139db3</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.58/webrtc-m114.5735.08.58.8716173807-darwin64-8716173807.tar.zst</string>
+              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.59-debug/webrtc-m114.5735.08.59-debug.8823062977-darwin64-8823062977.tar.zst</string>
             </map>
             <key>name</key>
             <string>darwin64</string>
@@ -2915,11 +2969,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>600cabb49a889db3a29f2910f5bda08f28dd04c8</string>
+              <string>b19afcf0dc6775c27f2d2e18f558f39180d04144</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.58/webrtc-m114.5735.08.58.8716173807-linux64-8716173807.tar.zst</string>
+              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.59-debug/webrtc-m114.5735.08.59-debug.8823062977-linux64-8823062977.tar.zst</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -2931,49 +2985,61 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
               <key>creds</key>
               <string>github</string>
               <key>hash</key>
-              <string>915c9face95efcc6da240aa2c4f8e6c4aa803af8</string>
+              <string>abbd27bdbeec9b8c01ab7c176bee7bacbf7252f5</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.58/webrtc-m114.5735.08.58.8716173807-windows64-8716173807.tar.zst</string>
+              <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.59-debug/webrtc-m114.5735.08.59-debug.8823062977-windows64-8823062977.tar.zst</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/webrtc-license.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2011, The WebRTC project authors. All rights reserved.</string>
+        <key>version</key>
+        <string>m114.5735.08.59-debug.8823062977</string>
+        <key>name</key>
+        <string>webrtc</string>
         <key>vcs_branch</key>
         <string>secondlife</string>
         <key>vcs_revision</key>
         <string>d3f62d32bac8694d3c7423c731ae30c113bf6a11</string>
         <key>vcs_url</key>
         <string>https://github.com/secondlife/3p-webrtc-build</string>
-        <key>version</key>
-        <string>m114.5735.08.53.8337236647</string>
+        <key>canonical_repo</key>
+        <string>https://github.com/secondlife/3p-webrtc-build</string>
       </map>
-      <key>xmlrpc-epi</key>
+      <key>xxhash</key>
       <map>
-        <key>copyright</key>
-        <string>Copyright: (C) 2000 Epinions, Inc.</string>
-        <key>description</key>
-        <string>XMLRPC Library</string>
-        <key>license</key>
-        <string>xmlrpc-epi</string>
-        <key>license_file</key>
-        <string>LICENSES/xmlrpc-epi.txt</string>
-        <key>name</key>
-        <string>xmlrpc-epi</string>
         <key>platforms</key>
         <map>
+          <key>common</key>
+          <map>
+            <key>archive</key>
+            <map>
+              <key>hash</key>
+              <string>e4f77ba0a9b8ec3cc3fabc51c4da81d2</string>
+              <key>url</key>
+              <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110070/956941/xxhash-0.8.1.578006-windows-578006.tar.bz2</string>
+            </map>
+            <key>name</key>
+            <string>common</string>
+          </map>
           <key>darwin64</key>
           <map>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>aa12611374876196b3ebb6bda8d419a697217b8b</string>
+              <string>fdcc803a76a3359bb426db7dac161406676d51e7</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-darwin64-8a05acf.tar.zst</string>
+              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-darwin64-7501c90.tar.zst</string>
             </map>
             <key>name</key>
             <string>darwin64</string>
@@ -2983,11 +3049,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>ad0c8b41ee4b4de216382bec46ee1c25962a3f12</string>
+              <string>7acb3f94a549fbb9bd7bc16604e34f33c5365a9b</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-linux64-8a05acf.tar.zst</string>
+              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-linux64-7501c90.tar.zst</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -2997,55 +3063,43 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>e53fd38c14b8c47c7c84dead8a1b211bb8be170c</string>
+              <string>4522d075ea4703ef4b527c3039864ef735ea7953</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-windows64-8a05acf.tar.zst</string>
+              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-windows64-7501c90.tar.zst</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
-        <key>version</key>
-        <string>0.54.1.8a05acf</string>
-      </map>
-      <key>xxhash</key>
-      <map>
-        <key>copyright</key>
-        <string>Copyright (c) 2012-2021 Yann Collet</string>
-        <key>description</key>
-        <string>xxHash Library</string>
         <key>license</key>
         <string>xxhash</string>
         <key>license_file</key>
         <string>LICENSES/xxhash.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2012-2021 Yann Collet</string>
+        <key>version</key>
+        <string>0.8.1.7501c90</string>
         <key>name</key>
         <string>xxhash</string>
+        <key>description</key>
+        <string>xxHash Library</string>
+      </map>
+      <key>zlib-ng</key>
+      <map>
         <key>platforms</key>
         <map>
-          <key>common</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>e4f77ba0a9b8ec3cc3fabc51c4da81d2</string>
-              <key>url</key>
-              <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110070/956941/xxhash-0.8.1.578006-windows-578006.tar.bz2</string>
-            </map>
-            <key>name</key>
-            <string>common</string>
-          </map>
           <key>darwin64</key>
           <map>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>fdcc803a76a3359bb426db7dac161406676d51e7</string>
+              <string>dacc5f3fb307c4d1292ed1ffb1d595d83599062d</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-darwin64-7501c90.tar.zst</string>
+              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-darwin64-32fd361.tar.zst</string>
             </map>
             <key>name</key>
             <string>darwin64</string>
@@ -3055,11 +3109,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>7acb3f94a549fbb9bd7bc16604e34f33c5365a9b</string>
+              <string>fba88375e12454ae19f4528e11ffc7ddf7d879ec</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-linux64-7501c90.tar.zst</string>
+              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-linux64-32fd361.tar.zst</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -3069,96 +3123,90 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>4522d075ea4703ef4b527c3039864ef735ea7953</string>
+              <string>ccfca9451063e2d0e95baa73b1ad2054d3e38907</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-windows64-7501c90.tar.zst</string>
+              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-windows64-32fd361.tar.zst</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
-        <key>version</key>
-        <string>0.8.1.7501c90</string>
-      </map>
-      <key>zlib-ng</key>
-      <map>
-        <key>canonical_repo</key>
-        <string>https://bitbucket.org/lindenlab/3p-zlib-ng</string>
-        <key>copyright</key>
-        <string>Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
-        <key>description</key>
-        <string>zlib data compression library for the next generation systems</string>
         <key>license</key>
         <string>zlib-ng</string>
         <key>license_file</key>
         <string>LICENSES/zlib-ng.txt</string>
+        <key>copyright</key>
+        <string>Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
+        <key>version</key>
+        <string>1.2.11.zlib-ng.32fd361</string>
         <key>name</key>
         <string>zlib-ng</string>
+        <key>canonical_repo</key>
+        <string>https://bitbucket.org/lindenlab/3p-zlib-ng</string>
+        <key>description</key>
+        <string>zlib data compression library for the next generation systems</string>
+      </map>
+      <key>webrtc-shim</key>
+      <map>
         <key>platforms</key>
         <map>
           <key>darwin64</key>
           <map>
             <key>archive</key>
             <map>
+              <key>creds</key>
+              <string>github</string>
               <key>hash</key>
-              <string>dacc5f3fb307c4d1292ed1ffb1d595d83599062d</string>
+              <string>a23ffe29c49f8fabb8c5f2de9879bed9d7e0e0ca</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-darwin64-32fd361.tar.zst</string>
+              <string>https://api.github.com/repos/secondlife/3p-webrtc-shim/releases/assets/155507516</string>
             </map>
             <key>name</key>
             <string>darwin64</string>
           </map>
-          <key>linux64</key>
-          <map>
-            <key>archive</key>
-            <map>
-              <key>hash</key>
-              <string>fba88375e12454ae19f4528e11ffc7ddf7d879ec</string>
-              <key>hash_algorithm</key>
-              <string>sha1</string>
-              <key>url</key>
-              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-linux64-32fd361.tar.zst</string>
-            </map>
-            <key>name</key>
-            <string>linux64</string>
-          </map>
           <key>windows64</key>
           <map>
             <key>archive</key>
             <map>
+              <key>creds</key>
+              <string>github</string>
               <key>hash</key>
-              <string>ccfca9451063e2d0e95baa73b1ad2054d3e38907</string>
+              <string>b264c6ed008bd45c4687c5dc4d7532727c74624a</string>
               <key>hash_algorithm</key>
               <string>sha1</string>
               <key>url</key>
-              <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-windows64-32fd361.tar.zst</string>
+              <string>https://api.github.com/repos/secondlife/3p-webrtc-shim/releases/assets/155507520</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
+        <key>license</key>
+        <string>MIT</string>
+        <key>license_file</key>
+        <string>LICENSES/webrtc-license.txt</string>
+        <key>copyright</key>
+        <string>Copyright (c) 2011, The WebRTC project authors. All rights reserved.</string>
         <key>version</key>
-        <string>1.2.11.zlib-ng.32fd361</string>
+        <string>m114.0.26.d4b8b92</string>
+        <key>name</key>
+        <string>webrtc-shim</string>
+        <key>vcs_branch</key>
+        <string>main</string>
+        <key>vcs_revision</key>
+        <string>d4b8b921825ae4344d87fdb0c9179c358c6e3698</string>
+        <key>vcs_url</key>
+        <string>https://github.com/secondlife/3p-webrtc-shim</string>
+        <key>canonical_repo</key>
+        <string>https://github.com/secondlife/3p-webrtc-shim</string>
       </map>
     </map>
     <key>package_description</key>
     <map>
-      <key>canonical_repo</key>
-      <string>https://github.com/secondlife/viewer</string>
-      <key>copyright</key>
-      <string>Copyright (c) 2020, Linden Research, Inc.</string>
-      <key>description</key>
-      <string>Second Life Viewer</string>
-      <key>license</key>
-      <string>LGPL</string>
-      <key>license_file</key>
-      <string>docs/LICENSE-source.txt</string>
-      <key>name</key>
-      <string>Second Life Viewer</string>
       <key>platforms</key>
       <map>
         <key>common</key>
@@ -3167,9 +3215,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
           <map>
             <key>RelWithDebInfo</key>
             <map>
-              <key>build</key>
-              <map>
-              </map>
               <key>configure</key>
               <map>
                 <key>command</key>
@@ -3182,6 +3227,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-DINSTALL_PROPRIETARY=TRUE</string>
                 </array>
               </map>
+              <key>build</key>
+              <map>
+              </map>
               <key>name</key>
               <string>RelWithDebInfo</string>
             </map>
@@ -3189,10 +3237,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>command</key>
                 <string>cmake</string>
                 <key>options</key>
@@ -3202,15 +3246,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
                   <string>-DINSTALL_PROPRIETARY=FALSE</string>
                 </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
               </map>
               <key>name</key>
               <string>RelWithDebInfoOS</string>
             </map>
             <key>Release</key>
             <map>
-              <key>build</key>
-              <map>
-              </map>
               <key>configure</key>
               <map>
                 <key>command</key>
@@ -3223,6 +3268,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-DINSTALL_PROPRIETARY=TRUE</string>
                 </array>
               </map>
+              <key>build</key>
+              <map>
+              </map>
               <key>name</key>
               <string>Release</string>
             </map>
@@ -3230,10 +3278,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>command</key>
                 <string>cmake</string>
                 <key>options</key>
@@ -3243,6 +3287,10 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
                   <string>-DINSTALL_PROPRIETARY=FALSE</string>
                 </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
               </map>
               <key>name</key>
               <string>ReleaseOS</string>
@@ -3253,12 +3301,22 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
         </map>
         <key>darwin64</key>
         <map>
-          <key>build_directory</key>
-          <string>build-darwin-x86_64</string>
           <key>configurations</key>
           <map>
             <key>RelWithDebInfo</key>
             <map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>Xcode</string>
+                </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
+              </map>
               <key>build</key>
               <map>
                 <key>command</key>
@@ -3272,25 +3330,21 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-parallelizeTargets</string>
                 </array>
               </map>
+              <key>default</key>
+              <string>True</string>
+              <key>name</key>
+              <string>RelWithDebInfo</string>
+            </map>
+            <key>RelWithDebInfoOS</key>
+            <map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>Xcode</string>
                 </array>
               </map>
-              <key>default</key>
-              <string>True</string>
-              <key>name</key>
-              <string>RelWithDebInfo</string>
-            </map>
-            <key>RelWithDebInfoOS</key>
-            <map>
               <key>build</key>
               <map>
                 <key>command</key>
@@ -3304,6 +3358,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-parallelizeTargets</string>
                 </array>
               </map>
+              <key>name</key>
+              <string>RelWithDebInfoOS</string>
+            </map>
+            <key>Release</key>
+            <map>
               <key>configure</key>
               <map>
                 <key>options</key>
@@ -3311,12 +3370,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-G</string>
                   <string>Xcode</string>
                 </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
               </map>
-              <key>name</key>
-              <string>RelWithDebInfoOS</string>
-            </map>
-            <key>Release</key>
-            <map>
               <key>build</key>
               <map>
                 <key>command</key>
@@ -3330,23 +3388,19 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-parallelizeTargets</string>
                 </array>
               </map>
+              <key>name</key>
+              <string>Release</string>
+            </map>
+            <key>ReleaseOS</key>
+            <map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>Xcode</string>
                 </array>
               </map>
-              <key>name</key>
-              <string>Release</string>
-            </map>
-            <key>ReleaseOS</key>
-            <map>
               <key>build</key>
               <map>
                 <key>command</key>
@@ -3360,46 +3414,38 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-parallelizeTargets</string>
                 </array>
               </map>
-              <key>configure</key>
-              <map>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>Xcode</string>
-                </array>
-              </map>
               <key>name</key>
               <string>ReleaseOS</string>
             </map>
           </map>
+          <key>build_directory</key>
+          <string>build-darwin-x86_64</string>
           <key>name</key>
           <string>darwin64</string>
         </map>
         <key>linux64</key>
         <map>
-          <key>build_directory</key>
-          <string>build-linux-x86_64</string>
           <key>configurations</key>
           <map>
             <key>Release</key>
             <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>ninja</string>
-              </map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>Ninja</string>
                   <string>-DLL_TESTS=Off</string>
                 </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
+              </map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>ninja</string>
               </map>
               <key>default</key>
               <string>True</string>
@@ -3408,11 +3454,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             </map>
             <key>ReleaseOS</key>
             <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>ninja</string>
-              </map>
               <key>configure</key>
               <map>
                 <key>options</key>
@@ -3422,6 +3463,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>-DLL_TESTS=Off</string>
                 </array>
               </map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>ninja</string>
+              </map>
               <key>name</key>
               <string>ReleaseOS</string>
             </map>
@@ -3434,23 +3480,33 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
               <string>default</string>
             </map>
           </map>
+          <key>build_directory</key>
+          <string>build-linux-x86_64</string>
           <key>name</key>
           <string>linux64</string>
         </map>
         <key>windows</key>
         <map>
-          <key>build_directory</key>
-          <string>build-vc${AUTOBUILD_VSVER|170}-$AUTOBUILD_ADDRSIZE</string>
           <key>configurations</key>
           <map>
             <key>RelWithDebInfo</key>
             <map>
-              <key>build</key>
+              <key>configure</key>
               <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
+                  <string>-A</string>
+                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                </array>
                 <key>arguments</key>
                 <array>
-                  <string>SecondLife.sln</string>
+                  <string>..\indra</string>
                 </array>
+              </map>
+              <key>build</key>
+              <map>
                 <key>command</key>
                 <string>devenv</string>
                 <key>options</key>
@@ -3458,19 +3514,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>/build</string>
                   <string>RelWithDebInfo|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
                 </array>
-              </map>
-              <key>configure</key>
-              <map>
                 <key>arguments</key>
                 <array>
-                  <string>..\indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
-                  <string>-A</string>
-                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                  <string>SecondLife.sln</string>
                 </array>
               </map>
               <key>default</key>
@@ -3480,12 +3526,25 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             </map>
             <key>RelWithDebInfoOS</key>
             <map>
-              <key>build</key>
+              <key>configure</key>
               <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
+                  <string>-A</string>
+                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                  <string>-DUSE_KDU=FALSE</string>
+                  <string>-DUSE_OPENAL:BOOL=ON</string>
+                </array>
                 <key>arguments</key>
                 <array>
-                  <string>SecondLife.sln</string>
+                  <string>..\indra</string>
                 </array>
+              </map>
+              <key>build</key>
+              <map>
                 <key>command</key>
                 <string>msbuild.exe</string>
                 <key>options</key>
@@ -3497,22 +3556,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>/verbosity:minimal</string>
                   <string>/p:VCBuildAdditionalOptions= /incremental</string>
                 </array>
-              </map>
-              <key>configure</key>
-              <map>
                 <key>arguments</key>
                 <array>
-                  <string>..\indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
-                  <string>-A</string>
-                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DUSE_KDU=FALSE</string>
-                  <string>-DUSE_OPENAL:BOOL=ON</string>
+                  <string>SecondLife.sln</string>
                 </array>
               </map>
               <key>name</key>
@@ -3520,12 +3566,22 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             </map>
             <key>Release</key>
             <map>
-              <key>build</key>
+              <key>configure</key>
               <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
+                  <string>-A</string>
+                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                </array>
                 <key>arguments</key>
                 <array>
-                  <string>SecondLife.sln</string>
+                  <string>..\indra</string>
                 </array>
+              </map>
+              <key>build</key>
+              <map>
                 <key>command</key>
                 <string>devenv</string>
                 <key>options</key>
@@ -3533,19 +3589,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>/build</string>
                   <string>Release|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
                 </array>
-              </map>
-              <key>configure</key>
-              <map>
                 <key>arguments</key>
                 <array>
-                  <string>..\indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
-                  <string>-A</string>
-                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                  <string>SecondLife.sln</string>
                 </array>
               </map>
               <key>name</key>
@@ -3553,12 +3599,26 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             </map>
             <key>ReleaseOS</key>
             <map>
-              <key>build</key>
+              <key>configure</key>
               <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
+                  <string>-A</string>
+                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
+                  <string>-DUNATTENDED:BOOL=ON</string>
+                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                  <string>-DUSE_KDU=FALSE</string>
+                  <string>-DUSE_OPENAL:BOOL=ON</string>
+                </array>
                 <key>arguments</key>
                 <array>
-                  <string>SecondLife.sln</string>
+                  <string>..\indra</string>
                 </array>
+              </map>
+              <key>build</key>
+              <map>
                 <key>command</key>
                 <string>msbuild.exe</string>
                 <key>options</key>
@@ -3570,39 +3630,35 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
                   <string>/verbosity:minimal</string>
                   <string>/p:VCBuildAdditionalOptions= /incremental</string>
                 </array>
-              </map>
-              <key>configure</key>
-              <map>
                 <key>arguments</key>
                 <array>
-                  <string>..\indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
-                  <string>-A</string>
-                  <string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
-                  <string>-DUNATTENDED:BOOL=ON</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DUSE_KDU=FALSE</string>
-                  <string>-DUSE_OPENAL:BOOL=ON</string>
+                  <string>SecondLife.sln</string>
                 </array>
               </map>
               <key>name</key>
               <string>ReleaseOS</string>
             </map>
           </map>
+          <key>build_directory</key>
+          <string>build-vc${AUTOBUILD_VSVER|170}-$AUTOBUILD_ADDRSIZE</string>
           <key>name</key>
           <string>windows</string>
         </map>
       </map>
+      <key>license</key>
+      <string>LGPL</string>
+      <key>license_file</key>
+      <string>docs/LICENSE-source.txt</string>
+      <key>copyright</key>
+      <string>Copyright (c) 2020, Linden Research, Inc.</string>
       <key>version_file</key>
       <string>newview/viewer_version.txt</string>
+      <key>name</key>
+      <string>Second Life Viewer</string>
+      <key>canonical_repo</key>
+      <string>https://github.com/secondlife/viewer</string>
+      <key>description</key>
+      <string>Second Life Viewer</string>
     </map>
-    <key>type</key>
-    <string>autobuild</string>
-    <key>version</key>
-    <string>1.3</string>
   </map>
 </llsd>
diff --git a/build.sh b/build.sh
index 22f9e0c78a4a1ec82f7e99aa0136ae4b46aae9eb..e025b731708483055e6b8e4c2933850c32ab36d8 100755
--- a/build.sh
+++ b/build.sh
@@ -6,9 +6,6 @@
 # it relies on the environment that sets up, functions it provides, and
 # the build result post-processing it does.
 #
-# The shared buildscript build.sh invokes this because it is named 'build.sh',
-# which is the default custom build script name in buildscripts/hg/BuildParams
-#
 # PLEASE NOTE:
 #
 # * This script is interpreted on three platforms, including windows and cygwin
@@ -85,7 +82,7 @@ installer_Linux()
 {
   local package_name="$1"
   local package_dir="$(build_dir_Linux)/newview/"
-  local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.bz2\$"
+  local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.xz\$"
   # since the additional packages are built after the base package,
   # sorting oldest first ensures that the unqualified package is returned
   # even if someone makes a qualified name that duplicates the last word of the base name
@@ -112,7 +109,8 @@ installer_CYGWIN()
   fi
 }
 
-[[ -n "$GITHUB_OUTPUT" ]] || fatal "Need to export GITHUB_OUTPUT"
+# if someone wants to run build.sh outside the GitHub environment
+[[ -n "$GITHUB_OUTPUT" ]] || export GITHUB_OUTPUT='/dev/null'
 # The following is based on the Warning for GitHub multiline output strings:
 # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
 EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
@@ -172,29 +170,7 @@ pre_build()
         # This name is consumed by indra/newview/CMakeLists.txt. Make it
         # absolute because we've had troubles with relative pathnames.
         abs_build_dir="$(cd "$build_dir"; pwd)"
-        VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
-    fi
-
-    # expect these variables to be set in the environment from GitHub secrets
-    if [[ -n "$BUGSPLAT_DB" ]]
-    then
-        # don't spew credentials into build log
-        set +x
-        if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]]
-        then
-            # older mechanism involving build-secrets repo -
-            # if build_secrets_checkout isn't set, report its name
-            bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh"
-            if [ -r "$bugsplat_sh" ]
-            then # show that we're doing this, just not the contents
-                echo source "$bugsplat_sh"
-                source "$bugsplat_sh"
-            else
-                fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh"
-            fi
-        fi
-        set -x
-        export BUGSPLAT_USER BUGSPLAT_PASS
+        VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")"
     fi
 
     # honor autobuild_configure_parameters same as sling-buildscripts
@@ -202,6 +178,7 @@ pre_build()
 
     "$autobuild" configure --quiet -c $variant \
      ${eval_autobuild_configure_parameters:---} \
+     -DLL_TESTS:BOOL=ON \
      -DPACKAGE:BOOL=ON \
      -DHAVOK:BOOL="$HAVOK" \
      -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \
@@ -438,10 +415,10 @@ do
               fi
               if [ -d "$build_dir/doxygen/html" ]
               then
-                  tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3  "$build_dir/doxygen/html"
-                  python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \
+                  tar -cJf "$build_dir/viewer-doxygen.tar.xz" --strip-components 3  "$build_dir/doxygen/html"
+                  python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.xz" \
                       || fatal "Upload of doxygen tarball failed"
-                  metadata+=("$build_dir/viewer-doxygen.tar.bz2")
+                  metadata+=("$build_dir/viewer-doxygen.tar.xz")
               fi
               ;;
             *)
diff --git a/doc/contributions.txt b/doc/contributions.txt
index c902a118741b405747e79b30f1f560fe459e6c9e..a14ffa24fd177e436dcd5a270019d7472f1a1c20 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -64,6 +64,8 @@ Aimee Trescothick
 	VWR-14711
 	VWR-14712
 	VWR-15454
+AiraYumi
+	SL-20781 (github PR #613)
 Alejandro Rosenthal
 	VWR-1184
 Aleric Inglewood
@@ -294,6 +296,7 @@ Beq Janus
 	SL-18637
 	SL-19317
 	SL-19660
+	SL-20610
 Beth Walcher
 Bezilon Kasei
 Biancaluce Robbiani
@@ -846,6 +849,7 @@ Kadah Coba
 Jondan Lundquist
 Joosten Briebers
     MAINT-7074
+    BUG-225288
 Josef Munster
 Josette Windlow
 Juilan Tripsa
diff --git a/doc/testplans/optimize_away_alpha.md b/doc/testplans/optimize_away_alpha.md
new file mode 100644
index 0000000000000000000000000000000000000000..f0c8d1e8d634342c9bc1758a7574718a89f75cdc
--- /dev/null
+++ b/doc/testplans/optimize_away_alpha.md
@@ -0,0 +1,5 @@
+Textures imported via Build->Upload->Material that have an all opaque (255) alpha channel should have their alpha channel removed before upload.
+
+1. Make 4 images that have different colors but all 255 alpha channels
+2. Upload them all using Build->Upload->Material, with one in each of the material texture slots
+3. Verify that using the textures as a blinn-phong diffuse map does not make the corresponding face render in the alpha pass (face should stay visible after disabling alpha pass by unchecking Advanced->Render Types->Alpha).
diff --git a/indra/fix-incredibuild.py b/indra/fix-incredibuild.py
deleted file mode 100755
index 678ee4329e4c080e0be9fcf013a3c64f5275bd9d..0000000000000000000000000000000000000000
--- a/indra/fix-incredibuild.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python3
-## 
-## $LicenseInfo:firstyear=2011&license=viewerlgpl$
-## Second Life Viewer Source Code
-## Copyright (C) 2011, Linden Research, Inc.
-## 
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation;
-## version 2.1 of the License only.
-## 
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## Lesser General Public License for more details.
-## 
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-## 
-## Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
-## $/LicenseInfo$
-
-import sys
-import os
-import glob
-
-def delete_file_types(path, filetypes):
-    if os.path.exists(path):
-        print('Cleaning: ' + path)
-        orig_dir = os.getcwd();
-        os.chdir(path)
-        filelist = []
-        for type in filetypes:
-            filelist.extend(glob.glob(type))
-        for file in filelist:
-            os.remove(file)
-        os.chdir(orig_dir)
-
-def main():
-    build_types = ['*.exp','*.exe','*.pdb','*.idb',
-                 '*.ilk','*.lib','*.obj','*.ib_pdb_index']
-    pch_types = ['*.pch']
-    delete_file_types("build-vc80/newview/Release", build_types)
-    delete_file_types("build-vc80/newview/secondlife-bin.dir/Release/", 
-                      pch_types)
-    delete_file_types("build-vc80/newview/RelWithDebInfo", build_types)
-    delete_file_types("build-vc80/newview/secondlife-bin.dir/RelWithDebInfo/", 
-                      pch_types)
-    delete_file_types("build-vc80/newview/Debug", build_types)
-    delete_file_types("build-vc80/newview/secondlife-bin.dir/Debug/", 
-                      pch_types)
-
-
-    delete_file_types("build-vc80/test/RelWithDebInfo", build_types)
-    delete_file_types("build-vc80/test/test.dir/RelWithDebInfo/", 
-                      pch_types)
-
-
-if __name__ == "__main__":
-    main()
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 18b03c1f8964df361db625645e72e3d0685a6467..b430c4c6aaf9f81c24c5825d127fb98786078565 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -24,12 +24,6 @@
  * $/LicenseInfo$
  */
 
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#endif
-
 #include "linden_common.h"
 
 #include "llavatarappearance.h"
@@ -46,14 +40,6 @@
 #include "boost/bind.hpp"
 #include "boost/tokenizer.hpp"
 
-
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
-#include <boost/lexical_cast.hpp>
-
 using namespace LLAvatarAppearanceDefines;
 
 //-----------------------------------------------------------------------------
@@ -230,7 +216,7 @@ void LLAvatarAppearance::initInstance()
 		for (U32 lod = 0; lod < mesh_dict->mLOD; lod++)
 		{
 			LLAvatarJointMesh* mesh = createAvatarJointMesh();
-			std::string mesh_name = "m" + mesh_dict->mName + boost::lexical_cast<std::string>(lod);
+			std::string mesh_name = "m" + mesh_dict->mName + std::to_string(lod);
 			// We pre-pended an m - need to capitalize first character for camelCase
 			mesh_name[1] = toupper(mesh_name[1]);
 			mesh->setName(mesh_name);
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index a387bb23cd6a604edb3e03b103acbcb46188edfb..ece0a12a7a157146a5b9d40134dcb9cf2b038420 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -398,7 +398,7 @@ void LLAudioEngine::idle()
 	for (source_map::value_type& src_pair : mAllSources)
 	{
 		LLAudioSource *sourcep = src_pair.second;
-		if (sourcep->isMuted() && sourcep->isSyncMaster() && sourcep->getPriority() > max_sm_priority)
+		if (!sourcep->isMuted() && sourcep->isSyncMaster() && sourcep->getPriority() > max_sm_priority)
 		{
 			sync_masterp = sourcep;
 			master_channelp = sync_masterp->getChannel();
diff --git a/indra/llcommon/classic_callback.h b/indra/llcommon/classic_callback.h
index 1ad6dbc58fde86d77d461538297c2c9793f61dfb..009c25d67c40d221919bc8e0b17cb994071ab5a1 100644
--- a/indra/llcommon/classic_callback.h
+++ b/indra/llcommon/classic_callback.h
@@ -119,11 +119,11 @@ class ClassicCallback
      * 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.
+    // However, makeClassicCallback() is useful for deducing the CALLABLE
+    // type, 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;
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
index 1b48e4daf3a911c94867d11a31587d79a7209083..9a0c565b06a134a595be2c4e10aa4197513d29cc 100644
--- a/indra/llcommon/indra_constants.cpp
+++ b/indra/llcommon/indra_constants.cpp
@@ -50,6 +50,7 @@ const LLUUID IMG_FIRE			("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
 const LLUUID IMG_FACE_SELECT    ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
 const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
 const LLUUID IMG_INVISIBLE		("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
+const LLUUID IMG_WHITE          ("5748decc-f629-461c-9a36-a35a221fe21f"); // dataserver
 
 const LLUUID IMG_EXPLOSION				("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
 const LLUUID IMG_EXPLOSION_2			("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
@@ -71,6 +72,11 @@ const LLUUID TERRAIN_ROCK_DETAIL		("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // V
 
 const LLUUID DEFAULT_WATER_NORMAL		("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
 
+const LLUUID DEFAULT_OBJECT_TEXTURE     ("89556747-24cb-43ed-920b-47caed15465f"); // On dataserver
+const LLUUID DEFAULT_OBJECT_SPECULAR    ("87e0e8f7-8729-1ea8-cfc9-8915773009db"); // On dataserver
+const LLUUID DEFAULT_OBJECT_NORMAL      ("85f28839-7a1c-b4e3-d71d-967792970a7b"); // On dataserver
+const LLUUID BLANK_OBJECT_NORMAL        ("5b53359e-59dd-d8a2-04c3-9e65134da47a"); // VIEWER (has a verion on dataserver, but with compression artifacts)
+
 const LLUUID IMG_USE_BAKED_HEAD  ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
 const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
 const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index 679f79039bd9adec0b7866d94f79059ba5cf27e2..a16cfac2b9223017570e903856c4ca5b7f159151 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -197,6 +197,7 @@ LL_COMMON_API extern const LLUUID IMG_FIRE;
 LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
 LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
 LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
+LL_COMMON_API extern const LLUUID IMG_WHITE;
 
 LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
 LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
@@ -230,6 +231,10 @@ LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3;
 
 LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
 
+LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_TEXTURE;
+LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_SPECULAR;
+LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_NORMAL;
+LL_COMMON_API extern const LLUUID BLANK_OBJECT_NORMAL;
 
 // radius within which a chat message is fully audible
 const F32 CHAT_NORMAL_RADIUS = 20.f;
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index b99166991f1862d35330571408ebd416742201e7..90d0c28eb166d6f46145f6392083e5f2359f7e82 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -104,7 +104,6 @@ BOOL LLApp::sLogInSignal = FALSE;
 // Keeps track of application status
 LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED};
 LLAppErrorHandler LLApp::sErrorHandler = NULL;
-BOOL LLApp::sErrorThreadRunning = FALSE;
 
 
 LLApp::LLApp()
@@ -787,13 +786,8 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
 				return;
 			}		
 			
-			// Flag status to ERROR, so thread_error does its work.
+			// Flag status to ERROR
 			LLApp::setError();
-			// Block in the signal handler until somebody says that we're done.
-			while (LLApp::sErrorThreadRunning && !LLApp::isStopped())
-			{
-				ms_sleep(10);
-			}
 			
 			if (LLApp::sLogInSignal)
 			{
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index c832c8b142768a6ddfdca6af93fca6557b3a2ae0..a892bfeb1ec35b43aa9b3e162e26d349e0563f26 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -291,7 +291,6 @@ class LL_COMMON_API LLApp
 
 	static void setStatus(EAppStatus status);		// Use this to change the application status.
 	static LLScalarCond<EAppStatus> sStatus; // Reflects current application status
-	static BOOL sErrorThreadRunning; // Set while the error thread is running
 	static BOOL sDisableCrashlogger; // Let the OS handle crashes for us.
 	std::wstring mCrashReportPipeStr;  //Name of pipe to use for crash reporting.
 
diff --git a/indra/llcommon/llbase64.cpp b/indra/llcommon/llbase64.cpp
index bb85fe32a3cff7b7805a77416ea3aeea3c48ba7d..433b54f6f82eb84492268ac7b1401be9e3b79db1 100644
--- a/indra/llcommon/llbase64.cpp
+++ b/indra/llcommon/llbase64.cpp
@@ -42,7 +42,7 @@ std::string LLBase64::encode(const U8* input, size_t input_size)
 		&& input_size > 0)
 	{
 		// Yes, it returns int.
-		int b64_buffer_length = apr_base64_encode_len(narrow(input_size));
+		int b64_buffer_length = apr_base64_encode_len(narrow<size_t>(input_size));
 		char* b64_buffer = new char[b64_buffer_length];
 		
 		// This is faster than apr_base64_encode() if you know
@@ -52,7 +52,7 @@ std::string LLBase64::encode(const U8* input, size_t input_size)
 		b64_buffer_length = apr_base64_encode_binary(
 			b64_buffer,
 			input,
-			narrow(input_size));
+			narrow<size_t>(input_size));
 		output.assign(b64_buffer);
 		delete[] b64_buffer;
 	}
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 3ab97b557f051dd0518528b4c765504a56cb29e4..c13900f74a08804682bdd6b0f9082b3beca93f5c 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -123,7 +123,7 @@ LLCoros::LLCoros():
     // Previously we used
     // boost::context::guarded_stack_allocator::default_stacksize();
     // empirically this is insufficient.
-    mStackSize(768*1024),
+    mStackSize(900*1024),
     // mCurrent does NOT own the current CoroData instance -- it simply
     // points to it. So initialize it with a no-op deleter.
     mCurrent{ [](CoroData*){} }
@@ -278,6 +278,7 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
     catch (std::bad_alloc&)
     {
         // Out of memory on stack allocation?
+        LLError::LLUserWarningMsg::showOutOfMemory();
         printActiveCoroutines();
         LL_ERRS("LLCoros") << "Bad memory allocation in LLCoros::launch(" << prefix << ")!" << LL_ENDL;
     }
diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h
index 5800ec5e5d8541ded1f8c651550b194511645642..18664e340e0e0f6dca4eb687da75a830a728566f 100644
--- a/indra/llcommon/lldictionary.h
+++ b/indra/llcommon/lldictionary.h
@@ -87,11 +87,10 @@ class LLDictionary : public std::map<Index, Entry *>
 	}
 	void addEntry(Index index, Entry *entry)
 	{
-		if (lookup(index))
+		if (!this->emplace(index, entry).second) 
 		{
 			LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL;
 		}
-		(*this)[index] = entry;
 	}
 };
 
diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h
index 8ed295b6f133dc72190ba675df603db92fee6b57..ce6731e86463f3784fbdde6505d68201639df58f 100644
--- a/indra/llcommon/lldoubledispatch.h
+++ b/indra/llcommon/lldoubledispatch.h
@@ -255,7 +255,7 @@ class LLDoubleDispatch
     };
 
     /// shared_ptr manages Entry lifespan for us
-    typedef boost::shared_ptr<EntryBase> EntryPtr;
+    typedef std::shared_ptr<EntryBase> EntryPtr;
     /// use a @c list to make it easy to insert
     typedef std::list<EntryPtr> DispatchTable;
     DispatchTable mDispatch;
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 414515854a241be125a3d33ab5b662b6bb75b40d..0f48ce16b2f747f9c1dbead3d44579283cf20303 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1070,7 +1070,7 @@ namespace LLError
     //
     // NOTE!!! Requires external mutex lock!!!
     template <typename RECORDER>
-    std::pair<boost::shared_ptr<RECORDER>, Recorders::iterator>
+    std::pair<std::shared_ptr<RECORDER>, Recorders::iterator>
     findRecorderPos(SettingsConfigPtr &s)
     {
         // Since we promise to return an iterator, use a classic iterator
@@ -1081,7 +1081,7 @@ namespace LLError
             // *it is a RecorderPtr, a shared_ptr<Recorder>. Use a
             // dynamic_pointer_cast to try to downcast to test if it's also a
             // shared_ptr<RECORDER>.
-            auto ptr = boost::dynamic_pointer_cast<RECORDER>(*it);
+            auto ptr = std::dynamic_pointer_cast<RECORDER>(*it);
             if (ptr)
             {
                 // found the entry we want
@@ -1101,7 +1101,7 @@ namespace LLError
     // shared_ptr might be empty (operator!() returns true) if there was no
     // such RECORDER subclass instance in mRecorders.
     template <typename RECORDER>
-    boost::shared_ptr<RECORDER> findRecorder()
+    std::shared_ptr<RECORDER> findRecorder()
     {
         SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
         LLMutexLock lock(&s->mRecorderMutex);
@@ -1134,7 +1134,7 @@ namespace LLError
 
 		if (!file_name.empty())
 		{
-			boost::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
+			std::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
 			if (recordToFile->okay())
 			{
 				addRecorder(recordToFile);
@@ -1601,6 +1601,48 @@ namespace LLError
     {
         return out << boost::stacktrace::stacktrace();
     }
+
+    // LLOutOfMemoryWarning
+    std::string LLUserWarningMsg::sLocalizedOutOfMemoryTitle;
+    std::string LLUserWarningMsg::sLocalizedOutOfMemoryWarning;
+    LLUserWarningMsg::Handler LLUserWarningMsg::sHandler;
+
+    void LLUserWarningMsg::show(const std::string& message)
+    {
+        if (sHandler)
+        {
+            sHandler(std::string(), message);
+        }
+    }
+
+    void LLUserWarningMsg::showOutOfMemory()
+    {
+        if (sHandler && !sLocalizedOutOfMemoryTitle.empty())
+        {
+            sHandler(sLocalizedOutOfMemoryTitle, sLocalizedOutOfMemoryWarning);
+        }
+    }
+
+    void LLUserWarningMsg::showMissingFiles()
+    {
+        // Files Are missing, likely can't localize.
+        const std::string error_string =
+            "Second Life viewer couldn't access some of the files it needs and will be closed."
+            "\n\nPlease reinstall viewer from  https://secondlife.com/support/downloads/ and "
+            "contact https://support.secondlife.com if issue persists after reinstall.";
+        sHandler("Missing Files", error_string);
+    }
+
+    void LLUserWarningMsg::setHandler(const LLUserWarningMsg::Handler &handler)
+    {
+        sHandler = handler;
+    }
+
+    void LLUserWarningMsg::setOutOfMemoryStrings(const std::string& title, const std::string& message)
+    {
+        sLocalizedOutOfMemoryTitle = title;
+        sLocalizedOutOfMemoryWarning = message;
+    }
 }
 
 void crashdriver(void (*callback)(int*))
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 05dd88ee514fc5a2097b7888d0744359e3699efd..6f6b349cf54c7b67043167c83fa68e86735a6658 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -39,6 +39,7 @@
 #include "llpreprocessor.h"
 
 #include <boost/static_assert.hpp>
+#include <functional> // std::function
 
 const int LL_ERR_NOERR = 0;
 
@@ -301,6 +302,28 @@ namespace LLError
     {
         friend std::ostream& operator<<(std::ostream& out, const LLStacktrace&);
     };
+
+    // Provides access to OS notification popup on error, since
+    // not everything has access to OS's messages
+    class LLUserWarningMsg
+    {
+    public:
+        typedef std::function<void(const std::string&, const std::string&)> Handler;
+        static void setHandler(const Handler&);
+        static void setOutOfMemoryStrings(const std::string& title, const std::string& message);
+
+        // When viewer encounters bad alloc or can't access files try warning user about reasons
+        static void showOutOfMemory();
+        static void showMissingFiles();
+        // Genering error
+        static void show(const std::string&);
+
+    private:
+        // needs to be preallocated before viewer runs out of memory
+        static std::string sLocalizedOutOfMemoryTitle;
+        static std::string sLocalizedOutOfMemoryWarning;
+        static Handler sHandler;
+    };
 }
 
 //this is cheaper than llcallstacks if no need to output other variables to call stacks. 
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 57f10b78950e7d7f9a8455ac180377e527241a76..77b187a80fe2608e22eb46ebb8a43783740bd3d2 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -174,7 +174,7 @@ namespace LLError
 		bool mWantsMultiline;
 	};
 
-	typedef boost::shared_ptr<Recorder> RecorderPtr;
+	typedef std::shared_ptr<Recorder> RecorderPtr;
 
     /**
      * Instantiate GenericRecorder with a callable(level, message) to get
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 1a305ec3dc453de445f2d00dbf9ac9c1eb5635a9..70931f3a657d020d6a54e1c61ee449a2cd1cb293 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -211,12 +211,21 @@ void LLEventPumps::clear()
     }
 }
 
-void LLEventPumps::reset()
+void LLEventPumps::reset(bool log_pumps)
 {
     // Reset every known LLEventPump instance. Leave it up to each instance to
     // decide what to do with the reset() call.
+    if (log_pumps)
+    {
+        LL_INFOS() << "Resetting " << (S32)mPumpMap.size() << " pumps" << LL_ENDL;
+    }
+
     for (PumpMap::value_type& pair : mPumpMap)
     {
+        if (log_pumps)
+        {
+            LL_INFOS() << "Resetting pump " << pair.first << LL_ENDL;
+        }
         pair.second->reset();
     }
 }
@@ -373,9 +382,11 @@ std::string LLEventPump::inventName(const std::string& pfx)
 
 void LLEventPump::clear()
 {
+    LLMutexLock lock(&mConnectionListMutex);
     // Destroy the original LLStandardSignal instance, replacing it with a
     // whole new one.
     mSignal = std::make_shared<LLStandardSignal>();
+
     mConnections.clear();
 }
 
@@ -383,6 +394,7 @@ void LLEventPump::reset()
 {
     // Resetting mSignal is supposed to disconnect everything on its own
     // But due to crash on 'reset' added explicit cleanup to get more data
+    LLMutexLock lock(&mConnectionListMutex);
     ConnectionMap::const_iterator iter = mConnections.begin();
     ConnectionMap::const_iterator end = mConnections.end();
     while (iter!=end)
@@ -407,6 +419,8 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
         return LLBoundListener();
     }
 
+    LLMutexLock lock(&mConnectionListMutex);
+
     float nodePosition = 1.0;
 
     // if the supplied name is empty we are not interested in the ordering mechanism 
@@ -566,8 +580,9 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
     return bound;
 }
 
-LLBoundListener LLEventPump::getListener(const std::string& name) const
+LLBoundListener LLEventPump::getListener(const std::string& name)
 {
+    LLMutexLock lock(&mConnectionListMutex);
     ConnectionMap::const_iterator found = mConnections.find(name);
     if (found != mConnections.end())
     {
@@ -579,6 +594,7 @@ LLBoundListener LLEventPump::getListener(const std::string& name) const
 
 void LLEventPump::stopListening(const std::string& name)
 {
+    LLMutexLock lock(&mConnectionListMutex);
     ConnectionMap::iterator found = mConnections.find(name);
     if (found != mConnections.end())
     {
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index c1dbf4392f730fa1dc29b8d117bfebb6cd65233f..bebcfacdcbfc7514c98b0ade1f0682b90c7df113 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -332,7 +332,7 @@ class LL_COMMON_API LLEventPumps: public LLSingleton<LLEventPumps>,
      * Reset all known LLEventPump instances
      * workaround for DEV-35406 crash on shutdown
      */
-    void reset();
+    void reset(bool log_pumps = false);
 
 private:
     friend class LLEventPump;
@@ -558,7 +558,7 @@ class LL_COMMON_API LLEventPump: public LLEventTrackable
 
     /// Get the LLBoundListener associated with the passed name (dummy
     /// LLBoundListener if not found)
-    virtual LLBoundListener getListener(const std::string& name) const;
+    virtual LLBoundListener getListener(const std::string& name);
     /**
      * Instantiate one of these to block an existing connection:
      * @code
@@ -601,6 +601,7 @@ class LL_COMMON_API LLEventPump: public LLEventTrackable
     LLHandle<LLEventPumps> mRegistry;
 
     std::string mName;
+    LLMutex mConnectionListMutex;
 
 protected:
     virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
diff --git a/indra/llcommon/llexception.cpp b/indra/llcommon/llexception.cpp
index 46560b5e4ce39ac7c12dc45b7ae1d080448090d7..0787bde57f101b02253d89cd5889dc82032ef24a 100644
--- a/indra/llcommon/llexception.cpp
+++ b/indra/llcommon/llexception.cpp
@@ -37,6 +37,7 @@
 #include "llerror.h"
 #include "llerrorcontrol.h"
 
+
 // used to attach and extract stacktrace information to/from boost::exception,
 // see https://www.boost.org/doc/libs/release/doc/html/stacktrace/getting_started.html#stacktrace.getting_started.exceptions_with_stacktrace
 // apparently the struct passed as the first template param needs no definition?
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 9edc7e40f36b5e8e28c2ad8efdc6ea0810909f55..e0d0ab9ac73bb4ea0f9b1fea463a01c7da0149f3 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -627,7 +627,7 @@ namespace LLInitParam
 		UserData*			mUserData;
 	};
 
-	typedef boost::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
+	typedef std::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
 
 	// each derived Block class keeps a static data structure maintaining offsets to various params
 	class LL_COMMON_API BlockDescriptor
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 8f88e728ce8f2a6ecaf3abb6912581c2abd3e576..b2b1162f635561bacd3f905a44e0097a8ab337de 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -462,10 +462,10 @@ class LLLeapImpl: public LLLeap
     LLProcessPtr mChild;
     LLTempBoundListener
         mStdinConnection, mStdoutConnection, mStdoutDataConnection, mStderrConnection;
-    boost::scoped_ptr<LLEventPump::Blocker> mBlocker;
+    std::unique_ptr<LLEventPump::Blocker> mBlocker;
     LLProcess::ReadPipe::size_type mExpect;
     LLError::RecorderPtr mRecorder;
-    boost::scoped_ptr<LLLeapListener> mListener;
+    std::unique_ptr<LLLeapListener> mListener;
 };
 
 // These must follow the declaration of LLLeapImpl, so they may as well be last.
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 7cdf7254ffaebeaf5ad89e870e47820af0213428..574b9b8b3b3b997115b5ed19ccc50bc6214d79e9 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -38,6 +38,7 @@
 #include <mach/mach_host.h>
 #elif LL_LINUX
 # include <unistd.h>
+# include <sys/resource.h>
 #endif
 
 #include "llmemory.h"
@@ -273,33 +274,16 @@ U64 LLMemory::getCurrentRSS()
 
 U64 LLMemory::getCurrentRSS()
 {
-	static const char statPath[] = "/proc/self/stat";
-	LLFILE *fp = LLFile::fopen(statPath, "r");
-	U64 rss = 0;
+	struct rusage usage;
 
-	if (fp == NULL)
-	{
-		LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
+	if (getrusage(RUSAGE_SELF, &usage) != 0) {
+		// Error handling code could be here
 		return 0;
 	}
 
-	// Eee-yew!	 See Documentation/filesystems/proc.txt in your
-	// nearest friendly kernel tree for details.
-	
-	{
-		int ret = fscanf(fp, "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*d %*d "
-						 "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %Lu",
-						 &rss);
-		if (ret != 1)
-		{
-			LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL;
-			rss = 0;
-		}
-	}
-	
-	fclose(fp);
-
-	return rss;
+	// ru_maxrss (since Linux 2.6.32)
+	// This is the maximum resident set size used (in kilobytes).
+	return usage.ru_maxrss * 1024;
 }
 
 #else
diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h
index f9de0c792959f9f0a4c2ad6247fdc62ae8c22f1b..64aceddf32c669bae7afbdb2d8ff11f4d7123e1d 100644
--- a/indra/llcommon/llpointer.h
+++ b/indra/llcommon/llpointer.h
@@ -46,33 +46,32 @@
 template <class Type> class LLPointer
 {
 public:
-
-	LLPointer() : 
+	LLPointer() :
 		mPointer(NULL)
 	{
 	}
 
-	LLPointer(Type* ptr) : 
+	LLPointer(Type* ptr) :
 		mPointer(ptr)
 	{
 		ref();
 	}
 
-	LLPointer(const LLPointer<Type>& ptr) : 
+	LLPointer(const LLPointer<Type>& ptr) :
 		mPointer(ptr.mPointer)
 	{
 		ref();
 	}
 
-	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
+	// Support conversion up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
 	template<typename Subclass>
-	LLPointer(const LLPointer<Subclass>& ptr) : 
+	LLPointer(const LLPointer<Subclass>& ptr) :
 		mPointer(ptr.get())
 	{
 		ref();
 	}
 
-	~LLPointer()								
+	~LLPointer()
 	{
 		unref();
 	}
@@ -83,39 +82,39 @@ template <class Type> class LLPointer
 	const Type&	operator*() const				{ return *mPointer; }
 	Type&	operator*()							{ return *mPointer; }
 
-	operator BOOL()  const						{ return (mPointer != NULL); }
-	operator bool()  const						{ return (mPointer != NULL); }
+	operator BOOL() const						{ return (mPointer != NULL); }
+	operator bool() const						{ return (mPointer != NULL); }
 	bool operator!() const						{ return (mPointer == NULL); }
 	bool isNull() const							{ return (mPointer == NULL); }
 	bool notNull() const						{ return (mPointer != NULL); }
 
-	operator Type*()       const				{ return mPointer; }
-	bool operator !=(Type* ptr) const           { return (mPointer != ptr); 	}
-	bool operator ==(Type* ptr) const           { return (mPointer == ptr); 	}
-	bool operator ==(const LLPointer<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
-	bool operator < (const LLPointer<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
-	bool operator > (const LLPointer<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
+	operator Type*() const						{ return mPointer; }
+	bool operator !=(Type* ptr) const			{ return (mPointer != ptr); }
+	bool operator ==(Type* ptr) const			{ return (mPointer == ptr); }
+	bool operator ==(const LLPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); }
+	bool operator < (const LLPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); }
+	bool operator > (const LLPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); }
 
-	LLPointer<Type>& operator =(Type* ptr)                   
-	{ 
+	LLPointer<Type>& operator =(Type* ptr)
+	{
 		assign(ptr);
-		return *this; 
+		return *this;
 	}
 
-	LLPointer<Type>& operator =(const LLPointer<Type>& ptr)  
-	{ 
+	LLPointer<Type>& operator =(const LLPointer<Type>& ptr)
+	{
 		assign(ptr);
-		return *this; 
+		return *this;
 	}
 
 	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
 	template<typename Subclass>
-	LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr)  
-	{ 
+	LLPointer<Type>& operator =(const LLPointer<Subclass>& ptr)
+	{
 		assign(ptr.get());
-		return *this; 
+		return *this;
 	}
-	
+
 	// Just exchange the pointers, which will not change the reference counts.
 	static void swap(LLPointer<Type>& a, LLPointer<Type>& b)
 	{
@@ -129,16 +128,6 @@ template <class Type> class LLPointer
 	void ref();                             
 	void unref();
 #else
-
-	void assign(const LLPointer<Type>& ptr)
-	{
-		if( mPointer != ptr.mPointer )
-		{
-			unref(); 
-			mPointer = ptr.mPointer;
-			ref();
-		}
-	}
 	void ref()                             
 	{ 
 		if (mPointer)
@@ -161,7 +150,18 @@ template <class Type> class LLPointer
 			}
 		}
 	}
-#endif
+#endif // LL_LIBRARY_INCLUDE
+
+	void assign(const LLPointer<Type>& ptr)
+	{
+		if (mPointer != ptr.mPointer)
+		{
+			unref();
+			mPointer = ptr.mPointer;
+			ref();
+		}
+	}
+
 protected:
 	Type*	mPointer;
 };
@@ -169,18 +169,18 @@ template <class Type> class LLPointer
 template <class Type> class LLConstPointer
 {
 public:
-	LLConstPointer() : 
+	LLConstPointer() :
 		mPointer(NULL)
 	{
 	}
 
-	LLConstPointer(const Type* ptr) : 
+	LLConstPointer(const Type* ptr) :
 		mPointer(ptr)
 	{
 		ref();
 	}
 
-	LLConstPointer(const LLConstPointer<Type>& ptr) : 
+	LLConstPointer(const LLConstPointer<Type>& ptr) :
 		mPointer(ptr.mPointer)
 	{
 		ref();
@@ -188,7 +188,7 @@ template <class Type> class LLConstPointer
 
 	// support conversion up the type hierarchy.  See Item 45 in Effective C++, 3rd Ed.
 	template<typename Subclass>
-	LLConstPointer(const LLConstPointer<Subclass>& ptr) : 
+	LLConstPointer(const LLConstPointer<Subclass>& ptr) :
 		mPointer(ptr.get())
 	{
 		ref();
@@ -203,55 +203,55 @@ template <class Type> class LLConstPointer
 	const Type*	operator->() const				{ return mPointer; }
 	const Type&	operator*() const				{ return *mPointer; }
 
-	operator BOOL()  const						{ return (mPointer != NULL); }
-	operator bool()  const						{ return (mPointer != NULL); }
+	operator BOOL() const						{ return (mPointer != NULL); }
+	operator bool() const						{ return (mPointer != NULL); }
 	bool operator!() const						{ return (mPointer == NULL); }
 	bool isNull() const							{ return (mPointer == NULL); }
 	bool notNull() const						{ return (mPointer != NULL); }
 
-	operator const Type*()       const			{ return mPointer; }
-	bool operator !=(const Type* ptr) const     { return (mPointer != ptr); 	}
-	bool operator ==(const Type* ptr) const     { return (mPointer == ptr); 	}
-	bool operator ==(const LLConstPointer<Type>& ptr) const           { return (mPointer == ptr.mPointer); 	}
-	bool operator < (const LLConstPointer<Type>& ptr) const           { return (mPointer < ptr.mPointer); 	}
-	bool operator > (const LLConstPointer<Type>& ptr) const           { return (mPointer > ptr.mPointer); 	}
+	operator const Type*() const				{ return mPointer; }
+	bool operator !=(const Type* ptr) const		{ return (mPointer != ptr); }
+	bool operator ==(const Type* ptr) const		{ return (mPointer == ptr); }
+	bool operator ==(const LLConstPointer<Type>& ptr) const { return (mPointer == ptr.mPointer); }
+	bool operator < (const LLConstPointer<Type>& ptr) const { return (mPointer < ptr.mPointer); }
+	bool operator > (const LLConstPointer<Type>& ptr) const { return (mPointer > ptr.mPointer); }
 
-	LLConstPointer<Type>& operator =(const Type* ptr)                   
+	LLConstPointer<Type>& operator =(const Type* ptr)
 	{
 		if( mPointer != ptr )
 		{
-			unref(); 
-			mPointer = ptr; 
+			unref();
+			mPointer = ptr;
 			ref();
 		}
 
-		return *this; 
+		return *this;
 	}
 
-	LLConstPointer<Type>& operator =(const LLConstPointer<Type>& ptr)  
-	{ 
+	LLConstPointer<Type>& operator =(const LLConstPointer<Type>& ptr)
+	{
 		if( mPointer != ptr.mPointer )
 		{
-			unref(); 
+			unref();
 			mPointer = ptr.mPointer;
 			ref();
 		}
-		return *this; 
+		return *this;
 	}
 
 	// support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed.
 	template<typename Subclass>
-	LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr)  
-	{ 
+	LLConstPointer<Type>& operator =(const LLConstPointer<Subclass>& ptr)
+	{
 		if( mPointer != ptr.get() )
 		{
-			unref(); 
+			unref();
 			mPointer = ptr.get();
 			ref();
 		}
-		return *this; 
+		return *this;
 	}
-	
+
 	// Just exchange the pointers, which will not change the reference counts.
 	static void swap(LLConstPointer<Type>& a, LLConstPointer<Type>& b)
 	{
@@ -262,11 +262,11 @@ template <class Type> class LLConstPointer
 
 protected:
 #ifdef LL_LIBRARY_INCLUDE
-	void ref();                             
+	void ref();
 	void unref();
-#else
-	void ref()                             
-	{ 
+#else // LL_LIBRARY_INCLUDE
+	void ref()
+	{
 		if (mPointer)
 		{
 			mPointer->ref();
@@ -277,9 +277,9 @@ template <class Type> class LLConstPointer
 	{
 		if (mPointer)
 		{
-			const Type *tempp = mPointer;
+			const Type *temp = mPointer;
 			mPointer = NULL;
-			tempp->unref();
+			temp->unref();
 			if (mPointer != NULL)
 			{
 				LL_WARNS() << "Unreference did assignment to non-NULL because of destructor" << LL_ENDL;
@@ -287,7 +287,8 @@ template <class Type> class LLConstPointer
 			}
 		}
 	}
-#endif
+#endif // LL_LIBRARY_INCLUDE
+
 protected:
 	const Type*	mPointer;
 };
@@ -297,13 +298,13 @@ class LLCopyOnWritePointer : public LLPointer<Type>
 {
 public:
 	typedef LLCopyOnWritePointer<Type> self_t;
-    typedef LLPointer<Type> pointer_t;
-    
-	LLCopyOnWritePointer() 
+	typedef LLPointer<Type> pointer_t;
+
+	LLCopyOnWritePointer()
 	:	mStayUnique(false)
 	{}
 
-	LLCopyOnWritePointer(Type* ptr) 
+	LLCopyOnWritePointer(Type* ptr)
 	:	LLPointer<Type>(ptr),
 		mStayUnique(false)
 	{}
diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp
index 0d657622844eb3155076e9c73118f7d4da88e410..0d6a147da3b43f1d911557f5f456c4382ea1e81e 100644
--- a/indra/llcommon/llprocess.cpp
+++ b/indra/llcommon/llprocess.cpp
@@ -36,7 +36,6 @@
 #include "llevents.h"
 #include "llexception.h"
 
-#include <boost/foreach.hpp>
 #include <boost/bind.hpp>
 #include <boost/asio/streambuf.hpp>
 #include <boost/asio/buffers_iterator.hpp>
@@ -587,7 +586,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
 	// apr_procattr_child_err_set()), or accepting a filename, opening it and
 	// passing that apr_file_t (simple <, >, 2> redirect emulation).
 	std::vector<apr_int32_t> select;
-	BOOST_FOREACH(const FileParam& fparam, params.files)
+	for (const FileParam& fparam : params.files)
 	{
 		// Every iteration, we're going to append an item to 'select'. At the
 		// top of the loop, its size() is, in effect, an index. Use that to
@@ -684,7 +683,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
 	argv.push_back(params.executable().c_str());
 
 	// Add arguments. See above remarks about c_str().
-	BOOST_FOREACH(const std::string& arg, params.args)
+	for (const std::string& arg : params.args)
 	{
 		argv.push_back(arg.c_str());
 	}
@@ -961,7 +960,7 @@ void LLProcess::handle_status(int reason, int status)
 		// only be performed if in fact we're going to produce the log message.
 		LL_DEBUGS("LLProcess") << empty;
 		std::string reason_str;
-		BOOST_FOREACH(const ReasonCode& rcp, reasons)
+		for (const ReasonCode& rcp : reasons)
 		{
 			if (reason == rcp.code)
 			{
@@ -1151,7 +1150,7 @@ std::ostream& operator<<(std::ostream& out, const LLProcess::Params& params)
 		out << "cd " << LLStringUtil::quote(params.cwd) << ": ";
 	}
 	out << LLStringUtil::quote(params.executable);
-	BOOST_FOREACH(const std::string& arg, params.args)
+	for (const std::string& arg : params.args)
 	{
 		out << ' ' << LLStringUtil::quote(arg);
 	}
diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h
index 0842f2eb07ab3d34a1cbbbddbc419cec7e9f6cdd..c57821bf52ec849953e53790c1d204f967cc065a 100644
--- a/indra/llcommon/llprocess.h
+++ b/indra/llcommon/llprocess.h
@@ -51,7 +51,7 @@ class LLEventPump;
 class LLProcess;
 /// LLProcess instances are created on the heap by static factory methods and
 /// managed by ref-counted pointers.
-typedef boost::shared_ptr<LLProcess> LLProcessPtr;
+typedef std::shared_ptr<LLProcess> LLProcessPtr;
 
 /**
  * LLProcess handles launching an external process with specified command line
diff --git a/indra/llcommon/llrand.cpp b/indra/llcommon/llrand.cpp
index 33afc50cf78881747294ca8187ce036f5a2a8e07..019211157420e550ae10979594a771721a9e6c98 100644
--- a/indra/llcommon/llrand.cpp
+++ b/indra/llcommon/llrand.cpp
@@ -58,7 +58,9 @@
  * to restore uniform distribution.
  */
 
-static LLRandLagFib2281 gRandomGenerator(LLUUID::getRandomSeed());
+// gRandomGenerator is a stateful static object, which is therefore not
+// inherently thread-safe.
+static thread_local LLRandLagFib2281 gRandomGenerator(LLUUID::getRandomSeed());
 
 // no default implementation, only specific F64 and F32 specializations
 template <typename REAL>
@@ -71,7 +73,7 @@ inline F64 ll_internal_random<F64>()
 	// CPUs (or at least multi-threaded processes) seem to
 	// occasionally give an obviously incorrect random number -- like
 	// 5^15 or something. Sooooo, clamp it as described above.
-	F64 rv = gRandomGenerator();
+	F64 rv{ gRandomGenerator() };
 	if(!((rv >= 0.0) && (rv < 1.0))) return fmod(rv, 1.0);
 	return rv;
 }
@@ -79,7 +81,13 @@ inline F64 ll_internal_random<F64>()
 template <>
 inline F32 ll_internal_random<F32>()
 {
-    return F32(ll_internal_random<F64>());
+	// *HACK: clamp the result as described above.
+	// Per Monty, it's important to clamp using the correct fmodf() rather
+	// than expanding to F64 for fmod() and then truncating back to F32. Prior
+	// to this change, we were getting sporadic ll_frand() == 1.0 results.
+	F32 rv{ narrow<F32>(gRandomGenerator()) };
+	if(!((rv >= 0.0f) && (rv < 1.0f))) return fmodf(rv, 1.0f);
+	return rv;
 }
 
 /*------------------------------ F64 aliases -------------------------------*/
diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp
index 6852b5536aecdfebb1627ae218cfcfed26bacc78..3da94e7a8d7c3e3522e6c18762d4ee9723112e18 100644
--- a/indra/llcommon/llrefcount.cpp
+++ b/indra/llcommon/llrefcount.cpp
@@ -30,7 +30,7 @@
 #include "llerror.h"
 
 // maximum reference count before sounding memory leak alarm
-const S32 gMaxRefCount = S32_MAX;
+const S32 gMaxRefCount = LL_REFCOUNT_FREE;
 
 LLRefCount::LLRefCount(const LLRefCount& other)
 :	mRef(0)
@@ -49,7 +49,7 @@ LLRefCount::LLRefCount() :
 }
 
 LLRefCount::~LLRefCount()
-{ 
+{
 	if (mRef != LL_REFCOUNT_FREE && mRef != 0)
 	{
 		LL_ERRS() << "deleting non-zero reference" << LL_ENDL;
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
index 2080da15653d8e9974b3d2d09aa38755aa981151..15e7175fc8f750cf8d2a592891eb52742c19a4cc 100644
--- a/indra/llcommon/llrefcount.h
+++ b/indra/llcommon/llrefcount.h
@@ -51,24 +51,20 @@ class LL_COMMON_API LLRefCount
 public:
 	LLRefCount();
 
-    inline void validateRefCount() const
-    {
-        llassert(mRef > 0); // ref count below 0, likely corrupted
-        llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak
-    }
-
 	inline void ref() const
-	{ 
-		mRef++; 
-        validateRefCount();
-	} 
+	{
+		llassert(mRef != LL_REFCOUNT_FREE); // object is deleted
+		mRef++;
+		llassert(mRef < gMaxRefCount); // ref count excessive, likely memory leak
+	}
 
 	inline S32 unref() const
 	{
-        validateRefCount();
+		llassert(mRef != LL_REFCOUNT_FREE); // object is deleted
+		llassert(mRef > 0); // ref count below 1, likely corrupted
 		if (0 == --mRef)
 		{
-            mRef = LL_REFCOUNT_FREE; // set to nonsense yet recognizable value to aid in debugging
+			mRef = LL_REFCOUNT_FREE; // set to nonsense yet recognizable value to aid in debugging
 			delete this;
 			return 0;
 		}
@@ -82,8 +78,8 @@ class LL_COMMON_API LLRefCount
 		return mRef;
 	}
 
-private: 
-	mutable S32	mRef; 
+private:
+	mutable S32	mRef;
 };
 
 
@@ -106,7 +102,7 @@ class LL_COMMON_API LLThreadSafeRefCount
 public:
 	LLThreadSafeRefCount();
 	LLThreadSafeRefCount(const LLThreadSafeRefCount&);
-	LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) 
+	LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref)
 	{
 		mRef = 0;
 		return *this;
@@ -114,8 +110,8 @@ class LL_COMMON_API LLThreadSafeRefCount
 
 	void ref()
 	{
-		mRef++; 
-	} 
+		mRef++;
+	}
 
 	void unref()
 	{
@@ -136,36 +132,36 @@ class LL_COMMON_API LLThreadSafeRefCount
 		return currentVal;
 	}
 
-private: 
-	LLAtomicS32 mRef; 
+private:
+	LLAtomicS32 mRef;
 };
 
 /**
  * intrusive pointer support for LLThreadSafeRefCount
  * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type
  */
-inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) 
+inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p)
 {
 	p->ref();
 }
 
-inline void intrusive_ptr_release(LLThreadSafeRefCount* p) 
+inline void intrusive_ptr_release(LLThreadSafeRefCount* p)
 {
-	p->unref(); 
+	p->unref();
 }
 
 /**
  * intrusive pointer support
  * this allows you to use boost::intrusive_ptr with any LLRefCount-derived type
  */
-inline void intrusive_ptr_add_ref(LLRefCount* p) 
+inline void intrusive_ptr_add_ref(LLRefCount* p)
 {
 	p->ref();
 }
 
-inline void intrusive_ptr_release(LLRefCount* p) 
+inline void intrusive_ptr_release(LLRefCount* p)
 {
-	p->unref(); 
+	p->unref();
 }
 
 #endif
diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h
index d610f86234f63f6c256d208ff7cd2a529e5f4a3d..42e3d9b47a8abd189344e450a621cd9242310839 100644
--- a/indra/llcommon/llrun.h
+++ b/indra/llcommon/llrun.h
@@ -48,7 +48,7 @@ class LL_COMMON_API LLRunner
 	/**
 	 * @brief The pointer to a runnable.
 	 */
-	typedef boost::shared_ptr<LLRunnable> run_ptr_t;
+	typedef std::shared_ptr<LLRunnable> run_ptr_t;
 
 	/**
 	 * @brief The handle for use in the API.
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index cdb9a7ed8aab736beaf8b2e625f5b0e9e68ad308..8ed254919ca95ed4871d326dff350d387c85e715 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -197,12 +197,12 @@ class LL_COMMON_API LLSD
 				  typename std::enable_if<std::is_integral<VALUE>::value &&
 										  ! std::is_same<VALUE, Boolean>::value,
 										  bool>::type = true>
-		LLSD(VALUE v): LLSD(Integer(narrow(v))) {}
+		LLSD(VALUE v): LLSD(Integer(narrow<VALUE>(v))) {}
 		// support construction from F32 et al.
 		template <typename VALUE,
 				  typename std::enable_if<std::is_floating_point<VALUE>::value,
 										  bool>::type = true>
-		LLSD(VALUE v): LLSD(Real(narrow(v))) {}
+		LLSD(VALUE v): LLSD(Real(narrow<VALUE>(v))) {}
 	//@}
 	
 	/** @name Scalar Assignment */
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index a475be62934f97caa5d4d1562401939488c8b9c0..76171f2dfd23847c691134e74db51ff5881a927c 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -2174,7 +2174,7 @@ std::string zip_llsd(LLSD& data)
 
 	U8 out[CHUNK];
 
-	strm.avail_in = narrow(source.size());
+	strm.avail_in = narrow<size_t>(source.size());
 	strm.next_in = (U8*) source.data();
 	U8* output = NULL;
 
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index 38b11eb32b355f0d6311151124da7632e12419fe..db61f4ae4122d1ecbb6953501152930561ca88b2 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -196,12 +196,12 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr,
 			// *FIX: memory inefficient.
 			// *TODO: convert to use LLBase64
 			ostr << pre << "<binary encoding=\"base64\">";
-			int b64_buffer_length = apr_base64_encode_len(narrow(buffer.size()));
+			int b64_buffer_length = apr_base64_encode_len(narrow<size_t>(buffer.size()));
 			char* b64_buffer = new char[b64_buffer_length];
 			b64_buffer_length = apr_base64_encode_binary(
 				b64_buffer,
 				&buffer[0],
-				narrow(buffer.size()));
+				narrow<size_t>(buffer.size()));
 			ostr.write(b64_buffer, b64_buffer_length - 1);
 			delete[] b64_buffer;
 			ostr << "</binary>" << post;
@@ -404,11 +404,18 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
 		if (buffer)
 		{
 			((char*) buffer)[count ? count - 1 : 0] = '\0';
+            if (mEmitErrors)
+            {
+                LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*)buffer << LL_ENDL;
+            }
 		}
-		if (mEmitErrors)
-		{
-		LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << LL_ENDL;
-		}
+        else
+        {
+            if (mEmitErrors)
+            {
+                LL_INFOS() << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR, null buffer" << LL_ENDL;
+            }
+        }
 		data = LLSD();
 		return LLSDParser::PARSE_FAILURE;
 	}
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index ad54d1b0be6c3c4c962826d11f25c46666a39cbd..fdcc052bd03c505b5fc1ddc2727de490f471a71a 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -478,9 +478,9 @@ namespace llsd
 {
 
 /*****************************************************************************
-*   BOOST_FOREACH() helpers for LLSD
+*   range-based for-loop helpers for LLSD
 *****************************************************************************/
-/// Usage: BOOST_FOREACH(LLSD item, inArray(someLLSDarray)) { ... }
+/// Usage: for (LLSD item : inArray(someLLSDarray)) { ... }
 class inArray
 {
 public:
@@ -503,7 +503,7 @@ class inArray
 /// MapEntry is what you get from dereferencing an LLSD::map_[const_]iterator.
 typedef std::map<LLSD::String, LLSD>::value_type MapEntry;
 
-/// Usage: BOOST_FOREACH([const] MapEntry& e, inMap(someLLSDmap)) { ... }
+/// Usage: for([const] MapEntry& e : inMap(someLLSDmap)) { ... }
 class inMap
 {
 public:
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index 6b1986d0e9191d8702a920e7b6bf26e5d0e6e522..5f1a89670e5606c043f54463d25b366cd993f7bf 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -32,7 +32,6 @@
 #include "lldependencies.h"
 #include "llexception.h"
 #include "llcoros.h"
-#include <boost/foreach.hpp>
 #include <algorithm>
 #include <iostream>                 // std::cerr in dire emergency
 #include <sstream>
@@ -411,7 +410,7 @@ void LLSingletonBase::cleanup_()
 void LLSingletonBase::deleteAll()
 {
     // It's essential to traverse these in dependency order.
-    BOOST_FOREACH(LLSingletonBase* sp, dep_sort())
+    for (LLSingletonBase* sp : dep_sort())
     {
         // Capture the class name first: in case of exception, don't count on
         // being able to extract it later.
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index cbe5ab6406b0eac442328707474231028c091af1..64027c16c76274a4c8550ab1138b6168d488a553 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -455,7 +455,7 @@ class LLSingleton : public LLSingletonBase
 
     static DERIVED_TYPE* getInstance()
     {
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
+        //LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD; // TODO -- reenable this when we have a fix for using Tracy with coroutines
         // We know the viewer has LLSingleton dependency circularities. If you
         // feel strongly motivated to eliminate them, cheers and good luck.
         // (At that point we could consider a much simpler locking mechanism.)
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 82dc7c9f805c0dfa2876b3db93eba065e71a8483..a746cc11ecc659bb160dce0e6e11832d09c2c90d 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -1406,9 +1406,17 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
 		}
 		else
 		{
+#if 0
+			// EXT-1565 : Zai Lynch, James Linden : 15/Oct/09
+			// [BSI] Feedback: Viewer clock mentions SLT, but would prefer it to show PST/PDT
 			// "slt" = Second Life Time, which is deprecated.
 			// If not utc or user local time, fallback to Pacific time
 			replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST";
+#else
+			// SL-20370 : Steeltoe Linden : 29/Sep/23
+			// Change "PDT" to "SLT" on menu bar
+			replacement = "SLT";
+#endif
 		}
 		return true;
 	}
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index bfbf25d9abb23d93a9e3db62aaf1ec545348b4bc..be00aa277b69cf4097fd1d031b55fa80a97bc6a3 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1208,7 +1208,7 @@ void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<strin
 {
 	// This overload must deal with escapes. Delegate that to InEscString
 	// (unless there ARE no escapes).
-	boost::scoped_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
+	std::unique_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
 	if (escapes.empty())
 		instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end()));
 	else
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 938685bae6d91390ff1ed7729b60a7060f25a9cd..42400e90af0f56216cd468054319ed92bab2a235 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -49,7 +49,6 @@
 #include "llsdutil.h"
 #include <boost/bind.hpp>
 #include <boost/circular_buffer.hpp>
-#include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/range.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -905,9 +904,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
 
 	// Max key length
 	size_t key_width(0);
-	BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+	for (const auto& [key, value] : inMap(mStatsMap))
 	{
-		size_t len(pair.first.length());
+		size_t len(key.length());
 		if (len > key_width)
 		{
 			key_width = len;
@@ -915,10 +914,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
 	}
 
 	// Now stream stats
-	BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+	for (const auto& [key, value] : inMap(mStatsMap))
 	{
-		s << pfx << std::setw(narrow(key_width+1)) << (pair.first + ':') << ' ';
-		LLSD value(pair.second);
+		s << pfx << std::setw(narrow<size_t>(key_width+1)) << (key + ':') << ' ';
 		if (value.isInteger())
 			s << std::setw(12) << value.asInteger();
 		else if (value.isReal())
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 4eaa05c3359ec23b230fc025ebfe668b21101b6f..cd4975d9d34b564c05c995d6c7804a2d0eea977e 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -113,15 +113,16 @@ LL_COMMON_API bool on_main_thread()
     return (LLThread::currentID() == main_thread());
 }
 
-LL_COMMON_API void assert_main_thread()
+LL_COMMON_API bool assert_main_thread()
 {
     auto curr = LLThread::currentID();
     auto main = main_thread();
-    if (curr != main)
-    {
-        LL_WARNS() << "Illegal execution from thread id " << curr
-            << " outside main thread " << main << LL_ENDL;
-    }
+    if (curr == main)
+        return true;
+
+    LL_WARNS() << "Illegal execution from thread id " << curr
+               << " outside main thread " << main << LL_ENDL;
+    return false;
 }
 
 // this function has become moot
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index 50202631e7ad50be44db7bbfaac9606184b4c5b5..9f1c589fcda29434c234857585c15b77056b5410 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -152,7 +152,7 @@ class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
 
 //============================================================================
 
-extern LL_COMMON_API void assert_main_thread();
+extern LL_COMMON_API bool assert_main_thread();
 extern LL_COMMON_API bool on_main_thread();
 
 #endif // LL_LLTHREAD_H
diff --git a/indra/llcommon/lltrace.cpp b/indra/llcommon/lltrace.cpp
index ff671a837089be312599ff7c9f010a8a61bd7e83..87457ad90771de45c3425a30ccb7fe511ab5a75c 100644
--- a/indra/llcommon/lltrace.cpp
+++ b/indra/llcommon/lltrace.cpp
@@ -33,8 +33,6 @@
 namespace LLTrace
 {
 
-MemStatHandle gTraceMemStat("LLTrace");
-
 StatBase::StatBase( const char* name, const char* description ) 
 :	mName(name),
 	mDescription(description ? description : "")
@@ -65,7 +63,7 @@ void TimeBlockTreeNode::setParent( BlockTimerStatHandle* parent )
 	llassert_always(parent != mBlock);
 	llassert_always(parent != NULL);
 
-	TimeBlockTreeNode* parent_tree_node = get_thread_recorder()->getTimeBlockTreeNode(narrow(parent->getIndex()));
+	TimeBlockTreeNode* parent_tree_node = get_thread_recorder()->getTimeBlockTreeNode(narrow<size_t>(parent->getIndex()));
 	if (!parent_tree_node) return;
 
 	if (mParent)
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h
index 580cf0a5fdb7e76aa613f9ed3d754a6bab4ab732..21a5803a766b8f14eae4e74ef877aa7f537e2f7f 100644
--- a/indra/llcommon/lltrace.h
+++ b/indra/llcommon/lltrace.h
@@ -193,61 +193,6 @@ void add(CountStatHandle<T>& count, VALUE_T value)
 #endif
 }
 
-template<>
-class StatType<MemAccumulator::AllocationFacet>
-:	public StatType<MemAccumulator>
-{
-public:
-
-	StatType(const char* name, const char* description = "")
-	:	StatType<MemAccumulator>(name, description)
-	{}
-};
-
-template<>
-class StatType<MemAccumulator::DeallocationFacet>
-:	public StatType<MemAccumulator>
-{
-public:
-
-	StatType(const char* name, const char* description = "")
-	:	StatType<MemAccumulator>(name, description)
-	{}
-};
-
-class MemStatHandle : public StatType<MemAccumulator>
-{
-public:
-	typedef StatType<MemAccumulator> stat_t;
-	MemStatHandle(const char* name, const char* description = "")
-	:	stat_t(name, description)
-	{
-		mName = name;
-	}
-
-	void setName(const char* name)
-	{
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-		mName = name;
-		setKey(name);
-	}
-
-	/*virtual*/ const char* getUnitLabel() const { return "KB"; }
-
-	StatType<MemAccumulator::AllocationFacet>& allocations() 
-	{
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-		return static_cast<StatType<MemAccumulator::AllocationFacet>&>(*(StatType<MemAccumulator>*)this);
-	}
-
-	StatType<MemAccumulator::DeallocationFacet>& deallocations() 
-	{
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-		return static_cast<StatType<MemAccumulator::DeallocationFacet>&>(*(StatType<MemAccumulator>*)this);
-	}
-};
-
-
 // measures effective memory footprint of specified type
 // specialize to cover different types
 template<typename T, typename IS_MEM_TRACKABLE = void, typename IS_UNITS = void>
@@ -334,33 +279,6 @@ struct MeasureMem<std::basic_string<T>, IS_MEM_TRACKABLE, IS_BYTES>
 	}
 };
 
-
-template<typename T>
-inline void claim_alloc(MemStatHandle& measurement, const T& value)
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-#if LL_TRACE_ENABLED
-	auto size = MeasureMem<T>::measureFootprint(value);
-	if(size == 0) return;
-	MemAccumulator& accumulator = measurement.getCurrentAccumulator();
-	accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() + (F64)size : (F64)size);
-	accumulator.mAllocations.record(size);
-#endif
-}
-
-template<typename T>
-inline void disclaim_alloc(MemStatHandle& measurement, const T& value)
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-#if LL_TRACE_ENABLED
-	auto size = MeasureMem<T>::measureFootprint(value);
-	if(size == 0) return;
-	MemAccumulator& accumulator = measurement.getCurrentAccumulator();
-	accumulator.mSize.sample(accumulator.mSize.hasValue() ? accumulator.mSize.getLastValue() - (F64)size : -(F64)size);
-	accumulator.mDeallocations.add(size);
-#endif
-}
-
 }
 
 #endif // LL_LLTRACE_H
diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp
index 6bd886ae98aff6bf4e64b61412fbf7d88f9be05e..b5b32cba38fb3bb6311dbce66b2ebba04364cb68 100644
--- a/indra/llcommon/lltraceaccumulators.cpp
+++ b/indra/llcommon/lltraceaccumulators.cpp
@@ -1,24 +1,24 @@
-/** 
+/**
  * @file lltracesampler.cpp
  *
  * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2012, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
@@ -32,73 +32,52 @@
 namespace LLTrace
 {
 
-extern MemStatHandle gTraceMemStat;
-
-
 ///////////////////////////////////////////////////////////////////////
 // AccumulatorBufferGroup
 ///////////////////////////////////////////////////////////////////////
 
-AccumulatorBufferGroup::AccumulatorBufferGroup() 
+AccumulatorBufferGroup::AccumulatorBufferGroup()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
-	claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
-	claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
-	claim_alloc(gTraceMemStat, mStackTimers.capacity() * sizeof(TimeBlockAccumulator));
-	claim_alloc(gTraceMemStat, mMemStats.capacity() * sizeof(MemAccumulator));
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 }
 
 AccumulatorBufferGroup::AccumulatorBufferGroup(const AccumulatorBufferGroup& other)
 :	mCounts(other.mCounts),
 	mSamples(other.mSamples),
 	mEvents(other.mEvents),
-	mStackTimers(other.mStackTimers),
-	mMemStats(other.mMemStats)
+	mStackTimers(other.mStackTimers)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	claim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
-	claim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
-	claim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
-	claim_alloc(gTraceMemStat, mStackTimers.capacity() * sizeof(TimeBlockAccumulator));
-	claim_alloc(gTraceMemStat, mMemStats.capacity() * sizeof(MemAccumulator));
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 }
 
 AccumulatorBufferGroup::~AccumulatorBufferGroup()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	disclaim_alloc(gTraceMemStat, mCounts.capacity() * sizeof(CountAccumulator));
-	disclaim_alloc(gTraceMemStat, mSamples.capacity() * sizeof(SampleAccumulator));
-	disclaim_alloc(gTraceMemStat, mEvents.capacity() * sizeof(EventAccumulator));
-	disclaim_alloc(gTraceMemStat, mStackTimers.capacity() * sizeof(TimeBlockAccumulator));
-	disclaim_alloc(gTraceMemStat, mMemStats.capacity() * sizeof(MemAccumulator));
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 }
 
 void AccumulatorBufferGroup::handOffTo(AccumulatorBufferGroup& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	other.mCounts.reset(&mCounts);
 	other.mSamples.reset(&mSamples);
 	other.mEvents.reset(&mEvents);
 	other.mStackTimers.reset(&mStackTimers);
-	other.mMemStats.reset(&mMemStats);
 }
 
 void AccumulatorBufferGroup::makeCurrent()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mCounts.makeCurrent();
 	mSamples.makeCurrent();
 	mEvents.makeCurrent();
 	mStackTimers.makeCurrent();
-	mMemStats.makeCurrent();
 
 	ThreadRecorder* thread_recorder = get_thread_recorder();
 	AccumulatorBuffer<TimeBlockAccumulator>& timer_accumulator_buffer = mStackTimers;
 	// update stacktimer parent pointers
 	for (size_t i = 0, end_i = mStackTimers.size(); i < end_i; i++)
 	{
-		TimeBlockTreeNode* tree_node = thread_recorder->getTimeBlockTreeNode(narrow(i));
+		TimeBlockTreeNode* tree_node = thread_recorder->getTimeBlockTreeNode(narrow<size_t>(i));
 		if (tree_node)
 		{
 			timer_accumulator_buffer[i].mParent = tree_node->mParent;
@@ -109,12 +88,11 @@ void AccumulatorBufferGroup::makeCurrent()
 //static
 void AccumulatorBufferGroup::clearCurrent()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	AccumulatorBuffer<CountAccumulator>::clearCurrent();	
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	AccumulatorBuffer<CountAccumulator>::clearCurrent();
 	AccumulatorBuffer<SampleAccumulator>::clearCurrent();
 	AccumulatorBuffer<EventAccumulator>::clearCurrent();
 	AccumulatorBuffer<TimeBlockAccumulator>::clearCurrent();
-	AccumulatorBuffer<MemAccumulator>::clearCurrent();
 }
 
 bool AccumulatorBufferGroup::isCurrent() const
@@ -124,44 +102,39 @@ bool AccumulatorBufferGroup::isCurrent() const
 
 void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mCounts.addSamples(other.mCounts, SEQUENTIAL);
 	mSamples.addSamples(other.mSamples, SEQUENTIAL);
 	mEvents.addSamples(other.mEvents, SEQUENTIAL);
-	mMemStats.addSamples(other.mMemStats, SEQUENTIAL);
 	mStackTimers.addSamples(other.mStackTimers, SEQUENTIAL);
 }
 
 void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
 	mSamples.addSamples(other.mSamples, NON_SEQUENTIAL);
 	mEvents.addSamples(other.mEvents, NON_SEQUENTIAL);
-	mMemStats.addSamples(other.mMemStats, NON_SEQUENTIAL);
 	// for now, hold out timers from merge, need to be displayed per thread
 	//mStackTimers.addSamples(other.mStackTimers, NON_SEQUENTIAL);
 }
 
 void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mCounts.reset(other ? &other->mCounts : NULL);
 	mSamples.reset(other ? &other->mSamples : NULL);
 	mEvents.reset(other ? &other->mEvents : NULL);
 	mStackTimers.reset(other ? &other->mStackTimers : NULL);
-	mMemStats.reset(other ? &other->mMemStats : NULL);
 }
 
 void AccumulatorBufferGroup::sync()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	if (isCurrent())
 	{
 		F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();
-
 		mSamples.sync(time_stamp);
-		mMemStats.sync(time_stamp);
 	}
 }
 
@@ -197,10 +170,9 @@ F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const Samp
 	return a.getSumOfSquares();
 }
 
-
 void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppendType append_type )
 {
-    if (append_type == NON_SEQUENTIAL)
+	if (append_type == NON_SEQUENTIAL)
 	{
 		return;
 	}
@@ -299,7 +271,7 @@ void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendT
 
 void EventAccumulator::reset( const EventAccumulator* other )
 {
-    mNumSamples = 0;
+	mNumSamples = 0;
 	mSum = 0;
 	mMin = F32(NaN);
 	mMax = F32(NaN);
@@ -308,5 +280,4 @@ void EventAccumulator::reset( const EventAccumulator* other )
 	mLastValue = other ? other->mLastValue : NaN;
 }
 
-
 }
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index 7267a44300cd605eef702d68b2f5c04e76d718b4..b9d577be9eef8ce0af40606dff4a6b86a5c2ff0d 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -1,26 +1,26 @@
 
-/** 
+/**
  * @file lltraceaccumulators.h
  * @brief Storage for accumulating statistics
  *
  * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2012, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
@@ -28,7 +28,6 @@
 #ifndef LL_LLTRACEACCUMULATORS_H
 #define LL_LLTRACEACCUMULATORS_H
 
-
 #include "stdtypes.h"
 #include "llpreprocessor.h"
 #include "llunits.h"
@@ -66,7 +65,7 @@ namespace LLTrace
 			: mStorageSize(0),
 			mStorage(NULL)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			const AccumulatorBuffer& other = *getDefaultBuffer();
 			resize(sNextStorageSlot);
 			for (S32 i = 0; i < sNextStorageSlot; i++)
@@ -77,7 +76,7 @@ namespace LLTrace
 
 		~AccumulatorBuffer()
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			if (isCurrent())
 			{
 				LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
@@ -85,14 +84,14 @@ namespace LLTrace
 			delete[] mStorage;
 		}
 
-		LL_FORCE_INLINE ACCUMULATOR& operator[](size_t index) 
-		{ 
-			return mStorage[index]; 
+		LL_FORCE_INLINE ACCUMULATOR& operator[](size_t index)
+		{
+			return mStorage[index];
 		}
 
 		LL_FORCE_INLINE const ACCUMULATOR& operator[](size_t index) const
-		{ 
-			return mStorage[index]; 
+		{
+			return mStorage[index];
 		}
 
 
@@ -100,7 +99,7 @@ namespace LLTrace
 			: mStorageSize(0),
 			mStorage(NULL)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			resize(sNextStorageSlot);
 			for (S32 i = 0; i < sNextStorageSlot; i++)
 			{
@@ -110,7 +109,7 @@ namespace LLTrace
 
 		void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, EBufferAppendType append_type)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
 			for (size_t i = 0; i < sNextStorageSlot; i++)
 			{
@@ -120,7 +119,7 @@ namespace LLTrace
 
 		void copyFrom(const AccumulatorBuffer<ACCUMULATOR>& other)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);
 			for (size_t i = 0; i < sNextStorageSlot; i++)
 			{
@@ -130,7 +129,7 @@ namespace LLTrace
 
 		void reset(const AccumulatorBuffer<ACCUMULATOR>* other = NULL)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			llassert(mStorageSize >= sNextStorageSlot);
 			for (size_t i = 0; i < sNextStorageSlot; i++)
 			{
@@ -140,7 +139,7 @@ namespace LLTrace
 
 		void sync(F64SecondsImplicit time_stamp)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			llassert(mStorageSize >= sNextStorageSlot);
 			for (size_t i = 0; i < sNextStorageSlot; i++)
 			{
@@ -160,13 +159,13 @@ namespace LLTrace
 
 		static void clearCurrent()
 		{
-            LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
+			LLThreadLocalSingletonPointer<ACCUMULATOR>::setInstance(NULL);
 		}
 
 		// NOTE: this is not thread-safe.  We assume that slots are reserved in the main thread before any child threads are spawned
 		size_t reserveSlot()
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			size_t next_slot = sNextStorageSlot++;
 			if (next_slot >= mStorageSize)
 			{
@@ -180,7 +179,7 @@ namespace LLTrace
 
 		void resize(size_t new_size)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			if (new_size <= mStorageSize) return;
 
 			ACCUMULATOR* old_storage = mStorage;
@@ -214,14 +213,14 @@ namespace LLTrace
 			return mStorageSize;
 		}
 
-		static size_t getNumIndices() 
+		static size_t getNumIndices()
 		{
 			return sNextStorageSlot;
 		}
 
 		static self_t* getDefaultBuffer()
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			static bool sInitialized = false;
 			if (!sInitialized)
 			{
@@ -336,7 +335,7 @@ namespace LLTrace
 
 		void sample(F64 value)
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			F64SecondsImplicit time_stamp = LLTimer::getTotalSeconds();
 
 			// store effect of last value
@@ -399,7 +398,7 @@ namespace LLTrace
 		F64		mMean,
 				mSumOfSquares;
 
-		F64SecondsImplicit	
+		F64SecondsImplicit
 				mLastSampleTimeStamp,
 				mTotalSamplingTime;
 
@@ -409,7 +408,7 @@ namespace LLTrace
 		S32		mNumSamples;
 		// distinct from mNumSamples, since we might have inherited a last value from
 		// a previous sampling period
-		bool	mHasValue;		
+		bool	mHasValue;
 	};
 
 	class CountAccumulator
@@ -457,14 +456,14 @@ namespace LLTrace
 
 	class alignas(32) TimeBlockAccumulator
 	{
-    public:
+	public:
 		typedef F64Seconds value_t;
 		static F64Seconds getDefaultValue() { return F64Seconds(0); }
 
 		typedef TimeBlockAccumulator self_t;
 
 		// fake classes that allows us to view different facets of underlying statistic
-		struct CallCountFacet 
+		struct CallCountFacet
 		{
 			typedef S32 value_t;
 		};
@@ -515,12 +514,12 @@ namespace LLTrace
 		BlockTimerStatHandle* getParent() { return mParent; }
 
 		BlockTimerStatHandle*					mBlock;
-		BlockTimerStatHandle*					mParent;	
+		BlockTimerStatHandle*					mParent;
 		std::vector<BlockTimerStatHandle*>		mChildren;
 		bool						mCollapsed;
 		bool						mNeedsSorting;
 	};
-	
+
 	struct BlockTimerStackRecord
 	{
 		class BlockTimer*	mActiveTimer;
@@ -528,65 +527,6 @@ namespace LLTrace
 		U64					mChildTime;
 	};
 
-	struct MemAccumulator
-	{
-		typedef F64Bytes value_t;
-		static F64Bytes getDefaultValue() { return F64Bytes(0); }
-
-		typedef MemAccumulator self_t;
-
-		// fake classes that allows us to view different facets of underlying statistic
-		struct AllocationFacet 
-		{
-			typedef F64Bytes value_t;
-			static F64Bytes getDefaultValue() { return F64Bytes(0); }
-		};
-
-		struct DeallocationFacet 
-		{
-			typedef F64Bytes value_t;
-			static F64Bytes getDefaultValue() { return F64Bytes(0); }
-		};
-
-		void addSamples(const MemAccumulator& other, EBufferAppendType append_type)
-		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-			mAllocations.addSamples(other.mAllocations, append_type);
-			mDeallocations.addSamples(other.mDeallocations, append_type);
-
-			if (append_type == SEQUENTIAL)
-			{
-				mSize.addSamples(other.mSize, SEQUENTIAL);
-			}
-			else
-			{
-				F64 allocation_delta(other.mAllocations.getSum() - other.mDeallocations.getSum());
-				mSize.sample(mSize.hasValue() 
-					? mSize.getLastValue() + allocation_delta 
-					: allocation_delta);
-			}
-		}
-
-		void reset(const MemAccumulator* other)
-		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-			mSize.reset(other ? &other->mSize : NULL);
-			mAllocations.reset(other ? &other->mAllocations : NULL);
-			mDeallocations.reset(other ? &other->mDeallocations : NULL);
-		}
-
-		void sync(F64SecondsImplicit time_stamp) 
-		{
-			mSize.sync(time_stamp);
-		}
-
-		bool hasValue() const			 { return mSize.hasValue(); }
-
-		SampleAccumulator	mSize;
-		EventAccumulator	mAllocations;
-		CountAccumulator	mDeallocations;
-	};
-
 	struct AccumulatorBufferGroup : public LLRefCount
 	{
 		AccumulatorBufferGroup();
@@ -607,9 +547,7 @@ namespace LLTrace
 		AccumulatorBuffer<SampleAccumulator>	mSamples;
 		AccumulatorBuffer<EventAccumulator>		mEvents;
 		AccumulatorBuffer<TimeBlockAccumulator> mStackTimers;
-		AccumulatorBuffer<MemAccumulator> 	mMemStats;
 	};
 }
 
 #endif // LL_LLTRACEACCUMULATORS_H
-
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index bb3d667a426baabcb63c46d71664bdf5e489ba0a..075e7c1d28ba3531b68d47934209bfa33c2df578 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -1,24 +1,24 @@
-/** 
+/**
  * @file lltracesampler.cpp
  *
  * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2012, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
@@ -32,7 +32,7 @@
 #include "lltracethreadrecorder.h"
 #include "llthread.h"
 
-inline F64 lerp(F64 a, F64 b, F64 u) 
+inline F64 lerp(F64 a, F64 b, F64 u)
 {
 	return a + ((b - a) * u);
 }
@@ -40,34 +40,29 @@ inline F64 lerp(F64 a, F64 b, F64 u)
 namespace LLTrace
 {
 
-extern MemStatHandle gTraceMemStat;
-
 ///////////////////////////////////////////////////////////////////////
 // Recording
 ///////////////////////////////////////////////////////////////////////
 
-Recording::Recording(EPlayState state) 
+Recording::Recording(EPlayState state)
 :	mElapsedSeconds(0),
 	mActiveBuffers(NULL)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	claim_alloc(gTraceMemStat, this);
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mBuffers = new AccumulatorBufferGroup();
-	claim_alloc(gTraceMemStat, mBuffers);
 	setPlayState(state);
 }
 
 Recording::Recording( const Recording& other )
 :	mActiveBuffers(NULL)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	claim_alloc(gTraceMemStat, this);
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	*this = other;
 }
 
 Recording& Recording::operator = (const Recording& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	// this will allow us to seamlessly start without affecting any data we've acquired from other
 	setPlayState(PAUSED);
 
@@ -85,14 +80,11 @@ Recording& Recording::operator = (const Recording& other)
 	return *this;
 }
 
-
 Recording::~Recording()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	disclaim_alloc(gTraceMemStat, this);
-	disclaim_alloc(gTraceMemStat, mBuffers);
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 
-	// allow recording destruction without thread recorder running, 
+	// allow recording destruction without thread recorder running,
 	// otherwise thread shutdown could crash if a recording outlives the thread recorder
 	// besides, recording construction and destruction is fine without a recorder...just don't attempt to start one
 	if (isStarted() && LLTrace::get_thread_recorder() != NULL)
@@ -107,14 +99,14 @@ void Recording::update()
 #if LL_TRACE_ENABLED
 	if (isStarted())
 	{
-        LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+		LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 		mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
 
-		// must have 
-		llassert(mActiveBuffers != NULL 
+		// must have
+		llassert(mActiveBuffers != NULL
 				&& LLTrace::get_thread_recorder() != NULL);
 
-		if(!mActiveBuffers->isCurrent() && LLTrace::get_thread_recorder() != NULL)
+		if (!mActiveBuffers->isCurrent() && LLTrace::get_thread_recorder() != NULL)
 		{
 			AccumulatorBufferGroup* buffers = mBuffers.write();
 			LLTrace::get_thread_recorder()->deactivate(buffers);
@@ -128,7 +120,7 @@ void Recording::update()
 
 void Recording::handleReset()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 #if LL_TRACE_ENABLED
 	mBuffers.write()->reset();
 
@@ -139,7 +131,7 @@ void Recording::handleReset()
 
 void Recording::handleStart()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 #if LL_TRACE_ENABLED
 	mSamplingTimer.reset();
 	mBuffers.setStayUnique(true);
@@ -151,7 +143,7 @@ void Recording::handleStart()
 
 void Recording::handleStop()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 #if LL_TRACE_ENABLED
 	mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
 	// must have thread recorder running on this thread
@@ -204,7 +196,6 @@ F64Seconds Recording::getSum(const StatType<TimeBlockAccumulator::SelfTimeFacet>
 	return F64Seconds(((F64)(accumulator.mSelfTimeCounter) + (F64)(active_accumulator ? active_accumulator->mSelfTimeCounter : 0)) / (F64)LLTrace::BlockTimer::countsPerSecond());
 }
 
-
 S32 Recording::getSum(const StatType<TimeBlockAccumulator::CallCountFacet>& stat)
 {
 	update();
@@ -219,7 +210,7 @@ F64Seconds Recording::getPerSec(const StatType<TimeBlockAccumulator>& stat)
 	const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()];
 	const TimeBlockAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mStackTimers[stat.getIndex()] : NULL;
 
-	return F64Seconds((F64)(accumulator.mTotalTimeCounter + (active_accumulator ? active_accumulator->mTotalTimeCounter : 0)) 
+	return F64Seconds((F64)(accumulator.mTotalTimeCounter + (active_accumulator ? active_accumulator->mTotalTimeCounter : 0))
 				/ ((F64)LLTrace::BlockTimer::countsPerSecond() * mElapsedSeconds.value()));
 }
 
@@ -241,144 +232,9 @@ F32 Recording::getPerSec(const StatType<TimeBlockAccumulator::CallCountFacet>& s
 	return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / mElapsedSeconds.value();
 }
 
-bool Recording::hasValue(const StatType<MemAccumulator>& stat)
-{
-	update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return accumulator.mSize.hasValue() || (active_accumulator && active_accumulator->mSize.hasValue() ? active_accumulator->mSize.hasValue() : false);
-}
-
-F64Kilobytes Recording::getMin(const StatType<MemAccumulator>& stat)
-{
-	update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes(llmin(accumulator.mSize.getMin(), (active_accumulator && active_accumulator->mSize.hasValue() ? active_accumulator->mSize.getMin() : F32_MAX)));
-}
-
-F64Kilobytes Recording::getMean(const StatType<MemAccumulator>& stat)
-{
-	update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	
-	if (active_accumulator && active_accumulator->mSize.hasValue())
-	{
-        F32 t = 0.0f;
-        S32 div = accumulator.mSize.getSampleCount() + active_accumulator->mSize.getSampleCount();
-        if (div > 0)
-        {
-            t = active_accumulator->mSize.getSampleCount() / div;
-        }
-		return F64Bytes(lerp(accumulator.mSize.getMean(), active_accumulator->mSize.getMean(), t));
-	}
-	else
-	{
-		return F64Bytes(accumulator.mSize.getMean());
-	}
-}
-
-F64Kilobytes Recording::getMax(const StatType<MemAccumulator>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes(llmax(accumulator.mSize.getMax(), active_accumulator && active_accumulator->mSize.hasValue() ? active_accumulator->mSize.getMax() : F32_MIN));
-}
-
-F64Kilobytes Recording::getStandardDeviation(const StatType<MemAccumulator>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	if (active_accumulator && active_accumulator->hasValue())
-	{
-		F64 sum_of_squares = SampleAccumulator::mergeSumsOfSquares(accumulator.mSize, active_accumulator->mSize);
-		return F64Bytes(sqrtf(sum_of_squares / (accumulator.mSize.getSamplingTime().value() + active_accumulator->mSize.getSamplingTime().value())));
-	}
-	else
-	{
-		return F64Bytes(accumulator.mSize.getStandardDeviation());
-	}
-}
-
-F64Kilobytes Recording::getLastValue(const StatType<MemAccumulator>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes(active_accumulator ? active_accumulator->mSize.getLastValue() : accumulator.mSize.getLastValue());
-}
-
-bool Recording::hasValue(const StatType<MemAccumulator::AllocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return accumulator.mAllocations.hasValue() || (active_accumulator ? active_accumulator->mAllocations.hasValue() : false);
-}
-
-F64Kilobytes Recording::getSum(const StatType<MemAccumulator::AllocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes(accumulator.mAllocations.getSum() + (active_accumulator ? active_accumulator->mAllocations.getSum() : 0));
-}
-
-F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::AllocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes((accumulator.mAllocations.getSum() + (active_accumulator ? active_accumulator->mAllocations.getSum() : 0)) / mElapsedSeconds.value());
-}
-
-S32 Recording::getSampleCount(const StatType<MemAccumulator::AllocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return accumulator.mAllocations.getSampleCount() + (active_accumulator ? active_accumulator->mAllocations.getSampleCount() : 0);
-}
-
-bool Recording::hasValue(const StatType<MemAccumulator::DeallocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return accumulator.mDeallocations.hasValue() || (active_accumulator ? active_accumulator->mDeallocations.hasValue() : false);
-}
-
-
-F64Kilobytes Recording::getSum(const StatType<MemAccumulator::DeallocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes(accumulator.mDeallocations.getSum() + (active_accumulator ? active_accumulator->mDeallocations.getSum() : 0));
-}
-
-F64Kilobytes Recording::getPerSec(const StatType<MemAccumulator::DeallocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return F64Bytes((accumulator.mDeallocations.getSum() + (active_accumulator ? active_accumulator->mDeallocations.getSum() : 0)) / mElapsedSeconds.value());
-}
-
-S32 Recording::getSampleCount(const StatType<MemAccumulator::DeallocationFacet>& stat)
-{
-    update();
-	const MemAccumulator& accumulator = mBuffers->mMemStats[stat.getIndex()];
-	const MemAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mMemStats[stat.getIndex()] : NULL;
-	return accumulator.mDeallocations.getSampleCount() + (active_accumulator ? active_accumulator->mDeallocations.getSampleCount() : 0);
-}
-
 bool Recording::hasValue(const StatType<CountAccumulator>& stat)
 {
-    update();
+	update();
 	const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
 	const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
 	return accumulator.hasValue() || (active_accumulator ? active_accumulator->hasValue() : false);
@@ -386,7 +242,7 @@ bool Recording::hasValue(const StatType<CountAccumulator>& stat)
 
 F64 Recording::getSum(const StatType<CountAccumulator>& stat)
 {
-    update();
+	update();
 	const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
 	const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
 	return accumulator.getSum() + (active_accumulator ? active_accumulator->getSum() : 0);
@@ -394,7 +250,7 @@ F64 Recording::getSum(const StatType<CountAccumulator>& stat)
 
 F64 Recording::getPerSec( const StatType<CountAccumulator>& stat )
 {
-    update();
+	update();
 	const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
 	const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
 	F64 sum = accumulator.getSum() + (active_accumulator ? active_accumulator->getSum() : 0);
@@ -403,7 +259,7 @@ F64 Recording::getPerSec( const StatType<CountAccumulator>& stat )
 
 S32 Recording::getSampleCount( const StatType<CountAccumulator>& stat )
 {
-    update();
+	update();
 	const CountAccumulator& accumulator = mBuffers->mCounts[stat.getIndex()];
 	const CountAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mCounts[stat.getIndex()] : NULL;
 	return accumulator.getSampleCount() + (active_accumulator ? active_accumulator->getSampleCount() : 0);
@@ -411,7 +267,7 @@ S32 Recording::getSampleCount( const StatType<CountAccumulator>& stat )
 
 bool Recording::hasValue(const StatType<SampleAccumulator>& stat)
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	return accumulator.hasValue() || (active_accumulator && active_accumulator->hasValue());
@@ -419,7 +275,7 @@ bool Recording::hasValue(const StatType<SampleAccumulator>& stat)
 
 F64 Recording::getMin( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	return llmin(accumulator.getMin(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMin() : F32_MAX);
@@ -427,7 +283,7 @@ F64 Recording::getMin( const StatType<SampleAccumulator>& stat )
 
 F64 Recording::getMax( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	return llmax(accumulator.getMax(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMax() : F32_MIN);
@@ -435,17 +291,17 @@ F64 Recording::getMax( const StatType<SampleAccumulator>& stat )
 
 F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	if (active_accumulator && active_accumulator->hasValue())
 	{
-        F32 t = 0.0f;
-        S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
-        if (div > 0)
-        {
-            t = active_accumulator->getSampleCount() / div;
-        }
+		F32 t = 0.0f;
+		S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
+		if (div > 0)
+		{
+			t = active_accumulator->getSampleCount() / div;
+		}
 		return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
 	}
 	else
@@ -456,7 +312,7 @@ F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
 
 F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 
@@ -473,7 +329,7 @@ F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
 
 F64 Recording::getLastValue( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	return (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getLastValue() : accumulator.getLastValue());
@@ -481,7 +337,7 @@ F64 Recording::getLastValue( const StatType<SampleAccumulator>& stat )
 
 S32 Recording::getSampleCount( const StatType<SampleAccumulator>& stat )
 {
-    update();
+	update();
 	const SampleAccumulator& accumulator = mBuffers->mSamples[stat.getIndex()];
 	const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
 	return accumulator.getSampleCount() + (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getSampleCount() : 0);
@@ -489,7 +345,7 @@ S32 Recording::getSampleCount( const StatType<SampleAccumulator>& stat )
 
 bool Recording::hasValue(const StatType<EventAccumulator>& stat)
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return accumulator.hasValue() || (active_accumulator && active_accumulator->hasValue());
@@ -497,7 +353,7 @@ bool Recording::hasValue(const StatType<EventAccumulator>& stat)
 
 F64 Recording::getSum( const StatType<EventAccumulator>& stat)
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return (F64)(accumulator.getSum() + (active_accumulator && active_accumulator->hasValue() ? active_accumulator->getSum() : 0));
@@ -505,7 +361,7 @@ F64 Recording::getSum( const StatType<EventAccumulator>& stat)
 
 F64 Recording::getMin( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return llmin(accumulator.getMin(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMin() : F32_MAX);
@@ -513,7 +369,7 @@ F64 Recording::getMin( const StatType<EventAccumulator>& stat )
 
 F64 Recording::getMax( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return llmax(accumulator.getMax(), active_accumulator && active_accumulator->hasValue() ? active_accumulator->getMax() : F32_MIN);
@@ -521,17 +377,17 @@ F64 Recording::getMax( const StatType<EventAccumulator>& stat )
 
 F64 Recording::getMean( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	if (active_accumulator && active_accumulator->hasValue())
 	{
 		F32 t = 0.0f;
-        S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
-        if (div > 0)
-        {
-            t = active_accumulator->getSampleCount() / div;
-        }
+		S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
+		if (div > 0)
+		{
+			t = active_accumulator->getSampleCount() / div;
+		}
 		return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
 	}
 	else
@@ -542,7 +398,7 @@ F64 Recording::getMean( const StatType<EventAccumulator>& stat )
 
 F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 
@@ -559,7 +415,7 @@ F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
 
 F64 Recording::getLastValue( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return active_accumulator ? active_accumulator->getLastValue() : accumulator.getLastValue();
@@ -567,7 +423,7 @@ F64 Recording::getLastValue( const StatType<EventAccumulator>& stat )
 
 S32 Recording::getSampleCount( const StatType<EventAccumulator>& stat )
 {
-    update();
+	update();
 	const EventAccumulator& accumulator = mBuffers->mEvents[stat.getIndex()];
 	const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
 	return accumulator.getSampleCount() + (active_accumulator ? active_accumulator->getSampleCount() : 0);
@@ -577,7 +433,7 @@ S32 Recording::getSampleCount( const StatType<EventAccumulator>& stat )
 // PeriodicRecording
 ///////////////////////////////////////////////////////////////////////
 
-PeriodicRecording::PeriodicRecording( size_t num_periods, EPlayState state) 
+PeriodicRecording::PeriodicRecording( size_t num_periods, EPlayState state)
 :	mAutoResize(num_periods == 0),
 	mCurPeriod(0),
 	mNumRecordedPeriods(0),
@@ -585,15 +441,13 @@ PeriodicRecording::PeriodicRecording( size_t num_periods, EPlayState state)
 	// code in several methods.
 	mRecordingPeriods(num_periods ? num_periods : 1)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	setPlayState(state);
-	claim_alloc(gTraceMemStat, this);
 }
 
 PeriodicRecording::~PeriodicRecording()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	disclaim_alloc(gTraceMemStat, this);
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 }
 
 void PeriodicRecording::nextPeriod()
@@ -615,12 +469,11 @@ void PeriodicRecording::nextPeriod()
 
 void PeriodicRecording::appendRecording(Recording& recording)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	getCurRecording().appendRecording(recording);
 	nextPeriod();
 }
 
-
 void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
 {
 	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
@@ -693,16 +546,14 @@ F64Seconds PeriodicRecording::getDuration() const
 	return duration;
 }
 
-
 LLTrace::Recording PeriodicRecording::snapshotCurRecording() const
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	Recording recording_copy(getCurRecording());
 	recording_copy.stop();
 	return recording_copy;
 }
 
-
 Recording& PeriodicRecording::getLastRecording()
 {
 	return getPrevRecording(1);
@@ -737,19 +588,19 @@ const Recording& PeriodicRecording::getPrevRecording( size_t offset ) const
 
 void PeriodicRecording::handleStart()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	getCurRecording().start();
 }
 
 void PeriodicRecording::handleStop()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	getCurRecording().pause();
 }
 
 void PeriodicRecording::handleReset()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	getCurRecording().stop();
 
 	if (mAutoResize)
@@ -771,13 +622,13 @@ void PeriodicRecording::handleReset()
 
 void PeriodicRecording::handleSplitTo(PeriodicRecording& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	getCurRecording().splitTo(other.getCurRecording());
 }
 
 F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	bool has_value = false;
@@ -792,14 +643,14 @@ F64 PeriodicRecording::getPeriodMin( const StatType<EventAccumulator>& stat, siz
 		}
 	}
 
-	return has_value 
-			? min_val 
+	return has_value
+			? min_val
 			: NaN;
 }
 
 F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	bool has_value = false;
@@ -814,15 +665,15 @@ F64 PeriodicRecording::getPeriodMax( const StatType<EventAccumulator>& stat, siz
 		}
 	}
 
-	return has_value 
-			? max_val 
+	return has_value
+			? max_val
 			: NaN;
 }
 
 // calculates means using aggregates per period
 F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	F64 mean = 0;
@@ -838,14 +689,14 @@ F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, si
 		}
 	}
 
-	return valid_period_count 
+	return valid_period_count
 			? mean / (F64)valid_period_count
 			: NaN;
 }
 
 F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	F64 period_mean = getPeriodMean(stat, num_periods);
@@ -870,7 +721,7 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulat
 
 F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	bool has_value = false;
@@ -885,14 +736,14 @@ F64 PeriodicRecording::getPeriodMin( const StatType<SampleAccumulator>& stat, si
 		}
 	}
 
-	return has_value 
-			? min_val 
+	return has_value
+			? min_val
 			: NaN;
 }
 
 F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	bool has_value = false;
@@ -907,15 +758,15 @@ F64 PeriodicRecording::getPeriodMax(const StatType<SampleAccumulator>& stat, siz
 		}
 	}
 
-	return has_value 
-			? max_val 
+	return has_value
+			? max_val
 			: NaN;
 }
 
 
 F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	S32 valid_period_count = 0;
@@ -938,7 +789,7 @@ F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, s
 
 F64 PeriodicRecording::getPeriodMedian( const StatType<SampleAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	std::vector<F64> buf;
@@ -964,7 +815,7 @@ F64 PeriodicRecording::getPeriodMedian( const StatType<SampleAccumulator>& stat,
 
 F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 	F64 period_mean = getPeriodMean(stat, num_periods);
@@ -987,105 +838,13 @@ F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumula
 			: NaN;
 }
 
-
-F64Kilobytes PeriodicRecording::getPeriodMin( const StatType<MemAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	num_periods = llmin(num_periods, getNumRecordedPeriods());
-
-	F64Kilobytes min_val(std::numeric_limits<F64>::max());
-	for (size_t i = 1; i <= num_periods; i++)
-	{
-		Recording& recording = getPrevRecording(i);
-		min_val = llmin(min_val, recording.getMin(stat));
-	}
-
-	return min_val;
-}
-
-F64Kilobytes PeriodicRecording::getPeriodMin(const MemStatHandle& stat, size_t num_periods)
-{
-	return getPeriodMin(static_cast<const StatType<MemAccumulator>&>(stat), num_periods);
-}
-
-F64Kilobytes PeriodicRecording::getPeriodMax(const StatType<MemAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/)
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	num_periods = llmin(num_periods, getNumRecordedPeriods());
-
-	F64Kilobytes max_val(0.0);
-	for (size_t i = 1; i <= num_periods; i++)
-	{
-		Recording& recording = getPrevRecording(i);
-		max_val = llmax(max_val, recording.getMax(stat));
-	}
-
-	return max_val;
-}
-
-F64Kilobytes PeriodicRecording::getPeriodMax(const MemStatHandle& stat, size_t num_periods)
-{
-	return getPeriodMax(static_cast<const StatType<MemAccumulator>&>(stat), num_periods);
-}
-
-F64Kilobytes PeriodicRecording::getPeriodMean( const StatType<MemAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	num_periods = llmin(num_periods, getNumRecordedPeriods());
-
-	F64Kilobytes mean(0);
-
-	for (size_t i = 1; i <= num_periods; i++)
-	{
-		Recording& recording = getPrevRecording(i);
-		mean += recording.getMean(stat);
-	}
-
-	return mean / F64(num_periods);
-}
-
-F64Kilobytes PeriodicRecording::getPeriodMean(const MemStatHandle& stat, size_t num_periods)
-{
-	return getPeriodMean(static_cast<const StatType<MemAccumulator>&>(stat), num_periods);
-}
-
-F64Kilobytes PeriodicRecording::getPeriodStandardDeviation( const StatType<MemAccumulator>& stat, size_t num_periods /*= std::numeric_limits<size_t>::max()*/ )
-{
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
-	num_periods = llmin(num_periods, getNumRecordedPeriods());
-
-	F64Kilobytes period_mean = getPeriodMean(stat, num_periods);
-	S32 valid_period_count = 0;
-	F64 sum_of_squares = 0;
-
-	for (size_t i = 1; i <= num_periods; i++)
-	{
-		Recording& recording = getPrevRecording(i);
-		if (recording.hasValue(stat))
-		{
-			F64Kilobytes delta = recording.getMean(stat) - period_mean;
-			sum_of_squares += delta.value() * delta.value();
-			valid_period_count++;
-		}
-	}
-
-	return F64Kilobytes(valid_period_count
-			? sqrt(sum_of_squares / (F64)valid_period_count)
-			: NaN);
-}
-
-F64Kilobytes PeriodicRecording::getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods)
-{
-	return getPeriodStandardDeviation(static_cast<const StatType<MemAccumulator>&>(stat), num_periods);
-}
-
 ///////////////////////////////////////////////////////////////////////
 // ExtendableRecording
 ///////////////////////////////////////////////////////////////////////
 
 void ExtendableRecording::extend()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	// push the data back to accepted recording
 	mAcceptedRecording.appendRecording(mPotentialRecording);
 	// flush data, so we can start from scratch
@@ -1094,76 +853,72 @@ void ExtendableRecording::extend()
 
 void ExtendableRecording::handleStart()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.start();
 }
 
 void ExtendableRecording::handleStop()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.pause();
 }
 
 void ExtendableRecording::handleReset()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mAcceptedRecording.reset();
 	mPotentialRecording.reset();
 }
 
 void ExtendableRecording::handleSplitTo(ExtendableRecording& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.splitTo(other.mPotentialRecording);
 }
 
-
 ///////////////////////////////////////////////////////////////////////
 // ExtendablePeriodicRecording
 ///////////////////////////////////////////////////////////////////////
 
-
-ExtendablePeriodicRecording::ExtendablePeriodicRecording() 
-:	mAcceptedRecording(0), 
+ExtendablePeriodicRecording::ExtendablePeriodicRecording()
+:	mAcceptedRecording(0),
 	mPotentialRecording(0)
 {}
 
 void ExtendablePeriodicRecording::extend()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	// push the data back to accepted recording
 	mAcceptedRecording.appendPeriodicRecording(mPotentialRecording);
 	// flush data, so we can start from scratch
 	mPotentialRecording.reset();
 }
 
-
 void ExtendablePeriodicRecording::handleStart()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.start();
 }
 
 void ExtendablePeriodicRecording::handleStop()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.pause();
 }
 
 void ExtendablePeriodicRecording::handleReset()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mAcceptedRecording.reset();
 	mPotentialRecording.reset();
 }
 
 void ExtendablePeriodicRecording::handleSplitTo(ExtendablePeriodicRecording& other)
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	mPotentialRecording.splitTo(other.mPotentialRecording);
 }
 
-
 PeriodicRecording& get_frame_recording()
 {
 	static thread_local PeriodicRecording sRecording(200, PeriodicRecording::STARTED);
@@ -1174,7 +929,7 @@ PeriodicRecording& get_frame_recording()
 
 void LLStopWatchControlsMixinCommon::start()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1196,7 +951,7 @@ void LLStopWatchControlsMixinCommon::start()
 
 void LLStopWatchControlsMixinCommon::stop()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1216,7 +971,7 @@ void LLStopWatchControlsMixinCommon::stop()
 
 void LLStopWatchControlsMixinCommon::pause()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1236,7 +991,7 @@ void LLStopWatchControlsMixinCommon::pause()
 
 void LLStopWatchControlsMixinCommon::unpause()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1256,7 +1011,7 @@ void LLStopWatchControlsMixinCommon::unpause()
 
 void LLStopWatchControlsMixinCommon::resume()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1277,7 +1032,7 @@ void LLStopWatchControlsMixinCommon::resume()
 
 void LLStopWatchControlsMixinCommon::restart()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch (mPlayState)
 	{
 	case STOPPED:
@@ -1301,13 +1056,13 @@ void LLStopWatchControlsMixinCommon::restart()
 
 void LLStopWatchControlsMixinCommon::reset()
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	handleReset();
 }
 
 void LLStopWatchControlsMixinCommon::setPlayState( EPlayState state )
 {
-    LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+	LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 	switch(state)
 	{
 	case STOPPED:
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index a6b1a67d021a1b6a6d5eb32252a667cd492d61c5..61b9096ae2d50ebda076613ee7d3d392c81997e3 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -1,25 +1,25 @@
-/** 
+/**
  * @file lltracerecording.h
  * @brief Sampling object for collecting runtime statistics originating from lltrace.
  *
  * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2012, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
@@ -112,7 +112,6 @@ class LLStopWatchControlsMixin
 	// atomically stop this object while starting the other
 	// no data can be missed in between stop and start
 	virtual void handleSplitTo(DERIVED& other) {};
-
 };
 
 namespace LLTrace
@@ -129,8 +128,6 @@ namespace LLTrace
 	template<typename T>
 	class EventStatHandle;
 
-	class MemStatHandle;
-
 	template<typename T>
 	struct RelatedTypes
 	{
@@ -152,7 +149,7 @@ namespace LLTrace
 		typedef S32 sum_t;
 	};
 
-	class Recording 
+	class Recording
 	:	public LLStopWatchControlsMixin<Recording>
 	{
 	public:
@@ -182,24 +179,6 @@ namespace LLTrace
 		F64Seconds getPerSec(const StatType<TimeBlockAccumulator::SelfTimeFacet>& stat);
 		F32 getPerSec(const StatType<TimeBlockAccumulator::CallCountFacet>& stat);
 
-		// Memory accessors
-		bool hasValue(const StatType<MemAccumulator>& stat);
-		F64Kilobytes getMin(const StatType<MemAccumulator>& stat);
-		F64Kilobytes getMean(const StatType<MemAccumulator>& stat);
-		F64Kilobytes getMax(const StatType<MemAccumulator>& stat);
-		F64Kilobytes getStandardDeviation(const StatType<MemAccumulator>& stat);
-		F64Kilobytes getLastValue(const StatType<MemAccumulator>& stat);
-
-		bool hasValue(const StatType<MemAccumulator::AllocationFacet>& stat);
-		F64Kilobytes getSum(const StatType<MemAccumulator::AllocationFacet>& stat);
-		F64Kilobytes getPerSec(const StatType<MemAccumulator::AllocationFacet>& stat);
-		S32 getSampleCount(const StatType<MemAccumulator::AllocationFacet>& stat);
-
-		bool hasValue(const StatType<MemAccumulator::DeallocationFacet>& stat);
-		F64Kilobytes getSum(const StatType<MemAccumulator::DeallocationFacet>& stat);
-		F64Kilobytes getPerSec(const StatType<MemAccumulator::DeallocationFacet>& stat);
-		S32 getSampleCount(const StatType<MemAccumulator::DeallocationFacet>& stat);
-
 		// CountStatHandle accessors
 		bool hasValue(const StatType<CountAccumulator>& stat);
 		F64 getSum(const StatType<CountAccumulator>& stat);
@@ -318,7 +297,7 @@ namespace LLTrace
 		/*virtual*/ void handleSplitTo(Recording& other);
 
 		// returns data for current thread
-		class ThreadRecorder* getThreadRecorder(); 
+		class ThreadRecorder* getThreadRecorder();
 
 		LLTimer											mSamplingTimer;
 		F64Seconds										mElapsedSeconds;
@@ -335,10 +314,10 @@ namespace LLTrace
 		~PeriodicRecording();
 
 		void nextPeriod();
-		auto getNumRecordedPeriods() 
-		{ 
+		auto getNumRecordedPeriods()
+		{
 			// current period counts if not active
-			return mNumRecordedPeriods + (isStarted() ? 0 : 1); 
+			return mNumRecordedPeriods + (isStarted() ? 0 : 1);
 		}
 
 		F64Seconds getDuration() const;
@@ -367,7 +346,7 @@ namespace LLTrace
 			}
 			return num_samples;
 		}
-        
+
 		//
 		// PERIODIC MIN
 		//
@@ -376,7 +355,7 @@ namespace LLTrace
 		template <typename T>
 		typename T::value_t getPeriodMin(const StatType<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			bool has_value = false;
@@ -391,15 +370,15 @@ namespace LLTrace
 				}
 			}
 
-			return has_value 
-				? min_val 
+			return has_value
+				? min_val
 				: T::getDefaultValue();
 		}
 
 		template<typename T>
 		T getPeriodMin(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMin(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 
@@ -407,7 +386,7 @@ namespace LLTrace
 		template<typename T>
 		T getPeriodMin(const SampleStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMin(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
 		}
 
@@ -415,17 +394,14 @@ namespace LLTrace
 		template<typename T>
 		T getPeriodMin(const EventStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMin(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
 		}
 
-		F64Kilobytes getPeriodMin(const StatType<MemAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		F64Kilobytes getPeriodMin(const MemStatHandle& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-
 		template <typename T>
 		typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMinPerSec(const StatType<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			typename RelatedTypes<typename T::value_t>::fractional_t min_val(std::numeric_limits<F64>::max());
@@ -440,7 +416,7 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMinPerSec(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMinPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 
@@ -452,7 +428,7 @@ namespace LLTrace
 		template <typename T>
 		typename T::value_t getPeriodMax(const StatType<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			bool has_value = false;
@@ -467,15 +443,15 @@ namespace LLTrace
 				}
 			}
 
-			return has_value 
-				? max_val 
+			return has_value
+				? max_val
 				: T::getDefaultValue();
 		}
 
 		template<typename T>
 		T getPeriodMax(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMax(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 
@@ -483,7 +459,7 @@ namespace LLTrace
 		template<typename T>
 		T getPeriodMax(const SampleStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMax(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
 		}
 
@@ -491,17 +467,14 @@ namespace LLTrace
 		template<typename T>
 		T getPeriodMax(const EventStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return T(getPeriodMax(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
 		}
 
-		F64Kilobytes getPeriodMax(const StatType<MemAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		F64Kilobytes getPeriodMax(const MemStatHandle& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-
 		template <typename T>
 		typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMaxPerSec(const StatType<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			F64 max_val = std::numeric_limits<F64>::min();
@@ -516,7 +489,7 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMaxPerSec(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMaxPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 
@@ -528,7 +501,7 @@ namespace LLTrace
 		template <typename T>
 		typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMean(const StatType<T >& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			typename RelatedTypes<typename T::value_t>::fractional_t mean(0);
@@ -549,14 +522,14 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMean(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 		F64 getPeriodMean(const StatType<SampleAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		template<typename T> 
+		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMean(const SampleStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
 		}
 
@@ -564,17 +537,14 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMean(const EventStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMean(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
 		}
 
-		F64Kilobytes getPeriodMean(const StatType<MemAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		F64Kilobytes getPeriodMean(const MemStatHandle& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		
 		template <typename T>
 		typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMeanPerSec(const StatType<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			num_periods = llmin(num_periods, getNumRecordedPeriods());
 
 			typename RelatedTypes<typename T::value_t>::fractional_t mean = 0;
@@ -596,7 +566,7 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodMeanPerSec(const CountStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
 		}
 
@@ -635,10 +605,10 @@ namespace LLTrace
 
 		F64 getPeriodStandardDeviation(const StatType<SampleAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
 
-		template<typename T> 
+		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const SampleStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<SampleAccumulator>&>(stat), num_periods));
 		}
 
@@ -646,13 +616,10 @@ namespace LLTrace
 		template<typename T>
 		typename RelatedTypes<T>::fractional_t getPeriodStandardDeviation(const EventStatHandle<T>& stat, size_t num_periods = std::numeric_limits<size_t>::max())
 		{
-            LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
+			LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
 			return typename RelatedTypes<T>::fractional_t(getPeriodStandardDeviation(static_cast<const StatType<EventAccumulator>&>(stat), num_periods));
 		}
 
-		F64Kilobytes getPeriodStandardDeviation(const StatType<MemAccumulator>& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-		F64Kilobytes getPeriodStandardDeviation(const MemStatHandle& stat, size_t num_periods = std::numeric_limits<size_t>::max());
-
 	private:
 		// implementation for LLStopWatchControlsMixin
 		/*virtual*/ void handleStart();
@@ -731,7 +698,7 @@ namespace LLTrace
 
 		PeriodicRecording& getResults()				{ return mAcceptedRecording; }
 		const PeriodicRecording& getResults() const	{return mAcceptedRecording;}
-		
+
 		void nextPeriod() { mPotentialRecording.nextPeriod(); }
 
 	private:
diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp
index 282c454a2aa1f4b424f274947e3bcebc9b1f5557..914bfb55dc67d678612a050f9ad9efddcf0de60c 100644
--- a/indra/llcommon/lltracethreadrecorder.cpp
+++ b/indra/llcommon/lltracethreadrecorder.cpp
@@ -32,7 +32,7 @@
 
 namespace LLTrace
 {
-extern MemStatHandle gTraceMemStat;
+//extern MemStatHandle gTraceMemStat;
 
 static ThreadRecorder* sMasterThreadRecorder = NULL;
 
@@ -81,9 +81,9 @@ void ThreadRecorder::init()
 
 	BlockTimer::getRootTimeBlock().getCurrentAccumulator().mActiveCount = 1;
 
-	claim_alloc(gTraceMemStat, this);
-	claim_alloc(gTraceMemStat, mRootTimer);
-	claim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
+	//claim_alloc(gTraceMemStat, this);
+	//claim_alloc(gTraceMemStat, mRootTimer);
+	//claim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
 #endif
 }
 
@@ -101,9 +101,9 @@ ThreadRecorder::~ThreadRecorder()
 #if LL_TRACE_ENABLED
 	LLThreadLocalSingletonPointer<BlockTimerStackRecord>::setInstance(NULL);
 
-	disclaim_alloc(gTraceMemStat, this);
-	disclaim_alloc(gTraceMemStat, sizeof(BlockTimer));
-	disclaim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
+	//disclaim_alloc(gTraceMemStat, this);
+	//disclaim_alloc(gTraceMemStat, sizeof(BlockTimer));
+	//disclaim_alloc(gTraceMemStat, sizeof(TimeBlockTreeNode) * mNumTimeBlockTreeNodes);
 
 	deactivate(&mThreadRecordingBuffers);
 
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index e4f229dd163f05bd22608c4d9b3ff2b158ce1804..f79a98a56d2b055809ccd50e9721181e92457caf 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -164,8 +164,10 @@ void LLUriParser::extractParts()
 #if LL_DARWIN
 typedef void(*sighandler_t)(int);
 jmp_buf return_to_normalize;
+static int sLastSignal = 0;
 void uri_signal_handler(int signal)
 {
+    sLastSignal = signal;
     // Apparently signal handler throwing an exception doesn't work.
     // This is ugly and unsafe due to not unwinding content of uriparser library,
     // but unless we have a way to catch this as NSexception, jump appears to be the only option.
@@ -179,8 +181,10 @@ S32 LLUriParser::normalize()
 	if (!mRes)
 	{
 #if LL_DARWIN
-        sighandler_t last_handler;
-        last_handler = signal(SIGILL, &uri_signal_handler);		// illegal instruction
+        sighandler_t last_sigill_handler, last_sigbus_handler;
+        last_sigill_handler = signal(SIGILL, &uri_signal_handler);		// illegal instruction
+        last_sigbus_handler = signal(SIGBUS, &uri_signal_handler);
+        
         if (setjmp(return_to_normalize))
         {
             // Issue: external library crashed via signal
@@ -194,8 +198,9 @@ S32 LLUriParser::normalize()
             // if this can be handled by NSexception, it needs to be remade
             llassert(0);
 
-            LL_WARNS() << "Uriparser crashed with SIGILL, while processing: " << mNormalizedUri << LL_ENDL;
-            signal(SIGILL, last_handler);
+            LL_WARNS() << "Uriparser crashed with " << sLastSignal << " , while processing: " << mNormalizedUri << LL_ENDL;
+            signal(SIGILL, last_sigill_handler);
+            signal(SIGBUS, last_sigbus_handler);
             return 1;
         }
 #endif
@@ -203,7 +208,8 @@ S32 LLUriParser::normalize()
         mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
 
 #if LL_DARWIN
-        signal(SIGILL, last_handler);
+        signal(SIGILL, last_sigill_handler);
+        signal(SIGBUS, last_sigbus_handler);
 #endif
 
         if (!mRes)
@@ -226,7 +232,7 @@ S32 LLUriParser::normalize()
         }
 	}
 
-	if(mTmpScheme)
+	if(mTmpScheme && mNormalizedUri.size() > 7)
 	{
 		mNormalizedUri = mNormalizedUri.substr(7);
 		mTmpScheme = false;
diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h
index 0b43d7ad4b4c272da5026cefa8c4773509863dfa..3aba9dda00abc863443e441345377dd7a3109bd9 100644
--- a/indra/llcommon/stdtypes.h
+++ b/indra/llcommon/stdtypes.h
@@ -156,18 +156,15 @@ typedef int intptr_t;
  * type.
  */
 // narrow_holder is a struct that accepts the passed value as its original
-// type and provides templated conversion functions to other types. Once we're
-// building with compilers that support Class Template Argument Deduction, we
-// can rename this class template 'narrow' and eliminate the narrow() factory
-// function below.
+// type and provides templated conversion functions to other types.
 template <typename FROM>
-class narrow_holder
+class narrow
 {
 private:
     FROM mValue;
 
 public:
-    narrow_holder(FROM value): mValue(value) {}
+    narrow(FROM value): mValue(value) {}
 
     /*---------------------- Narrowing unsigned to signed ----------------------*/
     template <typename TO,
@@ -207,13 +204,4 @@ class narrow_holder
     }
 };
 
-/// narrow() factory function returns a narrow_holder<FROM>(), which can be
-/// implicitly converted to the target type.
-template <typename FROM>
-inline
-narrow_holder<FROM> narrow(FROM value)
-{
-    return { value };
-}
-
 #endif
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index 148c18aabea3c82c826d5585d50259c4ed8a1b9e..b4cdbdc6bf1cd3659b9a317dbabee0afcb1cf40b 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -153,27 +153,27 @@ namespace tut
 
 		int countMessages()
 		{
-			return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
+			return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
 		}
 
 		void clearMessages()
 		{
-			boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
+			std::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
 		}
 
 		void setWantsTime(bool t)
             {
-                boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
+                std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
             }
 
 		void setWantsMultiline(bool t)
             {
-                boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
+                std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
             }
 
 		std::string message(int n)
 		{
-			return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
+			return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
 		}
 
 		void ensure_message_count(int expectedCount)
@@ -497,12 +497,12 @@ namespace
 	void testLogName(LLError::RecorderPtr recorder, LogFromFunction f,
 		const std::string& class_name = "")
 	{
-		boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
+		std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
 		std::string name = f(false);
 		f(true);
 
-		std::string messageWithoutName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
-		std::string messageWithName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
+		std::string messageWithoutName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
+		std::string messageWithName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
 
 		ensure_has(name + " logged without name",
 			messageWithoutName, name);
@@ -691,13 +691,13 @@ namespace tut
 		LL_INFOS() << "boo" << LL_ENDL;
 
 		ensure_message_field_equals(0, MSG_FIELD, "boo");
-		ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
-		ensure_contains("alt recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
+		ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
+		ensure_contains("alt recorder message 0", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
 
 		LLError::setTimeFunction(roswell);
 
 		LLError::RecorderPtr anotherRecorder(new TestRecorder());
-		boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
+		std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
 		LLError::addRecorder(anotherRecorder);
 
 		LL_INFOS() << "baz" << LL_ENDL;
@@ -705,10 +705,10 @@ namespace tut
 		std::string when = roswell();
 
 		ensure_message_does_not_contain(1, when);
-		ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
-		ensure_does_not_contain("alt recorder message 1", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
-		ensure_equals("another recorder count", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
-		ensure_contains("another recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
+		ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
+		ensure_does_not_contain("alt recorder message 1", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
+		ensure_equals("another recorder count", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
+		ensure_contains("another recorder message 0", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
 
 		LLError::removeRecorder(altRecorder);
 		LLError::removeRecorder(anotherRecorder);
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index 032923a1083e8a59940959f0e2e9a2192067f4e7..01104545c6108baa057e5941e3242b0b909ffa29 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -101,7 +101,7 @@ namespace tut
         int which;
         LLTestApp testApp;
 
-        void explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp);
+        void explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp);
         void waitForEventOn1();
         void coroPump();
         void postAndWait1();
@@ -111,7 +111,7 @@ namespace tut
     typedef coroutine_group::object object;
     coroutine_group coroutinegrp("coroutine");
 
-    void test_data::explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp)
+    void test_data::explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp)
     {
         BEGIN
         {
@@ -127,7 +127,7 @@ namespace tut
             // For test purposes, instead of handing 'callback' (or an
             // adapter) off to some I/O subsystem, we'll just pass it back to
             // our caller.
-            cbp = boost::make_shared<LLCoros::Promise<std::string>>();
+            cbp = std::make_shared<LLCoros::Promise<std::string>>();
             LLCoros::Future<std::string> future = LLCoros::getFuture(*cbp);
 
             // calling get() on the future causes us to suspend
@@ -146,7 +146,7 @@ namespace tut
         DEBUG;
 
         // Construct the coroutine instance that will run explicit_wait.
-        boost::shared_ptr<LLCoros::Promise<std::string>> respond;
+        std::shared_ptr<LLCoros::Promise<std::string>> respond;
         LLCoros::instance().launch("test<1>",
                                    [this, &respond](){ explicit_wait(respond); });
         mSync.bump();
diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp
index 5daa29adf44386ce3ee2ca3670e08ca012a3f37f..95af9c2a50db8f2e806e3301e7d474443f5c6359 100644
--- a/indra/llcommon/tests/llinstancetracker_test.cpp
+++ b/indra/llcommon/tests/llinstancetracker_test.cpp
@@ -94,7 +94,7 @@ namespace tut
             ensure("couldn't find stack Keyed", bool(found));
             ensure_equals("found wrong Keyed instance", found.get(), &one);
             {
-                boost::scoped_ptr<Keyed> two(new Keyed("two"));
+                std::unique_ptr<Keyed> two(new Keyed("two"));
                 ensure_equals(Keyed::instanceCount(), 2);
                 auto found = Keyed::getInstance("two");
                 ensure("couldn't find heap Keyed", bool(found));
@@ -118,7 +118,7 @@ namespace tut
             std::weak_ptr<Unkeyed> found = one.getWeak();
             ensure(! found.expired());
             {
-                boost::scoped_ptr<Unkeyed> two(new Unkeyed);
+                std::unique_ptr<Unkeyed> two(new Unkeyed);
                 ensure_equals(Unkeyed::instanceCount(), 2);
             }
             ensure_equals(Unkeyed::instanceCount(), 1);
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index b6b297b8d7bfafdfb790837b72345d7a55ba2a52..628f046f55d163d3088109a60a7487957b31af3d 100644
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -21,7 +21,6 @@
 // external library headers
 #include "llapr.h"
 #include "apr_thread_proc.h"
-#include <boost/foreach.hpp>
 #include <boost/function.hpp>
 #include <boost/algorithm/string/find_iterator.hpp>
 #include <boost/algorithm/string/finder.hpp>
@@ -323,7 +322,7 @@ namespace tut
     {
 /*==========================================================================*|
         std::string reason_str;
-        BOOST_FOREACH(const ReasonCode& rcp, reasons)
+        for (const ReasonCode& rcp : reasons)
         {
             if (reason == rcp.code)
             {
@@ -554,7 +553,7 @@ namespace tut
         catch (const failure&)
         {
             std::cout << "History:\n";
-            BOOST_FOREACH(const Item& item, history)
+            for (const Item& item : history)
             {
                 std::string what(item.what);
                 if ((! what.empty()) && what[what.length() - 1] == '\n')
diff --git a/indra/llcommon/tests/llstreamqueue_test.cpp b/indra/llcommon/tests/llstreamqueue_test.cpp
index 050ad5c5bff287ddc7bdad0f7ed7f59997c9f123..8af057328b49a1a537641f9462b9b365c62ddff3 100644
--- a/indra/llcommon/tests/llstreamqueue_test.cpp
+++ b/indra/llcommon/tests/llstreamqueue_test.cpp
@@ -15,9 +15,6 @@
 #include "llstreamqueue.h"
 // STL headers
 #include <vector>
-// std headers
-// external library headers
-#include <boost/foreach.hpp>
 // other Linden headers
 #include "../test/lltut.h"
 #include "stringize.h"
@@ -133,7 +130,7 @@ namespace tut
         std::streamsize leave(5);   // len("craft") above
         std::streamsize skip(total - leave);
         std::streamsize written(0);
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             written += strq.write(&block[0], block.length());
             ensure_equals("size() after write()", strq.size(), written);
@@ -152,7 +149,7 @@ namespace tut
     {
         set_test_name("concatenate blocks");
         std::string blocks[] = { "abcd", "efghij", "klmnopqrs" };
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             strq.write(&block[0], block.length());
         }
@@ -170,7 +167,7 @@ namespace tut
     {
         set_test_name("split blocks");
         std::string blocks[] = { "abcdefghijklm", "nopqrstuvwxyz" };
-        BOOST_FOREACH(const std::string& block, blocks)
+        for (const std::string& block : blocks)
         {
             strq.write(&block[0], block.length());
         }
diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp
index 1d619867d480c7f120788fe8a141f58b3ab655ab..b9c7a70c07b06b0ca4fba802e451e79e8a0df642 100644
--- a/indra/llcommon/tests/lltreeiterators_test.cpp
+++ b/indra/llcommon/tests/lltreeiterators_test.cpp
@@ -38,7 +38,6 @@
 // external library headers
 #include <boost/bind.hpp>
 #include <boost/range/iterator_range.hpp>
-#include <boost/foreach.hpp>
 
 // associated header
 #include "../lltreeiterators.h"
@@ -402,7 +401,7 @@ class TreeNode: public LLRefCount
  *
  * Example:
  * @code
- * BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(somenode))
+ * for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(somenode))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -424,7 +423,7 @@ getRootRange(const TreeNodePtr& node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(TreeNodePtr node, getWalkRange<LLTreeIter::DFS_PRE>(root))
+ * for (TreeNodePtr node : getWalkRange<LLTreeIter::DFS_PRE>(root))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -520,7 +519,7 @@ class EnhancedTreeNode: public LLRefCount
      *
      * Example usage:
      * @code
-     * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getRootRange<LLTreeIter::UP>())
+     * for (EnhancedTreeNodePtr node : somenode->getRootRange<LLTreeIter::UP>())
      * {
      *     std::cout << node->name() << '\n';
      * }
@@ -564,7 +563,7 @@ class EnhancedTreeNode: public LLRefCount
      *
      * Example usage:
      * @code
-     * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getWalkRange<LLTreeIter::DFS_PRE>())
+     * for (EnhancedTreeNodePtr node : somenode->getWalkRange<LLTreeIter::DFS_PRE>())
      * {
      *     std::cout << node->name() << '\n';
      * }
@@ -644,7 +643,7 @@ LLLinkedIter<PlainTree> PlainTree_child_end(PlainTree* node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(PlainTree* node, getRootRange<LLTreeIter::UP>(somenode))
+ * for (PlainTree* node : getRootRange<LLTreeIter::UP>(somenode))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -668,7 +667,7 @@ getRootRange(PlainTree* node)
  *
  * Example:
  * @code
- * BOOST_FOREACH(PlainTree* node, getWalkRange<LLTreeIter::DFS_PRE>(root))
+ * for (PlainTree* node : getWalkRange<LLTreeIter::DFS_PRE>(root))
  * {
  *     std::cout << node->name() << '\n';
  * }
@@ -1103,18 +1102,18 @@ namespace tut
         // This test function illustrates the looping techniques described in the
         // comments for the getRootRange() free function, the
         // EnhancedTreeNode::root_range template and the
-        // EnhancedTreeNode::getRootRange() method. Obviously the BOOST_FOREACH()
+        // EnhancedTreeNode::getRootRange() method. Obviously the for()
         // forms are more succinct.
         TreeNodePtr tnroot(example_tree<TreeNode>());
         TreeNodePtr tnB2b(get_B2b<TreeNode, TreeNode::child_iterator>
                           (tnroot, boost::bind(&TreeNode::child_begin, _1)));
     
-        std::string desc1("BOOST_FOREACH(TreeNodePr, getRootRange<LLTreeIter::UP>(tnB2b))");
+        std::string desc1("for (TreeNodePr : getRootRange<LLTreeIter::UP>(tnB2b))");
 //      std::cout << desc1 << "\n";
         // Although we've commented out the output statement, ensure that the
         // loop construct is still valid, as promised by the getRootRange()
         // documentation.
-        BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(tnB2b))
+        for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(tnB2b))
         {
 //          std::cout << node->name() << '\n';
         }
@@ -1137,9 +1136,9 @@ namespace tut
 //          std::cout << (*ri)->name() << '\n';
         }
 
-        std::string desc2("BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())");
+        std::string desc2("for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())");
 //      std::cout << desc2 << '\n';
-        BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())
+        for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())
         {
 //          std::cout << node->name() << '\n';
         }
diff --git a/indra/llcommon/tests/threadsafeschedule_test.cpp b/indra/llcommon/tests/threadsafeschedule_test.cpp
index c421cc7b1c3634ba4b81511a1097d136a50bb166..885159018939c329960ec72e29958e073d27cd61 100644
--- a/indra/llcommon/tests/threadsafeschedule_test.cpp
+++ b/indra/llcommon/tests/threadsafeschedule_test.cpp
@@ -46,11 +46,12 @@ namespace tut
         // the real time required for each push() call. Explicitly increment
         // the timestamp for each one -- but since we're passing explicit
         // timestamps, make the queue reorder them.
-        queue.push(Queue::TimeTuple(Queue::Clock::now() + 200ms, "ghi"));
+        auto now{ Queue::Clock::now() };
+        queue.push(Queue::TimeTuple(now + 200ms, "ghi"));
         // Given the various push() overloads, you have to match the type
         // exactly: conversions are ambiguous.
         queue.push("abc"s);
-        queue.push(Queue::Clock::now() + 100ms, "def");
+        queue.push(now + 100ms, "def");
         queue.close();
         auto entry = queue.pop();
         ensure_equals("failed to pop first", std::get<0>(entry), "abc"s);
diff --git a/indra/llcommon/tests/wrapllerrs.h b/indra/llcommon/tests/wrapllerrs.h
index d657b329bbb182f1a44d71fc68793ae0a955d483..6978c296b39a3a1077fda95c6b9a62dbfd366bf6 100644
--- a/indra/llcommon/tests/wrapllerrs.h
+++ b/indra/llcommon/tests/wrapllerrs.h
@@ -218,12 +218,12 @@ class CaptureLog : public boost::noncopyable
     /// for the sought string.
     std::string messageWith(const std::string& search, bool required=true)
     {
-        return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
+        return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
     }
 
     std::ostream& streamto(std::ostream& out) const
     {
-        return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
+        return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
     }
 
     friend inline std::ostream& operator<<(std::ostream& out, const CaptureLog& self)
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp
index 3a9a5a20626abf939a97bbb489ad22d2b6ce2990..c48989358ec4790b61b122cd3055c06b7570e708 100644
--- a/indra/llcommon/threadpool.cpp
+++ b/indra/llcommon/threadpool.cpp
@@ -60,12 +60,15 @@ struct sleepy_robin: public boost::fibers::algo::round_robin
 /*****************************************************************************
 *   ThreadPoolBase
 *****************************************************************************/
-LL::ThreadPoolBase::ThreadPoolBase(const std::string& name, size_t threads,
-                                   WorkQueueBase* queue):
+LL::ThreadPoolBase::ThreadPoolBase(const std::string& name,
+                                   size_t threads,
+                                   WorkQueueBase* queue,
+                                   bool auto_shutdown):
     super(name),
     mName("ThreadPool:" + name),
     mThreadCount(getConfiguredWidth(name, threads)),
-    mQueue(queue)
+    mQueue(queue),
+    mAutomaticShutdown(auto_shutdown)
 {}
 
 void LL::ThreadPoolBase::start()
@@ -79,6 +82,14 @@ void LL::ThreadPoolBase::start()
                 run(tname);
             });
     }
+
+    if (!mAutomaticShutdown)
+    {
+        // Some threads, like main window's might need to run a bit longer
+        // to wait for a proper shutdown message
+        return;
+    }
+
     // Listen on "LLApp", and when the app is shutting down, close the queue
     // and join the workers.
     LLEventPumps::instance().obtain("LLApp").listen(
@@ -109,8 +120,11 @@ void LL::ThreadPoolBase::close()
         mQueue->close();
         for (auto& pair: mThreads)
         {
-            LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL;
-            pair.second.join();
+            if (pair.second.joinable())
+            {
+                LL_DEBUGS("ThreadPool") << mName << " waiting on thread " << pair.first << LL_ENDL;
+                pair.second.join();
+            }
         }
         LL_DEBUGS("ThreadPool") << mName << " shutdown complete" << LL_ENDL;
     }
diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h
index 60f4a0ce1bc4c0d99da918320288518e313880bf..74056aea170c7a2da3b1fce33db3b383d2ec4f7c 100644
--- a/indra/llcommon/threadpool.h
+++ b/indra/llcommon/threadpool.h
@@ -40,7 +40,7 @@ namespace LL
          * overrides this parameter.
          */
         ThreadPoolBase(const std::string& name, size_t threads,
-                       WorkQueueBase* queue);
+                       WorkQueueBase* queue, bool auto_shutdown = true);
         virtual ~ThreadPoolBase();
 
         /**
@@ -55,7 +55,7 @@ namespace LL
          * ThreadPool listens for application shutdown messages on the "LLApp"
          * LLEventPump. Call close() to shut down this ThreadPool early.
          */
-        void close();
+        virtual void close();
 
         std::string getName() const { return mName; }
         size_t getWidth() const { return mThreads.size(); }
@@ -87,13 +87,14 @@ namespace LL
 
     protected:
         std::unique_ptr<WorkQueueBase> mQueue;
+        std::vector<std::pair<std::string, std::thread>> mThreads;
+        bool mAutomaticShutdown;
 
     private:
         void run(const std::string& name);
 
         std::string mName;
         size_t mThreadCount;
-        std::vector<std::pair<std::string, std::thread>> mThreads;
     };
 
     /**
@@ -117,8 +118,11 @@ namespace LL
          * Constraining the queue can cause a submitter to block. Do not
          * constrain any ThreadPool accepting work from the main thread.
          */
-        ThreadPoolUsing(const std::string& name, size_t threads=1, size_t capacity=1024*1024):
-            ThreadPoolBase(name, threads, new queue_t(name, capacity))
+        ThreadPoolUsing(const std::string& name,
+                        size_t threads=1,
+                        size_t capacity=1024*1024,
+                        bool auto_shutdown = true):
+            ThreadPoolBase(name, threads, new queue_t(name, capacity), auto_shutdown)
         {}
         ~ThreadPoolUsing() override {}
 
diff --git a/indra/llcorehttp/_httplibcurl.h b/indra/llcorehttp/_httplibcurl.h
index a71eae59c087eed0900f26046eb6165b4611c044..61ecc492af0b60cbebe1b8bb969f4c86c3a476cd 100644
--- a/indra/llcorehttp/_httplibcurl.h
+++ b/indra/llcorehttp/_httplibcurl.h
@@ -65,7 +65,7 @@ class HttpLibcurl
 	void operator=(const HttpLibcurl &);		// Not defined
 
 public:
-    typedef boost::shared_ptr<HttpOpRequest> opReqPtr_t;
+    typedef std::shared_ptr<HttpOpRequest> opReqPtr_t;
 
 	/// Give cycles to libcurl to run active requests.  Completed
 	/// operations (successful or failed) will be retried or handed
diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp
index 3b6401813206824e5b74e7eb87f33e92d05d89b2..c3a9bcaf5463af3d1a67be1ace532c359aa8733a 100644
--- a/indra/llcorehttp/_httpoperation.cpp
+++ b/indra/llcorehttp/_httpoperation.cpp
@@ -58,7 +58,7 @@ HttpOperation::handleMap_t  HttpOperation::mHandleMap;
 LLCoreInt::HttpMutex	    HttpOperation::mOpMutex;
 
 HttpOperation::HttpOperation():
-    boost::enable_shared_from_this<HttpOperation>(),
+    std::enable_shared_from_this<HttpOperation>(),
     mReplyQueue(),
     mUserHandler(),
     mReqPolicy(HttpRequest::DEFAULT_POLICY_ID),
diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h
index 8c1364bab4ef1a6e489dc6c15faca325f00bf7bb..b07ef76d495856b416fe4b918a8695c99fa7d54a 100644
--- a/indra/llcorehttp/_httpoperation.h
+++ b/indra/llcorehttp/_httpoperation.h
@@ -69,12 +69,12 @@ class HttpService;
 /// and those interfaces establish the access rules.
 
 class HttpOperation : private boost::noncopyable,
-    public boost::enable_shared_from_this<HttpOperation>
+    public std::enable_shared_from_this<HttpOperation>
 {
 public:
-    typedef boost::shared_ptr<HttpOperation> ptr_t;
-    typedef boost::weak_ptr<HttpOperation> wptr_t;
-    typedef boost::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
+    typedef std::shared_ptr<HttpOperation> ptr_t;
+    typedef std::weak_ptr<HttpOperation> wptr_t;
+    typedef std::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
 
 	/// Threading:  called by consumer thread.
 	HttpOperation();
@@ -157,12 +157,12 @@ class HttpOperation : private boost::noncopyable,
     HttpHandle getHandle();
 
     template< class OPT >
-    static boost::shared_ptr< OPT > fromHandle(HttpHandle handle)
+    static std::shared_ptr< OPT > fromHandle(HttpHandle handle)
     {
         ptr_t ptr = findByHandle(handle);
         if (!ptr)
-            return boost::shared_ptr< OPT >();
-        return boost::dynamic_pointer_cast< OPT >(ptr);
+            return std::shared_ptr< OPT >();
+        return std::dynamic_pointer_cast< OPT >(ptr);
     }
 	
 protected:
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index d60eb6c95faff241ed8edfc33fbf62bf4398aaa2..324714621222c8f6ddcff6261d1b93d57f6866ac 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -201,7 +201,7 @@ HttpOpRequest::~HttpOpRequest()
 void HttpOpRequest::stageFromRequest(HttpService * service)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
-    HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
+    HttpOpRequest::ptr_t self(std::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
     service->getPolicy().addOp(self);			// transfers refcount
 }
 
@@ -209,7 +209,7 @@ void HttpOpRequest::stageFromRequest(HttpService * service)
 void HttpOpRequest::stageFromReady(HttpService * service)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
-    HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
+    HttpOpRequest::ptr_t self(std::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
     service->getTransport().addOp(self);		// transfers refcount
 }
 
@@ -290,7 +290,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
 // HttpOpRequest::ptr_t HttpOpRequest::fromHandle(HttpHandle handle)
 // {
 // 
-//     return boost::dynamic_pointer_cast<HttpOpRequest>((static_cast<HttpOpRequest *>(handle))->shared_from_this());
+//     return std::dynamic_pointer_cast<HttpOpRequest>((static_cast<HttpOpRequest *>(handle))->shared_from_this());
 // }
 
 
diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h
index ec84822cf46b085d12c5f2207b7c151197246b70..626064329d011b525fac470b000364dca3fdcd38 100644
--- a/indra/llcorehttp/_httpoprequest.h
+++ b/indra/llcorehttp/_httpoprequest.h
@@ -66,7 +66,7 @@ class BufferArray;
 class HttpOpRequest : public HttpOperation
 {
 public:
-    typedef boost::shared_ptr<HttpOpRequest> ptr_t;
+    typedef std::shared_ptr<HttpOpRequest> ptr_t;
 
 	HttpOpRequest();
 
diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h
index eabd41e79f29496cd3f8fd886390042010cb17df..04ab2446ef1c6eac35f0a30d4716ad25f0d22699 100644
--- a/indra/llcorehttp/_httpopsetget.h
+++ b/indra/llcorehttp/_httpopsetget.h
@@ -53,7 +53,7 @@ namespace LLCore
 class HttpOpSetGet : public HttpOperation
 {
 public:
-    typedef boost::shared_ptr<HttpOpSetGet> ptr_t;
+    typedef std::shared_ptr<HttpOpSetGet> ptr_t;
 
 	HttpOpSetGet();
 
diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h
index 0b8806a3e2f7be19fae4dd30b4bc7b32b043c060..955f757c938d0a134a6ed20773bb30dee8cb635a 100644
--- a/indra/llcorehttp/_httppolicy.h
+++ b/indra/llcorehttp/_httppolicy.h
@@ -60,7 +60,7 @@ class HttpPolicy
 	void operator=(const HttpPolicy &);			// Not defined
 
 public:
-    typedef boost::shared_ptr<HttpOpRequest> opReqPtr_t;
+    typedef std::shared_ptr<HttpOpRequest> opReqPtr_t;
 
 	/// Threading:  called by init thread.
 	HttpRequest::policy_t createPolicyClass();
diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h
index 33e205c1c961092e347990b38b3e9d56d54bfb69..2de26249ef671b115cf5f909a3441e37d220e339 100644
--- a/indra/llcorehttp/_httpreplyqueue.h
+++ b/indra/llcorehttp/_httpreplyqueue.h
@@ -63,8 +63,8 @@ class HttpReplyQueue : private boost::noncopyable
 {
 
 public:
-    typedef boost::shared_ptr<HttpOperation>    opPtr_t;
-    typedef boost::shared_ptr<HttpReplyQueue>   ptr_t;
+    typedef std::shared_ptr<HttpOperation>    opPtr_t;
+    typedef std::shared_ptr<HttpReplyQueue>   ptr_t;
 
 	HttpReplyQueue();
     virtual ~HttpReplyQueue();		
diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h
index f0296f30e38a0690123f71402055471875ff870c..52369df174bf1bfe535e6a7ab8ac68d7cdc0df66 100644
--- a/indra/llcorehttp/_httprequestqueue.h
+++ b/indra/llcorehttp/_httprequestqueue.h
@@ -61,7 +61,7 @@ class HttpRequestQueue : public LLCoreInt::RefCounted
 	void operator=(const HttpRequestQueue &);			// Not defined
 
 public:
-    typedef boost::shared_ptr<HttpOperation> opPtr_t;
+    typedef std::shared_ptr<HttpOperation> opPtr_t;
 
 	static void init();
 	static void term();
diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp
index 294acd7f638175501216323678e8d0cb59a9b929..517076804d2b40140d135b62018f8e0a772358a5 100644
--- a/indra/llcorehttp/_httpservice.cpp
+++ b/indra/llcorehttp/_httpservice.cpp
@@ -320,6 +320,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread)
             LLMemory::logMemoryInfo(TRUE);
 
             //output possible call stacks to log file.
+            LLError::LLUserWarningMsg::showOutOfMemory();
             LLError::LLCallStacks::print();
 
             LL_ERRS() << "Bad memory allocation in HttpService::threadRun()!" << LL_ENDL;
diff --git a/indra/llcorehttp/bufferarray.cpp b/indra/llcorehttp/bufferarray.cpp
index 8d2e7c6a63b6fb17a586e6091e44f2917c6c4b74..c780c06b4e0b05d1521932ce1778ef0210c24674 100644
--- a/indra/llcorehttp/bufferarray.cpp
+++ b/indra/llcorehttp/bufferarray.cpp
@@ -288,7 +288,7 @@ int BufferArray::findBlock(size_t pos, size_t * ret_offset)
 	if (pos >= mLen)
 		return -1;		// Doesn't exist
 
-	const int block_limit(narrow(mBlocks.size()));
+	const int block_limit(narrow<size_t>(mBlocks.size()));
 	for (int i(0); i < block_limit; ++i)
 	{
 		if (pos < mBlocks[i]->mUsed)
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index 18505e0aad2aa56759be91f7ce747be7e809b11f..7fe5c48edfbf13421e2215967b93895b8d962cfb 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -301,24 +301,24 @@ struct HttpStatus
 	
 	HttpStatus()
 	{
-		mDetails = boost::shared_ptr<Details>(new Details(LLCORE, HE_SUCCESS));
+		mDetails = std::shared_ptr<Details>(new Details(LLCORE, HE_SUCCESS));
     }
 
 	HttpStatus(type_enum_t type, short status)
 	{
-        mDetails = boost::shared_ptr<Details>(new Details(type, status));
+        mDetails = std::shared_ptr<Details>(new Details(type, status));
 	}
 	
 	HttpStatus(int http_status)
 	{
-        mDetails = boost::shared_ptr<Details>(new Details(http_status, 
+        mDetails = std::shared_ptr<Details>(new Details(http_status, 
 			(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
 		llassert(http_status >= 100 && http_status <= 999);
 	}
 
 	HttpStatus(int http_status, const std::string &message)
 	{
-        mDetails = boost::shared_ptr<Details>(new Details(http_status,
+        mDetails = std::shared_ptr<Details>(new Details(http_status,
 			(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
 		llassert(http_status >= 100 && http_status <= 999);
 		mDetails->mMessage = message;
@@ -341,7 +341,7 @@ struct HttpStatus
 
     HttpStatus & clone(const HttpStatus &rhs)
     {
-        mDetails = boost::shared_ptr<Details>(new Details(*rhs.mDetails));
+        mDetails = std::shared_ptr<Details>(new Details(*rhs.mDetails));
         return *this;
     }
 	
@@ -490,14 +490,14 @@ struct HttpStatus
 		LLSD		mErrorData;
 	};
 
-    boost::shared_ptr<Details> mDetails;
+    std::shared_ptr<Details> mDetails;
 
 }; // end struct HttpStatus
 
 ///  A namespace for several free methods and low level utilities. 
 namespace LLHttp
 {
-    typedef boost::shared_ptr<CURL> CURL_ptr;
+    typedef std::shared_ptr<CURL> CURL_ptr;
 
     void initialize();
     void cleanup();
diff --git a/indra/llcorehttp/httphandler.h b/indra/llcorehttp/httphandler.h
index 65e043f5d3546baf4ce1cfefebfa2001eb220d62..4cfb2598c74b3ee8f4df46c56edd6ad061a85924 100644
--- a/indra/llcorehttp/httphandler.h
+++ b/indra/llcorehttp/httphandler.h
@@ -58,8 +58,8 @@ class HttpResponse;
 class HttpHandler 
 {
 public:
-    typedef boost::shared_ptr<HttpHandler>  ptr_t;
-    typedef boost::weak_ptr<HttpHandler>    wptr_t;
+    typedef std::shared_ptr<HttpHandler>  ptr_t;
+    typedef std::weak_ptr<HttpHandler>    wptr_t;
 
 	virtual ~HttpHandler()
 	{ }
diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h
index b9168cb6ec86eff22e4e68eae33460cef2d4f8c9..e7cf4037bfffb3f585c60c4a48797117f223ab8b 100644
--- a/indra/llcorehttp/httpheaders.h
+++ b/indra/llcorehttp/httpheaders.h
@@ -85,7 +85,7 @@ class HttpHeaders: private boost::noncopyable
 	typedef container_t::const_reverse_iterator const_reverse_iterator;
 	typedef container_t::value_type value_type;
 	typedef container_t::size_type size_type;
-    typedef boost::shared_ptr<HttpHeaders> ptr_t;
+    typedef std::shared_ptr<HttpHeaders> ptr_t;
 
 public:
 	/// @post In addition to the instance, caller has a refcount
diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h
index 41f71896b0294077ba77c79c1e3a1b7f5a01ad5c..fa993c857bd54bd218fdf697d7195b9fb5fbd8d7 100644
--- a/indra/llcorehttp/httpoptions.h
+++ b/indra/llcorehttp/httpoptions.h
@@ -60,7 +60,7 @@ class HttpOptions : private boost::noncopyable
 public:
 	HttpOptions();
 
-	typedef boost::shared_ptr<HttpOptions> ptr_t;
+	typedef std::shared_ptr<HttpOptions> ptr_t;
 
     virtual ~HttpOptions();						// Use release()
 
diff --git a/indra/llcorehttp/httprequest.h b/indra/llcorehttp/httprequest.h
index ca4b9e92bca1bd4a5913a1b6c01733538976477f..857a034a7b5dde0901bbea2a47aeb1b7d2e51350 100644
--- a/indra/llcorehttp/httprequest.h
+++ b/indra/llcorehttp/httprequest.h
@@ -96,8 +96,8 @@ class HttpRequest
 public:
 	typedef unsigned int policy_t;
 	
-	typedef boost::shared_ptr<HttpRequest> ptr_t;
-    typedef boost::weak_ptr<HttpRequest>   wptr_t;
+	typedef std::shared_ptr<HttpRequest> ptr_t;
+    typedef std::weak_ptr<HttpRequest>   wptr_t;
 public:
 	/// @name PolicyMethods
 	/// @{
@@ -627,7 +627,7 @@ class HttpRequest
 protected:
 
 private:
-    typedef boost::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
+    typedef std::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
 
 	/// @name InstanceData
 	///
diff --git a/indra/llcorehttp/httpresponse.h b/indra/llcorehttp/httpresponse.h
index b834085e5cb23b0ce08dce05587321454b42e724..ef98fbef2b5f2c51367aab1948be2d816f6a549a 100644
--- a/indra/llcorehttp/httpresponse.h
+++ b/indra/llcorehttp/httpresponse.h
@@ -72,7 +72,7 @@ class HttpResponse : public LLCoreInt::RefCounted
 	/// Statistics for the HTTP 
 	struct TransferStats
 	{
-		typedef boost::shared_ptr<TransferStats> ptr_t;
+		typedef std::shared_ptr<TransferStats> ptr_t;
 
 		TransferStats() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
 		F64 mSizeDownload;
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index 69b23f9cf882c43afa137e919f2cc35a7b772f06..41fbb97175a9577b7148263fcd08a47f6443000f 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -44,7 +44,6 @@
 #include "stringize.h"
 #include "llstring.h"
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 #include <boost/assign/list_of.hpp>
@@ -691,10 +690,10 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir,
 							   const std::string& filename,
 							   const FUNCTION& function) const
 {
-	BOOST_FOREACH(std::string skindir, mSearchSkinDirs)
+	for (const std::string& skindir : mSearchSkinDirs)
 	{
 		std::string subdir_path(add(skindir, subdir));
-		BOOST_FOREACH(std::string subsubdir, subsubdirs)
+		for (const std::string& subsubdir : subsubdirs)
 		{
 			std::string full_path(add(subdir_path, subsubdir, filename));
 			if (fileExists(full_path))
@@ -843,7 +842,7 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
 		// current language, copy them -- in proper order -- into results.
 		// Don't drive this by walking the map itself: it matters that we
 		// generate results in the same order as subsubdirs.
-		BOOST_FOREACH(std::string subsubdir, subsubdirs)
+		for (const std::string& subsubdir : subsubdirs)
 		{
 			StringMap::const_iterator found(path_for.find(subsubdir));
 			if (found != path_for.end())
@@ -855,7 +854,7 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
 
 	LL_DEBUGS("LLDir") << empty;
 	const char* comma = "";
-	BOOST_FOREACH(std::string path, results)
+	for (const std::string& path : results)
 	{
 		LL_CONT << comma << "'" << path << "'";
 		comma = ", ";
diff --git a/indra/llfilesystem/tests/lldir_test.cpp b/indra/llfilesystem/tests/lldir_test.cpp
index 3cff622a4bac4091914f43a1220d4eb5d71f5a82..60265cade651a28a32e5675c31e01117934fbdd3 100644
--- a/indra/llfilesystem/tests/lldir_test.cpp
+++ b/indra/llfilesystem/tests/lldir_test.cpp
@@ -34,7 +34,6 @@
 
 #include "../test/lltut.h"
 #include "stringize.h"
-#include <boost/foreach.hpp>
 #include <boost/assign/list_of.hpp>
 
 using boost::assign::list_of;
@@ -109,7 +108,7 @@ struct LLDir_Dummy: public LLDir
 
             "install/skins/default/future/somefile.txt"
         };
-        BOOST_FOREACH(const char* path, preload)
+        for (const char* path : preload)
         {
             buildFilesystem(path);
         }
@@ -166,7 +165,7 @@ struct LLDir_Dummy: public LLDir
         LLStringUtil::getTokens(path, components, "/");
         // Ensure we have an entry representing every level of this path
         std::string partial;
-        BOOST_FOREACH(std::string component, components)
+        for (std::string component : components)
         {
             append(partial, component);
             mFilesystem.insert(partial);
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 031471d1fecf3e73a9a7df60dd4263c8f2c5c1a6..f9393dea541842093ddbec341696af5d5352706e 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -2259,9 +2259,9 @@ bool LLImageFormatted::save(const std::string &filename)
 		return false;
 	}
 	
-	outfile.write(getData(), 	getDataSize());
+	S32 result = outfile.write(getData(), getDataSize());
 	outfile.close() ;
-	return true;
+    return (result != 0);
 }
 
 S8 LLImageFormatted::getCodec() const
diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp
index 90b7272efa78f17d4314f8b07a763b23f0ba3b23..cdea0da68ddad653d88f9439b7e2d60ae1786a86 100644
--- a/indra/llimage/llimagebmp.cpp
+++ b/indra/llimage/llimagebmp.cpp
@@ -321,6 +321,7 @@ bool LLImageBMP::updateData()
 		mColorPalette = new(std::nothrow) U8[color_palette_size];
 		if (!mColorPalette)
 		{
+            LLError::LLUserWarningMsg::showOutOfMemory();
 			LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL;
 			return false;
 		}
diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp
index 97b543f3b6fee4fbadcefe3a25edff5c5a944b68..9dd69ff132b295a1e92b537545977788be2867c6 100644
--- a/indra/llimage/llimagedimensionsinfo.cpp
+++ b/indra/llimage/llimagedimensionsinfo.cpp
@@ -50,6 +50,7 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec)
 
 	if (file_size == 0)
 	{
+        mWarning = "texture_load_empty_file";
 		setLastError("File is empty",src_filename);
 		return false;
 	}
@@ -90,6 +91,7 @@ bool LLImageDimensionsInfo::getImageDimensionsBmp()
 	if (signature[0] != 'B' || signature[1] != 'M')
 	{
 		LL_WARNS() << "Not a BMP" << LL_ENDL;
+        mWarning = "texture_load_format_error";
 		return false;
 	}
 
@@ -140,6 +142,7 @@ bool LLImageDimensionsInfo::getImageDimensionsPng()
 	if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0)
 	{
 		LL_WARNS() << "Not a PNG" << LL_ENDL;
+        mWarning = "texture_load_format_error";
 		return false;
 	}
 
@@ -183,6 +186,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg()
 	if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0)
 	{
 		LL_WARNS() << "Not a JPEG" << LL_ENDL;
+        mWarning = "texture_load_format_error";
 		return false;
 	}
 	fseek(fp, 0, SEEK_SET); // go back to start of the file
diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h
index 8f716c5d027e1fb401bd05a7fb0b0c0268bbbc62..ade283bb8582becc47927229e770a04b50127236 100644
--- a/indra/llimage/llimagedimensionsinfo.h
+++ b/indra/llimage/llimagedimensionsinfo.h
@@ -55,6 +55,12 @@ class LLImageDimensionsInfo
 	{
 		return mLastError;
 	}
+
+    const std::string& getWarningName()
+    {
+        return mWarning;
+    }
+
 protected:
 
 	void clean()
@@ -129,6 +135,7 @@ class LLImageDimensionsInfo
 	std::string mSrcFilename;
 
 	std::string mLastError;
+    std::string mWarning;
 
 	U8* mData;
 
diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp
index 36317a5ba883c39cd973549c308ba66a658e7f73..ae76c5243f0a4215f9563ab3a614294b0f05fac3 100644
--- a/indra/llimage/llimagedxt.cpp
+++ b/indra/llimage/llimagedxt.cpp
@@ -437,6 +437,7 @@ bool LLImageDXT::convertToDXR()
 	U8* newdata = (U8*)ll_aligned_malloc_16(total_bytes);
 	if (!newdata)
 	{
+        LLError::LLUserWarningMsg::showOutOfMemory();
 		LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;
 		return false;
 	}
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 8dba1641a6d20bbbc3bcce07e74e596b0af0e129..68598589b8b5a9ead8624d4b8bcfbc9103fe4b3e 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -48,7 +48,7 @@ std::string LLImageJ2C::getEngineInfo()
 {
 	// All known LLImageJ2CImpl implementation subclasses are cheap to
 	// construct.
-	boost::scoped_ptr<LLImageJ2CImpl> impl(fallbackCreateLLImageJ2CImpl());
+	std::unique_ptr<LLImageJ2CImpl> impl(fallbackCreateLLImageJ2CImpl());
 	return impl->getEngineInfo();
 }
 
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index e196f7479ed0c83dd30b17e3a5db0db5f7c7d863..b30df6f77638463875b5c0b5f308c3f6dd092e42 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -95,7 +95,7 @@ class LLImageJ2C : public LLImageFormatted
 	S8  mRawDiscardLevel;
 	F32 mRate;
 	bool mReversible;
-	boost::scoped_ptr<LLImageJ2CImpl> mImpl;
+	std::unique_ptr<LLImageJ2CImpl> mImpl;
 	std::string mLastError;
 
     // Image compression/decompression tester
diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp
index 88bdae9b80f4fe3f1247759bb4a2f98a51a275ac..152a7f309c0417d9b91edf142937cea3a2e7307c 100644
--- a/indra/llimage/llimagetga.cpp
+++ b/indra/llimage/llimagetga.cpp
@@ -266,6 +266,7 @@ bool LLImageTGA::updateData()
 			mColorMap = new(std::nothrow) U8[ color_map_bytes ];  
 			if (!mColorMap)
 			{
+                LLError::LLUserWarningMsg::showOutOfMemory();
 				LL_ERRS() << "Out of Memory in bool LLImageTGA::updateData()" << LL_ENDL;
 				return false;
 			}
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index c1ee0529978df95d4bdf4b277ea4bd1fb4e7324d..fd59daad3d0d60cb121b4c9855608f2e28ad0f02 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -35,8 +35,10 @@ class ImageRequest
 {
 public:
 	ImageRequest(const LLPointer<LLImageFormatted>& image,
-				 S32 discard, BOOL needs_aux,
-				 const LLPointer<LLImageDecodeThread::Responder>& responder);
+                 S32 discard,
+                 BOOL needs_aux,
+                 const LLPointer<LLImageDecodeThread::Responder>& responder,
+                 U32 request_id);
 	virtual ~ImageRequest();
 
 	/*virtual*/ bool processRequest();
@@ -48,6 +50,7 @@ class ImageRequest
 	// input
 	LLPointer<LLImageFormatted> mFormattedImage;
 	S32 mDiscardLevel;
+    U32 mRequestId;
 	BOOL mNeedsAux;
 	// output
 	LLPointer<LLImageRaw> mDecodedImageRaw;
@@ -62,6 +65,7 @@ class ImageRequest
 
 // MAIN THREAD
 LLImageDecodeThread::LLImageDecodeThread(bool /*threaded*/)
+    : mDecodeCount(0)
 {
     mThreadPool.reset(new LL::ThreadPool("ImageDecode", 8));
     mThreadPool->start();
@@ -92,9 +96,10 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
 
+    U32 decode_id = ++mDecodeCount;
     // Instantiate the ImageRequest right in the lambda, why not?
     bool posted = mThreadPool->getQueue().post(
-        [req = ImageRequest(image, discard, needs_aux, responder)]
+        [req = ImageRequest(image, discard, needs_aux, responder, decode_id)]
         () mutable
         {
             auto done = req.processRequest();
@@ -103,13 +108,10 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(
     if (! posted)
     {
         LL_DEBUGS() << "Tried to start decoding on shutdown" << LL_ENDL;
-        // should this return 0?
+        return 0;
     }
 
-    // It's important to our consumer (LLTextureFetchWorker) that we return a
-    // nonzero handle. It is NOT important that the nonzero handle be unique:
-    // nothing is ever done with it except to compare it to zero, or zero it.
-    return 17;
+    return decode_id;
 }
 
 void LLImageDecodeThread::shutdown()
@@ -123,15 +125,18 @@ LLImageDecodeThread::Responder::~Responder()
 
 //----------------------------------------------------------------------------
 
-ImageRequest::ImageRequest(const LLPointer<LLImageFormatted>& image, 
-							S32 discard, BOOL needs_aux,
-							const LLPointer<LLImageDecodeThread::Responder>& responder)
+ImageRequest::ImageRequest(const LLPointer<LLImageFormatted>& image,
+                           S32 discard,
+                           BOOL needs_aux,
+                           const LLPointer<LLImageDecodeThread::Responder>& responder,
+                           U32 request_id)
 	: mFormattedImage(image),
 	  mDiscardLevel(discard),
 	  mNeedsAux(needs_aux),
 	  mDecodedRaw(FALSE),
 	  mDecodedAux(FALSE),
-	  mResponder(responder)
+	  mResponder(responder),
+	  mRequestId(request_id)
 {
 }
 
@@ -199,7 +204,7 @@ void ImageRequest::finishRequest(bool completed)
 	if (mResponder.notNull())
 	{
 		bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux);
-		mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux);
+		mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux, mRequestId);
 	}
 	// Will automatically be deleted
 }
diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h
index ca4c0d93d0c16e7f967c31600dd83a4d1da9ddd3..b4ab9432e6f6380e41245b2267dc386397388de1 100644
--- a/indra/llimage/llimageworker.h
+++ b/indra/llimage/llimageworker.h
@@ -39,7 +39,7 @@ class LLImageDecodeThread
 	protected:
 		virtual ~Responder();
 	public:
-		virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) = 0;
+		virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux, U32 request_id) = 0;
 	};
 
 public:
@@ -53,6 +53,7 @@ class LLImageDecodeThread
 						 const LLPointer<Responder>& responder);
 	size_t getPending();
 	size_t update(F32 max_time_ms);
+    S32 getTotalDecodeCount() { return mDecodeCount; }
 	void shutdown();
 
 private:
@@ -60,6 +61,7 @@ class LLImageDecodeThread
 	// LLQueuedThread - instead this is the API by which we submit work to the
 	// "ImageDecode" ThreadPool.
 	std::unique_ptr<LL::ThreadPool> mThreadPool;
+    LLAtomicU32 mDecodeCount;
 };
 
 #endif
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index 0a97b739b093333c35e50b53225c061cf2b8d407..ffcd7d257f63812880d18746502846cb60ad331a 100644
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -98,7 +98,7 @@ namespace tut
 				done = res;
 				*done = false;
 			}
-			virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux)
+			virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux, U32)
 			{
 				*done = true;
 			}
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 55bcc7c5b272655815eda4d0f14c5b295ea18a03..6334a35fd0ed3dd41895eb3151588b8cf5ed8b96 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -32,6 +32,7 @@
 #include "llinventorydefines.h"
 #include "llxorcipher.h"
 #include "llsd.h"
+#include "llsdserialize.h"
 #include "message.h"
 #include <boost/tokenizer.hpp>
 
@@ -217,7 +218,19 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
 		}
         else if (0 == strcmp("metadata", keyword))
         {
-            LLSD metadata(valuestr);
+            LLSD metadata;
+            if (strncmp("<llsd>", valuestr, 6) == 0)
+            {
+                std::istringstream stream(valuestr);
+                LLSDSerialize::fromXML(metadata, stream);
+            }
+            else
+            {
+                // next line likely contains metadata, but at the moment is not supported
+                // can do something like:
+                // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+            }
+
             if (metadata.has("thumbnail"))
             {
                 const LLSD& thumbnail = metadata["thumbnail"];
@@ -693,7 +706,19 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
 		}
         else if (0 == strcmp("metadata", keyword))
         {
-            LLSD metadata(valuestr);
+            LLSD metadata;
+            if (strncmp("<llsd>", valuestr, 6) == 0)
+            {
+                std::istringstream stream(valuestr);
+                LLSDSerialize::fromXML(metadata, stream);
+            }
+            else
+            {
+                // next line likely contains metadata, but at the moment is not supported
+                // can do something like:
+                // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+            }
+
             if (metadata.has("thumbnail"))
             {
                 const LLSD& thumbnail = metadata["thumbnail"];
@@ -802,9 +827,14 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
 
     if (mThumbnailUUID.notNull())
     {
+        // Max length is 255 chars, will have to export differently if it gets more data
+        // Ex: use newline and toNotation (uses {}) for unlimited size
         LLSD metadata;
         metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
-        output_stream << "\t\tmetadata\t" << metadata << "|\n";
+
+        output_stream << "\t\tmetadata\t";
+        LLSDSerialize::toXML(metadata, output_stream);
+        output_stream << "|\n";
     }
 
 	// Check for permissions to see the asset id, and if so write it
@@ -1303,7 +1333,19 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
 		}
         else if (0 == strcmp("metadata", keyword))
         {
-            LLSD metadata(valuestr);
+            LLSD metadata;
+            if (strncmp("<llsd>", valuestr, 6) == 0)
+            {
+                std::istringstream stream(valuestr);
+                LLSDSerialize::fromXML(metadata, stream);
+            }
+            else
+            {
+                // next line likely contains metadata, but at the moment is not supported
+                // can do something like:
+                // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+            }
+
             if (metadata.has("thumbnail"))
             {
                 const LLSD& thumbnail = metadata["thumbnail"];
@@ -1343,9 +1385,12 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL)
 	output_stream << "\t\tname\t" << mName.c_str() << "|\n";
     if (mThumbnailUUID.notNull())
     {
+        // Only up to 255 chars
         LLSD metadata;
         metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
-        output_stream << "\t\tmetadata\t" << metadata << "|\n";
+        output_stream << "\t\tmetadata\t";
+        LLSDSerialize::toXML(metadata, output_stream);
+        output_stream << "|\n";
     }
 	output_stream << "\t}\n";
 	return TRUE;
diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h
index b57e4cc40e51519fae5eab0b9b08caaedb89d4de..fe3902380cfd17cb45298ffa078263a34c337070 100644
--- a/indra/llkdu/llimagej2ckdu.h
+++ b/indra/llkdu/llimagej2ckdu.h
@@ -113,10 +113,10 @@ class LLImageJ2CKDU : public LLImageJ2CImpl
 	};
 
 	// Encode variable
-	boost::scoped_ptr<LLKDUMemSource> mInputp;
+	std::unique_ptr<LLKDUMemSource> mInputp;
 	CodeStreamHolder mCodeStreamp;
-	boost::scoped_ptr<kdu_core::kdu_coords> mTPosp; // tile position
-	boost::scoped_ptr<kdu_core::kdu_dims> mTileIndicesp;
+	std::unique_ptr<kdu_core::kdu_coords> mTPosp; // tile position
+	std::unique_ptr<kdu_core::kdu_dims> mTileIndicesp;
 	int mBlocksSize;
 	int mPrecinctsSize;
 	int mLevels;
@@ -125,7 +125,7 @@ class LLImageJ2CKDU : public LLImageJ2CImpl
 	// We don't own this LLImageRaw. We're simply pointing to an instance
 	// passed into initDecode().
 	LLImageRaw *mRawImagep;
-	boost::scoped_ptr<LLKDUDecodeState> mDecodeState;
+	std::unique_ptr<LLKDUDecodeState> mDecodeState;
 };
 
 #endif
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 6d36daa92ae0618332d49933e032cc095a0732af..e694732da2ee6e3dc2fdd0a19b868db094f881f7 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5592,9 +5592,9 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
 
         U32 stream_count = data.w.empty() ? 4 : 5;
 
-        U32 vert_count = meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count);
+        size_t vert_count = meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count);
 
-        if (vert_count < 65535)
+        if (vert_count < 65535 && vert_count != 0)
         {
             std::vector<U32> indices;
             indices.resize(mNumIndices);
@@ -5613,6 +5613,13 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
             {
                 U32 src_idx = i;
                 U32 dst_idx = remap[i];
+                if (dst_idx >= mNumVertices)
+                {
+                    dst_idx = mNumVertices - 1;
+                    // Shouldn't happen, figure out what gets returned in remap and why.
+                    llassert(false);
+                    LL_DEBUGS_ONCE("LLVOLUME") << "Invalid destination index, substituting" << LL_ENDL;
+                }
                 mIndices[i] = dst_idx;
 
                 mPositions[dst_idx].load3(data.p[src_idx].mV);
@@ -5646,6 +5653,10 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
         }
         else
         {
+            if (vert_count == 0)
+            {
+                LL_WARNS_ONCE("LLVOLUME") << "meshopt_generateVertexRemapMulti failed to process a model or model was invalid" << LL_ENDL;
+            }
             // blew past the max vertex size limit, use legacy tangent generation which never adds verts
             createTangents();
         }
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index afed98ff363e982334880fa08d5a2879c1971952..71878b8cb68857df706fd412d38efeededfcd50b 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1000,7 +1000,7 @@ class LLVolume : public LLRefCount
 	friend class LLVolumeLODGroup;
 
 protected:
-	~LLVolume(); // use unref
+	virtual ~LLVolume(); // use unref
 
 public:
 	typedef std::vector<LLVolumeFace> face_list_t;
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index ebbaea9b12cfabd0b693878f3837fff30cb7ff53..c0a5e361b104131ca0fb6db9b62263714d96b999 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -95,7 +95,7 @@ class LLCoprocedurePool: private boost::noncopyable
 private:
     struct QueuedCoproc
     {
-        typedef boost::shared_ptr<QueuedCoproc> ptr_t;
+        typedef std::shared_ptr<QueuedCoproc> ptr_t;
 
         QueuedCoproc(const std::string &name, const LLUUID &id, CoProcedure_t proc) :
             mName(name),
@@ -115,7 +115,7 @@ class LLCoprocedurePool: private boost::noncopyable
     // Use shared_ptr to control the lifespan of our CoprocQueue_t instance
     // because the consuming coroutine might outlive this LLCoprocedurePool
     // instance.
-    typedef boost::shared_ptr<CoprocQueue_t> CoprocQueuePtr;
+    typedef std::shared_ptr<CoprocQueue_t> CoprocQueuePtr;
 
     std::string     mPoolName;
     size_t          mPoolSize, mActiveCoprocsCount, mPending;
@@ -301,7 +301,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
     mPoolSize(size),
     mActiveCoprocsCount(0),
     mPending(0),
-    mPendingCoprocs(boost::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
+    mPendingCoprocs(std::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
     mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
     mCoroMapping()
 {
@@ -384,7 +384,7 @@ LLUUID LLCoprocedurePool::enqueueCoprocedure(const std::string &name, LLCoproced
         LL_INFOS("CoProcMgr") << "Coprocedure(" << name << ") enqueuing with id=" << id.asString() << " in pool \"" << mPoolName << "\" at "
                               << mPending << LL_ENDL;
     }
-    auto pushed = mPendingCoprocs->try_push(boost::make_shared<QueuedCoproc>(name, id, proc));
+    auto pushed = mPendingCoprocs->try_push(std::make_shared<QueuedCoproc>(name, id, proc));
     if (pushed == boost::fibers::channel_op_status::success)
     {
         ++mPending;
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index 6d0d68cf24e822c81025b00ab2fb2df989677e07..fc561c6b0f92e48fbf8e911a3e662ded3f5ce43d 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -263,8 +263,8 @@ class HttpCoroHandler : public LLCore::HttpHandler
 {
 public:
 
-    typedef boost::shared_ptr<HttpCoroHandler>  ptr_t;
-    typedef boost::weak_ptr<HttpCoroHandler>    wptr_t;
+    typedef std::shared_ptr<HttpCoroHandler>  ptr_t;
+    typedef std::weak_ptr<HttpCoroHandler>    wptr_t;
 
     HttpCoroHandler(LLEventStream &reply);
 
@@ -317,8 +317,8 @@ class HttpCoroutineAdapter
     static const std::string HTTP_RESULTS_CONTENT;
     static const std::string HTTP_RESULTS_RAW;
 
-    typedef boost::shared_ptr<HttpCoroutineAdapter> ptr_t;
-    typedef boost::weak_ptr<HttpCoroutineAdapter>   wptr_t;
+    typedef std::shared_ptr<HttpCoroutineAdapter> ptr_t;
+    typedef std::weak_ptr<HttpCoroutineAdapter>   wptr_t;
 
     HttpCoroutineAdapter(const std::string &name, LLCore::HttpRequest::policy_t policyId);
     ~HttpCoroutineAdapter();
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp
index 9f7768f78ec6f13c7f4fdc75b389ac11f72f9ed8..b7013dbb6eb3e20c5caabb8a4c580e360c070db1 100644
--- a/indra/llmessage/lldatapacker.cpp
+++ b/indra/llmessage/lldatapacker.cpp
@@ -298,6 +298,13 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
 	}
 
 	htolememcpy(&size, mCurBufferp, MVT_S32, 4);
+
+    if (size < 0)
+    {
+        LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData unpacked invalid size, aborting!" << LL_ENDL;
+        return FALSE;
+    }
+
 	mCurBufferp += 4;
 
 	if (!verifyLength(size, name))
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h
index 8be4c64dfca9d48fc75960c579bc0617b71fb375..3ee45da2e75fbe977ed6e0cbb098886cb7bf6550 100644
--- a/indra/llmessage/llexperiencecache.h
+++ b/indra/llmessage/llexperiencecache.h
@@ -112,7 +112,7 @@ class LLExperienceCache: public LLSingleton < LLExperienceCache >
 
     // Callback types for get() 
     typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t;
-	typedef boost::shared_ptr<callback_signal_t> signal_ptr;
+	typedef std::shared_ptr<callback_signal_t> signal_ptr;
 	// May have multiple callbacks for a single ID, which are
 	// represented as multiple slots bound to the signal.
 	// Avoid copying signals via pointers.
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index c707c7ad09a0d77ca71a5ed2d48877da5ecd175f..e302dd2b5e24beaec398669558ce0db5bf84632f 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -982,7 +982,7 @@ LLHTTPNode& LLIOHTTPServer::create(
     }
 
     LLHTTPResponseFactory* factory = new LLHTTPResponseFactory;
-	boost::shared_ptr<LLChainIOFactory> factory_ptr(factory);
+	std::shared_ptr<LLChainIOFactory> factory_ptr(factory);
 
     LLIOServerSocket* server = new LLIOServerSocket(pool, socket, factory_ptr);
 
diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h
index 7fd4cee8ba97e194574b86a4c61e15876e645a71..e6ac8ebfc2936b7bf5ca6c3c150717e92ffd4774 100644
--- a/indra/llmessage/lliopipe.h
+++ b/indra/llmessage/lliopipe.h
@@ -89,7 +89,7 @@ class LLIOPipe
 	/** 
 	 * @brief Scattered memory container.
 	 */
-	typedef boost::shared_ptr<LLBufferArray> buffer_ptr_t;
+	typedef std::shared_ptr<LLBufferArray> buffer_ptr_t;
 
 	/** 
 	 * @brief Enumeration for IO return codes
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index 303d80eb142982c40daa1592d865fc06b52e19cd..a62b3c0204374059041dd125047d9a4db7491804 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -65,7 +65,7 @@ class LLSocket
 	/** 
 	 * @brief Reference counted shared pointers to sockets.
 	 */
-	typedef boost::shared_ptr<LLSocket> ptr_t;
+	typedef std::shared_ptr<LLSocket> ptr_t;
 
 	/** 
 	 * @brief Type of socket to create.
@@ -305,7 +305,7 @@ class LLIOServerSocket : public LLIOPipe
 {
 public:
 	typedef LLSocket::ptr_t socket_t;
-	typedef boost::shared_ptr<LLChainIOFactory> factory_t;
+	typedef std::shared_ptr<LLChainIOFactory> factory_t;
 	LLIOServerSocket(apr_pool_t* pool, socket_t listener, factory_t reactor);
 	virtual ~LLIOServerSocket();
 
diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h
index 9c09aeb44ca42bf5408391a12c488f8c4ffcb135..f215acab56ea1d71f6ecfd4462d688a4a5e37718 100644
--- a/indra/llmessage/llservice.h
+++ b/indra/llmessage/llservice.h
@@ -116,7 +116,7 @@ class LLService : public LLIOPipe
 public:
 	//typedef boost::intrusive_ptr<LLServiceCreator> creator_t;
 	//typedef boost::intrusive_ptr<LLService> service_t;
-	typedef boost::shared_ptr<LLChainIOFactory> creator_t;
+	typedef std::shared_ptr<LLChainIOFactory> creator_t;
 
 	/** 
 	 * @brief This method is used to register a protocol name with a
diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h
index 9c98e2c558ab5c12c8546d7e62ebefaf13b65423..6ea150fda36fdb1f87938358d26b82d127d720c4 100644
--- a/indra/llmessage/llstoredmessage.h
+++ b/indra/llmessage/llstoredmessage.h
@@ -46,7 +46,7 @@ class LLStoredMessage
 	std::string mName;
 };
 
-typedef boost::shared_ptr<LLStoredMessage> LLStoredMessagePtr;
+typedef std::shared_ptr<LLStoredMessage> LLStoredMessagePtr;
 
 
 #endif // LL_STOREDMESSAGE_H
diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp
index 93d5cfc13156b71d5e89a1baf71b23dee9355a42..212d0619d1e92ce2b18ea012a896e96aa4141943 100644
--- a/indra/llmessage/llxfer.cpp
+++ b/indra/llmessage/llxfer.cpp
@@ -386,12 +386,3 @@ std::ostream& operator<< (std::ostream& os, LLXfer &hh)
 	os << hh.getFileName() ;
 	return os;
 }
-
-
-
-
-
-
-
-
-
diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp
index b7fdf4f437b075ae07977d1bc107a05e6d32e5f9..1c571a74dae5ececac89261a59314f9a1d408917 100644
--- a/indra/llmessage/tests/llcurl_stub.cpp
+++ b/indra/llmessage/tests/llcurl_stub.cpp
@@ -49,7 +49,7 @@ void LLCurl::Responder::httpCompleted()
 }
 
 void LLCurl::Responder::completedRaw(LLChannelDescriptors const&,
-									 boost::shared_ptr<LLBufferArray> const&)
+									 std::shared_ptr<LLBufferArray> const&)
 {
 }
 
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index ba76ae4e3726174cfaea4a6b03c1457f0d97c62c..d56712257b1a68b644e9e9dbeae915c2db9d21b8 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -335,7 +335,7 @@ class LLPluginClassMedia : public LLPluginProcessParentOwner
 	// "init_history" message 
 	void initializeUrlHistory(const LLSD& url_history);
 
-	boost::shared_ptr<LLPluginClassMedia> getSharedPtr() { return boost::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/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 1893c9e65746cf267f96dd4839678fedbfeba414..01627925d74adff987c27d86756fc43af9425991 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -43,7 +43,7 @@
 #include "llsd.h"
 #include "llevents.h"
 
-class LLPluginProcessParentOwner : public boost::enable_shared_from_this < LLPluginProcessParentOwner > 
+class LLPluginProcessParentOwner : public std::enable_shared_from_this < LLPluginProcessParentOwner > 
 {
 public:
 	virtual ~LLPluginProcessParentOwner();
@@ -60,7 +60,7 @@ class LLPluginProcessParent : public LLPluginMessagePipeOwner
 
     LLPluginProcessParent(LLPluginProcessParentOwner *owner);
 public:
-    typedef boost::shared_ptr<LLPluginProcessParent> ptr_t;
+    typedef std::shared_ptr<LLPluginProcessParent> ptr_t;
 
 	~LLPluginProcessParent();
 		
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 2e4b013b778787e38809549799f00422fb33c941..2c357e1ac5815d39b0a171238dc9d27e3011bb92 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -53,8 +53,6 @@
 #pragma warning (default : 4264)
 #endif
 
-#include <boost/lexical_cast.hpp>
-
 #include "lldaeloader.h"
 #include "llsdserialize.h"
 #include "lljoint.h"
@@ -2385,7 +2383,7 @@ std::string LLDAELoader::getElementLabel(daeElement *element)
 
 		if (ind > 0)
 		{
-			index_string = "_" + boost::lexical_cast<std::string>(ind);
+			index_string = "_" + std::to_string(ind);
 		}
 
 		// if parent has a name or ID, use it
diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp
index 7394f99794e4ab1d2134f94985a68a6e23e865bb..8e498158d6d82402269e034a5e775bcfa7fb49c7 100644
--- a/indra/llprimitive/llgltfloader.cpp
+++ b/indra/llprimitive/llgltfloader.cpp
@@ -48,8 +48,6 @@
 
 // TODO: includes inherited from dae loader.  Validate / prune
 
-#include <boost/lexical_cast.hpp>
-
 #include "llsdserialize.h"
 #include "lljoint.h"
 
diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h
index 02f62fb08c4bb78765cfe59fbc6040831ad40709..f62cab1a61d71787a204d1e5abea6f36c7f6fad1 100644
--- a/indra/llprimitive/llgltfmaterial.h
+++ b/indra/llprimitive/llgltfmaterial.h
@@ -122,13 +122,20 @@ class LLGLTFMaterial : public LLRefCount
     F32 mRoughnessFactor = 1.f;
     F32 mAlphaCutoff = 0.5f;
 
-    bool mDoubleSided = false;
     AlphaMode mAlphaMode = ALPHA_MODE_OPAQUE;
 
+    bool mDoubleSided = false;
+
     // override specific flags for state that can't use off-by-epsilon or UUID hack
     bool mOverrideDoubleSided = false;
     bool mOverrideAlphaMode = false;
 
+    // These fields are local to viewer and are a part of local bitmap support
+    typedef std::map<LLUUID, LLUUID> local_tex_map_t;
+    local_tex_map_t                  mTrackingIdToLocalTexture;
+
+public:
+
     // get a UUID based on a hash of this LLGLTFMaterial
     LLUUID getHash() const;
 
@@ -229,10 +236,6 @@ class LLGLTFMaterial : public LLRefCount
     virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id);
     virtual void updateTextureTracking();
 
-    // These fields are local to viewer and are a part of local bitmap support
-    typedef std::map<LLUUID, LLUUID> local_tex_map_t;
-    local_tex_map_t mTrackingIdToLocalTexture;
-
 protected:
     static LLVector2 vec2FromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const LLVector2& default_value);
     static F32 floatFromJson(const std::map<std::string, tinygltf::Value>& object, const char* key, const F32 default_value);
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 99a5697a84f895345f30f4f5a9cd167f9d87e523..7b0d2632aa43bc7e4d7836e0b9e10343512c5304 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -68,6 +68,7 @@ LLModel::~LLModel()
 	{
 		LLConvexDecomposition::getInstance()->deleteDecomposition(mDecompID);
 	}
+    mPhysics.mMesh.clear();
 }
 
 //static
@@ -1041,7 +1042,12 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
 	weight_map::iterator iterPos = mSkinWeights.begin();
 	weight_map::iterator iterEnd = mSkinWeights.end();
 
-    llassert(!mSkinWeights.empty());
+    if (mSkinWeights.empty())
+    {
+        // function calls iter->second on all return paths
+        // everything that calls this function should precheck that there is data.
+        LL_ERRS() << "called getJointInfluences with empty weights list" << LL_ENDL;
+    }
 	
 	for ( ; iterPos!=iterEnd; ++iterPos )
 	{
@@ -1068,11 +1074,16 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
 		const F32 epsilon = 1e-5f;
 		weight_map::iterator iter_up = mSkinWeights.lower_bound(pos);
 		weight_map::iterator iter_down = iter_up;
-		if (iter_up != mSkinWeights.end())
-		{
-			iter_down = ++iter_up;
-		}
-		weight_map::iterator best = iter_up;
+        weight_map::iterator best = iter_up;
+        if (iter_up != mSkinWeights.end())
+        {
+            iter_down = ++iter_up;
+        }
+        else
+        {
+            // Assumes that there is at least one element
+            --best;
+        }
 
 		F32 min_dist = (iter->first - pos).magVec();
 
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 4505d6b3b993b90cf6162bcbe943420e2fd28321..040257e00e13e53bdbaa2a7912bcbb82a8eaa44f 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -106,6 +106,8 @@ class LLModel : public LLVolume
 		std::vector<LLVector3> mPositions;
 		std::vector<LLVector3> mNormals;
 
+        ~PhysicsMesh() {}
+
 		void clear()
 		{
 			mPositions.clear();
@@ -131,6 +133,7 @@ class LLModel : public LLVolume
 	public:
 		Decomposition() { }
 		Decomposition(LLSD& data);
+		~Decomposition() { }
 		void fromLLSD(LLSD& data);
 		LLSD asLLSD() const;
 		bool hasHullList() const;
@@ -365,7 +368,7 @@ class LLModelInstanceBase
 {
 public:
 	LLPointer<LLModel> mModel;
-	LLPointer<LLModel> mLOD[5];
+	LLPointer<LLModel> mLOD[LLModel::NUM_LODS];
 	LLUUID mMeshID;
 
 	LLMatrix4 mTransform;
@@ -380,6 +383,15 @@ class LLModelInstanceBase
 		: mModel(NULL)
 	{
 	}
+
+    virtual ~LLModelInstanceBase()
+    {
+        mModel = NULL;
+        for (int j = 0; j < LLModel::NUM_LODS; ++j)
+        {
+            mLOD[j] = NULL;
+        }
+    };
 };
 
 typedef std::vector<LLModelInstanceBase> model_instance_list;
@@ -399,6 +411,8 @@ class LLModelInstance : public LLModelInstanceBase
 
 	LLModelInstance(LLSD& data);
 
+    ~LLModelInstance() {}
+
 	LLSD asLLSD();
 };
 
diff --git a/indra/llprimitive/tests/llgltfmaterial_test.cpp b/indra/llprimitive/tests/llgltfmaterial_test.cpp
index 88b6fae3a7a5f57d712d12ac670c22937770980b..b56c9ab4f5e507a58b0891f32750cdb37a1ad28b 100644
--- a/indra/llprimitive/tests/llgltfmaterial_test.cpp
+++ b/indra/llprimitive/tests/llgltfmaterial_test.cpp
@@ -143,7 +143,7 @@ namespace tut
 #if LL_WINDOWS
         // If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial)
         // This test result will vary between compilers, so only test a single platform
-        ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216);
+        ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 224);
 #endif
 #endif
         ensure_equals("LLGLTFMaterial texture info count", (U32)LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, 4);
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index b072ce3964c382ba43cdb2a5d9dc66f769afb5cc..c3e17d1267a513d90e1163cf6e0ff38b37ee7410 100644
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -211,7 +211,7 @@ namespace tut
 
     void whitelist_test(int num, bool enable, const char *whitelist, const char *candidate_url, bool expected_pass)
     {
-        std::string message = "Whitelist test " + boost::lexical_cast<std::string>(num);
+        std::string message = "Whitelist test " + std::to_string(num);
         LLMediaEntry entry;
         entry.setWhiteListEnable(enable);
         set_whitelist(entry, whitelist);
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 9d3abf32bb4191fbe916a852ea56f43b32225fd1..a4a56af981b4f1b4f499bb3e5da5996685761f16 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -94,6 +94,17 @@ void APIENTRY gl_debug_callback(GLenum source,
         return;
     }*/
 
+    if (gGLManager.mIsDisabled &&
+        severity == GL_DEBUG_SEVERITY_HIGH_ARB &&
+        source == GL_DEBUG_SOURCE_API_ARB &&
+        type == GL_DEBUG_TYPE_ERROR_ARB &&
+        id == GL_INVALID_VALUE)
+    {
+        // Suppress messages about deleting already deleted objects called from LLViewerWindow::stopGL()
+        // "GL_INVALID_VALUE error generated. Handle does not refer to an object generated by OpenGL."
+        return;
+    }
+
     // list of messages to suppress
     const char* suppress[] =
     {
@@ -148,8 +159,9 @@ void APIENTRY gl_debug_callback(GLenum source,
         glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_SIZE, &ubo_size);
         glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_IMMUTABLE_STORAGE, &ubo_immutable);
     }
-    
-    if (severity == GL_DEBUG_SEVERITY_HIGH)
+
+    // No needs to halt when is called from LLViewerWindow::stopGL()
+    if (severity == GL_DEBUG_SEVERITY_HIGH && !gGLManager.mIsDisabled)
     {
         LL_ERRS() << "Halting on GL Error" << LL_ENDL;
     }
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index c6fd824c4eed881c7aa05ff0f391a44267d60237..56a12b07b1dfc32f7801b502088e7d73458666b8 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -1353,6 +1353,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
                 scratch = new(std::nothrow) U32[width * height];
                 if (!scratch)
                 {
+                    LLError::LLUserWarningMsg::showOutOfMemory();
                     LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
                               << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
                 }
@@ -1378,6 +1379,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
                 scratch = new(std::nothrow) U32[width * height];
                 if (!scratch)
                 {
+                    LLError::LLUserWarningMsg::showOutOfMemory();
                     LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
                         << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
                 }
@@ -1406,6 +1408,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
                 scratch = new(std::nothrow) U32[width * height];
                 if (!scratch)
                 {
+                    LLError::LLUserWarningMsg::showOutOfMemory();
                     LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
                         << " bytes for a manual image W" << width << " H" << height << LL_ENDL;
                 }
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index ee66122774d0487d1ed9fe3a85aa7de615a801d2..4d64dc9e104ab729f488091a4afd6b2dc1fe9b02 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -857,7 +857,7 @@ LLRender::~LLRender()
 	shutdown();
 }
 
-void LLRender::init(bool needs_vertex_buffer)
+bool LLRender::init(bool needs_vertex_buffer)
 {
 #if LL_WINDOWS
     if (gGLManager.mHasDebugOutput && gDebugGL)
@@ -879,6 +879,13 @@ void LLRender::init(bool needs_vertex_buffer)
     // necessary for reflection maps
     glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
 
+#if LL_WINDOWS
+    if (glGenVertexArrays == nullptr)
+    {
+        return false;
+    }
+#endif
+
     { //bind a dummy vertex array object so we're core profile compliant
         U32 ret;
         glGenVertexArrays(1, &ret);
@@ -889,6 +896,7 @@ void LLRender::init(bool needs_vertex_buffer)
     {
         initVertexBuffer();
     }
+    return true;
 }
 
 void LLRender::initVertexBuffer()
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index fd922affbabe219dfda2ca9713abce09e89b0407..716b52354dc4fb0c2061e17e05af358f1f1b1e10 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -375,7 +375,7 @@ class LLRender
 
 	LLRender();
 	~LLRender();
-    void init(bool needs_vertex_buffer);
+    bool init(bool needs_vertex_buffer);
     void initVertexBuffer();
     void resetVertexBuffer();
 	void shutdown();
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index d610a44bc680c4462179af1d723cad84385f708a..eea30776321fa06e6efd391e3c1bd432d87fbcf7 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -40,20 +40,20 @@ LLRenderNavPrim gRenderNav;
 //=============================================================================
 void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
 {
-	LLColor4 cV(color);
-	gGL.color4fv( cV.mV );
-	gGL.begin(LLRender::TRIANGLES);
+    gGL.color4ubv(color.mV);
+
+    gGL.begin(LLRender::TRIANGLES);
 	{
 		gGL.vertex3fv( a.mV );
 		gGL.vertex3fv( b.mV );
 		gGL.vertex3fv( c.mV );
 	}
-	gGL.end();		
+	gGL.end();
 }
 //=============================================================================
 void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt )
 {	
 	pVBO->setBuffer();
-	pVBO->drawArrays( mode, 0, vertCnt );	
+	pVBO->drawArrays( mode, 0, vertCnt );
 }
 //=============================================================================
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 896a34cac4f9f28842799ea4e65e0b1b799f70c7..496c34c38b233096efa8d780cc8cfe49d84bb167 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -126,12 +126,12 @@ class LLAccordionCtrlTab : public LLUICtrl
 
 	void setSelected(bool is_selected);
 
-	bool getCollapsible() {return mCollapsible;};
+	bool getCollapsible() { return mCollapsible; };
 
-	void setCollapsible(bool collapsible) {mCollapsible = collapsible;};
+	void setCollapsible(bool collapsible) { mCollapsible = collapsible; };
 	void changeOpenClose(bool is_open);
 
-	void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close;};
+	void canOpenClose(bool can_open_close) { mCanOpenClose = can_open_close; };
 	bool canOpenClose() const { return mCanOpenClose; };
 
 	virtual BOOL postBuild();
@@ -142,8 +142,8 @@ class LLAccordionCtrlTab : public LLUICtrl
 
 	void draw();
 
-	void    storeOpenCloseState		();
-	void    restoreOpenCloseState	();
+	void storeOpenCloseState();
+	void restoreOpenCloseState();
 
 protected:
 	LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&);
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 3e159365e5d0fcea0999b2a6397dd4c1ae97a69a..8ef7bd837f44f4fe976702cecbc26a34ec0cd41c 100644
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -34,8 +34,6 @@
 #include "llerror.h"
 #include "llxuiparser.h"
 
-#include <boost/foreach.hpp>
-
 
 //
 // LLCommandId class
@@ -182,7 +180,7 @@ bool LLCommandManager::load()
 		return false;
 	}
 
-	BOOST_FOREACH(LLCommand::Params& commandParams, commandsParams.commands)
+	for (const LLCommand::Params& commandParams : commandsParams.commands)
 	{
 		LLCommand * command = new LLCommand(commandParams);
 
diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp
index 727fbe850e29825898471ab56a65e96093b86d3b..1c33088e8d396d4cc005e4aea382fb7416c85b43 100644
--- a/indra/llui/llcontainerview.cpp
+++ b/indra/llui/llcontainerview.cpp
@@ -288,7 +288,7 @@ void LLContainerView::setLabel(const std::string& label)
 	mLabel = label;
 }
 
-void LLContainerView::setDisplayChildren(const BOOL displayChildren)
+void LLContainerView::setDisplayChildren(BOOL displayChildren)
 {
 	mDisplayChildren = displayChildren;
 	for (child_list_const_iter_t child_iter = getChildList()->begin();
diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h
index 99267d978aa49f7c5283f846441bd15e81a7044c..8e75aaef6ef82bd9e5a93d918138ac066fc9b862 100644
--- a/indra/llui/llcontainerview.h
+++ b/indra/llui/llcontainerview.h
@@ -78,7 +78,7 @@ class LLContainerView : public LLView
 
 	void setLabel(const std::string& label);
 	void showLabel(BOOL show) { mShowLabel = show; }
-	void setDisplayChildren(const BOOL displayChildren);
+	void setDisplayChildren(BOOL displayChildren);
 	BOOL getDisplayChildren() { return mDisplayChildren; }
 	void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;}
 
diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h
index 3a05bc05a165efa6466d27639f9be4692b955d01..52cad3bff4916ae14a1d9671a09b30552fce5baf 100644
--- a/indra/llui/llfiltereditor.h
+++ b/indra/llui/llfiltereditor.h
@@ -43,6 +43,7 @@ class LLFilterEditor : public LLSearchEditor
 public:
 	struct Params : public LLInitParam::Block<Params, LLSearchEditor::Params>
 	{};
+    virtual ~LLFilterEditor() {}
 
 protected:
 	LLFilterEditor(const Params&);
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 460bd0945bacea82297db0196e433dcccda32009..fd4c33df30842fd7ccc46e7cb1d12e3ad11b0b65 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -1361,26 +1361,28 @@ void LLFlatListViewEx::setForceShowingUnmatchedItems(bool show)
 	mForceShowingUnmatchedItems = show;
 }
 
-void LLFlatListViewEx::setFilterSubString(const std::string& filter_str)
+void LLFlatListViewEx::setFilterSubString(const std::string& filter_str, bool notify_parent)
 {
 	if (0 != LLStringUtil::compareInsensitive(filter_str, mFilterSubString))
 	{
 		mFilterSubString = filter_str;
 		updateNoItemsMessage(mFilterSubString);
-		filterItems();
+		filterItems(false, notify_parent);
 	}
 }
 
-void LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
+bool LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
 {
-	if (!item) return;
+    if (!item)
+        return false;
+
+	BOOL visible = TRUE;
 
 	// 0 signifies that filter is matched,
 	// i.e. we don't hide items that don't support 'match_filter' action, separators etc.
 	if (0 == item->notify(action))
 	{
 		mHasMatchedItems = true;
-		item->setVisible(true);
 	}
 	else
 	{
@@ -1388,34 +1390,45 @@ void LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action)
 		if (!mForceShowingUnmatchedItems)
 		{
 			selectItem(item, false);
+			visible = FALSE;
 		}
-		item->setVisible(mForceShowingUnmatchedItems);
 	}
+
+	if (item->getVisible() != visible)
+	{
+		item->setVisible(visible);
+		return true;
+	}
+
+	return false;
 }
 
-void LLFlatListViewEx::filterItems()
+void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent)
 {
-	typedef std::vector <LLPanel*> item_panel_list_t;
-
 	std::string cur_filter = mFilterSubString;
 	LLStringUtil::toUpper(cur_filter);
 
 	LLSD action;
 	action.with("match_filter", cur_filter);
 
-	item_panel_list_t items;
-	getItems(items);
-
 	mHasMatchedItems = false;
-    item_panel_list_t::iterator iter = items.begin(), iter_end = items.end();
-	while (iter < iter_end)
+	bool visibility_changed = false;
+	pairs_const_iterator_t iter = getItemPairs().begin(), iter_end = getItemPairs().end();
+	while (iter != iter_end)
 	{
-		LLPanel* pItem = *(iter++);
-		updateItemVisibility(pItem, action);
+		LLPanel* pItem = (*(iter++))->first;
+		visibility_changed |= updateItemVisibility(pItem, action);
 	}
 
-	sort();
-	notifyParentItemsRectChanged();
+    if (re_sort)
+    {
+        sort();
+    }
+
+    if (visibility_changed && notify_parent)
+    {
+        notifyParentItemsRectChanged();
+    }
 }
 
 bool LLFlatListViewEx::hasMatchedItems()
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index d47c1cf3332204de198085efeeab357765e52ee8..adb0e3e553ad5d005c14b440ae9bc3c29ec13bab 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -300,6 +300,7 @@ class LLFlatListView : public LLScrollContainer, public LLEditMenuHandler
 	virtual S32	notify(const LLSD& info) ;
 
 	virtual ~LLFlatListView();
+
 protected:
 
 	/** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */
@@ -375,7 +376,9 @@ class LLFlatListView : public LLScrollContainer, public LLEditMenuHandler
 
 	LLRect getLastSelectedItemRect();
 
-	void   ensureSelectedVisible();
+	void ensureSelectedVisible();
+
+	const pairs_list_t& getItemPairs() { return mItemPairs; }
 
 private:
 
@@ -482,14 +485,14 @@ class LLFlatListViewEx : public LLFlatListView
 	/**
 	 * Sets up new filter string and filters the list.
 	 */
-	void setFilterSubString(const std::string& filter_str);
+	void setFilterSubString(const std::string& filter_str, bool notify_parent);
 	std::string getFilterSubString() { return mFilterSubString; }
 	
 	/**
 	 * Filters the list, rearranges and notifies parent about shape changes.
 	 * Derived classes may want to overload rearrangeItems() to exclude repeated separators after filtration.
 	 */
-	void filterItems();
+	void filterItems(bool re_sort, bool notify_parent);
 
 	/**
 	 * Returns true if last call of filterItems() found at least one matching item
@@ -513,7 +516,7 @@ class LLFlatListViewEx : public LLFlatListView
 	* @param item - item we are changing
 	* @param item - action - parameters to determin visibility from
 	*/
-	void updateItemVisibility(LLPanel* item, const LLSD &action);
+	bool updateItemVisibility(LLPanel* item, const LLSD &action);
 
 private:
 	std::string mNoFilteredItemsMsg;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index de3de53569a80db0a3f198c7c4c70ba43ecfca5b..c7b04c905c557e29bf192fee29ee87a9c68c1759 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -59,7 +59,6 @@
 #include "llmultifloater.h"
 #include "llsdutil.h"
 #include "lluiusage.h"
-#include <boost/foreach.hpp>
 
 
 // use this to control "jumping" behavior when Ctrl-Tabbing
@@ -506,7 +505,6 @@ void LLFloater::enableResizeCtrls(bool enable, bool width, bool height)
 
 void LLFloater::destroy()
 {
-	gFloaterView->onDestroyFloater(this);
 	// LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before
 	// it was deleted via LLMortician::updateClass(). See EXT-8458.
 	LLFloaterReg::removeInstance(mInstanceName, mKey);
@@ -1850,6 +1848,8 @@ void LLFloater::onClickTearOff(LLFloater* self)
 		{
 			if (self->mSaveRect)
 			{
+                LLRect screen_rect = self->calcScreenRect();
+                self->mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
 				self->storeRectControl();
 			}
 			self->setMinimized(FALSE); // to reenable minimize button if it was minimized
@@ -2407,8 +2407,7 @@ LLFloaterView::LLFloaterView (const Params& p)
 	mFocusCycleMode(FALSE),
 	mMinimizePositionVOffset(0),
 	mSnapOffsetBottom(0),
-	mSnapOffsetRight(0),
-	mFrontChild(NULL)
+	mSnapOffsetRight(0)
 {
 	mSnapView = getHandle();
 }
@@ -2463,7 +2462,7 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
 			//{
 			//	floaterp->translate(translate_x, translate_y);
 			//}
-			BOOST_FOREACH(LLHandle<LLFloater> dependent_floater, floaterp->mDependents)
+			for (LLHandle<LLFloater> dependent_floater : floaterp->mDependents)
 			{
 				if (dependent_floater.get())
 				{
@@ -2478,10 +2477,9 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
 void LLFloaterView::restoreAll()
 {
 	// make sure all subwindows aren't minimized
-	child_list_t child_list = *(getChildList());
-	for (child_list_const_iter_t child_it = child_list.begin(); child_it != child_list.end(); ++child_it)
+	for (auto child : *getChildList())
 	{
-		LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
+		LLFloater* floaterp = dynamic_cast<LLFloater*>(child);
 		if (floaterp)
 		{
 			floaterp->setMinimized(FALSE);
@@ -2564,7 +2562,8 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
 	if (!child)
 		return;
 
-	if (mFrontChild == child)
+    LLFloater* front_child = mFrontChildHandle.get();
+	if (front_child == child)
 	{
 		if (give_focus && child->canFocusStealFrontmost() && !gFocusMgr.childHasKeyboardFocus(child))
 		{
@@ -2573,12 +2572,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
 		return;
 	}
 
-	if (mFrontChild)
+	if (front_child && front_child->getVisible())
 	{
-		mFrontChild->goneFromFront();
+        front_child->goneFromFront();
 	}
 
-	mFrontChild = child;
+    mFrontChildHandle = child->getHandle();
 
 	// *TODO: make this respect floater's mAutoFocus value, instead of
 	// using parameter
@@ -3077,7 +3076,8 @@ LLFloater *LLFloaterView::getBackmost() const
 
 void LLFloaterView::syncFloaterTabOrder()
 {
-	if (mFrontChild && !mFrontChild->isDead() && mFrontChild->getIsChrome())
+    LLFloater* front_child = mFrontChildHandle.get();
+	if (front_child && front_child->getIsChrome())
 		return;
 
 	// look for a visible modal dialog, starting from first
@@ -3115,11 +3115,12 @@ void LLFloaterView::syncFloaterTabOrder()
 			LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
 			if (gFocusMgr.childHasKeyboardFocus(floaterp))
 			{
-                if (mFrontChild != floaterp)
+                LLFloater* front_child = mFrontChildHandle.get();
+                if (front_child != floaterp)
                 {
                     // Grab a list of the top floaters that want to stay on top of the focused floater
 					std::list<LLFloater*> listTop;
-					if (mFrontChild && !mFrontChild->canFocusStealFrontmost())
+					if (front_child && !front_child->canFocusStealFrontmost())
                     {
                         for (LLView* childp : *getChildList())
                         {
@@ -3139,7 +3140,7 @@ void LLFloaterView::syncFloaterTabOrder()
 						{
 							sendChildToFront(childp);
 						}
-						mFrontChild = listTop.back();
+                        mFrontChildHandle = listTop.back()->getHandle();
 					}
                 }
 
@@ -3235,14 +3236,6 @@ void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LL
 	}
 }
 
-void LLFloaterView::onDestroyFloater(LLFloater* floater)
-{
-    if (mFrontChild == floater)
-    {
-        mFrontChild = nullptr;
-    }
-}
-
 void LLFloater::setInstanceName(const std::string& name)
 {
 	if (name != mInstanceName)
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 88f9e7777716ae992e33af9faaa5a5de803888d3..39957386df7c6045cd81afa37d7e1540b34b406f 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -607,7 +607,6 @@ class LLFloaterView : public LLUICtrl
 	LLFloater* getFrontmostClosableFloater(); 
 
 	void setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect);
-	void onDestroyFloater(LLFloater* floater);
 
 private:
 	void hiddenFloaterClosed(LLFloater* floater);
@@ -623,7 +622,7 @@ class LLFloaterView : public LLUICtrl
 	S32				mMinimizePositionVOffset;
 	typedef std::vector<std::pair<LLHandle<LLFloater>, boost::signals2::connection> > hidden_floaters_t;
 	hidden_floaters_t mHiddenFloaters;
-	LLFloater *		mFrontChild;
+    LLHandle<LLFloater>	mFrontChildHandle;
 };
 
 //
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index bc9469cfadf296c8f1843858a1994d4b37d7f8bb..2bd14f6f6aec89175e8215d8afbe4ce79dd05bad 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -187,14 +187,18 @@ LLFolderViewItem::~LLFolderViewItem()
 
 BOOL LLFolderViewItem::postBuild()
 {
-    LLFolderViewModelItem& vmi = *getViewModelItem();
-    // getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
-    // it also sets search strings so it requires a filter reset
-    mLabel = vmi.getDisplayName();
-    setToolTip(vmi.getName());
+    LLFolderViewModelItem* vmi = getViewModelItem();
+    llassert(vmi); // not supposed to happen, if happens, find out why and fix
+    if (vmi)
+    {
+        // getDisplayName() is expensive (due to internal getLabelSuffix() and name building)
+        // it also sets search strings so it requires a filter reset
+        mLabel = vmi->getDisplayName();
+        setToolTip(vmi->getName());
 
-    // Dirty the filter flag of the model from the view (CHUI-849)
-    vmi.dirtyFilter();
+        // Dirty the filter flag of the model from the view (CHUI-849)
+        vmi->dirtyFilter();
+    }
 
     // Don't do full refresh on constructor if it is possible to avoid
     // it significantly slows down bulk view creation.
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 69e338ddb9709b60be5151c9e29f4fec5d162c26..341ddb83f3473d7f99b1fed34f0f5c9cd51b58f1 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -479,7 +479,7 @@ LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring");
 
 // Walk through a string, applying the rules specified by the keyword token list and
 // create a list of color segments.
-void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLWString& wtext, const LLColor4 &defaultColor, LLTextEditor& editor)
+void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLWString& wtext, LLTextEditor& editor, LLStyleConstSP style)
 {
 	LL_RECORD_BLOCK_TIME(FTM_SYNTAX_COLORING);
 	seg_list->clear();
@@ -491,7 +491,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 
 	S32 text_len = wtext.size() + 1;
 
-	seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) );
+	seg_list->push_back( new LLNormalTextSegment( style, 0, text_len, editor ) );
 
 	const llwchar* base = wtext.c_str();
 	const llwchar* cur = base;
@@ -501,9 +501,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 		{
 			if( *cur == '\n' )
 			{
-				LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(cur-base);
+				LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, cur-base);
 				text_segment->setToken( 0 );
-				insertSegment( *seg_list, text_segment, text_len, defaultColor, editor);
+				insertSegment( *seg_list, text_segment, text_len, style, editor);
 				cur++;
 				if( !*cur || *cur == '\n' )
 				{
@@ -541,7 +541,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 						S32 seg_end = cur - base;
 
 						//create segments from seg_start to seg_end
-						insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
+						insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor);
 						line_done = TRUE; // to break out of second loop.
 						break;
 					}
@@ -648,7 +648,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 						seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead();
 					}
 
-					insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, defaultColor, editor);
+					insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, style, editor);
 					/*
 					LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_delimiter->getColor(), seg_start, seg_end, editor );
 					text_segment->setToken( cur_delimiter );
@@ -682,7 +682,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 
 						// LL_INFOS("SyntaxLSL") << "Seg: [" << word.c_str() << "]" << LL_ENDL;
 
-						insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
+						insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor);
 					}
 					cur += seg_len;
 					continue;
@@ -697,30 +697,32 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 	}
 }
 
-void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor )
+void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, LLStyleConstSP style, LLTextEditor& editor )
 {
 	std::string::size_type pos = wtext.find('\n',seg_start);
+    
+    LLStyleConstSP cur_token_style = new LLStyle(LLStyle::Params().font(style->getFont()).color(cur_token->getColor()));
 
 	while (pos!=-1 && pos < (std::string::size_type)seg_end)
 	{
 		if (pos!=seg_start)
 		{
-			LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, pos, editor );
+            LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, pos, editor);
 			text_segment->setToken( cur_token );
-			insertSegment( seg_list, text_segment, text_len, defaultColor, editor);
+			insertSegment( seg_list, text_segment, text_len, style, editor);
 		}
 
-		LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(pos);
+		LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, pos);
 		text_segment->setToken( cur_token );
-		insertSegment( seg_list, text_segment, text_len, defaultColor, editor);
+		insertSegment( seg_list, text_segment, text_len, style, editor);
 
 		seg_start = pos+1;
 		pos = wtext.find('\n',seg_start);
 	}
 
-	LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor );
+	LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, seg_end, editor);
 	text_segment->setToken( cur_token );
-	insertSegment( seg_list, text_segment, text_len, defaultColor, editor);
+	insertSegment( seg_list, text_segment, text_len, style, editor);
 }
 
 void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor )
@@ -744,6 +746,27 @@ void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSe
 	}
 }
 
+void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, LLStyleConstSP style, LLTextEditor& editor )
+{
+	LLTextSegmentPtr last = seg_list.back();
+	S32 new_seg_end = new_segment->getEnd();
+
+	if( new_segment->getStart() == last->getStart() )
+	{
+		seg_list.pop_back();
+	}
+	else
+	{
+		last->setEnd( new_segment->getStart() );
+	}
+	seg_list.push_back( new_segment );
+
+	if( new_seg_end < text_len )
+	{
+		seg_list.push_back( new LLNormalTextSegment( style, new_seg_end, text_len, editor ) );
+	}
+}
+
 #ifdef _DEBUG
 void LLKeywords::dump()
 {
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index 18e2ed06c53e6a4be87d08a5201ec6cb67002b08..2410fe7d5ab5fe1dbb0e2f95c70a43bcdfc069f4 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -29,6 +29,7 @@
 
 
 #include "lldir.h"
+#include "llstyle.h"
 #include "llstring.h"
 #include "v3color.h"
 #include "v4color.h"
@@ -115,8 +116,8 @@ class LLKeywords
 
 	void		findSegments(std::vector<LLTextSegmentPtr> *seg_list,
 							 const LLWString& text,
-							 const LLColor4 &defaultColor,
-							 class LLTextEditor& editor);
+							 class LLTextEditor& editor,
+                             LLStyleConstSP style);
 	void		initialize(LLSD SyntaxXML);
 	void		processTokens();
 
@@ -181,9 +182,11 @@ class LLKeywords
 							   S32 text_len,
 							   S32 seg_start,
 							   S32 seg_end,
-							   const LLColor4 &defaultColor,
+							   LLStyleConstSP style,
 							   LLTextEditor& editor);
 
+    void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, LLStyleConstSP style, LLTextEditor& editor );
+
 	bool		mLoaded;
 	LLSD		mSyntax;
 	word_token_map_t mWordTokenMap;
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 7e4e828a885d0103134916224526c2b9e70e54c4..2769a96875d2e1037f1dde1b424e64f7547454ba 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -395,8 +395,7 @@ void LLLayoutStack::updateLayout()
 							: getRect().getHeight();
 
 	// first, assign minimum dimensions
-	LLLayoutPanel* panelp = NULL;
-	BOOST_FOREACH(panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (panelp->mAutoResize)
 		{
@@ -409,12 +408,15 @@ void LLLayoutStack::updateLayout()
 	llassert(total_visible_fraction < 1.05f);
 
 	// don't need spacing after last panel
-	space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0;
+	if (!mPanels.empty())
+	{
+		space_to_distribute += ll_round(F32(mPanelSpacing) * mPanels.back()->getVisibleAmount());
+	}
 
 	S32 remaining_space = space_to_distribute;
 	if (space_to_distribute > 0 && total_visible_fraction > 0.f)
 	{	// give space proportionally to visible auto resize panels
-		BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+		for (LLLayoutPanel* panelp : mPanels)
 		{
 			if (panelp->mAutoResize)
 			{
@@ -427,7 +429,7 @@ void LLLayoutStack::updateLayout()
 	}
 
 	// distribute any left over pixels to non-collapsed, visible panels
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (remaining_space == 0) break;
 
@@ -443,7 +445,7 @@ void LLLayoutStack::updateLayout()
 
 	F32 cur_pos = (mOrientation == HORIZONTAL) ? 0.f : (F32)getRect().getHeight();
 
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		F32 panel_dim = llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
 
@@ -538,7 +540,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
 {
 	if (!panelp) return NULL;
 
-	BOOST_FOREACH(LLLayoutPanel* p, mPanels)
+	for (LLLayoutPanel* p : mPanels)
 	{
 		if (p == panelp)
 		{
@@ -552,7 +554,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) c
 {
 	LLLayoutPanel* result = NULL;
 
-	BOOST_FOREACH(LLLayoutPanel* p, mPanels)
+	for (LLLayoutPanel* p : mPanels)
 	{
 		if (p->getName() == name)
 		{
@@ -566,7 +568,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) c
 
 void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
 {
-	BOOST_FOREACH(LLLayoutPanel* lp, mPanels)
+	for (LLLayoutPanel* lp : mPanels)
 	{
 		if (lp->mResizeBar == NULL)
 		{
@@ -669,7 +671,7 @@ void LLLayoutStack::updateFractionalSizes()
 {
 	F32 total_resizable_dim = 0.f;
 
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (panelp->mAutoResize)
 		{
@@ -677,7 +679,7 @@ void LLLayoutStack::updateFractionalSizes()
 		}
 	}
 
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (panelp->mAutoResize)
 		{
@@ -698,7 +700,7 @@ void LLLayoutStack::normalizeFractionalSizes()
 	S32 num_auto_resize_panels = 0;
 	F32 total_fractional_size = 0.f;
 	
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (panelp->mAutoResize)
 		{
@@ -709,7 +711,7 @@ void LLLayoutStack::normalizeFractionalSizes()
 
 	if (total_fractional_size == 0.f)
 	{ // equal distribution
-		BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+		for (LLLayoutPanel* panelp : mPanels)
 		{
 			if (panelp->mAutoResize)
 			{
@@ -719,7 +721,7 @@ void LLLayoutStack::normalizeFractionalSizes()
 	}
 	else
 	{ // renormalize
-		BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+		for (LLLayoutPanel* panelp : mPanels)
 		{
 			if (panelp->mAutoResize)
 			{
@@ -736,7 +738,7 @@ bool LLLayoutStack::animatePanels()
 	//
 	// animate visibility
 	//
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (panelp->getVisible())
 		{
@@ -834,7 +836,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
 	LLLayoutPanel* other_resize_panel = NULL;
 	LLLayoutPanel* following_panel = NULL;
 
-	BOOST_REVERSE_FOREACH(LLLayoutPanel* panelp, mPanels)
+	BOOST_REVERSE_FOREACH(LLLayoutPanel* panelp, mPanels) // Should replace this when C++20 reverse view adaptor becomes available...
 	{
 		if (panelp->mAutoResize)
 		{
@@ -883,7 +885,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
 		AFTER_RESIZED_PANEL
 	} which_panel = BEFORE_RESIZED_PANEL;
 
-	BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
+	for (LLLayoutPanel* panelp : mPanels)
 	{
 		if (!panelp->getVisible() || panelp->mCollapsed) 
 		{
@@ -974,6 +976,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
 												MIN_FRACTIONAL_SIZE,
 												MAX_FRACTIONAL_SIZE);
 			}
+			break;
 		default:
 			break;
 		}
@@ -990,8 +993,8 @@ void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent)
 
 void LLLayoutStack::updateResizeBarLimits()
 {
-	LLLayoutPanel* previous_visible_panelp = NULL;
-	BOOST_REVERSE_FOREACH(LLLayoutPanel* visible_panelp, mPanels)
+	LLLayoutPanel* previous_visible_panelp{ nullptr };
+	BOOST_REVERSE_FOREACH(LLLayoutPanel* visible_panelp, mPanels) // Should replace this when C++20 reverse view adaptor becomes available...
 	{
 		if (!visible_panelp->getVisible() || visible_panelp->mCollapsed)
 		{
diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp
index 1ede5b706f9db44488bf041b892915fc81cefe76..e8b6b7e43b50e2eed0b55f60f48a8d7123be4925 100644
--- a/indra/llui/llloadingindicator.cpp
+++ b/indra/llui/llloadingindicator.cpp
@@ -34,7 +34,6 @@
 // Project includes
 #include "lluictrlfactory.h"
 #include "lluiimage.h"
-#include "boost/foreach.hpp"
 
 // registered in llui.cpp to avoid being left out by MS linker
 //static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator");
@@ -52,7 +51,7 @@ LLLoadingIndicator::LLLoadingIndicator(const Params& p)
 
 void LLLoadingIndicator::initFromParams(const Params& p)
 {
-	BOOST_FOREACH(LLUIImage* image, p.images().image)
+	for (LLUIImage* image : p.images().image)
 	{
 		mImages.push_back(image);
 	}
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index fececa15cfd29f1f506b9af68d0a7fcde8803375..7381dc80a85ff4bbccebb8a81a229fab34f89c5d 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -60,7 +60,6 @@
 #include "v2math.h"
 #include <set>
 #include <boost/tokenizer.hpp>
-#include <boost/foreach.hpp>
 
 // static
 LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL;
@@ -1788,7 +1787,8 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
 	mNeedsArrange(FALSE),
 	mAlwaysShowMenu(FALSE),
 	mResetScrollPositionOnShow(true),
-	mShortcutPad(p.shortcut_pad)
+	mShortcutPad(p.shortcut_pad),
+    mFont(p.font)
 {
 	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
 	boost::char_separator<char> sep("_");
@@ -2161,7 +2161,7 @@ void LLMenuGL::arrange( void )
 		}
 		else
 		{
-			BOOST_FOREACH(LLMenuItemGL* itemp, mItems)
+			for (LLMenuItemGL* itemp : mItems)
 			{
 				// do first so LLMenuGLItemCall can call on_visible to determine if visible
 				itemp->buildDrawLabel();
@@ -3647,6 +3647,7 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu )
 	p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
 	p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
 	p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
+    p.font = menu->getFont();
 
 	LLMenuItemBranchDownGL* branch = LLUICtrlFactory::create<LLMenuItemBranchDownGL>(p);
 	success &= branch->addToAcceleratorList(&mAccelerators);
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 5c51cf8465b2cac43d5b239573fb390da7f45948..44ac61f20d9a036c0dfcf2d9cdd27bebb2c1605a 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -562,7 +562,9 @@ class LLMenuGL
 	// add a context menu branch
 	BOOL appendContextSubMenu(LLMenuGL *menu);
 
-protected:
+    const LLFontGL *getFont() const { return mFont; }
+
+  protected:
 	void createSpilloverBranch();
 	void cleanupSpilloverBranch();
 	// Add the menu item to this menu.
@@ -594,6 +596,9 @@ class LLMenuGL
 	BOOL			mKeepFixedSize;
 	BOOL			mNeedsArrange;
 
+    // Font for top menu items only
+    const LLFontGL* mFont;
+
 private:
 
 
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index d736aa6634879ca33fc27023000f539c59db6a8f..907408f3099dc321d7db1ca41439f1f521f420d5 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -45,7 +45,6 @@
 
 #include <algorithm>
 #include <boost/regex.hpp>
-#include <boost/foreach.hpp>
 
 
 const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
@@ -444,14 +443,14 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
 		mSoundName = p.sound;
 	}
 
-	BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts)
+	for (const LLNotificationTemplate::UniquenessContext& context : p.unique.contexts)
 	{
 		mUniqueContext.push_back(context.value);
 	}
 	
 	LL_DEBUGS("Notifications") << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL;
 	
-	BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
+	for (const LLNotificationTemplate::Tag& tag : p.tags)
 	{
 		LL_DEBUGS("Notifications") << "    tag \"" << std::string(tag.value) << "\"" << LL_ENDL;
 		mTags.push_back(tag.value);
@@ -994,6 +993,7 @@ LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListe
 	// all of the notifications that are already in the channel
 	// we use a special signal called "load" in case the channel wants to care
 	// only about new notifications
+    LLMutexLock lock(&mItemsMutex);
 	for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
 	{
 		slot(LLSD().with("sigtype", "load").with("id", (*it)->id()));
@@ -1153,7 +1153,7 @@ LLNotificationChannel::LLNotificationChannel(const Params& p)
 	LLInstanceTracker<LLNotificationChannel, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()),
 	mName(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString())
 {
-	BOOST_FOREACH(const std::string& source, p.sources)
+	for (const std::string& source : p.sources)
     {
 		connectToChannel(source);
 	}
@@ -1171,29 +1171,33 @@ LLNotificationChannel::LLNotificationChannel(const std::string& name,
 	connectToChannel(parent);
 }
 
-bool LLNotificationChannel::isEmpty() const
+LLNotificationChannel::~LLNotificationChannel()
 {
-	return mItems.empty();
+    for (LLBoundListener &listener : mListeners)
+    {
+        listener.disconnect();
+    }
 }
 
-S32 LLNotificationChannel::size() const
+bool LLNotificationChannel::isEmpty() const
 {
-	return mItems.size();
+	return mItems.empty();
 }
 
-LLNotificationChannel::Iterator LLNotificationChannel::begin()
+S32 LLNotificationChannel::size() const
 {
-	return mItems.begin();
+    return mItems.size();
 }
 
-LLNotificationChannel::Iterator LLNotificationChannel::end()
+size_t LLNotificationChannel::size()
 {
-	return mItems.end();
+	return mItems.size();
 }
 
-size_t LLNotificationChannel::size()
+void LLNotificationChannel::forEachNotification(NotificationProcess process)
 {
-	return mItems.size();
+    LLMutexLock lock(&mItemsMutex);
+    std::for_each(mItems.begin(), mItems.end(), process);
 }
 
 std::string LLNotificationChannel::summarize()
@@ -1201,7 +1205,8 @@ std::string LLNotificationChannel::summarize()
 	std::string s("Channel '");
 	s += mName;
 	s += "'\n  ";
-	for (LLNotificationChannel::Iterator it = begin(); it != end(); ++it)
+    LLMutexLock lock(&mItemsMutex);
+	for (LLNotificationChannel::Iterator it = mItems.begin(); it != mItems.end(); ++it)
 	{
 		s += (*it)->summarize();
 		s += "\n  ";
@@ -1213,14 +1218,14 @@ void LLNotificationChannel::connectToChannel( const std::string& channel_name )
 {
 	if (channel_name.empty())
 	{
-		LLNotifications::instance().connectChanged(
-			boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
+        mListeners.push_back(LLNotifications::instance().connectChanged(
+			boost::bind(&LLNotificationChannelBase::updateItem, this, _1)));
 	}
 	else
 	{
 		mParents.push_back(channel_name);
 		LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name);
-		p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
+        mListeners.push_back(p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)));
 	}
 }
 
@@ -1521,7 +1526,7 @@ void replaceFormText(LLNotificationForm::Params& form, const std::string& patter
 		form.ignore.text = replace;
 	}
 
-	BOOST_FOREACH(LLNotificationForm::FormElement& element, form.form_elements.elements)
+	for (LLNotificationForm::FormElement& element : form.form_elements.elements)
 	{
 		if (element.button.isChosen() && element.button.text() == pattern)
 		{
@@ -1553,6 +1558,7 @@ bool LLNotifications::loadTemplates()
 
 	if (!success || root.isNull() || !root->hasName( "notifications" ))
 	{
+        LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
 		LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL;
 		return false;
 	}
@@ -1563,25 +1569,26 @@ bool LLNotifications::loadTemplates()
 
 	if(!params.validateBlock())
 	{
+        LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
 		LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL;
 		return false;
 	}
 
 	mTemplates.clear();
 
-	BOOST_FOREACH(LLNotificationTemplate::GlobalString& string, params.strings)
+	for (const LLNotificationTemplate::GlobalString& string : params.strings)
 	{
 		mGlobalStrings[string.name] = string.value;
 	}
 
 	std::map<std::string, LLNotificationForm::Params> form_templates;
 
-	BOOST_FOREACH(LLNotificationTemplate::Template& notification_template, params.templates)
+	for (const LLNotificationTemplate::Template& notification_template : params.templates)
 	{
 		form_templates[notification_template.name] = notification_template.form;
 	}
 
-	BOOST_FOREACH(LLNotificationTemplate::Params& notification, params.notifications)
+	for (LLNotificationTemplate::Params& notification : params.notifications)
 	{
 		if (notification.form_ref.form_template.isChosen())
 		{
@@ -1629,13 +1636,14 @@ bool LLNotifications::loadVisibilityRules()
 
 	if(!params.validateBlock())
 	{
+        LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
 		LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL;
 		return false;
 	}
 
 	mVisibilityRules.clear();
 
-	BOOST_FOREACH(LLNotificationVisibilityRule::Rule& rule, params.rules)
+	for (const LLNotificationVisibilityRule::Rule& rule : params.rules)
 	{
 		mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule)));
 	}
@@ -1728,6 +1736,7 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
 
 void LLNotifications::cancelByName(const std::string& name)
 {
+    LLMutexLock lock(&mItemsMutex);
 	std::vector<LLNotificationPtr> notifs_to_cancel;
 	for (LLNotificationSet::iterator it=mItems.begin(), end_it = mItems.end();
 		it != end_it;
@@ -1752,6 +1761,7 @@ void LLNotifications::cancelByName(const std::string& name)
 
 void LLNotifications::cancelByOwner(const LLUUID ownerId)
 {
+    LLMutexLock lock(&mItemsMutex);
 	std::vector<LLNotificationPtr> notifs_to_cancel;
 	for (LLNotificationSet::iterator it = mItems.begin(), end_it = mItems.end();
 		 it != end_it;
@@ -1799,11 +1809,6 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
 	}
 }
 
-void LLNotifications::forEachNotification(NotificationProcess process)
-{
-	std::for_each(mItems.begin(), mItems.end(), process);
-}
-
 std::string LLNotifications::getGlobalString(const std::string& key) const
 {
 	GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 4d9a33f1d7ad7bce5b7613f1e401da97dc90b083..8e61ff5259a42875daed9d1bf5452f2369d24678 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -738,16 +738,19 @@ class LLNotificationChannelBase :
 {
 	LOG_CLASS(LLNotificationChannelBase);
 public:
-	LLNotificationChannelBase(LLNotificationFilter filter) 
-	:	mFilter(filter), 
-		mItems() 
-	{}
+    LLNotificationChannelBase(LLNotificationFilter filter) 
+    : mFilter(filter)
+    , mItems() 
+    , mItemsMutex()
+    {}
+
     virtual ~LLNotificationChannelBase()
     {
         // explicit cleanup for easier issue detection
         mChanged.disconnect_all_slots();
         mPassedFilter.disconnect_all_slots();
         mFailedFilter.disconnect_all_slots();
+        LLMutexLock lock(&mItemsMutex);
         mItems.clear();
     }
 	// you can also connect to a Channel, so you can be notified of
@@ -786,6 +789,7 @@ class LLNotificationChannelBase :
 	LLStandardSignal mChanged;
 	LLStandardSignal mPassedFilter;
 	LLStandardSignal mFailedFilter;
+    LLMutex mItemsMutex;
 	
 	// these are action methods that subclasses can override to take action 
 	// on specific types of changes; the management of the mItems list is
@@ -835,7 +839,7 @@ class LLNotificationChannel :
 	LLNotificationChannel(const Params& p = Params());
 	LLNotificationChannel(const std::string& name, const std::string& parent, LLNotificationFilter filter);
 
-	virtual ~LLNotificationChannel() {}
+	virtual ~LLNotificationChannel();
 	typedef LLNotificationSet::iterator Iterator;
     
 	std::string getName() const { return mName; }
@@ -844,21 +848,23 @@ class LLNotificationChannel :
 	{
 		return boost::iterator_range<parents_iter>(mParents);
 	}
-    
-	void connectToChannel(const std::string& channel_name);
-    
+
     bool isEmpty() const;
     S32 size() const;
-    
-    Iterator begin();
-    Iterator end();
-	size_t size();
-	
+    size_t size();
+
+    typedef boost::function<void(LLNotificationPtr)> NotificationProcess;
+    void forEachNotification(NotificationProcess process);
+
 	std::string summarize();
 
+protected:
+    void connectToChannel(const std::string& channel_name);
+
 private:
 	std::string mName;
 	std::vector<std::string> mParents;
+    std::vector<LLBoundListener> mListeners;
 };
 
 // An interface class to provide a clean linker seam to the LLNotifications class.
@@ -924,10 +930,6 @@ class LLNotifications :
 	void update(const LLNotificationPtr pNotif);
 
 	LLNotificationPtr find(LLUUID uuid);
-	
-	typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
-	
-	void forEachNotification(NotificationProcess process);
 
 	// This is all stuff for managing the templates
 	// take your template out
@@ -990,7 +992,7 @@ class LLNotifications :
 
 	bool mIgnoreAllNotifications;
 
-	boost::scoped_ptr<LLNotificationsListener> mListener;
+	std::unique_ptr<LLNotificationsListener> mListener;
 
 	std::vector<LLNotificationChannelPtr> mDefaultChannels;
 };
diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index e73ba1fbe90577c65dddcfdae24221a59f991c51..859222f907eb34c31b297b25e7a039984410000b 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -32,7 +32,6 @@
 #include "llnotificationtemplate.h"
 #include "llsd.h"
 #include "llui.h"
-#include <boost/foreach.hpp>
 
 LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
     LLEventAPI("LLNotifications",
@@ -149,11 +148,11 @@ void LLNotificationsListener::listChannelNotifications(const LLSD& params) const
     if (channel)
     {
         LLSD notifications(LLSD::emptyArray());
-        for (LLNotificationChannel::Iterator ni(channel->begin()), nend(channel->end());
-             ni != nend; ++ni)
-        {
-            notifications.append(asLLSD(*ni));
-        }
+        std::function<void(LLNotificationPtr)> func = [notifications](LLNotificationPtr ni) mutable
+            {
+                notifications.append(asLLSD(ni));
+            };
+        channel->forEachNotification(func);
         response["notifications"] = notifications;
     }
     LLEventPumps::instance().obtain(params["reply"]).post(response);
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index cfaf08ec0a26704df4db9bae7e86c38af25d92a1..8bf135f10ce804999b87d1d9640f802d21e2acfc 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -104,6 +104,14 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
 	}
 }
 
+LLSearchEditor::~LLSearchEditor()
+{
+    mSearchButton = NULL;
+    mClearButton = NULL;
+    mSearchEditor->deleteAllChildren();
+    deleteAllChildren();
+}
+
 //virtual
 void LLSearchEditor::draw()
 {
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
index c0f3c1d60cbb3edc9c0758a672cade3c8f3c35f8..bd51988d071a3d7120d86af9b5c28ee144fda271 100644
--- a/indra/llui/llsearcheditor.h
+++ b/indra/llui/llsearcheditor.h
@@ -74,7 +74,7 @@ class LLSearchEditor : public LLUICtrl
 	friend class LLUICtrlFactory;
 
 public:
-	virtual ~LLSearchEditor() {}
+	virtual ~LLSearchEditor();
 
 	/*virtual*/ void	draw();
 
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 244910095205b9f6092d71e1ce313302206ebd4a..fc3024c0defe6b967563badfc636fb47ae54f292 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -181,7 +181,7 @@ LLStatBar::LLStatBar(const Params& p)
 	mTargetMinBar(llmin(p.bar_min, p.bar_max)),
 	mTargetMaxBar(llmax(p.bar_max, p.bar_min)),
 	mCurMaxBar(p.bar_max),
-    mCurMinBar(0),
+	mCurMinBar(0),
 	mDecimalDigits(p.decimal_digits),
 	mNumHistoryFrames(p.num_frames),
 	mNumShortHistoryFrames(p.num_frames_short),
@@ -222,9 +222,6 @@ BOOL LLStatBar::handleHover(S32 x, S32 y, MASK mask)
 	case STAT_SAMPLE:
 		LLToolTipMgr::instance().show(LLToolTip::Params().message(mStat.sampleStatp->getDescription()).sticky_rect(calcScreenRect()));
 		break;
-	case STAT_MEM:
-		LLToolTipMgr::instance().show(LLToolTip::Params().message(mStat.memStatp->getDescription()).sticky_rect(calcScreenRect()));
-		break;
 	default:
 		break;
 	}
@@ -373,18 +370,6 @@ void LLStatBar::draw()
 			}
 		}
 		break;
-	case STAT_MEM:
-		{
-			const LLTrace::StatType<LLTrace::MemAccumulator>& mem_stat = *mStat.memStatp;
-
-			unit_label        = mUnitLabel.empty() ? mem_stat.getUnitLabel() : mUnitLabel;
-			current           = last_frame_recording.getLastValue(mem_stat).value();
-			min               = frame_recording.getPeriodMin(mem_stat, num_frames).value();
-			max               = frame_recording.getPeriodMax(mem_stat, num_frames).value();
-			mean              = frame_recording.getPeriodMean(mem_stat, num_frames).value();
-			display_value	  = current;
-		}
-		break;
 	default:
 		break;
 	}
@@ -500,11 +485,6 @@ void LLStatBar::draw()
 							max_value		= recording.getMax(*mStat.sampleStatp);
 							num_samples		= recording.getSampleCount(*mStat.sampleStatp);
 							break;
-						case STAT_MEM:
-							min_value       = recording.getMin(*mStat.memStatp).value();
-							max_value		= recording.getMax(*mStat.memStatp).value();
-							num_samples = 1;
-							break;
 						default:
 							break;
 					}
@@ -583,14 +563,8 @@ void LLStatBar::setStat(const std::string& stat_name)
 		mStat.sampleStatp = sample_stat.get();
 		mStatType = STAT_SAMPLE;
 	}
-	else if (auto mem_stat = StatType<MemAccumulator>::getInstance(stat_name))
-	{
-		mStat.memStatp = mem_stat.get();
-		mStatType = STAT_MEM;
-	}
 }
 
-
 void LLStatBar::setRange(F32 bar_min, F32 bar_max)
 {
 	mTargetMinBar		= llmin(bar_min, bar_max);
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index 6b481ca68f78d2d1b1e8bd8de0dc95b7de35acff..384d0950a64406d05dd7ed82a1dc687159ef5c7e 100644
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -95,17 +95,15 @@ class LLStatBar : public LLView
 		STAT_NONE,
 		STAT_COUNT,
 		STAT_EVENT,
-		STAT_SAMPLE,
-		STAT_MEM
+		STAT_SAMPLE
 	} mStatType;
 
 	union
 	{
-		void*														valid;
+		void*													valid;
 		const LLTrace::StatType<LLTrace::CountAccumulator>*		countStatp;
 		const LLTrace::StatType<LLTrace::EventAccumulator>*		eventStatp;
-		const LLTrace::StatType<LLTrace::SampleAccumulator>*		sampleStatp;
-		const LLTrace::StatType<LLTrace::MemAccumulator>*		memStatp;
+		const LLTrace::StatType<LLTrace::SampleAccumulator>*	sampleStatp;
 	} mStat;
 
 	LLUIString   mLabel;
diff --git a/indra/llui/llstatview.cpp b/indra/llui/llstatview.cpp
index bb4969c81f1d74c2f86c206b909f6fc6872225d7..03f2fb7cc0e51081e6a7e96878256eae5054e7b2 100644
--- a/indra/llui/llstatview.cpp
+++ b/indra/llui/llstatview.cpp
@@ -58,10 +58,7 @@ LLStatView::~LLStatView()
 	}
 }
 
-
 static StatViewRegistry::Register<LLStatBar> r1("stat_bar");
 static StatViewRegistry::Register<LLStatView> r2("stat_view");
 // stat_view can be a child of panels/etc.
 static LLDefaultChildRegistry::Register<LLStatView> r3("stat_view");
-
-
diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h
index af4db7d7ea0a56f50ef8e64bf97e19637e477be4..044f0a8679ee93837887e5e17ce751cf8b8728ad 100644
--- a/indra/llui/llstatview.h
+++ b/indra/llui/llstatview.h
@@ -63,7 +63,7 @@ class LLStatView : public LLContainerView
 	friend class LLUICtrlFactory;
 
 protected:
-	std::string mSetting;
-
+	const std::string mSetting;
 };
+
 #endif // LL_STATVIEW_
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index cb36f72f6e04f243b8250e3a9edc462ebf8e1e38..6aeae0f291ed8687b0769d5eff434a103c10231d 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1516,25 +1516,23 @@ BOOL LLTabContainer::selectTab(S32 which)
 
 	LLTabTuple* selected_tuple = getTab(which);
 	if (!selected_tuple)
-	{
 		return FALSE;
-	}
-	
+
 	LLSD cbdata;
 	if (selected_tuple->mTabPanel)
 		cbdata = selected_tuple->mTabPanel->getName();
 
-	BOOL res = FALSE;
-	if( !mValidateSignal || (*mValidateSignal)( this, cbdata ) )
+	BOOL result = FALSE;
+	if (!mValidateSignal || (*mValidateSignal)(this, cbdata))
 	{
-		res = setTab(which);
-		if (res && mCommitSignal)
+		result = setTab(which);
+		if (result && mCommitSignal)
 		{
 			(*mCommitSignal)(this, cbdata);
 		}
 	}
-	
-	return res;
+
+	return result;
 }
 
 // private
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 7ccf025a191f8c54d097b5939f4bd7ef33c7a506..50feee8a4766c42bab4ef5909f5324fe39f94458 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -3470,7 +3470,7 @@ BOOL LLNormalTextSegment::handleToolTip(S32 x, S32 y, MASK mask)
 	if (mToken && !mToken->getToolTip().empty())
 	{
 		const LLWString& wmsg = mToken->getToolTip();
-		LLToolTipMgr::instance().show(wstring_to_utf8str(wmsg));
+        LLToolTipMgr::instance().show(wstring_to_utf8str(wmsg), (mToken->getType() == LLKeywordToken::TT_FUNCTION));
 		return TRUE;
 	}
 	// or do we have an explicitly set tooltip (e.g., for Urls)
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 092739a5382be768abe58c22099328873d0b4aaf..7150052b65701e81f791660022793601dc4260c2 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1862,7 +1862,8 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask )
 		}
 
 		if (mEnableTooltipPaste &&
-			LLToolTipMgr::instance().toolTipVisible() && 
+			LLToolTipMgr::instance().toolTipVisible() &&
+            LLToolTipMgr::instance().isTooltipPastable() &&
 			KEY_TAB == key)
 		{	// Paste the first line of a tooltip into the editor
 			std::string message;
@@ -2694,6 +2695,7 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length )
 	char* text = new char[ text_len + 1];
 	if (text == NULL)
 	{
+        LLError::LLUserWarningMsg::showOutOfMemory();
 		LL_ERRS() << "Memory allocation failure." << LL_ENDL;			
 		return FALSE;
 	}
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 2707f7a15ca6bd8000b11a0e2da47f2418886711..204b8b99846b72dc414b806342e7762b4d5b658b 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -27,7 +27,6 @@
 
 #include "linden_common.h"
 
-#include <boost/foreach.hpp>
 #include "lltoolbar.h"
 
 #include "llcommandmanager.h"
@@ -219,7 +218,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
 	
 	mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p));
 
-	BOOST_FOREACH(LLCommandId id, p.commands)
+	for (const auto& id : p.commands)
 	{
 		addCommand(id);
 	}
@@ -417,7 +416,7 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
 		// Determine which button the mouse was over during the click in case the context menu action
 		// is intended to affect the button.
 		mRightMouseTargetButton = NULL;
-		BOOST_FOREACH(LLToolBarButton* button, mButtons)
+		for (LLToolBarButton* button : mButtons)
 		{
 			LLRect button_rect;
 			button->localRectToOtherView(button->getLocalRect(), &button_rect, this);
@@ -505,7 +504,7 @@ void LLToolBar::setButtonType(LLToolBarEnums::ButtonType button_type)
 void LLToolBar::resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth)
 {
 	// make buttons in current row all same girth
-	BOOST_FOREACH(LLToolBarButton* button, buttons_in_row)
+	for (LLToolBarButton* button : buttons_in_row)
 	{
 		if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
 		{
@@ -693,7 +692,7 @@ void LLToolBar::updateLayoutAsNeeded()
 
 	std::vector<LLToolBarButton*> buttons_in_row;
 
-	BOOST_FOREACH(LLToolBarButton* button, mButtons)
+	for (LLToolBarButton* button : mButtons)
 	{
 		button->reshape(button->mWidthRange.getMin(), button->mDesiredHeight);
 		button->autoResize();
@@ -878,7 +877,7 @@ void LLToolBar::createButtons()
 {
 	std::set<LLUUID> set_flashing;
 
-	BOOST_FOREACH(LLToolBarButton* button, mButtons)
+	for (LLToolBarButton* button : mButtons)
 	{
         if (button->getFlashTimer() && button->getFlashTimer()->isFlashingInProgress())
         {
@@ -896,7 +895,7 @@ void LLToolBar::createButtons()
 	mButtonMap.clear();
 	mRightMouseTargetButton = NULL;
 	
-	BOOST_FOREACH(LLCommandId& command_id, mButtonCommands)
+	for (const LLCommandId& command_id : mButtonCommands)
 	{
 		LLToolBarButton* button = createButton(command_id);
 		mButtons.push_back(button);
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index a6552d4ff1c312e68ec89cf81895549f3ef67ba0..bea46f4a6ff884d861d8eeed715038718f0a12b4 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -154,7 +154,8 @@ LLToolTip::Params::Params()
 	text_color("text_color"),
 	time_based_media("time_based_media", false),
 	web_based_media("web_based_media", false),
-	media_playing("media_playing", false)
+	media_playing("media_playing", false),
+    allow_paste_tooltip("allow_paste_tooltip", false)
 {
 	changeDefault(chrome, true);
 }
@@ -167,7 +168,8 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
 	mTextBox(NULL),
 	mInfoButton(NULL),
 	mPlayMediaButton(NULL),
-	mHomePageButton(NULL)
+	mHomePageButton(NULL),
+    mIsTooltipPastable(p.allow_paste_tooltip)
 {
 	LLTextBox::Params params;
 	params.name = params.initial_value().asString();
@@ -289,6 +291,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
 		mTextBox->setText(p.message());
 	}
 
+	mIsTooltipPastable = p.allow_paste_tooltip;
+
 	updateTextBox();
 	snapToChildren();
 }
@@ -440,7 +444,13 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params)
 	tooltip_params.rect = LLRect (0, 1, 1, 0);
 
 	if (tooltip_params.create_callback.isProvided())
-		mToolTip = tooltip_params.create_callback()(tooltip_params);
+    {
+        mToolTip = tooltip_params.create_callback()(tooltip_params);
+        if (mToolTip == NULL) 
+        {
+            return;
+        }
+    }
 	else
 		mToolTip = LLUICtrlFactory::create<LLToolTip> (tooltip_params);
 
@@ -483,16 +493,16 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params)
 }
 
 
-void LLToolTipMgr::show(const std::string& msg)
+void LLToolTipMgr::show(const std::string& msg, bool allow_paste_tooltip)
 {
-	show(LLToolTip::Params().message(msg));
+    show(LLToolTip::Params().message(msg).allow_paste_tooltip(allow_paste_tooltip));
 }
 
 void LLToolTipMgr::show(const LLToolTip::Params& params)
 {
 	if (!params.styled_message.isProvided() 
 		&& (!params.message.isProvided() || params.message().empty())
-		&& !params.image.isProvided()) return;
+		&& !params.image.isProvided() && !params.create_callback.isProvided()) return;
 
 	// fill in default tooltip params from tool_tip.xml
 	LLToolTip::Params params_with_defaults(params);
@@ -626,5 +636,13 @@ void LLToolTipMgr::getToolTipMessage(std::string & message)
 	}
 }
 
+bool LLToolTipMgr::isTooltipPastable()
+{
+    if (toolTipVisible())
+    {
+        return mToolTip->isTooltipPastable();
+    }
+    return false;
+ }
 
 // EOF
diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h
index 86943625fff61184201e7ac06fd21436bd87f2c7..fef5e7c75f428fc3fa4b83ff01176e8cd8b69ee7 100644
--- a/indra/llui/lltooltip.h
+++ b/indra/llui/lltooltip.h
@@ -94,6 +94,8 @@ class LLToolTip : public LLPanel
 									padding;
 		Optional<bool>				wrap;
 
+        Optional<bool> allow_paste_tooltip;
+
 		Params();
 	};
 	/*virtual*/ void draw();
@@ -109,6 +111,7 @@ class LLToolTip : public LLPanel
 	virtual void initFromParams(const LLToolTip::Params& params);
 
 	void getToolTipMessage(std::string & message);
+    bool isTooltipPastable() { return mIsTooltipPastable; }
 
 protected:
 	void updateTextBox();
@@ -125,6 +128,8 @@ class LLToolTip : public LLPanel
 	bool			mHasClickCallback;
 	S32				mPadding;	// pixels
 	S32				mMaxWidth;
+
+    bool mIsTooltipPastable;
 };
 
 // used for the inspector tooltips which need different background images etc.
@@ -142,7 +147,7 @@ class LLToolTipMgr : public LLSingleton<LLToolTipMgr>
 
 public:
 	void show(const LLToolTip::Params& params);
-	void show(const std::string& message);
+	void show(const std::string& message, bool allow_paste_tooltip = false);
 
 	void unblockToolTips();
 	void blockToolTips();
@@ -154,6 +159,7 @@ class LLToolTipMgr : public LLSingleton<LLToolTipMgr>
 	void updateToolTipVisibility();
 
 	void getToolTipMessage(std::string & message);
+    bool isTooltipPastable();
 
 private:
 	void createToolTip(const LLToolTip::Params& params);
diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp
index 5da722a72bb8fd1815c5ee3ddcdb4cb58926f765..6c486f29ba94ebae5d824bc89a4ae79a07a5b9f9 100644
--- a/indra/llui/lltransutil.cpp
+++ b/indra/llui/lltransutil.cpp
@@ -44,8 +44,13 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s
 	bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
 	if (!success)
 	{
+        const std::string error_string =
+            "Second Life viewer couldn't access some of the files it needs and will be closed."
+            "\n\nPlease reinstall viewer from  https://secondlife.com/support/downloads/ and "
+            "contact https://support.secondlife.com if issue persists after reinstall.";
+        LLError::LLUserWarningMsg::show(error_string);
 		gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
-		LL_ERRS() << "Couldn't load string table " << xml_filename << ". Please reinstall viewer from  https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
+		LL_ERRS() << "Couldn't load string table " << xml_filename << " " << errno << LL_ENDL;
 		return false;
 	}
 
@@ -60,6 +65,7 @@ bool LLTransUtil::parseLanguageStrings(const std::string& xml_filename)
 	
 	if (!success)
 	{
+        LLError::LLUserWarningMsg::showMissingFiles();
 		LL_ERRS() << "Couldn't load localization table " << xml_filename << LL_ENDL;
 		return false;
 	}
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 096336045c364fbc9ab715264b7677814ee9f061..f43bdf1fdc713e86022994e7682f369cd65acd87 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -32,7 +32,6 @@
 #include "llui.h"
 #include "lluicolortable.h"
 #include "lluictrlfactory.h"
-#include <boost/foreach.hpp>
 
 LLUIColorTable::ColorParams::ColorParams()
 :	value("value"),
@@ -208,7 +207,7 @@ bool LLUIColorTable::loadFromSettings()
 
 	// pass constraint=LLDir::ALL_SKINS because we want colors.xml from every
 	// skin dir
-	BOOST_FOREACH(std::string colors_path,
+	for (const std::string& colors_path :
 				  gDirUtilp->findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS))
 	{
 		result |= loadFromFilename(colors_path, mLoadedColors);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 77e9edf5e5f602e0f1a715d6ff2bad00cfa5a4c1..05d821f5d8136746521a865eb8daf6cb75a0cd4b 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -234,14 +234,20 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const
 
 std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const
 {
+    if (url.empty())
+    {
+        return url;
+    }
 	LLUriParser up(escapeUrl(url));
-	up.normalize();
-
-	std::string label;
-	up.extractParts();
-	up.glueFirst(label);
+	if (up.normalize() == 0)
+    {
+        std::string label;
+        up.extractParts();
+        up.glueFirst(label);
 
-	return unescapeUrl(label);
+        return unescapeUrl(label);
+    }
+    return std::string();
 }
 
 std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 3bd7321777493a3452f9cdddbb329d160c7144a5..f1df7699e26c605ce28ff20b925832082513c2a9 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -221,8 +221,10 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
 		if (match_entry == mUrlEntryTrusted)
 		{
 			LLUriParser up(url);
-			up.normalize();
-			url = up.normalizedUri();
+			if (up.normalize() == 0)
+            {
+                url = up.normalizedUri();
+            }
 		}
 
 		match.setValues(match_start, match_end,
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 139eb17efaff0af712617ac9f1e76a4985c719b2..5768ceacd3318aeab0f69bc00c8be40f40d5210e 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -32,7 +32,6 @@
 
 #include <sstream>
 #include <boost/tokenizer.hpp>
-#include <boost/foreach.hpp>
 #include <boost/bind.hpp>
 
 #include "llrender.h"
@@ -61,6 +60,7 @@ static const S32 LINE_HEIGHT = 15;
 S32		LLView::sDepth = 0;
 bool	LLView::sDebugRects = false;
 bool	LLView::sDebugUnicode = false;
+bool	LLView::sDebugCamera = false;
 bool	LLView::sIsRectDirty = false;
 LLRect	LLView::sDirtyRect;
 bool	LLView::sDebugRectsShowNames = true;
@@ -593,7 +593,7 @@ void LLView::deleteAllChildren()
 
 void LLView::setAllChildrenEnabled(BOOL b)
 {
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		viewp->setEnabled(b);
 	}
@@ -622,7 +622,7 @@ void LLView::onVisibilityChange ( BOOL new_visibility )
 {
 	BOOL old_visibility;
 	BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus();
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		if (!viewp)
 		{
@@ -726,7 +726,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
 {
 	if ( getVisible() && getEnabled() )
 	{
-		BOOST_FOREACH(LLView* viewp, mChildList)
+		for (LLView* viewp : mChildList)
 		{
 			if ((viewp->*method)(c, mask, TRUE))
 			{
@@ -745,7 +745,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
 template <typename METHOD, typename XDATA>
 LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block)
 {
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		S32 local_x = x - viewp->getRect().mLeft;
 		S32 local_y = y - viewp->getRect().mBottom;
@@ -774,7 +774,7 @@ LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDA
 
 LLView* LLView::childrenHandleToolTip(S32 x, S32 y, MASK mask)
 {
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		S32 local_x = x - viewp->getRect().mLeft;
 		S32 local_y = y - viewp->getRect().mBottom;
@@ -806,7 +806,7 @@ LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
 	// default to not accepting drag and drop, will be overridden by handler
 	*accept = ACCEPT_NO;
 
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		S32 local_x = x - viewp->getRect().mLeft;
 		S32 local_y = y - viewp->getRect().mBottom;
@@ -832,7 +832,7 @@ LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
 
 LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
 {
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		S32 local_x = x - viewp->getRect().mLeft;
 		S32 local_y = y - viewp->getRect().mBottom;
@@ -860,7 +860,7 @@ LLView*	LLView::childFromPoint(S32 x, S32 y, bool recur)
 	if (!getVisible())
 		return NULL;
 
-	BOOST_FOREACH(LLView* viewp, mChildList)
+	for (LLView* viewp : mChildList)
 	{
 		S32 local_x = x - viewp->getRect().mLeft;
 		S32 local_y = y - viewp->getRect().mBottom;
@@ -1379,7 +1379,7 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent)
 		mRect.mTop = getRect().mBottom + height;
 
 		// move child views according to reshape flags
-		BOOST_FOREACH(LLView* viewp, mChildList)
+		for (LLView* viewp : mChildList)
 		{
 			if (viewp != NULL)
 			{
@@ -1451,7 +1451,7 @@ LLRect LLView::calcBoundingRect()
 {
 	LLRect local_bounding_rect = LLRect::null;
 
-	BOOST_FOREACH(LLView* childp, mChildList)
+	for (LLView* childp : mChildList)
 	{
 		// ignore invisible and "top" children when calculating bounding rect
 		// such as combobox popups
@@ -1614,7 +1614,7 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
     LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
 	
     // Look for direct children *first*
-	BOOST_FOREACH(LLView* childp, mChildList)
+	for (LLView* childp : mChildList)
 	{
 		llassert(childp);
 		if (childp->getName() == name)
@@ -1625,7 +1625,7 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
 	if (recurse)
 	{
 		// Look inside each child as well.
-		BOOST_FOREACH(LLView* childp, mChildList)
+		for (LLView* childp : mChildList)
 		{
 			llassert(childp);
 			LLView* viewp = childp->findChildView(name, recurse);
@@ -2809,7 +2809,7 @@ S32	LLView::notifyParent(const LLSD& info)
 bool	LLView::notifyChildren(const LLSD& info)
 {
 	bool ret = false;
-	BOOST_FOREACH(LLView* childp, mChildList)
+	for (LLView* childp : mChildList)
 	{
 		ret = ret || childp->notifyChildren(info);
 	}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 6e16d41cba39af8cfcfbe39385a0fc7f89fd3e6e..c14a8bdce31a7a4346659bed5b318cf41f8a1812 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -662,6 +662,9 @@ class LLView
 	// Show hexadecimal byte values of unicode symbols in a tooltip
 	static bool	sDebugUnicode;
 
+	// Show camera position and direction in Camera Controls floater
+	static bool	sDebugCamera;
+
 	static bool sIsRectDirty;
 	static LLRect sDirtyRect;
 
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index 391a37728064a49a21050177098c80fdacd4029d..aaa2f6aef140a3105748133adba4caba239ed0b3 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -65,13 +65,12 @@ HRESULT GetVideoMemoryViaWMI(WCHAR* strInputDeviceID, DWORD* pdwAdapterRam)
 {
     HRESULT hr;
     bool bGotMemory = false;
-    HRESULT hrCoInitialize = S_OK;
     IWbemLocator* pIWbemLocator = nullptr;
     IWbemServices* pIWbemServices = nullptr;
     BSTR pNamespace = nullptr;
 
     *pdwAdapterRam = 0;
-    hrCoInitialize = CoInitialize( 0 );
+    CoInitializeEx(0, COINIT_APARTMENTTHREADED);
 
     hr = CoCreateInstance( CLSID_WbemLocator,
                            nullptr,
@@ -208,8 +207,7 @@ HRESULT GetVideoMemoryViaWMI(WCHAR* strInputDeviceID, DWORD* pdwAdapterRam)
 
     SAFE_RELEASE( pIWbemLocator );
 
-    if( SUCCEEDED( hrCoInitialize ) )
-        CoUninitialize();
+    CoUninitialize();
 
     if( bGotMemory )
         return S_OK;
@@ -232,9 +230,8 @@ S32 LLDXHardware::getMBVideoMemoryViaWMI()
 std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
 {
 	std::string mDriverVersion;
-	HRESULT hrCoInitialize = S_OK;
 	HRESULT hres;
-	hrCoInitialize = CoInitialize(0);
+	CoInitializeEx(0, COINIT_APARTMENTTHREADED);
 	IWbemLocator *pLoc = NULL;
 
 	hres = CoCreateInstance(
@@ -437,10 +434,10 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
 	{
 		pEnumerator->Release();
 	}
-	if (SUCCEEDED(hrCoInitialize))
-	{
-		CoUninitialize();
-	}
+
+    // supposed to always call CoUninitialize even if init returned false
+	CoUninitialize();
+
 	return mDriverVersion;
 }
 
@@ -687,7 +684,8 @@ BOOL LLDXHardware::getInfo(BOOL vram_only)
 	BOOL ok = FALSE;
     HRESULT       hr;
 
-    CoInitialize(NULL);
+    // CLSID_DxDiagProvider does not work with Multithreaded?
+    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
 
     IDxDiagProvider *dx_diag_providerp = NULL;
     IDxDiagContainer *dx_diag_rootp = NULL;
@@ -976,7 +974,7 @@ LLSD LLDXHardware::getDisplayInfo()
 	LLTimer hw_timer;
     HRESULT       hr;
 	LLSD ret;
-    CoInitialize(NULL);
+    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
 
     IDxDiagProvider *dx_diag_providerp = NULL;
     IDxDiagContainer *dx_diag_rootp = NULL;
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 057d7a700e4f246df7392613f0d2799b7db30330..54e5f43e87ac90389d764844051a23324aa18cf3 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -351,6 +351,10 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
     LLWindowWin32Thread();
 
     void run() override;
+    void close() override;
+
+    // closes queue, wakes thread, waits until thread closes
+    void wakeAndDestroy();
 
     void glReady()
     {
@@ -363,6 +367,9 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
     // initialize D3D (if DXGI cannot be used)
     void initD3D();
 
+    //clean up DXGI/D3D resources
+    void cleanupDX();
+
     // call periodically to update available VRAM
     void updateVRAMUsage();
 
@@ -412,8 +419,8 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
     using FuncType = std::function<void()>;
     // call GetMessage() and pull enqueue messages for later processing
     void gatherInput();
-    HWND mWindowHandle = NULL;
-    HDC mhDC = 0;
+    HWND mWindowHandleThrd = NULL;
+    HDC mhDCThrd = 0;
 
     // *HACK: Attempt to prevent startup crashes by deferring memory accounting
     // until after some graphics setup. See SL-20177. -Cosmic,2023-09-18
@@ -987,46 +994,10 @@ void LLWindowWin32::close()
 
 	LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
 
-    mWindowThread->post([=]()
-        {
-            if (IsWindow(mWindowHandle))
-            {
-                if (mhDC)
-                {
-                    if (!ReleaseDC(mWindowHandle, mhDC))
-                    {
-                        LL_WARNS("Window") << "Release of ghDC failed!" << LL_ENDL;
-                    }
-                }
-
-                // Make sure we don't leave a blank toolbar button.
-                ShowWindow(mWindowHandle, SW_HIDE);
-
-                // This causes WM_DESTROY to be sent *immediately*
-                if (!destroy_window_handler(mWindowHandle))
-                {
-                    OSMessageBox(mCallbacks->translateString("MBDestroyWinFailed"),
-                        mCallbacks->translateString("MBShutdownErr"),
-                        OSMB_OK);
-                }
-            }
-            else
-            {
-                // Something killed the window while we were busy destroying gl or handle somehow got broken
-                LL_WARNS("Window") << "Failed to destroy Window, invalid handle!" << LL_ENDL;
-            }
-
-        });
-    // Window thread might be waiting for a getMessage(), give it
-    // a push to enshure it will process destroy_window_handler
-    kickWindowThread();
-
-    // Even though the above lambda might not yet have run, we've already
-    // bound mWindowHandle into it by value, which should suffice for the
-    // operations we're asking. That's the last time WE should touch it.
     mhDC = NULL;
     mWindowHandle = NULL;
-    mWindowThread->close();
+    
+    mWindowThread->wakeAndDestroy();
 }
 
 BOOL LLWindowWin32::isValid()
@@ -1777,8 +1748,8 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
         ()
         {
             LL_DEBUGS("Window") << "recreateWindow(): window_work entry" << LL_ENDL;
-            self->mWindowHandle = 0;
-            self->mhDC = 0;
+            self->mWindowHandleThrd = 0;
+            self->mhDCThrd = 0;
 
             if (oldWindowHandle)
             {
@@ -1813,20 +1784,20 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
             {
                 // Failed to create window: clear the variables. This
                 // assignment is valid because we're running on mWindowThread.
-                self->mWindowHandle = NULL;
-                self->mhDC = 0;
+                self->mWindowHandleThrd = NULL;
+                self->mhDCThrd = 0;
             }
             else
             {
                 // Update mWindowThread's own mWindowHandle and mhDC.
-                self->mWindowHandle = handle;
-                self->mhDC = GetDC(handle);
+                self->mWindowHandleThrd = handle;
+                self->mhDCThrd = GetDC(handle);
             }
             
             updateWindowRect();
 
             // It's important to wake up the future either way.
-            promise.set_value(std::make_pair(self->mWindowHandle, self->mhDC));
+            promise.set_value(std::make_pair(self->mWindowHandleThrd, self->mhDCThrd));
             LL_DEBUGS("Window") << "recreateWindow(): window_work done" << LL_ENDL;
         };
     // But how we pass window_work to the window thread depends on whether we
@@ -3656,6 +3627,9 @@ void LLSplashScreenWin32::showImpl()
 		NULL,	// no parent
 		(DLGPROC) LLSplashScreenWin32::windowProc); 
 	ShowWindow(mWindow, SW_SHOW);
+
+    // Should set taskbar text without creating a header for the window (caption)
+    SetWindowTextA(mWindow, "Second Life");
 }
 
 
@@ -4589,11 +4563,25 @@ U32 LLWindowWin32::getAvailableVRAMMegabytes()
 #endif // LL_WINDOWS
 
 inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread()
-    : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE)
+    : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, true /*should be false, temporary workaround for SL-18721*/)
 {
     LL::ThreadPool::start();
 }
 
+void LLWindowWin32::LLWindowWin32Thread::close()
+{
+    if (!mQueue->isClosed())
+    {
+        LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL;
+        LL::ThreadPool::close();
+
+        // Workaround for SL-18721 in case window closes too early and abruptly
+        LLSplashScreen::show();
+        LLSplashScreen::update("..."); // will be updated later
+    }
+}
+
+
 /**
  * LogChange is to log changes in status while trying to avoid spamming the
  * log with repeated messages, especially in a tight loop. It refuses to log
@@ -4745,7 +4733,7 @@ void LLWindowWin32::LLWindowWin32Thread::initD3D()
 {
     if (!mGLReady) { return; }
 
-    if (mDXGIAdapter == NULL && mD3DDevice == NULL && mWindowHandle != 0)
+    if (mDXGIAdapter == NULL && mD3DDevice == NULL && mWindowHandleThrd != 0)
     {
         mD3D = Direct3DCreate9(D3D_SDK_VERSION);
         
@@ -4755,7 +4743,7 @@ void LLWindowWin32::LLWindowWin32Thread::initD3D()
         d3dpp.Windowed = TRUE;
         d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
 
-        HRESULT res = mD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, mWindowHandle, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &mD3DDevice);
+        HRESULT res = mD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, mWindowHandleThrd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &mD3DDevice);
         
         if (FAILED(res))
         {
@@ -4768,6 +4756,28 @@ void LLWindowWin32::LLWindowWin32Thread::initD3D()
     }
 }
 
+void LLWindowWin32::LLWindowWin32Thread::cleanupDX()
+{
+    //clean up DXGI/D3D resources
+    if (mDXGIAdapter)
+    {
+        mDXGIAdapter->Release();
+        mDXGIAdapter = nullptr;
+    }
+
+    if (mD3DDevice)
+    {
+        mD3DDevice->Release();
+        mD3DDevice = nullptr;
+    }
+
+    if (mD3D)
+    {
+        mD3D->Release();
+        mD3D = nullptr;
+    }
+}
+
 void LLWindowWin32::LLWindowWin32Thread::updateVRAMUsage()
 {
     LL_PROFILE_ZONE_SCOPED;
@@ -4861,7 +4871,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
         // lazily call initD3D inside this loop to catch when mGLReady has been set to true
         initDX();
 
-        if (mWindowHandle != 0)
+        if (mWindowHandleThrd != 0)
         {
             // lazily call initD3D inside this loop to catch when mWindowHandle has been set, and mGLReady has been set to true
             // *TODO: Shutdown if this fails when mWindowHandle exists
@@ -4869,16 +4879,16 @@ void LLWindowWin32::LLWindowWin32Thread::run()
 
             MSG msg;
             BOOL status;
-            if (mhDC == 0)
+            if (mhDCThrd == 0)
             {
                 LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - PeekMessage");
-                logger.onChange("PeekMessage(", std::hex, mWindowHandle, ")");
-                status = PeekMessage(&msg, mWindowHandle, 0, 0, PM_REMOVE);
+                logger.onChange("PeekMessage(", std::hex, mWindowHandleThrd, ")");
+                status = PeekMessage(&msg, mWindowHandleThrd, 0, 0, PM_REMOVE);
             }
             else
             {
                 LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("w32t - GetMessage");
-                logger.always("GetMessage(", std::hex, mWindowHandle, ")");
+                logger.always("GetMessage(", std::hex, mWindowHandleThrd, ")");
                 status = GetMessage(&msg, NULL, 0, 0);
             }
             if (status > 0)
@@ -4915,25 +4925,110 @@ void LLWindowWin32::LLWindowWin32Thread::run()
 #endif
     }
 
-    //clean up DXGI/D3D resources
-    if (mDXGIAdapter)
+    cleanupDX();
+}
+
+void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()
+{
+    if (mQueue->isClosed())
     {
-        mDXGIAdapter->Release();
-        mDXGIAdapter = nullptr;
+        LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." << LL_ENDL;
+        return;
     }
 
-    if (mD3DDevice)
+    // Make sure we don't leave a blank toolbar button.
+    // Also hiding window now prevents user from suspending it
+    // via some action (like dragging it around)
+    ShowWindow(mWindowHandleThrd, SW_HIDE);
+
+    // Schedule destruction
+    HWND old_handle = mWindowHandleThrd;
+    post([this]()
+         {
+             if (IsWindow(mWindowHandleThrd))
+             {
+                 if (mhDCThrd)
+                 {
+                     if (!ReleaseDC(mWindowHandleThrd, mhDCThrd))
+                     {
+                         LL_WARNS("Window") << "Release of ghDC failed!" << LL_ENDL;
+                     }
+                     mhDCThrd = NULL;
+                 }
+
+                 // This causes WM_DESTROY to be sent *immediately*
+                 if (!destroy_window_handler(mWindowHandleThrd))
+                 {
+                     LL_WARNS("Window") << "Failed to destroy Window! " << std::hex << GetLastError() << LL_ENDL;
+                 }
+             }
+             else
+             {
+                 // Something killed the window while we were busy destroying gl or handle somehow got broken
+                 LL_WARNS("Window") << "Failed to destroy Window, invalid handle!" << LL_ENDL;
+             }
+             mWindowHandleThrd = NULL;
+             mhDCThrd = NULL;
+             mGLReady = false;
+         });
+
+    LL_DEBUGS("Window") << "Closing window's pool queue" << LL_ENDL;
+    mQueue->close();
+
+    // Post a nonsense user message to wake up the thread in
+    // case it is waiting for a getMessage()
+    if (old_handle)
     {
-        mD3DDevice->Release();
-        mD3DDevice = nullptr;
+        WPARAM wparam{ 0xB0B0 };
+        LL_DEBUGS("Window") << "PostMessage(" << std::hex << old_handle
+            << ", " << WM_DUMMY_
+            << ", " << wparam << ")" << std::dec << LL_ENDL;
+        PostMessage(old_handle, WM_DUMMY_, wparam, 0x1337);
     }
 
-    if (mD3D)
+    // There are cases where window will refuse to close,
+    // can't wait forever on join, check state instead
+    LLTimer timeout;
+    timeout.setTimerExpirySec(2.0);
+    while (!getQueue().done() && !timeout.hasExpired() && mWindowHandleThrd)
     {
-        mD3D->Release();
-        mD3D = nullptr;
+        ms_sleep(100);
+    }
+
+    if (getQueue().done() || mWindowHandleThrd == NULL)
+    {
+        // Window is closed, started closing or is cleaning up
+        // now wait for our single thread to die.
+        if (mWindowHandleThrd)
+        {
+            LL_INFOS("Window") << "Window is closing, waiting on pool's thread to join, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL;
+        }
+        else
+        {
+            LL_DEBUGS("Window") << "Waiting on pool's thread, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL;
+        }
+        for (auto& pair : mThreads)
+        {
+            pair.second.join();
+        }
     }
+    else
+    {
+        // Something suspended window thread, can't afford to wait forever
+        // so kill thread instead
+        // Ex: This can happen if user starts dragging window arround (if it
+        // was visible) or a modal notification pops up
+        LL_WARNS("Window") << "Window is frozen, couldn't perform clean exit" << LL_ENDL;
 
+        for (auto& pair : mThreads)
+        {
+            // very unsafe
+            TerminateThread(pair.second.native_handle(), 0);
+            pair.second.detach();
+            cleanupDX();
+        }
+    }
+    LL_DEBUGS("Window") << "thread pool shutdown complete" << LL_ENDL;
 }
 
 void LLWindowWin32::post(const std::function<void()>& func)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index dc0c92bd1944457bf2ae31baef6bc46831ecbe93..4b6135c24cc8bf2e6ffc94d46c5043e3967ff62f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -235,6 +235,7 @@ set(viewer_SOURCE_FILES
     llfloaterimcontainer.cpp
     llfloaterinspect.cpp
     llfloaterinventorysettings.cpp
+    llfloaterinventorythumbnailshelper.cpp
     llfloaterjoystick.cpp
     llfloaterlagmeter.cpp
     llfloaterland.cpp
@@ -892,6 +893,7 @@ set(viewer_HEADER_FILES
     llfloaterimcontainer.h
     llfloaterinspect.h
     llfloaterinventorysettings.h
+    llfloaterinventorythumbnailshelper.h
     llfloaterjoystick.h
     llfloaterlagmeter.h
     llfloaterland.h
@@ -1581,34 +1583,15 @@ endif (WINDOWS)
 
 # Add the xui files. This is handy for searching for xui elements
 # from within the IDE.
-set(viewer_XUI_FILES
-    skins/default/colors.xml
-    skins/default/default_languages.xml
-    skins/default/textures/textures.xml
-    )
-file(GLOB DEFAULT_XUI_FILE_GLOB_LIST
-     ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/*.xml)
-list(APPEND viewer_XUI_FILES ${DEFAULT_XUI_FILE_GLOB_LIST})
-
-file(GLOB DEFAULT_WIDGET_FILE_GLOB_LIST
-     ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/widgets/*.xml)
-list(APPEND viewer_XUI_FILES ${DEFAULT_WIDGET_FILE_GLOB_LIST})
-
-# Cannot append empty lists in CMake, wait until we have files here.
-#file(GLOB SILVER_WIDGET_FILE_GLOB_LIST
-#     ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/widgets/*.xml)
-#list(APPEND viewer_XUI_FILES ${SILVER_WIDGET_FILE_GLOB_LIST})
-
-list(SORT viewer_XUI_FILES)
-
-source_group("XUI Files" FILES ${viewer_XUI_FILES})
-
-set_source_files_properties(${viewer_XUI_FILES}
+file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
+    ${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES})
+set_source_files_properties(${viewer_XUI_FILES} 
                             PROPERTIES HEADER_FILE_ONLY TRUE)
-
 list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
 
-file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES TRUE
+# Add the shader sources
+file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
     ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
 set_source_files_properties(${viewer_SHADER_FILES} 
@@ -1618,6 +1601,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
 
 set(viewer_APPSETTINGS_FILES
     app_settings/anim.ini
+    app_settings/autoreplace.xml
     app_settings/cmd_line.xml
     app_settings/commands.xml
     app_settings/grass.xml
@@ -1825,7 +1809,7 @@ if (WINDOWS)
 
     if (PACKAGE)
       add_custom_command(
-        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
+        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz
         COMMAND ${PYTHON_EXECUTABLE}
         ARGS
           ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
@@ -1869,7 +1853,7 @@ if (WINDOWS)
         )
         # temporarily disable packaging of event_host until hg subrepos get
         # sorted out on the parabuild cluster...
-        #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
+        #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz)
 
     endif (PACKAGE)
 elseif (DARWIN)
@@ -1990,7 +1974,7 @@ if (LINUX)
   #endif (NOT USE_BUGSPLAT)
 
   add_custom_command(
-      OUTPUT ${product}.tar.bz2
+      OUTPUT ${product}.tar.xz
       COMMAND ${PYTHON_EXECUTABLE}
       ARGS
         ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -2044,7 +2028,7 @@ if (LINUX)
   add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
 
   if (PACKAGE)
-    add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2)
+    add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz)
     # Make sure we don't run two instances of viewer_manifest.py at the same time.
     add_dependencies(llpackage copy_l_viewer_manifest)
     check_message_template(llpackage)
@@ -2175,12 +2159,12 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
         OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN
         OUTPUT_STRIP_TRAILING_WHITESPACE)
       add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
-        # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2;
+        # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz;
         # testing a string suffix is painful enough in CMake language that
         # we'll continue assuming it until forced to generalize.
         COMMAND "tar"
         ARGS
-          "cjf"
+          "cJf"
           "${VIEWER_SYMBOL_FILE_CYGWIN}"
           "-C"
           "${PARENT_DIRECTORY_CYGWIN}"
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index b7f8ee41e6934d953db404b5c91f4465bd1850cb..2380dcfd47328403cb6f1238721f9a3d9cccc5e7 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.1.4
+7.1.7
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3ac1844f8ef1f50fe002f7ec64c055cd905cad6f..56c16ed9de3e029736f61c43688ca3f86345bdef 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3244,17 +3244,6 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-  <key>DefaultBlankNormalTexture</key>
-  <map>
-    <key>Comment</key>
-    <string>Texture used as 'Blank' in texture picker for normal maps. (UUID texture reference)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>String</string>
-    <key>Value</key>
-    <string>5b53359e-59dd-d8a2-04c3-9e65134da47a</string>
-  </map>
 	<key>DefaultFemaleAvatar</key>
 	<map>
 	  <key>Comment</key>
@@ -3288,39 +3277,6 @@
 	  <key>Value</key>
 	  <string>Male Shape &amp; Outfit</string>
 	</map>
-  <key>DefaultObjectNormalTexture</key>
-  <map>
-    <key>Comment</key>
-    <string>Texture used as 'Default' in texture picker for normal map. (UUID texture reference)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>String</string>
-    <key>Value</key>
-    <string>85f28839-7a1c-b4e3-d71d-967792970a7b</string>
-  </map>
-  <key>DefaultObjectSpecularTexture</key>
-  <map>
-    <key>Comment</key>
-    <string>Texture used as 'Default' in texture picker for specular map. (UUID texture reference)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>String</string>
-    <key>Value</key>
-    <string>87e0e8f7-8729-1ea8-cfc9-8915773009db</string>
-  </map>
-  <key>DefaultObjectTexture</key>
-    <map>
-      <key>Comment</key>
-      <string>Texture used as 'Default' in texture picker. (UUID texture reference)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>89556747-24cb-43ed-920b-47caed15465f</string>
-    </map>
     <key>DefaultUploadCost</key>
     <map>
       <key>Comment</key>
@@ -5431,6 +5387,17 @@
       <key>Value</key>
       <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string>
     </map>
+    <key>LSLFontSizeName</key>
+    <map>
+        <key>Comment</key>
+        <string>Text font size in LSL editor</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string>Monospace</string>
+    </map>
     <key>GridStatusRSS</key>
     <map>
       <key>Comment</key>
@@ -7507,10 +7474,21 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>OpenDebugStatBasic</key>
+    <map>
+      <key>Comment</key>
+      <string>Expand Basic performance stats display</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>1</integer>
+    </map>
     <key>OpenDebugStatAdvanced</key>
     <map>
       <key>Comment</key>
-      <string>Expand advanced performance stats display</string>
+      <string>Expand Advanced performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7518,10 +7496,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>OpenDebugStatBasic</key>
+    <key>OpenDebugStatRender</key>
     <map>
       <key>Comment</key>
-      <string>Expand basic performance stats display</string>
+      <string>Expand Render performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7529,10 +7507,21 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>OpenDebugStatNet</key>
+    <key>OpenDebugStatTexture</key>
     <map>
       <key>Comment</key>
-      <string>Expand network stats display</string>
+      <string>Expand Texture performance stats display</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
+    <key>OpenDebugStatMemory</key>
+    <map>
+      <key>Comment</key>
+      <string>Expand Memory Usage stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7540,10 +7529,10 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>OpenDebugStatRender</key>
+    <key>OpenDebugStatNet</key>
     <map>
       <key>Comment</key>
-      <string>Expand render stats display</string>
+      <string>Expand Network performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7554,7 +7543,7 @@
     <key>OpenDebugStatSim</key>
     <map>
       <key>Comment</key>
-      <string>Expand simulator performance stats display</string>
+      <string>Expand Simulator performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7562,10 +7551,10 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>OpenDebugStatTexture</key>
+    <key>OpenDebugStatPhysicsDetails</key>
     <map>
       <key>Comment</key>
-      <string>Expand Texture performance stats display</string>
+      <string>Expand Physics Details performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -7573,10 +7562,10 @@
       <key>Value</key>
       <integer>0</integer>
     </map>
-    <key>OpenDebugStatPhysicsDetails</key>
+    <key>OpenDebugStatPathfinding</key>
     <map>
       <key>Comment</key>
-      <string>Expand Physics Details performance stats display</string>
+      <string>Expand Pathfinding performance stats display</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -10676,7 +10665,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>2.0</real>
+    <real>1.0</real>
   </map>
   <key>RendeSkyAutoAdjustBlueHorizonScale</key>
   <map>
@@ -10720,7 +10709,7 @@
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0.001</real>
+    <real>0.01</real>
   </map>
   <key>RenderSkySunlightScale</key>
   <map>
@@ -13620,17 +13609,6 @@
       <key>Value</key>
       <string>F3E07BC8-A973-476D-8C7F-F3B7293975D1</string>
     </map>
-    <key>UIImgWhiteUUID</key>
-    <map>
-      <key>Comment</key>
-      <string />
-      <key>Persist</key>
-      <integer>0</integer>
-      <key>Type</key>
-      <string>String</string>
-      <key>Value</key>
-      <string>5748decc-f629-461c-9a36-a35a221fe21f</string>
-    </map>
     <key>UILineEditorCursorThickness</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index ca27dbd818b5434730439e23125b3a914892377a..0974950274d6015f8f923ca11778590603d46ed8 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -95,7 +95,6 @@
 #include "llworld.h"
 #include "llworldmap.h"
 #include "stringize.h"
-#include "boost/foreach.hpp"
 #include "llcorehttputil.h"
 #include "lluiusage.h"
 
@@ -1469,23 +1468,27 @@ void LLAgent::pitch(F32 angle)
 
 	LLVector3 skyward = getReferenceUpVector();
 
-	// SL-19286 Avatar is upside down when viewed from below
-	// after left-clicking the mouse on the avatar and dragging down
-	//
-	// The issue is observed on angle below 10 degrees
-	const F32 look_down_limit = 179.f * DEG_TO_RAD;
-	const F32 look_up_limit   =  10.f * DEG_TO_RAD;
-
-	F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
-
 	// clamp pitch to limits
-	if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
+	if (angle >= 0.f)
 	{
-		angle = look_down_limit - angle_from_skyward;
+		const F32 look_down_limit = 179.f * DEG_TO_RAD;
+		F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
+		if (angle_from_skyward + angle > look_down_limit)
+		{
+			angle = look_down_limit - angle_from_skyward;
+		}
 	}
-	else if ((angle < 0.f) && (angle_from_skyward + angle < look_up_limit))
+	else if (angle < 0.f)
 	{
-		angle = look_up_limit - angle_from_skyward;
+		const F32 look_up_limit = 5.f * DEG_TO_RAD;
+		const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin();
+		LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal());
+		LLVector3 look_dir = agent_focus_pos - viewer_camera_pos;
+		F32 angle_from_skyward = angle_between(look_dir, skyward);
+		if (angle_from_skyward + angle < look_up_limit)
+		{
+			angle = look_up_limit - angle_from_skyward;
+		}
 	}
 
 	if (fabs(angle) > 1e-4)
@@ -2329,7 +2332,7 @@ void LLAgent::endAnimationUpdateUI()
 			LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
 			LLFloaterIMContainer::floater_list_t conversations;
 			im_box->getDetachedConversationFloaters(conversations);
-			BOOST_FOREACH(LLFloater* conversation, conversations)
+			for (LLFloater* conversation : conversations)
 			{
 				LL_INFOS() << "skip_list.insert(session_floater): " << conversation->getTitle() << LL_ENDL;
 				skip_list.insert(conversation);
@@ -4329,6 +4332,10 @@ void LLAgent::teleportRequest(
 // Landmark ID = LLUUID::null means teleport home
 void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
 {
+    if (landmark_asset_id.isNull())
+    {
+        gAgentCamera.resetView();
+    }
 	mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLandmark(landmark_asset_id));
 	startTeleportRequest();
 }
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index fd3a9b1d7b9aa157af5f70957ac33a3bfd64972c..43b4457bf5a1d8257c9e142c436cd65a516dcb0b 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -61,7 +61,7 @@ class LLTeleportRequest;
 
 
 
-typedef boost::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
+typedef std::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
 
 //--------------------------------------------------------------------
 // Types
@@ -131,7 +131,7 @@ class LLAgent : public LLOldEvents::LLObservable
 private:
 	bool			mInitialized;
 	bool			mFirstLogin;
-	boost::shared_ptr<LLAgentListener> mListener;
+	std::shared_ptr<LLAgentListener> mListener;
 
 	//--------------------------------------------------------------------
 	// Session
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 8977b145d110698b859fe1e2eedf39b839f8c871..0d0d6e7e466ac64b00735bbd94e32dc19a626ee1 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1779,7 +1779,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
 
 		head_offset.clearVec();
 		F32 fixup;
-		if (gAgentAvatarp->hasPelvisFixup(fixup))
+        if (gAgentAvatarp->hasPelvisFixup(fixup) && !gAgentAvatarp->isSitting())
 		{
 			head_offset[VZ] -= fixup;
 		}
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 17e1a27934d3e67c0347b7320355eae286870dac..f23ce136087c6df0e68517504c4e860e0f46c4d9 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1738,10 +1738,6 @@ void AISUpdate::doUpdate()
 		LL_DEBUGS("Inventory") << "cat version update " << cat->getName() << " to version " << cat->getVersion() << LL_ENDL;
 		if (cat->getVersion() != version)
 		{
-			LL_WARNS() << "Possible version mismatch for category " << cat->getName()
-					<< ", viewer version " << cat->getVersion()
-					<< " AIS version " << version << " !!!Adjusting local version!!!" <<  LL_ENDL;
-
             // the AIS version should be considered the true version. Adjust 
             // our local category model to reflect this version number.  Otherwise 
             // it becomes possible to get stuck with the viewer being out of 
@@ -1751,13 +1747,23 @@ void AISUpdate::doUpdate()
             // is performed.  This occasionally gets out of sync however.
             if (version != LLViewerInventoryCategory::VERSION_UNKNOWN)
             {
+                LL_WARNS() << "Possible version mismatch for category " << cat->getName()
+                    << ", viewer version " << cat->getVersion()
+                    << " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL;
                 cat->setVersion(version);
             }
             else
             {
                 // We do not account for update if version is UNKNOWN, so we shouldn't rise version
                 // either or viewer will get stuck on descendants count -1, try to refetch folder instead
-                cat->fetch();
+                //
+                // Todo: proper backoff?
+
+                LL_WARNS() << "Possible version mismatch for category " << cat->getName()
+                    << ", viewer version " << cat->getVersion()
+                    << " AIS version " << version << " !!!Rerequesting category!!!" << LL_ENDL;
+                const S32 LONG_EXPIRY = 360;
+                cat->fetch(LONG_EXPIRY);
             }
 		}
 	}
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index debf93dccd740753599de90fdc3adf635176e3a7..51e259992d25bf238313d653600810eefe815727 100644
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -168,6 +168,7 @@ void LLAppCoreHttp::init()
     }
     else
     {
+        LLError::LLUserWarningMsg::showMissingFiles();
         LL_ERRS("Init") << "Missing CA File; should be at " << ca_file << LL_ENDL;
     }
     
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4c3a9229d2c51b5b546e21cf036cab490e3aacb1..c84657cf7abd53eb0ff92e7e2b6b32d5cac5cd5e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -27,7 +27,6 @@
 #include "llviewerprecompiledheaders.h"
 
 #include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
 #include "llaccordionctrltab.h"
 #include "llagent.h"
 #include "llagentcamera.h"
@@ -1647,7 +1646,7 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
         sub_cat_array,
         outfit_item_array,
         LLInventoryModel::EXCLUDE_TRASH);
-    BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+    for (LLViewerInventoryItem* outfit_item : outfit_item_array)
     {
         LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
         if (linked_item != NULL)
@@ -3438,7 +3437,7 @@ void update_base_outfit_after_ordering()
 								sub_cat_array,
 								outfit_item_array,
 								LLInventoryModel::EXCLUDE_TRASH);
-	BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+	for (LLViewerInventoryItem* outfit_item : outfit_item_array)
 	{
 		LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
 		if (linked_item != NULL)
@@ -3742,7 +3741,7 @@ LLSD LLAppearanceMgr::dumpCOF() const
 			LLUUID linked_asset_id(linked_item->getAssetUUID());
 			md5.update((unsigned char*)linked_asset_id.mData, 16);
 			U32 flags = linked_item->getFlags();
-			md5.update(boost::lexical_cast<std::string>(flags));
+			md5.update(std::to_string(flags));
 		}
 		else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType())
 		{
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c079b3d1a1ce85a18d09c30715baf4da55329977..b88ab845fe78e2a81baa6d1f8f544606951c6ad2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -143,7 +143,6 @@
 
 // Third party library includes
 #include <boost/bind.hpp>
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/regex.hpp>
 #include <boost/throw_exception.hpp>
@@ -362,7 +361,6 @@ BOOL gRandomizeFramerate = FALSE;
 BOOL gPeriodicSlowFrame = FALSE;
 
 BOOL gCrashOnStartup = FALSE;
-BOOL gLLErrorActivated = FALSE;
 BOOL gLogoutInProgress = FALSE;
 
 BOOL gSimulateMemLeak = FALSE;
@@ -1207,7 +1205,7 @@ bool LLAppViewer::init()
             LLSD item(LeapCommand);
             LeapCommand.append(item);
         }
-        BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand))
+        for (const auto& leap : llsd::inArray(LeapCommand))
         {
             LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL;
             // We don't have any better description of this plugin than the
@@ -1712,7 +1710,7 @@ bool LLAppViewer::cleanup()
     LLNotifications::instance().clear();
 
 	// workaround for DEV-35406 crash on shutdown
-	LLEventPumps::instance().reset();
+	LLEventPumps::instance().reset(true);
 
 	//dump scene loading monitor results
 	if (LLSceneMonitor::instanceExists())
@@ -1892,6 +1890,9 @@ bool LLAppViewer::cleanup()
 		LL_INFOS() << "ViewerWindow deleted" << LL_ENDL;
 	}
 
+    LLSplashScreen::show();
+    LLSplashScreen::update(LLTrans::getString("ShuttingDown"));
+
 	LL_INFOS() << "Cleaning up Keyboard & Joystick" << LL_ENDL;
 
 	// viewer UI relies on keyboard so keep it aound until viewer UI isa gone
@@ -2170,6 +2171,8 @@ bool LLAppViewer::cleanup()
 	// deleteSingleton() methods.
 	LLSingletonBase::deleteAll();
 
+    LLSplashScreen::hide();
+
     LL_INFOS() << "Goodbye!" << LL_ENDL;
 
 	removeDumpDir();
@@ -2253,9 +2256,6 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
         OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
 #endif
 
-        //Set the ErrorActivated global so we know to create a marker file
-        gLLErrorActivated = true;
-
         gDebugInfo["FatalMessage"] = error_string;
         // We're not already crashing -- we simply *intend* to crash. Since we
         // haven't actually trashed anything yet, we can afford to write the whole
@@ -2264,6 +2264,14 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
     }
 }
 
+void errorMSG(const std::string& title_string, const std::string& message_string)
+{
+    if (!message_string.empty())
+    {
+        OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
+    }
+}
+
 void LLAppViewer::initLoggingAndGetLastDuration()
 {
     //
@@ -2275,6 +2283,8 @@ void LLAppViewer::initLoggingAndGetLastDuration()
     LLError::addGenericRecorder(&errorCallback);
     //LLError::setTimeFunction(getRuntime);
 
+    LLError::LLUserWarningMsg::setHandler(errorMSG);
+
 
     if (mSecondInstance)
     {
@@ -2357,7 +2367,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 		LL_ERRS() << "Invalid settings location list" << LL_ENDL;
 	}
 
-	BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
+	for (const SettingsGroup& group : mSettingsLocationList->groups)
 	{
 		// skip settings groups that aren't the one we requested
 		if (group.name() != location_key) continue;
@@ -2369,7 +2379,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 			return false;
 		}
 
-		BOOST_FOREACH(const SettingsFile& file, group.files)
+		for (const SettingsFile& file : group.files)
 		{
 			LL_INFOS("Settings") << "Attempting to load settings for the group " << file.name()
 			    << " - from location " << location_key << LL_ENDL;
@@ -2412,6 +2422,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 			{	// failed to load
 				if(file.required)
 				{
+                    LLError::LLUserWarningMsg::showMissingFiles();
 					LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL;
 					return false;
 				}
@@ -2433,11 +2444,11 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
 std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
 											 const std::string& file)
 {
-	BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
+	for (const SettingsGroup& group : mSettingsLocationList->groups)
 	{
 		if (group.name() == location_key)
 		{
-			BOOST_FOREACH(const SettingsFile& settings_file, group.files)
+			for (const SettingsFile& settings_file : group.files)
 			{
 				if (settings_file.name() == file)
 				{
@@ -2510,6 +2521,7 @@ bool LLAppViewer::initConfiguration()
 	if (!success)
 	{
         LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
+        LLError::LLUserWarningMsg::showMissingFiles();
         if (gDirUtilp->fileExists(settings_file_list))
         {
             LL_ERRS() << "Cannot load default configuration file settings_files.xml. "
@@ -2533,6 +2545,7 @@ bool LLAppViewer::initConfiguration()
 
 	if (!mSettingsLocationList->validateBlock())
 	{
+        LLError::LLUserWarningMsg::showMissingFiles();
         LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
 	}
 
@@ -2944,13 +2957,14 @@ bool LLAppViewer::initConfiguration()
 
 	if (mSecondInstance)
 	{
-		// This is the second instance of SL. Turn off voice support,
+		// This is the second instance of SL. Mute voice,
 		// but make sure the setting is *not* persisted.
-		LLControlVariable* disable_voice = gSavedSettings.getControl("CmdLineDisableVoice");
-		if(disable_voice)
+		// Also see LLVivoxVoiceClient::voiceEnabled()
+		LLControlVariable* enable_voice = gSavedSettings.getControl("EnableVoiceChat");
+		if(enable_voice)
 		{
 			const BOOL DO_NOT_PERSIST = FALSE;
-			disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST);
+			enable_voice->setValue(LLSD(FALSE), DO_NOT_PERSIST);
 		}
 	}
 
@@ -2967,6 +2981,8 @@ bool LLAppViewer::initConfiguration()
 		LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", key));
 	}
 
+    LLError::LLUserWarningMsg::setOutOfMemoryStrings(LLTrans::getString("MBOutOfMemoryTitle"), LLTrans::getString("MBOutOfMemoryErr"));
+
 	return true; // Config was successful.
 }
 
@@ -3004,6 +3020,7 @@ void LLAppViewer::initStrings()
 
 		// initial check to make sure files are there failed
 		gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
+        LLError::LLUserWarningMsg::showMissingFiles();
 		LL_ERRS() << "Viewer failed to find localization and UI files."
 			<< " Please reinstall viewer from https://secondlife.com/support/downloads"
 			<< " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
@@ -3017,7 +3034,7 @@ void LLAppViewer::initStrings()
 	// Now that we've set "[sourceid]", have to go back through
 	// default_trans_args and reinitialize all those other keys because some
 	// of them, in turn, reference "[sourceid]".
-	BOOST_FOREACH(std::string key, default_trans_args)
+	for (const std::string& key : default_trans_args)
 	{
 		std::string brackets(key), nobrackets(key);
 		// Invalid to inspect key[0] if key is empty(). But then, the entire
@@ -3328,7 +3345,6 @@ LLSD LLAppViewer::getViewerInfo() const
     info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS");
     info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor");
     info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance");
-    info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled";
     info["TEXTURE_MEMORY"] = gGLManager.mVRAM;
 
 #if LL_DARWIN
@@ -4310,6 +4326,7 @@ void LLAppViewer::loadKeyBindings()
 		key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml");
 		if (!gViewerInput.loadBindingsXML(key_bindings_file))
 		{
+            LLError::LLUserWarningMsg::showMissingFiles();
 			LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL;
 		}
 	}
@@ -4682,16 +4699,23 @@ void LLAppViewer::idle()
 		// When appropriate, update agent location to the simulator.
 		F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
 		F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
-		BOOL force_update = gAgent.controlFlagsDirty()
-							|| (mLastAgentControlFlags != gAgent.getControlFlags())
-							|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
-		if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
+        bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND);
+        BOOL force_send =
+            // if there is something to send
+            (gAgent.controlFlagsDirty() && timed_out)
+            // if something changed
+            || (mLastAgentControlFlags != gAgent.getControlFlags())
+            // keep alive
+            || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
+        // timing out doesn't warranty that an update will be sent,
+        // just that it will be checked.
+		if (force_send || timed_out)
 		{
 			LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
 			// Send avatar and camera info
 			mLastAgentControlFlags = gAgent.getControlFlags();
-			mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
-			send_agent_update(force_update);
+			mLastAgentForceUpdate = force_send ? 0 : agent_force_update_time;
+			send_agent_update(force_send);
 			agent_update_timer.reset();
 		}
 	}
@@ -5058,6 +5082,9 @@ void LLAppViewer::idleShutdown()
 		&& gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME
 		&& !logoutRequestSent())
 	{
+        gViewerWindow->setShowProgress(TRUE);
+        gViewerWindow->setProgressPercent(100.f);
+        gViewerWindow->setProgressString(LLTrans::getString("LoggingOut"));
 		return;
 	}
 
@@ -5400,6 +5427,14 @@ void LLAppViewer::forceErrorLLError()
    	LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
 }
 
+void LLAppViewer::forceErrorLLErrorMsg()
+{
+    LLError::LLUserWarningMsg::show("Deliberate error");
+    // Note: under debug this will show a message as well,
+    // but release won't show anything and will quit silently
+    LL_ERRS() << "This is a deliberate llerror with a message" << LL_ENDL;
+}
+
 void LLAppViewer::forceErrorBreakpoint()
 {
    	LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
@@ -5422,9 +5457,18 @@ void LLAppViewer::forceErrorBadMemoryAccess()
 void LLAppViewer::forceErrorInfiniteLoop()
 {
    	LL_WARNS() << "Forcing a deliberate infinite loop" << LL_ENDL;
+    // Loop is intentionally complicated to fool basic loop detection
+    LLTimer timer_total;
+    LLTimer timer_expiry;
+    const S32 report_frequency = 10;
+    timer_expiry.setTimerExpirySec(report_frequency);
     while(true)
     {
-        ;
+        if (timer_expiry.hasExpired())
+        {
+            LL_INFOS() << "Infinite loop time : " << timer_total.getElapsedSeconds() << LL_ENDL;
+            timer_expiry.setTimerExpirySec(report_frequency);
+        }
     }
     return;
 }
@@ -5435,6 +5479,13 @@ void LLAppViewer::forceErrorSoftwareException()
     LLTHROW(LLException("User selected Force Software Exception"));
 }
 
+void LLAppViewer::forceErrorOSSpecificException()
+{
+    // Virtual, MacOS only
+    const std::string exception_text = "User selected Force OS Exception, Not implemented on this OS";
+    throw std::runtime_error(exception_text);
+}
+
 void LLAppViewer::forceErrorDriverCrash()
 {
    	LL_WARNS() << "Forcing a deliberate driver crash" << LL_ENDL;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index bfa1dea32417431acbbcb12b91baaf546cb97980..063fdd980c3a0902fe60494cbad19e573fc34ae9 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -153,10 +153,12 @@ class LLAppViewer : public LLApp
     // LLAppViewer testing helpers.
     // *NOTE: These will potentially crash the viewer. Only for debugging.
     virtual void forceErrorLLError();
+    virtual void forceErrorLLErrorMsg();
     virtual void forceErrorBreakpoint();
     virtual void forceErrorBadMemoryAccess();
     virtual void forceErrorInfiniteLoop();
     virtual void forceErrorSoftwareException();
+    virtual void forceErrorOSSpecificException();
     virtual void forceErrorDriverCrash();
     virtual void forceErrorCoroutineCrash();
     virtual void forceErrorThreadCrash();
diff --git a/indra/newview/llappviewermacosx-objc.h b/indra/newview/llappviewermacosx-objc.h
index c6dcec8e34e7161b3d9424f12cf75e29e3059095..3721151abac76955ebaa092e414ce296264c2771 100644
--- a/indra/newview/llappviewermacosx-objc.h
+++ b/indra/newview/llappviewermacosx-objc.h
@@ -33,4 +33,6 @@
 //Why?  Because BOOL
 void launchApplication(const std::string* app_name, const std::vector<std::string>* args);
 
+void force_ns_sxeption();
+
 #endif // LL_LLAPPVIEWERMACOSX_OBJC_H
diff --git a/indra/newview/llappviewermacosx-objc.mm b/indra/newview/llappviewermacosx-objc.mm
index 17301847e8bc08ff5e76d11f3db97fe8af20cd60..5d9ca24db2d13aa7554ff0a11fdbac8bc644e35a 100644
--- a/indra/newview/llappviewermacosx-objc.mm
+++ b/indra/newview/llappviewermacosx-objc.mm
@@ -71,3 +71,9 @@ void launchApplication(const std::string* app_name, const std::vector<std::strin
     [pool release];
 	return;
 }
+
+void force_ns_sxeption()
+{
+    NSException *exception = [NSException exceptionWithName:@"Forced NSException" reason:nullptr userInfo:nullptr];
+    @throw exception;
+}
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 8b313a321bdde410cb7dfb35846f9b97872fa5a5..c42c3b3daf4b7a2db17a007b8165e38233d9cd9c 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -250,6 +250,11 @@ bool LLAppViewerMacOSX::init()
     return LLAppViewer::init();
 }
 
+void LLAppViewerMacOSX::forceErrorOSSpecificException()
+{
+    force_ns_sxeption();
+}
+
 // MacOSX may add and addition command line arguement for the process serial number.
 // The option takes a form like '-psn_0_12345'. The following method should be able to recognize
 // and either ignore or return a pair of values for the option.
diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h
index b0e325a955bf0c8fc697dcbe3c45980939cb4fc6..15c55c44a69ead20cb85c8789bd3c3f031819fc8 100644
--- a/indra/newview/llappviewermacosx.h
+++ b/indra/newview/llappviewermacosx.h
@@ -42,6 +42,8 @@ class LLAppViewerMacOSX : public LLAppViewer
 	//
 	virtual bool init();			// Override to do application initialization
 
+    virtual void forceErrorOSSpecificException();
+
 protected:
 	virtual bool restoreErrorTrap();
 
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index a6c9a41fa46e0bf8d0e85b28b9829b00c4072b36..b95b9718906c57373b3fabdb4fd0c79a73a6ec81 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -339,6 +339,7 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
         }
         catch (std::bad_alloc&)
         {
+            LLError::LLUserWarningMsg::showOutOfMemory();
             LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
         }
 	}
@@ -370,6 +371,7 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
         }
         catch (std::bad_alloc&)
         {
+            LLError::LLUserWarningMsg::showOutOfMemory();
             LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
         }
 	}
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index cc4f4536a4d3413ae4105aaaa4a1eac605f67b9a..3444f50e52f18847f4ecd5fa720d907bb88913cd 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -177,6 +177,11 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
 	LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this);
 }
 
+LLNotificationChiclet::~LLNotificationChiclet()
+{
+    mNotificationChannel.reset();
+}
+
 void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data)
 {
 	std::string action = user_data.asString();
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 58a797218fd44760b5bcacf0577de8525eddab5b..1698fa269af5da659db71fb1bd9f1b7bc2cbe6cb 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -531,8 +531,9 @@ class LLNotificationChiclet : public LLSysWellChiclet
 	struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
 		
 protected:
-	struct ChicletNotificationChannel : public LLNotificationChannel
+	class ChicletNotificationChannel : public LLNotificationChannel
 	{
+    public:
 		ChicletNotificationChannel(LLNotificationChiclet* chiclet) 
 			: LLNotificationChannel(LLNotificationChannel::Params().filter(filterNotification).name(chiclet->getSessionId().asString()))
 			, mChiclet(chiclet)
@@ -542,6 +543,7 @@ class LLNotificationChiclet : public LLSysWellChiclet
 			connectToChannel("Offer");
 			connectToChannel("Notifications");
 		}
+        virtual ~ChicletNotificationChannel() {}
 				
 		static bool filterNotification(LLNotificationPtr notify);
 		// connect counter updaters to the corresponding signals
@@ -553,9 +555,10 @@ class LLNotificationChiclet : public LLSysWellChiclet
 	};
 				
 	boost::scoped_ptr<ChicletNotificationChannel> mNotificationChannel;
-				
-	LLNotificationChiclet(const Params& p);
-				
+
+    LLNotificationChiclet(const Params& p);
+    ~LLNotificationChiclet();
+
 	/**
 	 * Processes clicks on chiclet menu.
 	 */
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index eb2c156ca555f80b9487c435629d062b7c260fb7..b11786a451a7114a587bdd558bfee139364e3382 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -73,7 +73,7 @@ namespace
     class ObjectInventoryFetcher: public LLVOInventoryListener
     {
     public:
-        typedef boost::shared_ptr<ObjectInventoryFetcher> ptr_t;
+        typedef std::shared_ptr<ObjectInventoryFetcher> ptr_t;
 
         ObjectInventoryFetcher(LLEventPump &pump, LLViewerObject* object, void* user_data) :
             mPump(pump),
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 7def9c045ff63e3034708701b51e968809c04317..d764f64c790e8007a11e60839f5f16de7bfa14d6 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -99,7 +99,6 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
 
 void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_scale_fixup) const
 {
-
     F32 max_legal_offset = MAX_LEGAL_OFFSET;
     if (gSavedSettings.getControl("AnimatedObjectsMaxLegalOffset"))
     {
@@ -362,6 +361,9 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
 void LLControlAvatar::markForDeath()
 {
     mMarkedForDeath = true;
+    // object unlinked cav and might be dead already
+    // might need to clean mControlAVBridge here as well
+    mRootVolp = NULL;
 }
 
 void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
@@ -379,6 +381,7 @@ void LLControlAvatar::idleUpdate(LLAgent &agent, const F64 &time)
 
 void LLControlAvatar::markDead()
 {
+    mRootVolp = NULL;
     super::markDead();
     mControlAVBridge = NULL;
 }
@@ -439,7 +442,7 @@ void LLControlAvatar::updateDebugText()
         F32 streaming_cost = 0.f;
         std::string cam_dist_string = "";
         S32 cam_dist_count = 0;
-        F32 lod_radius = mRootVolp->mLODRadius;
+        F32 lod_radius = mRootVolp ? mRootVolp->mLODRadius : 0.f;
 
         for (std::vector<LLVOVolume*>::iterator it = volumes.begin();
              it != volumes.end(); ++it)
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index a696c99a82060c922b4c438d240a777ddf298882..3c59ca046d532e0258830b38ad0ac9b2922c68ce 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -32,7 +32,6 @@
 #include "llnotificationsutil.h"
 #include "lltrans.h"
 
-#include <boost/foreach.hpp>
 #include "boost/lexical_cast.hpp"
 
 const S32Days CONVERSATION_LIFETIME = (S32Days)30; // lifetime of LLConversation is 30 days by spec
@@ -392,7 +391,7 @@ void LLConversationLog::deleteBackupLogs()
 	std::vector<std::string> backup_logs;
 	getListOfBackupLogs(backup_logs);
 
-	BOOST_FOREACH(const std::string& fullpath, backup_logs)
+	for (const std::string& fullpath : backup_logs)
 	{
 		LLFile::remove(fullpath);
 	}
@@ -434,7 +433,7 @@ bool LLConversationLog::moveLog(const std::string &originDirectory, const std::s
 			while(LLFile::isfile(backupFileName))
 			{
 				++backupFileCount;
-				backupFileName = targetDirectory + ".backup" + boost::lexical_cast<std::string>(backupFileCount);
+				backupFileName = targetDirectory + ".backup" + std::to_string(backupFileCount);
 			}
 
 			//Rename the file to its backup name so it is not overwritten
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 9ec4fb085b2717b5790871b3ed341c39bdb33946..f152e36cf54933860412dc5a8df6201ab0635fc2 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -37,8 +37,6 @@
 #include "llimview.h" //For LLIMModel
 #include "lltrans.h"
 
-#include <boost/foreach.hpp>
-
 //
 // Conversation items : common behaviors
 //
@@ -90,6 +88,8 @@ LLConversationItem::~LLConversationItem()
 	{
 		mAvatarNameCacheConnection.disconnect();
 	}
+
+    clearChildren();
 }
 
 //virtual
@@ -254,6 +254,11 @@ LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolde
 	mConvType = CONV_SESSION_UNKNOWN;
 }
 
+LLConversationItemSession::~LLConversationItemSession()
+{
+    clearAndDeparentModels();
+}
+
 bool LLConversationItemSession::hasChildren() const
 {
 	return getChildrenCount() > 0;
@@ -293,8 +298,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic
 		// In the case of a P2P conversation, we need to grab the name of the other participant in the session instance itself
 		// as we do not create participants for such a session.
 
-		LLFolderViewModelItem * itemp;
-		BOOST_FOREACH(itemp, mChildren)
+		for (auto itemp : mChildren)
 		{
 			LLConversationItem* current_participant = dynamic_cast<LLConversationItem*>(itemp);
 			// Add the avatar uuid to the list (except if it's the own agent uuid)
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 0cbfad8b7349191dd450ddcdd4c410eb2e157ffe..436c9c00abb58e002b2fcb45ccbfc78cb59df7b1 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -157,6 +157,7 @@ class LLConversationItemSession : public LLConversationItem
 public:
 	LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
 	LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model);
+    ~LLConversationItemSession();
 	
 	/*virtual*/ bool hasChildren() const;
     LLPointer<LLUIImage> getIcon() const { return NULL; }
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index edc7bdef5f2ba17276be492428574afa8958c305..60c268207895d36cc468046fe5c9757465ce8201 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -815,7 +815,7 @@ const F64Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
 const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
 
 const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
-const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("651510b8-5f4d-8991-1592-e7eeab2a5a06");
+const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("c46226b4-0e43-5a56-9708-d27ca1df3292");
 const LLUUID LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY("cef49723-0292-af49-9b14-9598a616b8a3");
 const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2");
 const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090");
@@ -895,6 +895,14 @@ void LLEnvironment::initSingleton()
         gGenericDispatcher.addHandler(MESSAGE_PUSHENVIRONMENT, &environment_push_dispatch_handler);
     }
 
+    gSavedSettings.getControl("RenderSkyAutoAdjustProbeAmbiance")->getSignal()->connect(
+        [](LLControlVariable*, const LLSD& new_val, const LLSD& old_val)
+        {
+            LLSettingsSky::sAutoAdjustProbeAmbiance = new_val.asReal();
+        }
+    );
+    LLSettingsSky::sAutoAdjustProbeAmbiance = gSavedSettings.getF32("RenderSkyAutoAdjustProbeAmbiance");
+
     LLEventPumps::instance().obtain(PUMP_EXPERIENCE).stopListening(LISTENER_NAME);
     LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; });
 }
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index b66eb754a48c684aea5279944b89106b18a0e326..b0d88159c1579ac3f59a11f753ce1df876e58fbe 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -32,7 +32,6 @@
 #include "llprocess.h"
 #include "llsdutil.h"
 #include "llstring.h"
-#include <boost/foreach.hpp>
 
 // static
 const std::string LLExternalEditor::sFilenameMarker = "%s";
@@ -93,7 +92,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path)
 	params.executable = mProcessParams.executable;
 
 	// Substitute the filename marker in the command with the actual passed file name.
-	BOOST_FOREACH(const std::string& arg, mProcessParams.args)
+	for (const std::string& arg : mProcessParams.args)
 	{
 		std::string fixed(arg);
 		LLStringUtil::replaceString(fixed, sFilenameMarker, file_path);
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 5b8ca6c49c2eb9b0061dbdfc65dfd894049dc03c..a7998f6e9efb1e36a25de1ff3f04594c52a485bd 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -947,7 +947,7 @@ void LLFastTimerView::printLineStats()
 	{
 		std::string legend_stat;
 		bool first = true;
-		for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+		for(LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
 			it != LLTrace::end_block_timer_tree_df();
 			++it)
 		{
@@ -969,7 +969,7 @@ void LLFastTimerView::printLineStats()
 
 		std::string timer_stat;
 		first = true;
-		for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+		for(LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
 			it != LLTrace::end_block_timer_tree_df();
 			++it)
 		{
@@ -1046,7 +1046,7 @@ void LLFastTimerView::drawLineGraph()
 	F32Seconds cur_max(0);
 	U32 cur_max_calls = 0;
 
-	for(block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+	for(LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
 		it != LLTrace::end_block_timer_tree_df();
 		++it)
 	{
@@ -1195,8 +1195,8 @@ void LLFastTimerView::drawLegend()
 		S32 scroll_offset = 0; // element's y offset from top of the inner scroll's rect
 		ft_display_idx.clear();
 		std::map<BlockTimerStatHandle*, S32> display_line;
-		for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
-			it != block_timer_tree_df_iterator_t();
+		for (LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+			it != LLTrace::end_block_timer_tree_df();
 			++it)
 		{
 			BlockTimerStatHandle* idp = (*it);
@@ -1311,8 +1311,8 @@ void LLFastTimerView::generateUniqueColors()
 
 		F32 hue = 0.f;
 
-		for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
-			it != block_timer_tree_df_iterator_t();
+		for (LLTrace::block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME);
+			it != LLTrace::end_block_timer_tree_df();
 			++it)
 		{
 			BlockTimerStatHandle* idp = (*it);
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index cdce6f71565423de4db94133ea6aa3397a79cde3..c1d8828229cf6be66d4a6b23c977920d94ad7854 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -320,6 +320,7 @@ class LLItemCopiedCallback : public LLInventoryCallback
 
 		if (item)
 		{
+            LLFavoritesBarCtrl::sWaitingForCallabck = 0.f;
 			LLFavoritesOrderStorage::instance().setSortIndex(item, mSortField);
 
 			item->setComplete(TRUE);
@@ -365,6 +366,9 @@ struct LLFavoritesSort
 	}
 };
 
+
+F64 LLFavoritesBarCtrl::sWaitingForCallabck = 0.f;
+
 LLFavoritesBarCtrl::Params::Params()
 : image_drag_indication("image_drag_indication"),
   more_button("more_button"),
@@ -381,7 +385,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
 	mShowDragMarker(FALSE),
 	mLandingTab(NULL),
 	mLastTab(NULL),
-	mTabsHighlightEnabled(TRUE),
+    mItemsListDirty(false),
 	mUpdateDropDownItems(true),
 	mRestoreOverflowMenu(false),
 	mGetPrevItems(true),
@@ -618,6 +622,9 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
 	int sortField = 0;
 	LLPointer<LLItemCopiedCallback> cb;
 
+    const F64 CALLBACK_WAIT_TIME = 30.f;
+    sWaitingForCallabck = LLTimer::getTotalSeconds() + CALLBACK_WAIT_TIME;
+
 	// current order is saved by setting incremental values (1, 2, 3, ...) for the sort field
 	for (LLInventoryModel::item_array_t::iterator i = mItems.begin(); i != mItems.end(); ++i)
 	{
@@ -691,16 +698,22 @@ void LLFavoritesBarCtrl::changed(U32 mask)
 			LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID());
 		}
 
-		updateButtons();
-		if (!mItemsChangedTimer.getStarted())
-		{
-			mItemsChangedTimer.start();
-		}
-		else
-		{
-			mItemsChangedTimer.reset();
-		}
-
+        if (sWaitingForCallabck < LLTimer::getTotalSeconds())
+        {
+            updateButtons();
+            if (!mItemsChangedTimer.getStarted())
+            {
+                mItemsChangedTimer.start();
+            }
+            else
+            {
+                mItemsChangedTimer.reset();
+            }
+        }
+        else
+        {
+            mItemsListDirty = true;
+        }
 	}
 }
 
@@ -754,6 +767,18 @@ void LLFavoritesBarCtrl::draw()
 		mItemsChangedTimer.start();
 	}
 
+    if (mItemsListDirty && sWaitingForCallabck < LLTimer::getTotalSeconds())
+    {
+        updateButtons();
+        if (!mItemsChangedTimer.getStarted())
+        {
+            mItemsChangedTimer.start();
+        }
+        else
+        {
+            mItemsChangedTimer.reset();
+        }
+    }
 }
 
 const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
@@ -782,6 +807,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
         return;
     }
 
+    mItemsListDirty = false;
 	mItems.clear();
 
 	if (!collectFavoriteItems(mItems))
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 3b439b31fddeedca07da361d02703d993bf8d91d..68a679e27f07c901aaca1e23210c2e8c110b2c15 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -53,6 +53,7 @@ class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
 protected:
 	LLFavoritesBarCtrl(const Params&);
 	friend class LLUICtrlFactory;
+    friend class LLItemCopiedCallback;
 public:
 	virtual ~LLFavoritesBarCtrl();
 
@@ -84,7 +85,6 @@ class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
 	void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask);
 	
 	void onButtonMouseDown(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask);
-	void onOverflowMenuItemMouseDown(LLUUID id, LLUICtrl* item, S32 x, S32 y, MASK mask);
 	void onButtonMouseUp(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask);
 
 	void onEndDrag();
@@ -164,7 +164,8 @@ class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
 	BOOL mStartDrag;
 	LLInventoryModel::item_array_t mItems;
 
-	BOOL mTabsHighlightEnabled;
+    static F64 sWaitingForCallabck;
+    bool mItemsListDirty;
 
 	S32 mMouseX;
 	S32 mMouseY;
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 1c69b9d60baa026ba66c90e94c5b325658cc75b8..7985ce447f22aa5c3405dd40181d882b39f2f6f2 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -44,6 +44,7 @@
 #include "llfirstuse.h"
 #include "llhints.h"
 #include "lltabcontainer.h"
+#include "llviewercamera.h"
 #include "llvoavatarself.h"
 
 static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
@@ -65,13 +66,19 @@ class LLPanelCameraZoom
 :	public LLPanel
 {
 	LOG_CLASS(LLPanelCameraZoom);
+
 public:
-	LLPanelCameraZoom();
+	struct Params : public LLInitParam::Block<Params, LLPanel::Params> {};
+
+	LLPanelCameraZoom() { onCreate(); }
 
 	/* virtual */ BOOL	postBuild();
 	/* virtual */ void	draw();
 
 protected:
+	LLPanelCameraZoom(const Params& p) { onCreate(); }
+
+	void	onCreate();
 	void	onZoomPlusHeldDown();
 	void	onZoomMinusHeldDown();
 	void	onSliderValueChanged();
@@ -80,9 +87,11 @@ class LLPanelCameraZoom
 	F32		getOrbitRate(F32 time);
 
 private:
-	LLButton*	mPlusBtn;
-	LLButton*	mMinusBtn;
-	LLSlider*	mSlider;
+	LLButton*	mPlusBtn { nullptr };
+	LLButton*	mMinusBtn{ nullptr };
+	LLSlider*	mSlider{ nullptr };
+
+	friend class LLUICtrlFactory;
 };
 
 LLPanelCameraItem::Params::Params()
@@ -158,10 +167,7 @@ static LLPanelInjector<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel
 // LLPanelCameraZoom
 //-------------------------------------------------------------------------------
 
-LLPanelCameraZoom::LLPanelCameraZoom()
-:	mPlusBtn( NULL ),
-	mMinusBtn( NULL ),
-	mSlider( NULL )
+void LLPanelCameraZoom::onCreate()
 {
 	mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
 	mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
@@ -172,9 +178,9 @@ LLPanelCameraZoom::LLPanelCameraZoom()
 
 BOOL LLPanelCameraZoom::postBuild()
 {
-	mPlusBtn  = getChild <LLButton> ("zoom_plus_btn");
-	mMinusBtn = getChild <LLButton> ("zoom_minus_btn");
-	mSlider   = getChild <LLSlider> ("zoom_slider");
+	mPlusBtn  = getChild<LLButton>("zoom_plus_btn");
+	mMinusBtn = getChild<LLButton>("zoom_minus_btn");
+	mSlider   = getChild<LLSlider>("zoom_slider");
 	return LLPanel::postBuild();
 }
 
@@ -240,11 +246,80 @@ void activate_camera_tool()
 	LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
 };
 
+class LLCameraInfoPanel : public LLPanel
+{
+public:
+    typedef std::function<LLVector3()> get_vector_t;
+
+    LLCameraInfoPanel(
+        const LLView* parent,
+        const char* title,
+        const LLCoordFrame& camera,
+        const get_vector_t get_focus
+    )
+    : LLPanel([&]() -> LLPanel::Params
+        {
+            LLPanel::Params params;
+            params.rect = LLRect(parent->getLocalRect());
+            return params;
+        }())
+    , mTitle(title)
+    , mCamera(camera)
+    , mGetFocus(get_focus)
+    , mFont(LLFontGL::getFontSansSerifBig())
+    {
+    }
+
+    virtual void draw() override
+    {
+        LLPanel::draw();
+
+        static const U32 HPADDING = 10;
+        static const U32 VPADDING = 5;
+        LLVector3 focus = mGetFocus();
+        LLVector3 sight = focus - mCamera.mOrigin;
+        std::pair<const char*, const LLVector3&> const data[] =
+        {
+            { "Origin:", mCamera.mOrigin },
+            { "X Axis:", mCamera.mXAxis },
+            { "Y Axis:", mCamera.mYAxis },
+            { "Z Axis:", mCamera.mZAxis },
+            { "Focus:", focus },
+            { "Sight:", sight }
+        };
+        S32 width = getRect().getWidth();
+        S32 height = getRect().getHeight();
+        S32 row_count = 1 + sizeof(data) / sizeof(*data);
+        S32 row_height = (height - VPADDING * 2) / row_count;
+        S32 top = height - VPADDING - row_height / 2;
+        mFont->renderUTF8(mTitle, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER);
+        for (const auto& row : data)
+        {
+            top -= row_height;
+            mFont->renderUTF8(row.first, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER);
+            const LLVector3& vector = row.second;
+            for (S32 i = 0; i < 3; ++i)
+            {
+                std::string text = llformat("%.6f", vector[i]);
+                S32 right = width / 4 * (i + 2) - HPADDING;
+                mFont->renderUTF8(text, 0, right, top, LLColor4::white, LLFontGL::RIGHT, LLFontGL::VCENTER);
+            }
+        }
+    }
+
+private:
+    const char* mTitle;
+    const LLCoordFrame& mCamera;
+    const get_vector_t mGetFocus;
+    const LLFontGL* mFont;
+};
+
 //
 // Member functions
 //
 
-/*static*/ bool LLFloaterCamera::inFreeCameraMode()
+// static
+bool LLFloaterCamera::inFreeCameraMode()
 {
 	LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
 	if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
@@ -254,6 +329,7 @@ void activate_camera_tool()
 	return false;
 }
 
+// static
 void LLFloaterCamera::resetCameraMode()
 {
 	LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
@@ -261,6 +337,7 @@ void LLFloaterCamera::resetCameraMode()
 	floater_camera->switchMode(CAMERA_CTRL_MODE_PAN);
 }
 
+// static
 void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
 {
 	sAppearanceEditing = editing;
@@ -269,15 +346,46 @@ void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
 	floater_camera->handleAvatarEditingAppearance(editing);
 }
 
-void LLFloaterCamera::handleAvatarEditingAppearance(bool editing)
+// static
+void LLFloaterCamera::onDebugCameraToggled()
 {
+    if (LLFloaterCamera* instance = LLFloaterCamera::findInstance())
+    {
+        instance->showDebugInfo(LLView::sDebugCamera);
+    }
 
+    if (LLView::sDebugCamera)
+    {
+        LLFloaterReg::showInstanceOrBringToFront("camera");
+    }
+}
+
+void LLFloaterCamera::showDebugInfo(bool show)
+{
+    // Initially LLPanel contains 1 child "view_border"
+    if (show && mViewerCameraInfo->getChildCount() < 2)
+    {
+        mViewerCameraInfo->addChild(new LLCameraInfoPanel(mViewerCameraInfo, "Viewer Camera", *LLViewerCamera::getInstance(),
+            []() { return LLViewerCamera::getInstance()->getPointOfInterest(); }));
+        mAgentCameraInfo->addChild(new LLCameraInfoPanel(mAgentCameraInfo, "Agent Camera", gAgent.getFrameAgent(),
+            []() { return gAgent.getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); }));
+    }
+
+    mAgentCameraInfo->setVisible(show);
+    mViewerCameraInfo->setVisible(show);
+}
+
+void LLFloaterCamera::handleAvatarEditingAppearance(bool editing)
+{
 }
 
 void LLFloaterCamera::update()
 {
 	ECameraControlMode mode = determineMode();
-	if (mode != mCurrMode) setMode(mode);
+	if (mode != mCurrMode)
+	{
+		setMode(mode);
+	}
 }
 
 
@@ -286,7 +394,8 @@ void LLFloaterCamera::toPrevMode()
 	switchMode(mPrevMode);
 }
 
-/*static*/ void LLFloaterCamera::onLeavingMouseLook()
+// static
+void LLFloaterCamera::onLeavingMouseLook()
 {
 	LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
 	if (floater_camera)
@@ -320,12 +429,14 @@ void LLFloaterCamera::onOpen(const LLSD& key)
 	mClosed = FALSE;
 
 	populatePresetCombo();
+
+	showDebugInfo(LLView::sDebugCamera);
 }
 
 void LLFloaterCamera::onClose(bool app_quitting)
 {
 	//We don't care of camera mode if app is quitting
-	if(app_quitting)
+	if (app_quitting)
 		return;
 	// It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so 
 	// to avoid seeing an empty floater when reopening the control.
@@ -360,14 +471,18 @@ BOOL LLFloaterCamera::postBuild()
 {
 	updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
 
+	mControls = getChild<LLPanel>("controls");
+	mAgentCameraInfo = getChild<LLPanel>("agent_camera_info");
+	mViewerCameraInfo = getChild<LLPanel>("viewer_camera_info");
 	mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
-	mZoom = findChild<LLPanelCameraZoom>(ZOOM);
+	mZoom = getChild<LLPanelCameraZoom>(ZOOM);
 	mTrack = getChild<LLJoystickCameraTrack>(PAN);
 	mPresetCombo = getChild<LLComboBox>("preset_combo");
+	mPreciseCtrls = getChild<LLTextBox>("precise_ctrs_label");
 
-	getChild<LLTextBox>("precise_ctrs_label")->setShowCursorHand(false);
-	getChild<LLTextBox>("precise_ctrs_label")->setSoundFlags(LLView::MOUSE_UP);
-	getChild<LLTextBox>("precise_ctrs_label")->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), FALSE));
+	mPreciseCtrls->setShowCursorHand(false);
+	mPreciseCtrls->setSoundFlags(LLView::MOUSE_UP);
+	mPreciseCtrls->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), FALSE));
 
 	mPresetCombo->setCommitCallback(boost::bind(&LLFloaterCamera::onCustomPresetSelected, this));
 	LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCamera::populatePresetCombo, this));
@@ -507,6 +622,7 @@ void LLFloaterCamera::updateItemsSelection()
 	getChild<LLPanelCameraItem>("object_view")->setValue(argument);
 }
 
+// static
 void LLFloaterCamera::onClickCameraItem(const LLSD& param)
 {
 	std::string name = param.asString();
@@ -533,7 +649,7 @@ void LLFloaterCamera::onClickCameraItem(const LLSD& param)
 	}
 }
 
-/*static*/
+// static
 void LLFloaterCamera::switchToPreset(const std::string& name)
 {
 	sFreeCamera = false;
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index a69b87ad1626a6ffa1b72b8d413f072e824d5bd7..f31bc5486bb38d15d1c652b25756e90bd1a663ab 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -63,6 +63,9 @@ class LLFloaterCamera : public LLFloater
 	/** Called when Avatar is entered/exited editing appearance mode */
 	static void onAvatarEditingAppearance(bool editing);
 
+	/** Called when opening and when "Advanced | Debug Camera" menu item is toggled */
+	static void onDebugCameraToggled();
+
 	/* determines actual mode and updates ui */
 	void update();
 
@@ -77,9 +80,9 @@ class LLFloaterCamera : public LLFloater
 
 	void populatePresetCombo();
 
-	LLJoystickCameraRotate* mRotate;
-	LLPanelCameraZoom*	mZoom;
-	LLJoystickCameraTrack*	mTrack;
+	LLJoystickCameraRotate* mRotate { nullptr };
+	LLPanelCameraZoom* mZoom { nullptr };
+	LLJoystickCameraTrack* mTrack { nullptr };
 
 private:
 
@@ -117,6 +120,8 @@ class LLFloaterCamera : public LLFloater
 
 	void handleAvatarEditingAppearance(bool editing);
 
+	void showDebugInfo(bool show);
+
 	// set to true when free camera mode is selected in modes list
 	// remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed
 	static bool sFreeCamera;
@@ -126,7 +131,11 @@ class LLFloaterCamera : public LLFloater
 	ECameraControlMode mCurrMode;
 	std::map<ECameraControlMode, LLButton*> mMode2Button;
 
-	LLComboBox* mPresetCombo;
+	LLPanel* mControls { nullptr };
+	LLPanel* mViewerCameraInfo { nullptr };
+	LLPanel* mAgentCameraInfo { nullptr };
+	LLComboBox* mPresetCombo { nullptr };
+	LLTextBox* mPreciseCtrls { nullptr };
 };
 
 /**
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index 0301627c152eb4d07ca01adc88ef5bb714f89c44..776f8dc785254b5d81f369553e640b8959d391d9 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -751,7 +751,8 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
             PERM_NONE,
             PERM_NONE,
             FALSE,
-            NULL);
+            NULL,
+            PICK_TEXTURE);
 
         mPickerHandle = floaterp->getHandle();
 
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index bb47feaa9565938ca9cecbbd17f423b64df047e4..4e764674e5fd741dbdbd0f0bcc516749685eda1a 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1724,7 +1724,9 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p
         while (iter != end)
         {
             LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
-            if (sky && sky->canAutoAdjust()) 
+            if (sky
+                && sky->canAutoAdjust()
+                && sky->getReflectionProbeAmbiance(true) != 0.f) 
             {
                 LLNotificationsUtil::add("AutoAdjustHDRSky");
                 return;
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index 2d5e86869d8393e0bc4e5fa27f78892e32eae7fd..fa51143f3a62e5eb8b57a64431df29d1c81a246d 100644
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -84,7 +84,7 @@ BOOL LLFloaterEditSky::postBuild()
 	mSkyPresetCombo = getChild<LLComboBox>("sky_preset_combo");
 	mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
 	mSaveButton = getChild<LLButton>("save");
-    mSkyAdapter = boost::make_shared<LLSkySettingsAdapter>();
+    mSkyAdapter = std::make_shared<LLSkySettingsAdapter>();
 
     LLEnvironment::instance().setSkyListChange(boost::bind(&LLFloaterEditSky::onSkyPresetListChange, this));
 
diff --git a/indra/newview/llfloatereditwater.cpp b/indra/newview/llfloatereditwater.cpp
index c44ae7faca97eef87ea67159c6aa57fc0731ed13..4a6268435b9b6dfb2ad17aa0ddc5725f541022b4 100644
--- a/indra/newview/llfloatereditwater.cpp
+++ b/indra/newview/llfloatereditwater.cpp
@@ -71,7 +71,7 @@ BOOL LLFloaterEditWater::postBuild()
 	mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
 	mSaveButton = getChild<LLButton>("save");
 
-    mWaterAdapter = boost::make_shared<LLWatterSettingsAdapter>();
+    mWaterAdapter = std::make_shared<LLWatterSettingsAdapter>();
 
     LLEnvironment::instance().setWaterListChange(boost::bind(&LLFloaterEditWater::onWaterPresetListChange, this));
 
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp
index c64ee5a69ceaa512ee51c9749e25542e7d4e44b5..c98afefa65fee5a18e10c41288622d1f1243f8a1 100644
--- a/indra/newview/llfloaterenvironmentadjust.cpp
+++ b/indra/newview/llfloaterenvironmentadjust.cpp
@@ -116,7 +116,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
     getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
 
     getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
-    getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
+    getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
     getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); });
 
     getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 8e28fd6234afc271208fb80409052721e60ef334..3e8bad3ef58e92b197ede0a764b612011ad90dab 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -186,7 +186,8 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
     // teach user about HDR settings
     if (mSettings
         && mSettings->getSettingsType() == "sky"
-        && ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
+        && ((LLSettingsSky*)mSettings.get())->canAutoAdjust()
+        && ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f)
     {
         LLNotificationsUtil::add("AutoAdjustHDRSky");
     }
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index f997dc99104bb222fc1d3f1fc241b680d1993272..44938d550974e38d0fb8275450282a91ca3763a8 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -57,7 +57,6 @@
 #include "llsdserialize.h"
 #include "llviewermenu.h" // is_agent_mappable
 #include "llviewerobjectlist.h"
-#include "boost/foreach.hpp"
 
 
 const S32 EVENTS_PER_IDLE_LOOP_CURRENT_SESSION = 80;
@@ -805,12 +804,11 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
 
 void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters)
 {
-	typedef conversations_widgets_map::value_type conv_pair;
 	LLFloaterIMNearbyChat *nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
 
-	BOOST_FOREACH(conv_pair item, mConversationsWidgets)
+	for (const auto& [key, fvi] : mConversationsWidgets)
 	{
-		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second);
+		LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(fvi);
 		if (widget)
 		{
 			LLFloater* session_floater = widget->getSessionFloater();
@@ -1770,6 +1768,7 @@ void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& pa
 	LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(getSessionModel(session_id));
 	if (item)
 	{
+        item->setTimeNow(participant_id);
 		mConversationViewModel.requestSortAll();
 		mConversationsRoot->arrangeAll();
 	}
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 4cd91c53d85508cac022b6becdc6f551eb6f4ba6..dfee4096fe4c86a6fc79065503f80f13c47ca579 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -453,7 +453,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
 //-----------------------------------------------------------------------------------------------
 //LLFloaterIMNearbyChatHandler
 //-----------------------------------------------------------------------------------------------
-boost::scoped_ptr<LLEventPump> LLFloaterIMNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat"));
+std::unique_ptr<LLEventPump> LLFloaterIMNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat"));
 
 LLFloaterIMNearbyChatHandler::LLFloaterIMNearbyChatHandler()
 {
@@ -522,6 +522,8 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
 	// errors in separate window.
 	if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG)
 	{
+        if (LLFloater::isQuitRequested()) return;
+
 		if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
 			return;
 
diff --git a/indra/newview/llfloaterimnearbychathandler.h b/indra/newview/llfloaterimnearbychathandler.h
index 5e6f8cde305c704e1e18872d884d46f414a06a7b..18496044701cd9866c2e8aa8433d17b0d8df930c 100644
--- a/indra/newview/llfloaterimnearbychathandler.h
+++ b/indra/newview/llfloaterimnearbychathandler.h
@@ -46,7 +46,7 @@ class LLFloaterIMNearbyChatHandler : public LLChatHandler
 protected:
 	virtual void initChannel();
 
-	static boost::scoped_ptr<LLEventPump> sChatWatcher;
+	static std::unique_ptr<LLEventPump> sChatWatcher;
 };
 
 }
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.cpp b/indra/newview/llfloaterinventorythumbnailshelper.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..814f88e9b99a9a0002f09425a1570a764ea1f48e
--- /dev/null
+++ b/indra/newview/llfloaterinventorythumbnailshelper.cpp
@@ -0,0 +1,543 @@
+/**
+ * @file llfloaterinventorythumbnailshelper.cpp
+ * @author Callum Prentice
+ * @brief LLFloaterInventoryThumbnailsHelper class implementation
+ *
+ * Usage instructions and some brief notes can be found in Confluence here:
+ * https://lindenlab.atlassian.net/wiki/spaces/~174746736/pages/2928672843/Inventory+Thumbnail+Helper+Tool
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llaisapi.h"
+#include "llclipboard.h"
+#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llscrolllistctrl.h"
+#include "lltexteditor.h"
+#include "lluictrlfactory.h"
+#include "lluuid.h"
+
+#include "llfloaterinventorythumbnailshelper.h"
+
+LLFloaterInventoryThumbnailsHelper::LLFloaterInventoryThumbnailsHelper(const LLSD& key)
+    :   LLFloater("floater_inventory_thumbnails_helper")
+{
+}
+
+LLFloaterInventoryThumbnailsHelper::~LLFloaterInventoryThumbnailsHelper()
+{
+}
+
+BOOL LLFloaterInventoryThumbnailsHelper::postBuild()
+{
+    mInventoryThumbnailsList = getChild<LLScrollListCtrl>("inventory_thumbnails_list");
+    mInventoryThumbnailsList->setAllowMultipleSelection(true);
+
+    mOutputLog = getChild<LLTextEditor>("output_log");
+    mOutputLog->setMaxTextLength(0xffff * 0x10);
+
+    mPasteItemsBtn = getChild<LLUICtrl>("paste_items_btn");
+    mPasteItemsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onPasteItems, this));
+    mPasteItemsBtn->setEnabled(true);
+
+    mPasteTexturesBtn = getChild<LLUICtrl>("paste_textures_btn");
+    mPasteTexturesBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onPasteTextures, this));
+    mPasteTexturesBtn->setEnabled(true);
+
+    mWriteThumbnailsBtn = getChild<LLUICtrl>("write_thumbnails_btn");
+    mWriteThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onWriteThumbnails, this));
+    mWriteThumbnailsBtn->setEnabled(false);
+
+    mLogMissingThumbnailsBtn = getChild<LLUICtrl>("log_missing_thumbnails_btn");
+    mLogMissingThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onLogMissingThumbnails, this));
+    mLogMissingThumbnailsBtn->setEnabled(false);
+
+    mClearThumbnailsBtn = getChild<LLUICtrl>("clear_thumbnails_btn");
+    mClearThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onClearThumbnails, this));
+    mClearThumbnailsBtn->setEnabled(false);
+
+    return true;
+}
+
+// Records an entry in the pasted items - saves it to a map and writes it to the log
+// window for later confirmation/validation - since it uses a map, duplicates (based on
+// the name) are discarded
+void LLFloaterInventoryThumbnailsHelper::recordInventoryItemEntry(LLViewerInventoryItem* item)
+{
+    const std::string name = item->getName();
+
+    std::map<std::string, LLViewerInventoryItem*>::iterator iter = mItemNamesItems.find(name);
+    if (iter == mItemNamesItems.end())
+    {
+        mItemNamesItems.insert({name, item});
+
+        writeToLog(
+            STRINGIZE(
+                "ITEM " << mItemNamesItems.size() << "> " <<
+                name <<
+                std::endl
+            ), false);
+    }
+    else
+    {
+        // dupe - do not save
+    }
+}
+
+// Called when the user has copied items from their inventory and selects the Paste Items button
+// in the UI - iterates over items and folders and saves details of each one.
+// The first use of this tool is for updating NUX items and as such, only looks for OBJECTS,
+// CLOTHING and BODYPARTS - later versions of this tool should make that selection editable.
+void LLFloaterInventoryThumbnailsHelper::onPasteItems()
+{
+    if (!LLClipboard::instance().hasContents())
+    {
+        return;
+    }
+
+    writeToLog(
+        STRINGIZE(
+            "\n==== Pasting items from inventory ====" <<
+            std::endl
+        ), false);
+
+    std::vector<LLUUID> objects;
+    LLClipboard::instance().pasteFromClipboard(objects);
+    size_t count = objects.size();
+
+    for (size_t i = 0; i < count; i++)
+    {
+        const LLUUID& entry = objects.at(i);
+
+        // Check for a folder
+        const LLInventoryCategory* cat = gInventory.getCategory(entry);
+        if (cat)
+        {
+            LLInventoryModel::cat_array_t cat_array;
+            LLInventoryModel::item_array_t item_array;
+
+            LLIsType is_object(LLAssetType::AT_OBJECT);
+            gInventory.collectDescendentsIf(cat->getUUID(),
+                                            cat_array,
+                                            item_array,
+                                            LLInventoryModel::EXCLUDE_TRASH,
+                                            is_object);
+
+            LLIsType is_bodypart(LLAssetType::AT_BODYPART);
+            gInventory.collectDescendentsIf(cat->getUUID(),
+                                            cat_array,
+                                            item_array,
+                                            LLInventoryModel::EXCLUDE_TRASH,
+                                            is_bodypart);
+
+            LLIsType is_clothing(LLAssetType::AT_CLOTHING);
+            gInventory.collectDescendentsIf(cat->getUUID(),
+                                            cat_array,
+                                            item_array,
+                                            LLInventoryModel::EXCLUDE_TRASH,
+                                            is_clothing);
+
+            for (size_t i = 0; i < item_array.size(); i++)
+            {
+                LLViewerInventoryItem* item = item_array.at(i);
+                recordInventoryItemEntry(item);
+            }
+        }
+
+        // Check for an item
+        LLViewerInventoryItem* item = gInventory.getItem(entry);
+        if (item)
+        {
+            const LLAssetType::EType item_type = item->getType();
+            if (item_type == LLAssetType::AT_OBJECT || item_type == LLAssetType::AT_BODYPART || item_type == LLAssetType::AT_CLOTHING)
+            {
+                recordInventoryItemEntry(item);
+            }
+        }
+    }
+
+    // update the main list view based on what we found
+    updateDisplayList();
+
+    // update the buttons enabled state based on what we found/saved
+    updateButtonStates();
+}
+
+// Records a entry in the pasted textures - saves it to a map and writes it to the log
+// window for later confirmation/validation - since it uses a map, duplicates (based on
+// the name) are discarded
+void LLFloaterInventoryThumbnailsHelper::recordTextureItemEntry(LLViewerInventoryItem* item)
+{
+    const std::string name = item->getName();
+
+    std::map<std::string, LLUUID>::iterator iter = mTextureNamesIDs.find(name);
+    if (iter == mTextureNamesIDs.end())
+    {
+        LLUUID id = item->getAssetUUID();
+        mTextureNamesIDs.insert({name, id});
+
+        writeToLog(
+            STRINGIZE(
+                "TEXTURE " << mTextureNamesIDs.size() << "> " <<
+                name <<
+                //" | " <<
+                //id.asString() <<
+                std::endl
+            ), false);
+    }
+    else
+    {
+        // dupe - do not save
+    }
+}
+
+// Called when the user has copied textures from their inventory and selects the Paste Textures
+// button in the UI - iterates over textures and folders and saves details of each one.
+void LLFloaterInventoryThumbnailsHelper::onPasteTextures()
+{
+    if (!LLClipboard::instance().hasContents())
+    {
+        return;
+    }
+
+    writeToLog(
+        STRINGIZE(
+            "\n==== Pasting textures from inventory ====" <<
+            std::endl
+        ), false);
+
+    std::vector<LLUUID> objects;
+    LLClipboard::instance().pasteFromClipboard(objects);
+    size_t count = objects.size();
+
+    for (size_t i = 0; i < count; i++)
+    {
+        const LLUUID& entry = objects.at(i);
+
+        const LLInventoryCategory* cat = gInventory.getCategory(entry);
+        if (cat)
+        {
+            LLInventoryModel::cat_array_t cat_array;
+            LLInventoryModel::item_array_t item_array;
+
+            LLIsType is_object(LLAssetType::AT_TEXTURE);
+            gInventory.collectDescendentsIf(cat->getUUID(),
+                                            cat_array,
+                                            item_array,
+                                            LLInventoryModel::EXCLUDE_TRASH,
+                                            is_object);
+
+            for (size_t i = 0; i < item_array.size(); i++)
+            {
+                LLViewerInventoryItem* item = item_array.at(i);
+                recordTextureItemEntry(item);
+            }
+        }
+
+        LLViewerInventoryItem* item = gInventory.getItem(entry);
+        if (item)
+        {
+            const LLAssetType::EType item_type = item->getType();
+            if (item_type == LLAssetType::AT_TEXTURE)
+            {
+                recordTextureItemEntry(item);
+            }
+        }
+    }
+
+    // update the main list view based on what we found
+    updateDisplayList();
+
+    // update the buttons enabled state based on what we found/saved
+    updateButtonStates();
+}
+
+// Updates the main list of entries in the UI based on what is in the maps/storage
+void LLFloaterInventoryThumbnailsHelper::updateDisplayList()
+{
+    mInventoryThumbnailsList->deleteAllItems();
+
+    std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+    while (item_iter != mItemNamesItems.end())
+    {
+        std::string item_name = (*item_iter).first;
+
+        std::string existing_texture_name = std::string();
+        LLUUID existing_thumbnail_id = (*item_iter).second->getThumbnailUUID();
+        if (existing_thumbnail_id != LLUUID::null)
+        {
+            existing_texture_name = existing_thumbnail_id.asString();
+        }
+        else
+        {
+            existing_texture_name = "none";
+        }
+
+        std::string new_texture_name = std::string();
+        std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+        if (texture_iter != mTextureNamesIDs.end())
+        {
+            new_texture_name = (*texture_iter).first;
+        }
+        else
+        {
+            new_texture_name = "missing";
+        }
+
+        LLSD row;
+        row["columns"][EListColumnNum::NAME]["column"] = "item_name";
+        row["columns"][EListColumnNum::NAME]["type"] = "text";
+        row["columns"][EListColumnNum::NAME]["value"] = item_name;
+        row["columns"][EListColumnNum::NAME]["font"]["name"] = "Monospace";
+
+        row["columns"][EListColumnNum::EXISTING_TEXTURE]["column"] = "existing_texture";
+        row["columns"][EListColumnNum::EXISTING_TEXTURE]["type"] = "text";
+        row["columns"][EListColumnNum::EXISTING_TEXTURE]["font"]["name"] = "Monospace";
+        row["columns"][EListColumnNum::EXISTING_TEXTURE]["value"] = existing_texture_name;
+
+        row["columns"][EListColumnNum::NEW_TEXTURE]["column"] = "new_texture";
+        row["columns"][EListColumnNum::NEW_TEXTURE]["type"] = "text";
+        row["columns"][EListColumnNum::NEW_TEXTURE]["font"]["name"] = "Monospace";
+        row["columns"][EListColumnNum::NEW_TEXTURE]["value"] = new_texture_name;
+
+        mInventoryThumbnailsList->addElement(row);
+
+        ++item_iter;
+    }
+}
+
+#if 1
+// *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model.
+// temp code in transition
+void inventoryThumbnailsHelperCb(LLPointer<LLInventoryCallback> cb, LLUUID id)
+{
+    if (cb.notNull())
+    {
+        cb->fire(id);
+    }
+}
+#endif
+
+// Makes calls to the AIS v3 API to record the local changes made to the thumbnails.
+// If this is not called, the operations (e.g. set thumbnail or clear thumbnail)
+// appear to work but do not push the changes back to the inventory (local cache view only)
+bool writeInventoryThumbnailID(LLUUID item_id, LLUUID thumbnail_asset_id)
+{
+    if (AISAPI::isAvailable())
+    {
+
+        LLSD updates;
+        updates["thumbnail"] = LLSD().with("asset_id", thumbnail_asset_id.asString());
+
+        LLPointer<LLInventoryCallback> cb;
+
+        AISAPI::completion_t cr = boost::bind(&inventoryThumbnailsHelperCb, cb, _1);
+        AISAPI::UpdateItem(item_id, updates, cr);
+
+        return true;
+    }
+    else
+    {
+        LL_WARNS() << "Unable to write inventory thumbnail because the AIS API is not available" << LL_ENDL;
+        return false;
+    }
+}
+
+// Called when the Write Thumbanils button is pushed. Iterates over the name/item and
+// name/.texture maps and where it finds a common name, extracts what is needed and
+// writes the thumbnail accordingly.
+void LLFloaterInventoryThumbnailsHelper::onWriteThumbnails()
+{
+    // create and show confirmation (Yes/No) textbox since this is a destructive operation
+    LLNotificationsUtil::add("WriteInventoryThumbnailsWarning", LLSD(), LLSD(),
+                             [&](const LLSD & notif, const LLSD & resp)
+    {
+        S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+        if (opt == 0)
+        {
+            std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+            while (item_iter != mItemNamesItems.end())
+            {
+                std::string item_name = (*item_iter).first;
+
+                std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+                if (texture_iter != mTextureNamesIDs.end())
+                {
+                    LLUUID item_id = (*item_iter).second->getUUID();
+
+                    LLUUID thumbnail_asset_id = (*texture_iter).second;
+
+                    writeToLog(
+                        STRINGIZE(
+                            "WRITING THUMB " <<
+                            (*item_iter).first <<
+                            "\n" <<
+                            "item ID: " <<
+                            item_id <<
+                            "\n" <<
+                            "thumbnail texture ID: " <<
+                            thumbnail_asset_id <<
+                            "\n"
+                        ), true);
+
+
+                    (*item_iter).second->setThumbnailUUID(thumbnail_asset_id);
+
+                    // This additional step (notifying AIS API) is required
+                    // to make the changes persist outside of the local cache
+                    writeInventoryThumbnailID(item_id, thumbnail_asset_id);
+                }
+
+                ++item_iter;
+            }
+
+            updateDisplayList();
+        }
+        else
+        {
+            LL_INFOS() << "Writing new thumbnails was canceled" << LL_ENDL;
+        }
+    });
+}
+
+// Called when the Log Items with Missing Thumbnails is selected. This merely writes
+// a list of all the items for which the thumbnail ID is Null. Typical use case is to
+// copy from the log window, pasted to Slack to illustrate which items are missing
+// a thumbnail
+void LLFloaterInventoryThumbnailsHelper::onLogMissingThumbnails()
+{
+    std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+    while (item_iter != mItemNamesItems.end())
+    {
+        LLUUID thumbnail_id = (*item_iter).second->getThumbnailUUID();
+
+        if (thumbnail_id == LLUUID::null)
+        {
+            writeToLog(
+                STRINGIZE(
+                    "Missing thumbnail: " <<
+                    (*item_iter).first <<
+                    std::endl
+                ), true);
+        }
+
+        ++item_iter;
+    }
+}
+
+// Called when the Clear Thumbnail button is selected.  Code to perform the clear (really
+// just writing a NULL UUID into the thumbnail field) is behind an "Are you Sure?" dialog
+// since it cannot be undone and potentinally, you could remove the thumbnails from your
+// whole inventory this way.
+void LLFloaterInventoryThumbnailsHelper::onClearThumbnails()
+{
+    // create and show confirmation (Yes/No) textbox since this is a destructive operation
+    LLNotificationsUtil::add("ClearInventoryThumbnailsWarning", LLSD(), LLSD(),
+                             [&](const LLSD & notif, const LLSD & resp)
+    {
+        S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+        if (opt == 0)
+        {
+            std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+            while (item_iter != mItemNamesItems.end())
+            {
+                (*item_iter).second->setThumbnailUUID(LLUUID::null);
+
+                // This additional step (notifying AIS API) is required
+                // to make the changes persist outside of the local cache
+                const LLUUID item_id = (*item_iter).second->getUUID();
+                writeInventoryThumbnailID(item_id, LLUUID::null);
+
+                ++item_iter;
+            }
+
+            updateDisplayList();
+        }
+        else
+        {
+            LL_INFOS() << "Clearing on thumbnails was canceled" << LL_ENDL;
+        }
+    });
+}
+
+// Update the endabled state of some of the UI buttons based on what has
+// been recorded so far.  For example, if there are no valid item/texture pairs,
+// then the Write Thumbnails button is not enabled.
+void LLFloaterInventoryThumbnailsHelper::updateButtonStates()
+{
+    size_t found_count = 0;
+
+    std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+    while (item_iter != mItemNamesItems.end())
+    {
+        std::string item_name = (*item_iter).first;
+
+        std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+        if (texture_iter != mTextureNamesIDs.end())
+        {
+            found_count++;
+        }
+
+        ++item_iter;
+    }
+
+    // the "Write Thumbnails" button is only enabled when there is at least one
+    // item with a matching texture ready to be written to the thumbnail field
+    if (found_count > 0)
+    {
+        mWriteThumbnailsBtn->setEnabled(true);
+    }
+    else
+    {
+        mWriteThumbnailsBtn->setEnabled(false);
+    }
+
+    // The "Log Missing Items" and "Clear Thumbnails" buttons are only enabled
+    // when there is at least 1 item that was pasted from inventory (doesn't need
+    // to have a matching texture for these operations)
+    if (mItemNamesItems.size() > 0)
+    {
+        mLogMissingThumbnailsBtn->setEnabled(true);
+        mClearThumbnailsBtn->setEnabled(true);
+    }
+    else
+    {
+        mLogMissingThumbnailsBtn->setEnabled(false);
+        mClearThumbnailsBtn->setEnabled(false);
+    }
+}
+
+// Helper function for writing a line to the log window. Currently the only additional
+// feature is that it scrolls to the bottom each time a line is written but it
+// is envisaged that other common actions will be added here eventually - E.G. write eavh
+// line to the Second Life log too for example.
+void LLFloaterInventoryThumbnailsHelper::writeToLog(std::string logline, bool prepend_newline)
+{
+    mOutputLog->appendText(logline, prepend_newline);
+
+    mOutputLog->setCursorAndScrollToEnd();
+}
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.h b/indra/newview/llfloaterinventorythumbnailshelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..b42a85d1a56fac71e729946c4464515f77a196ab
--- /dev/null
+++ b/indra/newview/llfloaterinventorythumbnailshelper.h
@@ -0,0 +1,82 @@
+/**
+ * @file llfloaterinventorythumbnailshelper.h
+ * @author Callum Prentice
+ * @brief Helper floater for bulk processing of inventory thumbnails tool
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
+#define LL_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
+
+#include "llfloater.h"
+class LLTextEditor;
+class LLScrollListCtrl;
+class LLViewerInventoryItem;
+class LLUUID;
+
+class LLFloaterInventoryThumbnailsHelper:
+    public LLFloater
+{
+        friend class LLFloaterReg;
+    private:
+        LLFloaterInventoryThumbnailsHelper(const LLSD& key);
+        BOOL postBuild() override;
+        ~LLFloaterInventoryThumbnailsHelper();
+
+        LLScrollListCtrl* mInventoryThumbnailsList;
+
+        LLTextEditor* mOutputLog;
+
+        LLUICtrl* mPasteItemsBtn;
+        void onPasteItems();
+
+        LLUICtrl* mPasteTexturesBtn;
+        void onPasteTextures();
+
+        LLUICtrl* mWriteThumbnailsBtn;
+        void onWriteThumbnails();
+
+        LLUICtrl* mLogMissingThumbnailsBtn;
+        void onLogMissingThumbnails();
+
+        LLUICtrl* mClearThumbnailsBtn;
+        void onClearThumbnails();
+
+        void recordInventoryItemEntry(LLViewerInventoryItem* item);
+        void recordTextureItemEntry(LLViewerInventoryItem* item);
+        void updateButtonStates();
+        void updateDisplayList();
+        void writeToLog(std::string logline, bool prepend_newline);
+
+        std::map<std::string, LLViewerInventoryItem*> mItemNamesItems;
+        std::map<std::string, LLUUID> mTextureNamesIDs;
+
+        enum EListColumnNum
+        {
+            NAME = 0,
+            EXISTING_TEXTURE = 1,
+            NEW_TEXTURE = 2
+        };
+};
+
+#endif // LL_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 71b3b16809743e5a2c7525dda75881ff5b6c56a6..6216f4e39ab7e7762e4835efd4c1c12f65a09ace 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -183,7 +183,8 @@ void LLPanelMarketplaceListings::draw()
     // Get the audit button enabled only after the whole inventory is fetched
     if (!mAuditBtn->getEnabled())
     {
-        mAuditBtn->setEnabled(LLInventoryModelBackgroundFetch::instance().isEverythingFetched());
+        LLInventoryModelBackgroundFetch* inst = LLInventoryModelBackgroundFetch::getInstance();
+        mAuditBtn->setEnabled(inst->isEverythingFetched() && !inst->folderFetchActive());
     }
     
 	LLPanel::draw();
@@ -410,8 +411,14 @@ BOOL LLFloaterMarketplaceListings::postBuild()
 	mCategoryAddedObserver = new LLMarketplaceListingsAddedObserver(this);
 	gInventory.addObserver(mCategoryAddedObserver);
 	
-    // Fetch aggressively so we can interact with listings right onOpen()
-	fetchContents();
+
+    // Fetch aggressively so we can interact with listings as soon as possible
+    if (!fetchContents())
+    {
+        const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+        LLInventoryModelBackgroundFetch::instance().start(marketplacelistings_id, true);
+    }
+	
 
 	return TRUE;
 }
@@ -440,17 +447,19 @@ void LLFloaterMarketplaceListings::onFocusReceived()
 	updateView();
 }
 
-void LLFloaterMarketplaceListings::fetchContents()
+bool LLFloaterMarketplaceListings::fetchContents()
 {
-	if (mRootFolderId.notNull() &&
+    if (mRootFolderId.notNull() &&
         (LLMarketplaceData::instance().getSLMDataFetched() != MarketplaceFetchCodes::MARKET_FETCH_LOADING) &&
         (LLMarketplaceData::instance().getSLMDataFetched() != MarketplaceFetchCodes::MARKET_FETCH_DONE))
-	{
+    {
         LLMarketplaceData::instance().setDataFetchedSignal(boost::bind(&LLFloaterMarketplaceListings::updateView, this));
         LLMarketplaceData::instance().setSLMDataFetched(MarketplaceFetchCodes::MARKET_FETCH_LOADING);
-		LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true);
+        LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true);
         LLMarketplaceData::instance().getSLMListings();
-	}
+        return true;
+    }
+    return false;
 }
 
 void LLFloaterMarketplaceListings::setRootFolder()
diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h
index 085e517a9d5ff65c7bba6e542bb3eeb606f940ff..78d43f97a9ceeb0f14f439dbc20f55031f8fec40 100644
--- a/indra/newview/llfloatermarketplacelistings.h
+++ b/indra/newview/llfloatermarketplacelistings.h
@@ -114,8 +114,8 @@ class LLFloaterMarketplaceListings : public LLFloater
 protected:
 	void setRootFolder();
 	void setPanels();
-	void fetchContents();
-    
+    bool fetchContents();
+
 	void setStatusString(const std::string& statusString);
 
 	void onClose(bool app_quitting);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index aa723eb3a8237e7930c7ae6cc8d985d6d83bbe16..a3e173398f6cfe94c35765624de8e2b14b84f190 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -113,6 +113,7 @@
 #include "llpresetsmanager.h"
 #include "llviewercontrol.h"
 #include "llpresetsmanager.h"
+#include "llinventoryfunctions.h"
 
 #include "llsearchableui.h"
 #include "llperfstats.h"
@@ -1016,7 +1017,6 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
 	if (userdata.asString() == "closeadvanced")
 	{
 		LLFloaterReg::hideInstance("prefs_graphics_advanced");
-		updateMaxComplexity();
 	}
 	else
 	{
@@ -1628,25 +1628,6 @@ void LLFloaterPreference::onChangeMaturity()
 	getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
 }
 
-std::string get_category_path(LLUUID cat_id)
-{
-    LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
-    std::string localized_cat_name;
-    if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
-    {
-        localized_cat_name = cat->getName();
-    }
-
-    if (cat->getParentUUID().notNull())
-    {
-        return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
-    }
-    else
-    {
-        return localized_cat_name;
-    }
-}
-
 std::string get_category_path(LLFolderType::EType cat_type)
 {
     LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type);
diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp
index bf1f56a6d1c686fd057003d73ee022e28339de86..ec2e62716517f9f3a3789d7fcb72b5517f117b11 100644
--- a/indra/newview/llfloaterprofiletexture.cpp
+++ b/indra/newview/llfloaterprofiletexture.cpp
@@ -58,6 +58,8 @@ LLFloaterProfileTexture::~LLFloaterProfileTexture()
         mImage->setBoostLevel(mImageOldBoostLevel);
         mImage = NULL;
     }
+
+    LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList);
 }
 
 // virtual
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index d4eb40ff921b57606bda825b2473c1696d55f2dc..187ac9d3235441c3c7d2cc4412fee12f9c596430 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -144,7 +144,7 @@ class LLDispatchSetEstateExperience : public LLDispatchHandler
 		const LLUUID& invoice,
 		const sparam_t& strings);
 
-	LLSD getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count );
+	static LLSD getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count );
 };
 
 
@@ -2450,11 +2450,12 @@ bool LLDispatchSetEstateAccess::operator()(
 	return true;
 }
 
+// static
 LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count )
 {
 	LLSD idList = LLSD::emptyArray();
 	LLUUID id;
-	while(count--> 0)
+	while (count-- > 0 && it < end)
 	{
 		memcpy(id.mData, (*(it++)).data(), UUID_BYTES);
 		idList.append(id);
@@ -2468,7 +2469,7 @@ LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_
 // strings[2] = str(num blocked)
 // strings[3] = str(num trusted)
 // strings[4] = str(num allowed)
-// strings[8] = bin(uuid) ...
+// strings[5] = bin(uuid) ...
 // ...
 bool LLDispatchSetEstateExperience::operator()(
 	const LLDispatcher* dispatcher,
@@ -2477,23 +2478,30 @@ bool LLDispatchSetEstateExperience::operator()(
 	const sparam_t& strings)
 {
 	LLPanelRegionExperiences* panel = LLFloaterRegionInfo::getPanelExperiences();
-	if (!panel) return true;
+	if (!panel)
+		return true;
+
+	const sparam_t::size_type MIN_SIZE = 5;
+	if (strings.size() < MIN_SIZE)
+		return true;
 
+	// Skip 2 parameters
 	sparam_t::const_iterator it = strings.begin();
 	++it; // U32 estate_id = strtol((*it).c_str(), NULL, 10);
 	++it; // U32 send_to_agent_only = strtoul((*(++it)).c_str(), NULL, 10);
 
+	// Read 3 parameters
 	LLUUID id;
 	S32 num_blocked = strtol((*(it++)).c_str(), NULL, 10);
 	S32 num_trusted = strtol((*(it++)).c_str(), NULL, 10);
 	S32 num_allowed = strtol((*(it++)).c_str(), NULL, 10);
 
 	LLSD ids = LLSD::emptyMap()
-		.with("blocked", getIDs(it,								strings.end(), num_blocked))
-		.with("trusted", getIDs(it + (num_blocked),				strings.end(), num_trusted))
-		.with("allowed", getIDs(it + (num_blocked+num_trusted),	strings.end(), num_allowed));
+		.with("blocked", getIDs(it, strings.end(), num_blocked))
+		.with("trusted", getIDs(it + num_blocked, strings.end(), num_trusted))
+		.with("allowed", getIDs(it + num_blocked + num_trusted, strings.end(), num_allowed));
 
-	panel->processResponse(ids);			
+	panel->processResponse(ids);
 
 	return true;
 }
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index a875d33679771f7e9272a8e5826c4e3f60ad19ef..532e7da67f224c291a9dd6936e9947358bbc2f5a 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -67,14 +67,14 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
 		if (parent == this )
 		{
 			LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
-			if ( panel_appearance )
+			if (panel_appearance)
 			{
 				LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
 				if (edit_wearable_ptr)
 				{
 					edit_wearable_ptr->onClose();
 				}
-				if(!app_quitting)
+				if (!app_quitting)
 				{
 					panel_appearance->showOutfitsInventoryPanel();
 				}
@@ -116,11 +116,16 @@ LLFloater* LLFloaterSidePanelContainer::getTopmostInventoryFloater()
 LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
 {
 	LLView* view = findChildView(panel_name, true);
-	if (!view) return NULL;
+	if (!view)
+		return NULL;
 
 	if (!getVisible())
 	{
-	openFloater();
+		openFloater();
+	}
+	else if (!hasFocus())
+	{
+		setFocus(TRUE);
 	}
 
 	LLPanel* panel = NULL;
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index db69c3e2c37c63045ac2eab033324628f3949966..553d09bec24be860614030f7226a85fa48c682b2 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -158,7 +158,7 @@ class LLFloaterUIPreview : public LLFloater
 
 	// typedef std::map<std::string,std::pair<std::list<std::string>,std::list<std::string> > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise
 	typedef std::list<std::string> StringList;
-	typedef boost::shared_ptr<StringList> StringListPtr;
+	typedef std::shared_ptr<StringList> StringListPtr;
 	typedef std::map<std::string, std::pair<StringListPtr,StringListPtr> > DiffMap;
 	DiffMap mDiffsMap;							// map, of filename to pair of list of changed element paths and list of errors
 
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index c8559fc9d3cc349158cd379d42139d30a659d6c6..62e4022ddbd0ae7ad7279fd4a9df3d6a1fd55dab 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -327,6 +327,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data)
 BOOL LLFloaterWorldMap::postBuild()
 {
     mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
+    mMapView->setPan(0, 0, true);
 	
 	LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
 	avatar_combo->selectFirstItem();
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 8919229c78b9edaa6e436df75672bd00c4438144..92c58a2dbcc77e9170a8973bfe6871aa2d33fbdb 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -139,69 +139,18 @@ static bool is_valid_update(const LLSD& data)
 }
 #endif
 
-class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
+class LLGLTFMaterialOverrideDispatchHandler
 {
     LOG_CLASS(LLGLTFMaterialOverrideDispatchHandler);
 public:
     LLGLTFMaterialOverrideDispatchHandler() = default;
-    ~LLGLTFMaterialOverrideDispatchHandler() override = default;
+    ~LLGLTFMaterialOverrideDispatchHandler() = default;
 
     void addCallback(void(*callback)(const LLUUID& object_id, S32 side))
     {
         mSelectionCallbacks.push_back(callback);
     }
 
-    bool operator()(const LLDispatcher* dispatcher, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override
-    {
-        LL_PROFILE_ZONE_SCOPED;
-        // receive override data from simulator via LargeGenericMessage
-        // message should have:
-        //  object_id - UUID of LLViewerObject
-        //  sides - array of S32 indices of texture entries
-        //  gltf_json - array of corresponding Strings of GLTF json for override data
-
-        LLSD message;
-        bool success = true;
-#if 0 //deprecated
-        for(const std::string& llsdRaw : strings)
-        {
-            std::istringstream llsdData(llsdRaw);
-            if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
-            {
-                LL_WARNS() << "LLGLTFMaterialOverrideDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
-                success = false;
-                continue;
-            }
-
-            LLGLTFOverrideCacheEntry object_override;
-            if (!object_override.fromLLSD(message))
-            {
-                // malformed message, nothing we can do to handle it
-                LL_DEBUGS("GLTF") << "Message without id:" << message << LL_ENDL;
-                success = false;
-                continue;
-            }
-
-            // Cache the data
-            {
-                LLViewerRegion * region = LLWorld::instance().getRegionFromHandle(object_override.mRegionHandle);
-
-                if (region)
-                {
-                    region->cacheFullUpdateGLTFOverride(object_override);
-                }
-                else
-                {
-                    LL_WARNS("GLTF") << "could not access region for material overrides message cache, region_handle: " << LL_ENDL;
-                }
-            }
-            applyData(object_override);
-        }
-
-#endif
-        return success;
-    }
-
     void doSelectionCallbacks(const LLUUID& object_id, S32 side)
     {
         for (auto& callback : mSelectionCallbacks)
@@ -210,112 +159,6 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
         }
     }
 
-    void applyData(const LLGLTFOverrideCacheEntry &object_override)
-    {
-        // Parse the data
-
-#if 0 // DEPRECATED
-        LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
-        LL::WorkQueue::ptr_t general_queue = LL::WorkQueue::getInstance("General");
-
-        struct ReturnData
-        {
-        public:
-            LLGLTFMaterial mMaterial;
-            S32 mSide;
-            bool mSuccess;
-        };
-
-        if (!object_override.mSides.empty())
-        {
-            // fromJson() is performance heavy offload to a thread.
-            main_queue->postTo(
-                general_queue,
-                [sides=object_override.mSides]() // Work done on general queue
-            {
-                std::vector<ReturnData> results;
-
-                results.reserve(sides.size());
-                // parse json
-                std::unordered_map<S32, LLSD>::const_iterator iter = sides.begin();
-                std::unordered_map<S32, LLSD>::const_iterator end = sides.end();
-                while (iter != end)
-                {
-                    ReturnData result;
-
-                    result.mMaterial.applyOverrideLLSD(iter->second);
-                    
-                    result.mSuccess = true;
-                    result.mSide = iter->first;
-
-                    results.push_back(result);
-                    iter++;
-                }
-                return results;
-            },
-            [object_id=object_override.mObjectId, this](std::vector<ReturnData> results) // Callback to main thread
-            {
-                LLViewerObject * obj = gObjectList.findObject(object_id);
-
-                if (results.size() > 0 )
-                {
-                    std::unordered_set<S32> side_set;
-
-                    for (auto const & result : results)
-                    {
-                        S32 side = result.mSide;
-                        if (result.mSuccess)
-                        {
-                            // copy to heap here because LLTextureEntry is going to take ownership with an LLPointer
-                            LLGLTFMaterial * material = new LLGLTFMaterial(result.mMaterial);
-
-                            // flag this side to not be nulled out later
-                            side_set.insert(side);
-
-                            if (obj)
-                            {
-                                obj->setTEGLTFMaterialOverride(side, material);
-                            }
-                        }
-
-                        // unblock material editor
-                        if (obj && obj->getTE(side) && obj->getTE(side)->isSelected())
-                        {
-                            doSelectionCallbacks(object_id, side);
-                        }
-                    }
-
-                    if (obj && side_set.size() != obj->getNumTEs())
-                    { // object exists and at least one texture entry needs to have its override data nulled out
-                        for (int i = 0; i < obj->getNumTEs(); ++i)
-                        {
-                            if (side_set.find(i) == side_set.end())
-                            {
-                                obj->setTEGLTFMaterialOverride(i, nullptr);
-                                if (obj->getTE(i) && obj->getTE(i)->isSelected())
-                                {
-                                    doSelectionCallbacks(object_id, i);
-                                }
-                            }
-                        }
-                    }
-                }
-                else if (obj)
-                { // override list was empty or an error occurred, null out all overrides for this object
-                    for (int i = 0; i < obj->getNumTEs(); ++i)
-                    {
-                        obj->setTEGLTFMaterialOverride(i, nullptr);
-                        if (obj->getTE(i) && obj->getTE(i)->isSelected())
-                        {
-                            doSelectionCallbacks(obj->getID(), i);
-                        }
-                    }
-                }
-            });
-        }
-#endif
-    }
-
 private:
 
     std::vector<void(*)(const LLUUID& object_id, S32 side)> mSelectionCallbacks;
@@ -821,12 +664,6 @@ void LLGLTFMaterialList::flushMaterials()
     }
 }
 
-// static
-void LLGLTFMaterialList::registerCallbacks()
-{
-    gGenericDispatcher.addHandler("GLTFMaterialOverride", &handle_gltf_override_message);
-}
-
 // static
 void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool) )
 {
@@ -864,7 +701,3 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
     }
 }
 
-void LLGLTFMaterialList::loadCacheOverrides(const LLGLTFOverrideCacheEntry& override)
-{
-    handle_gltf_override_message.applyData(override);
-}
diff --git a/indra/newview/llgltfmateriallist.h b/indra/newview/llgltfmateriallist.h
index 7317214019d52ec41e39f96f057ca747c39d4f34..f1c4ce20f91c5ace4afee9f452c88cfb03ec6993 100644
--- a/indra/newview/llgltfmateriallist.h
+++ b/indra/newview/llgltfmateriallist.h
@@ -52,8 +52,6 @@ class LLGLTFMaterialList
 
     void flushMaterials();
 
-    static void registerCallbacks();
-
     // Queue an modification of a material that we want to send to the simulator.  Call "flushUpdates" to flush pending updates.
     //  id - ID of object to modify
     //  side - TexureEntry index to modify, or -1 for all sides
@@ -99,8 +97,6 @@ class LLGLTFMaterialList
     // any override data that arrived before the object was ready to receive it
     void applyQueuedOverrides(LLViewerObject* obj);
 
-    static void loadCacheOverrides(const LLGLTFOverrideCacheEntry& override);
-
     // Apply an override update with the given data
     void applyOverrideMessage(LLMessageSystem* msg, const std::string& data);
 
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 26fc899eb5aafd18a8af9777cb5169ddd7b1b15d..5524bb7f09a0c8902b846ce2ad18d9a1c23ef056 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -897,6 +897,15 @@ void LLHUDNameTag::shift(const LLVector3& offset)
 	mPositionAgent += offset;
 }
 
+F32 LLHUDNameTag::getWorldHeight() const
+{
+	const LLViewerCamera* camera = LLViewerCamera::getInstance();
+	F32 height_meters = mLastDistance * (F32)tan(camera->getView() / 2.f);
+	F32 height_pixels = camera->getViewHeightInPixels() / 2.f;
+	F32 meters_per_pixel = height_meters / height_pixels;
+	return mHeight * meters_per_pixel * gViewerWindow->getDisplayScale().mV[VY];
+}
+
 //static 
 void LLHUDNameTag::addPickable(std::set<LLViewerObject*> &pick_list)
 {
diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h
index 361e4d4f4b50598afa0203ae452f038f786685e0..592ab5518fe17b41915988e6f1a28ffe8713c911 100644
--- a/indra/newview/llhudnametag.h
+++ b/indra/newview/llhudnametag.h
@@ -127,11 +127,12 @@ class LLHUDNameTag : public LLHUDObject
 	/*virtual*/ void markDead();
 	friend class LLHUDObject;
 	/*virtual*/ F32 getDistance() const { return mLastDistance; }
-	S32  getLOD() { return mLOD; }
-	BOOL getVisible() { return mVisible; }
+	S32  getLOD() const { return mLOD; }
+	BOOL getVisible() const { return mVisible; }
 	BOOL getHidden() const { return mHidden; }
 	void setHidden( BOOL hide ) { mHidden = hide; }
 	void shift(const LLVector3& offset);
+	F32 getWorldHeight() const;
 
 	BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render = FALSE);
 
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index a1fb49c277e25b04ba3947d5f8d0e0bcc0146b0e..c9b4454f3f1343473fe28088d19a00a2db8fda98 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3226,9 +3226,11 @@ void LLIMMgr::addMessage(
             // Fetch group chat history, enabled by default.
             if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory"))
             {
-                std::string chat_url = gAgent.getRegion()->getCapability("ChatSessionRequest");
-                LLCoros::instance().launch("chatterBoxHistoryCoro",
-                    boost::bind(&chatterBoxHistoryCoro, chat_url, session_id, from, msg, timestamp));
+                std::string chat_url = gAgent.getRegionCapability("ChatSessionRequest");
+                if (!chat_url.empty())
+                {
+                    LLCoros::instance().launch("chatterBoxHistoryCoro", boost::bind(&chatterBoxHistoryCoro, chat_url, session_id, from, msg, timestamp));
+                }
             }
 
 			//Play sound for new conversations
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index da4e3c0949f327b874c052dae15f56cb1b20723e..76e428b7d00af2dc737ee2a9c526fa88544339de 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -84,7 +84,10 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p)
                         }
                     }
 				}
-
+                if ((!p.message.isProvided() || p.message().empty())) 
+                {
+                    return NULL;
+                }
 				// No or more than one texture found => show default tooltip
 				return LLUICtrlFactory::create<LLToolTip>(p);
 			}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 932a0316dd15b622e33fb92f8c212b5470b74e79..ddb69cdfb3f97d67f1aaf18426cf83e0f1d9d6d1 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1778,7 +1778,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
 	}
 	else if ("show_in_main_panel" == action)
 	{
-		LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+		LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
 		return;
 	}
 	else if ("cut" == action)
@@ -2284,8 +2284,11 @@ BOOL LLFolderBridge::isItemMovable() const
 
 void LLFolderBridge::selectItem()
 {
-	// Have no fear: the first thing start() does is to test if everything for that folder has been fetched...
-	LLInventoryModelBackgroundFetch::instance().start(getUUID(), true);
+    LLViewerInventoryCategory* cat = gInventory.getCategory(getUUID());
+    if (cat)
+    {
+        cat->fetch();
+    }
 }
 
 void LLFolderBridge::buildDisplayName() const
@@ -2810,7 +2813,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
             is_movable = can_move_folder_to_marketplace(master_folder, dest_folder, inv_cat, tooltip_msg, bundle_size);
 		}
 
-		if (is_movable)
+		if (is_movable && !move_is_into_landmarks)
 		{
 			LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
 			is_movable = active_panel != NULL;
@@ -3027,7 +3030,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
 	return accept;
 }
 
-void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> move_inv)
+void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move_inv)
 {
 	const char* dialog = NULL;
 	if (object->flagScripted())
@@ -3040,7 +3043,7 @@ void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> mo
 	}
 
     static LLNotificationPtr notification_ptr;
-    static boost::shared_ptr<LLMoveInv> inv_ptr;
+    static std::shared_ptr<LLMoveInv> inv_ptr;
 
     // Notification blocks user from interacting with inventories so everything that comes after first message
     // is part of this message - don'r show it again
@@ -3153,7 +3156,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
 	if(drop && accept)
 	{
 		it = inventory_objects.begin();
-        boost::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
+        std::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
 		move_inv->mObjectID = object_id;
 		move_inv->mCategoryID = category_id;
 		move_inv->mCallback = callback;
@@ -3409,7 +3412,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
 	}
 	else if ("show_in_main_panel" == action)
 	{
-		LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE);
+		LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true);
 		return;
 	}
 	else if ("cut" == action)
@@ -5012,7 +5015,7 @@ LLFontGL::StyleFlags LLMarketplaceFolderBridge::getLabelStyle() const
 
 
 // helper stuff
-bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv> move_inv)
+bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, std::shared_ptr<LLMoveInv> move_inv)
 {
 	LLFloaterOpenObject::LLCatAndWear* cat_and_wear = (LLFloaterOpenObject::LLCatAndWear* )move_inv->mUserData;
 	LLViewerObject* object = gObjectList.findObject(move_inv->mObjectID);
@@ -5486,7 +5489,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
 		if (accept && drop)
 		{
             LLUUID item_id = inv_item->getUUID();
-            boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+            std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
 			move_inv->mObjectID = inv_item->getParentUUID();
 			two_uuids_t item_pair(mUUID, item_id);
 			move_inv->mMoveList.push_back(item_pair);
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 3cbbd68e516c9fbc2c2b0f91e01bf59735f027a9..6f06f3b36dac9a346e2d4b8c405f56e38a77e2fa 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -794,7 +794,7 @@ struct LLMoveInv
     void* mUserData;
 };
 
-void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> move_inv);
-bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv>);
+void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move_inv);
+bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, std::shared_ptr<LLMoveInv>);
 
 #endif // LL_LLINVENTORYBRIDGE_H
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 7b4283e94d8b82031ac2e7ea72dab023c95d11be..332c6d3085be604cb9ba1bb9bbdb6554735a607e 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -202,12 +202,18 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
         && !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress())
     {
         LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id);
-        if ((!cat && folder_id.notNull()) || (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN))
+        if ((!cat && folder_id.notNull()))
         {
-            // At the moment background fetch only cares about VERSION_UNKNOWN,
-            // so do not check isCategoryComplete that compares descendant count
+            // Shouldn't happen? Server provides full list of folders on startup
             LLInventoryModelBackgroundFetch::instance().start(folder_id, false);
         }
+        else if (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+        {
+            // At the moment background fetch only cares about VERSION_UNKNOWN,
+            // so do not check isCategoryComplete that compares descendant count,
+            // but if that is nesesary, do a forced scheduleFolderFetch.
+            cat->fetch();
+        }
 	}
 
     if (!checkAgainstFilterThumbnails(folder_id))
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 4aeacae6edc613d6d37f87758a815cdf85437252..ea0566f5c474ea6cadbcb230673480b4722b150e 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -91,8 +91,6 @@
 #include "llvoavatarself.h"
 #include "llwearablelist.h"
 
-#include <boost/foreach.hpp>
-
 BOOL LLInventoryState::sWearNewClothing = FALSE;
 LLUUID LLInventoryState::sWearNewClothingTransactionID;
 std::list<LLUUID> LLInventoryAction::sMarketplaceFolders;
@@ -462,6 +460,13 @@ void copy_inventory_category(LLInventoryModel* model,
 	gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID());
 }
 
+void copy_cb(const LLUUID& dest_folder, const LLUUID& root_id)
+{
+    // Decrement the count in root_id since that one item won't be copied over
+    LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+    update_folder_cb(dest_folder);
+};
+
 void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& root_copy_id, bool move_no_copy_items)
 {
 	model->notifyObservers();
@@ -480,12 +485,21 @@ void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryMode
 		LLMarketplaceData::instance().setValidationWaiting(root_id, count_descendants_items(cat->getUUID()));
 	}
 
+    LLPointer<LLInventoryCallback> cb;
+    if (root_copy_id.isNull())
+    {
+        cb = new LLBoostFuncInventoryCallback(boost::bind(copy_cb, new_cat_uuid, root_id));
+    }
+    else
+    {
+        cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
+    }
+
 	// Copy all the items
 	LLInventoryModel::item_array_t item_array_copy = *item_array;
 	for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++)
 	{
 		LLInventoryItem* item = *iter;
-		LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
 
 		if (item->getIsLinkType())
 		{
@@ -500,8 +514,11 @@ void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryMode
 				LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *)item;
 				gInventory.changeItemParent(viewer_inv_item, new_cat_uuid, true);
 			}
-			// Decrement the count in root_id since that one item won't be copied over
-			LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+            if (root_copy_id.isNull())
+            {
+                // Decrement the count in root_id since that one item won't be copied over
+                LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+            }
 		}
 		else
 		{
@@ -2151,6 +2168,24 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st
     gInventory.createNewCategory(first_item->getParentUUID(), LLFolderType::FT_NONE, folder_name, func);
 }
 
+std::string get_category_path(LLUUID cat_id)
+{
+    LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
+    std::string localized_cat_name;
+    if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName()))
+    {
+        localized_cat_name = cat->getName();
+    }
+
+    if (cat->getParentUUID().notNull())
+    {
+        return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name;
+    }
+    else
+    {
+        return localized_cat_name;
+    }
+}
 // Returns true if the item can be moved to Current Outfit or any outfit folder.
 bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
 {
@@ -2554,6 +2589,12 @@ bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item
 	return FALSE;
 }
 
+bool LLAssetIDAndTypeMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+    if (!item) return false;
+    return (item->getActualType() == mType && item->getAssetUUID() == mAssetID);
+}
+
 bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
 {
 	LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
@@ -2949,6 +2990,23 @@ bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids)
 void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm)
 {
 	std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
+    if (selected_items.empty()
+        && action != "wear"
+        && action != "wear_add"
+        && !isRemoveAction(action))
+    {
+        // Was item removed while user was checking menu?
+        // "wear" and removal exlusions are due to use of
+        // getInventorySelectedUUIDs() below
+        LL_WARNS("Inventory") << "Menu tried to operate on empty selection" << LL_ENDL;
+
+        if (("copy" == action) || ("cut" == action))
+        {
+            LLClipboard::instance().reset();
+        }
+
+        return;
+    }
     
     // Prompt the user and check for authorization for some marketplace active listing edits
 	if (user_confirm && (("delete" == action) || ("cut" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action) || ("open" == action)))
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 925217dda35127572b62551eb090854b29f831dd..5a833eab8c5a0821ef1faae243ec4052ba594b07 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -106,6 +106,7 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st
 void move_items_to_folder(const LLUUID& new_cat_uuid, const uuid_vec_t& selected_uuids);
 bool is_only_cats_selected(const uuid_vec_t& selected_uuids);
 bool is_only_items_selected(const uuid_vec_t& selected_uuids);
+std::string get_category_path(LLUUID cat_id);
 
 bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
 bool can_move_to_landmarks(LLInventoryItem* inv_item);
@@ -278,6 +279,28 @@ class LLIsOfAssetType : public LLInventoryCollectFunctor
 	LLAssetType::EType mType;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLAssetIDAndTypeMatches
+//
+// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// the item matches both asset type and asset id.
+// This is needed in case you are looking for a specific type with default id
+// (since null is default for multiple asset types)
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLAssetIDAndTypeMatches: public LLInventoryCollectFunctor
+{
+public:
+    LLAssetIDAndTypeMatches(const LLUUID& asset_id, LLAssetType::EType type): mAssetID(asset_id), mType(type) {}
+    virtual ~LLAssetIDAndTypeMatches() {}
+    bool operator()(LLInventoryCategory* cat,
+                    LLInventoryItem* item);
+
+protected:
+    LLUUID mAssetID;
+    LLAssetType::EType mType;
+};
+
 class LLIsValidItemLink : public LLInventoryCollectFunctor
 {
 public:
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index d4ca58f778ac61833d03e1645ae0adf04e7344d7..230ee86fb720676ef48c2c9d36cbaaaa185f67a2 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2419,17 +2419,22 @@ void LLInventoryGallery::startDrag()
         }
 
         const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id);        
-        if (cat && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID())
-            && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType()))
+        if (cat)
         {
-            if (cat->getOwnerID() == ALEXANDRIA_LINDEN_ID)
+            if (gInventory.isObjectDescendentOf(selected_id, gInventory.getLibraryRootFolderID()))
             {
                 src = LLToolDragAndDrop::SOURCE_LIBRARY;
+                EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
+                types.push_back(type);
+                ids.push_back(selected_id);
+            }
+            else if (gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID())
+                && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType()))
+            {
+                EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
+                types.push_back(type);
+                ids.push_back(selected_id);
             }
-
-            EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
-            types.push_back(type);
-            ids.push_back(selected_id);
         }
     }
     LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, src);
@@ -3334,7 +3339,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
 
         if (accept && drop)
         {
-            boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+            std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
             move_inv->mObjectID = inv_item->getParentUUID();
             std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
             move_inv->mMoveList.push_back(item_pair);
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 23129f7d441e1a38abe4e0ed076e64d71de63d16..cac859387cdd9f40a1f2a0bb9f1c5eedd414790c 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -240,7 +240,7 @@ void LLInventoryItemsList::refresh()
     case REFRESH_LIST_SORT:
         {
             // Filter, sort, rearrange and notify parent about shape changes
-            filterItems();
+            filterItems(true, true);
 
             if (mAddedItems.size() == 0)
             {
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index ce41105f989f28d3117ceb792e0f0f60848a8ad9..5b83298bb9a62a4904a93f4787582706fbcd7f51 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -51,20 +51,20 @@ class LLInventoryItemsList : public LLFlatListViewEx
 	/**
 	 * Let list know items need to be refreshed in next doIdle()
 	 */
-	void setNeedsRefresh(bool needs_refresh){ mRefreshState = needs_refresh ? REFRESH_ALL : REFRESH_COMPLETE; }
+	void setNeedsRefresh(bool needs_refresh) { mRefreshState = needs_refresh ? REFRESH_ALL : REFRESH_COMPLETE; }
 
-	U32 getNeedsRefresh(){ return mRefreshState; }
+	U32 getNeedsRefresh() { return mRefreshState; }
 
 	/**
 	 * Sets the flag indicating that the list needs to be refreshed even if it is
 	 * not currently visible.
 	 */
-	void setForceRefresh(bool force_refresh){ mForceRefresh = force_refresh; }
+	void setForceRefresh(bool force_refresh) { mForceRefresh = force_refresh; }
 
 	/**
 	* If refreshes when invisible.
 	*/
-	bool getForceRefresh(){ return mForceRefresh;  }
+	bool getForceRefresh() { return mForceRefresh; }
 
 	virtual bool selectItemByValue(const LLSD& value, bool select = true);
 
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 05aa2e423f3fda4b2f01e5375e2eaf6d74b410e5..205e5f348937d54c7bfea794bdce00c9a177c85a 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3550,6 +3550,9 @@ void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, vo
 
 		gInventoryCallbacks.fire(callback_id, item_id);
 
+        // Message system at the moment doesn't support Thumbnails and potential
+        // newer features so just rerequest whole item
+        //
         // todo: instead of unpacking message fully,
         // grab only an item_id, then fetch
         LLInventoryModelBackgroundFetch::instance().scheduleItemFetch(item_id, true);
@@ -3912,19 +3915,22 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
 
 	for (cat_array_t::iterator cit = folders.begin(); cit != folders.end(); ++cit)
 	{
-		gInventory.updateCategory(*cit);
-
-        // Temporary workaround: just fetch the item using AIS to get missing fields.
-        // If this works fine we might want to extract ids only from the message
-        // then use AIS as a primary fetcher
-        LLInventoryModelBackgroundFetch::instance().scheduleFolderFetch((*cit)->getUUID(), true /*force, since it has changes*/);
+        gInventory.updateCategory(*cit);
+        if ((*cit)->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
+        {
+            // Temporary workaround: just fetch the item using AIS to get missing fields.
+            // If this works fine we might want to extract 'ids only' from the message
+            // then use AIS as a primary fetcher
+            LLInventoryModelBackgroundFetch::instance().scheduleFolderFetch((*cit)->getUUID(), true /*force, since it has changes*/);
+        }
+        // else already called fetch() above
 	}
 	for (item_array_t::iterator iit = items.begin(); iit != items.end(); ++iit)
 	{
 		gInventory.updateItem(*iit);
 
         // Temporary workaround: just fetch the item using AIS to get missing fields.
-        // If this works fine we might want to extract ids only from the message
+        // If this works fine we might want to extract 'ids only' from the message
         // then use AIS as a primary fetcher
         LLInventoryModelBackgroundFetch::instance().scheduleItemFetch((*iit)->getUUID(), true);
 	}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 1f410bea1012e8fef0e4444b7d56332c12059600..722447b5d75e4da6fc07572e9f9f84522d03457d 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -193,13 +193,16 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch():
     mLastFetchCount(0),
     mFetchFolderCount(0),
     mAllRecursiveFoldersFetched(false),
-	mRecursiveInventoryFetchStarted(false),
-	mRecursiveLibraryFetchStarted(false),
-	mMinTimeBetweenFetches(0.3f)
+    mRecursiveInventoryFetchStarted(false),
+    mRecursiveLibraryFetchStarted(false),
+    mRecursiveMarketplaceFetchStarted(false),
+    mMinTimeBetweenFetches(0.3f)
 {}
 
 LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()
-{}
+{
+    gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+}
 
 bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const
 {
@@ -314,6 +317,23 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
 				gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
 			}
 		}
+        else if (recursive && cat && cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
+        {
+            if (mFetchFolderQueue.empty() || mFetchFolderQueue.back().mUUID != id)
+            {
+                if (recursive && AISAPI::isAvailable())
+                {
+                    // Request marketplace folder and content separately
+                    mFetchFolderQueue.push_front(FetchQueueInfo(id, FT_FOLDER_AND_CONTENT));
+                }
+                else
+                {
+                    mFetchFolderQueue.push_front(FetchQueueInfo(id, recursion_type));
+                }
+                gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+                mRecursiveMarketplaceFetchStarted = true;
+            }
+        }
 		else
 		{
             if (AISAPI::isAvailable())
@@ -359,8 +379,22 @@ void LLInventoryModelBackgroundFetch::scheduleFolderFetch(const LLUUID& cat_id,
         mBackgroundFetchActive = true;
         mFolderFetchActive = true;
 
-        // Specific folder requests go to front of queue.
-        mFetchFolderQueue.push_front(FetchQueueInfo(cat_id, forced ? FT_FORCED : FT_DEFAULT));
+        if (forced)
+        {
+            // check if already requested
+            if (mForceFetchSet.find(cat_id) == mForceFetchSet.end())
+            {
+                mForceFetchSet.insert(cat_id);
+                mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_FORCED));
+            }
+        }
+        else
+        {
+            // Specific folder requests go to front of queue.
+            // version presence acts as dupplicate prevention for normal fetches
+            mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_DEFAULT));
+        }
+
         gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
     }
 }
@@ -370,8 +404,21 @@ void LLInventoryModelBackgroundFetch::scheduleItemFetch(const LLUUID& item_id, b
     if (mFetchItemQueue.empty() || mFetchItemQueue.front().mUUID != item_id)
     {
         mBackgroundFetchActive = true;
+        if (forced)
+        {
+            // check if already requested
+            if (mForceFetchSet.find(item_id) == mForceFetchSet.end())
+            {
+                mForceFetchSet.insert(item_id);
+                mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_FORCED, false));
+            }
+        }
+        else
+        {
+            // 'isFinished' being set acts as dupplicate prevention for normal fetches
+            mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_DEFAULT, false));
+        }
 
-        mFetchItemQueue.push_front(FetchQueueInfo(item_id, forced ? FT_FORCED : FT_DEFAULT, false));
         gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
     }
 }
@@ -591,6 +638,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
         return;
     }
 
+    LLViewerInventoryCategory::EFetchType new_state = LLViewerInventoryCategory::FETCH_NONE;
     bool request_descendants = false;
     if (response_id.isNull()) // Failure
     {
@@ -608,10 +656,12 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
 
             // set folder's version to prevent viewer from trying to request folder indefinetely
             LLViewerInventoryCategory* cat(gInventory.getCategory(request_id));
-            if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+            if (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
             {
                 cat->setVersion(0);
             }
+            // back off for a bit in case something tries to force-request immediately
+            new_state = LLViewerInventoryCategory::FETCH_FAILED;
         }
     }
     else
@@ -664,7 +714,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
     LLViewerInventoryCategory * cat(gInventory.getCategory(request_id));
     if (cat)
     {
-        cat->setFetching(LLViewerInventoryCategory::FETCH_NONE);
+        cat->setFetching(new_state);
     }
 }
 
@@ -753,7 +803,26 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
     
     if (isFolderFetchProcessingComplete() && mFolderFetchActive)
     {
-        setAllFoldersFetched();
+        if (!mRecursiveInventoryFetchStarted || mRecursiveMarketplaceFetchStarted)
+        {
+            setAllFoldersFetched();
+        }
+        else
+        {
+            // Intent is for marketplace request to happen after
+            // main inventory is done, unless requested by floater
+            mRecursiveMarketplaceFetchStarted = true;
+            const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+            if (marketplacelistings_id.notNull())
+            {
+                mFetchFolderQueue.push_front(FetchQueueInfo(marketplacelistings_id, FT_FOLDER_AND_CONTENT));
+            }
+            else
+            {
+                setAllFoldersFetched();
+            }
+        }
+        
     }
 
     if (isBulkFetchProcessingComplete())
@@ -813,22 +882,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
 
                         if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
                         {
-                            // special case
-                            content_done = false;
-                            if (children.empty())
-                            {
-                                // fetch marketplace alone
-                                // Should it actually be fetched as FT_FOLDER_AND_CONTENT?
-                                children.push_back(child_cat->getUUID());
-                                mExpectedFolderIds.push_back(child_cat->getUUID());
-                                child_cat->setFetching(target_state);
-                                break;
-                            }
-                            else
-                            {
-                                // fetch marketplace alone next run
-                                continue;
-                            }
+                            // special case, marketplace will fetch that as needed
+                            continue;
                         }
 
                         children.push_back(child_cat->getUUID());
@@ -902,10 +957,10 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
                         mExpectedFolderIds.push_back(cat_id);
 
                         EFetchType type = fetch_info.mFetchType;
-                        LLUUID cat_id = cat->getUUID();
-                        AISAPI::completion_t cb = [cat_id , type](const LLUUID& response_id)
+                        LLUUID cat_cb_id = cat_id;
+                        AISAPI::completion_t cb = [cat_cb_id, type](const LLUUID& response_id)
                         {
-                            LLInventoryModelBackgroundFetch::instance().onAISFolderCalback(cat_id , response_id , type);
+                            LLInventoryModelBackgroundFetch::instance().onAISFolderCalback(cat_cb_id, response_id , type);
                         };
 
                         AISAPI::ITEM_TYPE item_type = AISAPI::INVENTORY;
@@ -964,6 +1019,11 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
             AISAPI::FetchItem(fetch_info.mUUID, AISAPI::INVENTORY, ais_simple_item_callback);
         }
     }
+
+    if (fetch_info.mFetchType == FT_FORCED)
+    {
+        mForceFetchSet.erase(fetch_info.mUUID);
+    }
 }
 
 // Bundle up a bunch of requests to send all at once.
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index a712fc760407690de2d12663ab17d3102d64b20f..989968be53466aa3087a1a251172a7618e8f7985 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -76,7 +76,6 @@ class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackg
     void incrFetchFolderCount(S32 fetching);
 
 	bool isBulkFetchProcessingComplete() const;
-    bool isFolderFetchProcessingComplete() const;
 	void setAllFoldersFetched();
 
     typedef boost::function<void()> folders_fetched_callback_t;
@@ -86,6 +85,7 @@ class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackg
 	void addRequestAtBack(const LLUUID & id, bool recursive, bool is_category);
 
 protected:
+    bool isFolderFetchProcessingComplete() const;
 
     typedef enum {
         FT_DEFAULT = 0,
@@ -122,6 +122,7 @@ class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackg
 private:
  	bool mRecursiveInventoryFetchStarted;
 	bool mRecursiveLibraryFetchStarted;
+    bool mRecursiveMarketplaceFetchStarted; // AIS3 specific
 	bool mAllRecursiveFoldersFetched;
     typedef boost::signals2::signal<void()> folders_fetched_signal_t;
     folders_fetched_signal_t mFoldersFetchedSignal;
@@ -136,6 +137,7 @@ class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackg
 	F32 mMinTimeBetweenFetches;
 	fetch_queue_t mFetchFolderQueue;
     fetch_queue_t mFetchItemQueue;
+    uuid_set_t mForceFetchSet;
     std::list<LLUUID> mExpectedFolderIds; // for debug, should this track time?
 };
 
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index fe067b621a678bf95998f973653fca65b0e45e8b..15cd7957a2e9a23cabb3f51c64069d5681582c25 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -356,7 +356,6 @@ void LLInventoryFetchItemsObserver::startFetch()
                 {
                     // Start fetching whole folder since we need all items
                     LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
-
                 }
                 else
                 {
@@ -566,8 +565,12 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask)
 	for (uuid_set_t::iterator it = added.begin(); it != added.end(); ++it)
 	{
 		LLInventoryItem *item = gInventory.getItem(*it);
+        if (!item)
+        {
+            continue;
+        }
 		const LLUUID& asset_uuid = item->getAssetUUID();
-		if (item && item->getUUID().notNull() && asset_uuid.notNull())
+		if (item->getUUID().notNull() && asset_uuid.notNull())
 		{
 			if (isAssetWatched(asset_uuid))
 			{
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 154d8e2e18144059fe97a90742aeeeee35502be0..ab04a8589a2b6af7402b3249e373240b1151f24c 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1887,46 +1887,52 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
 }
 
 //static
-void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL use_main_panel, BOOL take_keyboard_focus, BOOL reset_filter)
+void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id,
+	bool use_main_panel, bool take_keyboard_focus, bool reset_filter)
 {
 	LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
 	sidepanel_inventory->showInventoryPanel();
 
-	bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX)));
-
-	if (!in_inbox && (use_main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected()))
+	LLUUID cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
+	bool in_inbox = gInventory.isObjectDescendentOf(obj_id, cat_id);
+	if (!in_inbox && use_main_panel)
 	{
 		sidepanel_inventory->selectAllItemsPanel();
 	}
 
-    LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
-    if(!auto_open && inventory_floater && inventory_floater->getVisible())
+    if (!auto_open)
     {
-        LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
-        LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
-        if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+        LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater();
+        if (inventory_floater && inventory_floater->getVisible())
         {
-            LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL;
-            main_panel->setGallerySelection(obj_id);
-            return;
+            LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
+            LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
+            if (main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+            {
+                LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL;
+                main_panel->setGallerySelection(obj_id);
+                return;
+            }
         }
     }
 
-    LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
-    if (main_inventory && main_inventory->isSingleFolderMode()
-        && use_main_panel)
+    if (use_main_panel)
     {
-        const LLInventoryObject *obj = gInventory.getObject(obj_id);
-        if (obj)
+        LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+        if (main_inventory && main_inventory->isSingleFolderMode())
         {
-            LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL;
-            main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
-            main_inventory->setGallerySelection(obj_id);
-            return;
+            const LLInventoryObject *obj = gInventory.getObject(obj_id);
+            if (obj)
+            {
+                LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL;
+                main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false);
+                main_inventory->setGallerySelection(obj_id);
+                return;
+            }
         }
     }
-	LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
 
+	LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
 	if (active_panel)
 	{
 		LL_DEBUGS("Messaging", "Inventory") << "Highlighting" << obj_id  << LL_ENDL;
@@ -1938,11 +1944,8 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
 
 		if (in_inbox)
 		{
-			
-			LLInventoryPanel * inventory_panel = NULL;
 			sidepanel_inventory->openInbox();
-			inventory_panel = sidepanel_inventory->getInboxPanel();
-
+			LLInventoryPanel* inventory_panel = sidepanel_inventory->getInboxPanel();
 			if (inventory_panel)
 			{
 				inventory_panel->setSelection(obj_id, take_keyboard_focus);
@@ -1967,7 +1970,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
 
 void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id)
 {
-
     LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
     for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
     {
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index b68433bab01e283752e36837334c07d3f7b2807f..97300596f93b7715e1e30dab0d19b6a9d422dc16 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -244,12 +244,12 @@ class LLInventoryPanel : public LLPanel
 	// "Auto_open" determines if we open an inventory panel if none are open.
 	static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
 
-	static void openInventoryPanelAndSetSelection(BOOL auto_open,
+	static void openInventoryPanelAndSetSelection(bool auto_open,
 													const LLUUID& obj_id,
-													BOOL use_main_panel = FALSE,
-													BOOL take_keyboard_focus = TAKE_FOCUS_YES,
-													BOOL reset_filter = FALSE);
-    static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
+													bool use_main_panel = false,
+													bool take_keyboard_focus = true,
+													bool reset_filter = false);
+	static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
 	void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
 	void removeItemID(const LLUUID& id);
 	LLFolderViewItem* getItemByID(const LLUUID& id);
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 5a5fb7474cb32affd24460ca12294dd6a87572a0..1e42773777747d34be22c94bf3a85816064461ff 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -1081,6 +1081,13 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename)
 	LLImageDimensionsInfo image_info;
 	if (!image_info.load(filename,codec))
 	{
+        LLSD args;
+        args["NAME"] = gDirUtilp->getBaseFileName(filename);
+        if (!image_info.getWarningName().empty())
+        {
+            args["REASON"] = LLTrans::getString(image_info.getWarningName());
+        }
+        LLNotificationsUtil::add("CannotUploadTexture", args);
 		return false;
 	}
 
@@ -1096,6 +1103,7 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename)
 
 		LLSD notif_args;
 		notif_args["REASON"] = mImageLoadError;
+        notif_args["NAME"] = gDirUtilp->getBaseFileName(filename);
 		LLNotificationsUtil::add("CannotUploadTexture", notif_args);
 
 		return false;
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 052ac50185369096d2b211a224054368bef210ef..55a947a09d42b7b6d88e65d42d335fb2bb62ed00 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -42,7 +42,6 @@
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/regex.hpp>
-#include <boost/foreach.hpp>
 
 #if LL_MSVC
 #pragma warning(push)  
@@ -709,7 +708,7 @@ bool LLLogChat::moveTranscripts(const std::string originDirectory,
 	std::string backupFileName;
 	unsigned backupFileCount;
 
-	BOOST_FOREACH(const std::string& fullpath, listOfFilesToMove)
+	for (const std::string& fullpath : listOfFilesToMove)
 	{
 		backupFileCount = 0;
 		newFullPath = targetDirectory + fullpath.substr(originDirectory.length(), std::string::npos);
@@ -723,7 +722,7 @@ bool LLLogChat::moveTranscripts(const std::string originDirectory,
 			while(LLFile::isfile(backupFileName))
 			{
 				++backupFileCount;
-				backupFileName = newFullPath + ".backup" + boost::lexical_cast<std::string>(backupFileCount);
+				backupFileName = newFullPath + ".backup" + std::to_string(backupFileCount);
 			}
 
 			//Rename the file to its backup name so it is not overwritten
@@ -780,7 +779,7 @@ void LLLogChat::deleteTranscripts()
 	getListOfTranscriptFiles(list_of_transcriptions);
 	getListOfTranscriptBackupFiles(list_of_transcriptions);
 
-	BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions)
+	for (const std::string& fullpath : list_of_transcriptions)
 	{
 		S32 retry_count = 0;
 		while (retry_count < 5)
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 2e9aab7c00c5fe9d16f9578a23f0427220a7b1ff..74d6890d1d856c3aaa682e2730dc6db4093f01b5 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -90,7 +90,7 @@ class LLLoginInstance : public LLSingleton<LLLoginInstance>
 
 	void attemptComplete() { mAttemptComplete = true; } // In the future an event?
 
-	boost::scoped_ptr<LLLogin> mLoginModule;
+	std::unique_ptr<LLLogin> mLoginModule;
 	LLNotificationsInterface* mNotifications;
 
 	std::string mLoginState;
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index 583742f970b4303d122272fad6bd8dfa74352ce1..1f4418f119855a02d8cd2a8f65702fae85c39d6b 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -85,11 +85,11 @@ void LLWMIMethods::initCOMObjects()
     // Step 1: --------------------------------------------------
     // Initialize COM. ------------------------------------------
 
-    mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
+    mHR = CoInitializeEx(0, COINIT_APARTMENTTHREADED);
     if (FAILED(mHR))
     {
+        // if result S_FALSE, it's already initialized
         LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << std::hex << mHR << LL_ENDL;
-        return;
     }
 
     // Step 2: --------------------------------------------------
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 8784f403cbe07b3b232adb50447188b639cf98ca..d27ee941a6dc8eb56ae74609f1fe92465dcb9ce2 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -611,27 +611,17 @@ class LLMarketplaceInventoryObserver : public LLInventoryObserver
     static void onIdleProcessQueue(void *userdata);
 
     // doesn't hold just marketplace related ids
-    static std::set<LLUUID> sAddQueue;
     static std::set<LLUUID> sStructureQueue;
     static bool sProcessingQueue;
 };
 
-std::set<LLUUID> LLMarketplaceInventoryObserver::sAddQueue;
 std::set<LLUUID> LLMarketplaceInventoryObserver::sStructureQueue;
 bool LLMarketplaceInventoryObserver::sProcessingQueue = false;
 
 void LLMarketplaceInventoryObserver::changed(U32 mask)
 {
-	if (mask & LLInventoryObserver::ADD && LLMarketplaceData::instance().hasValidationWaiting())
-	{
-        // When things are added to the marketplace, we might need to re-validate and fix the containing listings
-        // just add whole list even if it contains items and non-marketplace folders
-        const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
-        sAddQueue.insert(changed_items.begin(), changed_items.end());
-	}
-    
-	if (mask & (LLInventoryObserver::INTERNAL | LLInventoryObserver::STRUCTURE))
-	{
+    if (mask & (LLInventoryObserver::INTERNAL | LLInventoryObserver::STRUCTURE))
+    {
         // When things are changed in the inventory, this can trigger a host of changes in the marketplace listings folder:
         // * stock counts changing : no copy items coming in and out will change the stock count on folders
         // * version and listing folders : moving those might invalidate the marketplace data itself
@@ -641,7 +631,7 @@ void LLMarketplaceInventoryObserver::changed(U32 mask)
         sStructureQueue.insert(changed_items.begin(), changed_items.end());
 	}
 
-    if (!sProcessingQueue && (!sAddQueue.empty() || !sStructureQueue.empty()))
+    if (!sProcessingQueue && !sStructureQueue.empty())
     {
         gIdleCallbacks.addFunction(onIdleProcessQueue, NULL);
         // can do without sProcessingQueue, but it's usufull for simplicity and reliability
@@ -655,40 +645,6 @@ void LLMarketplaceInventoryObserver::onIdleProcessQueue(void *userdata)
     const U64 MAX_PROCESSING_TIME = 1000;
     U64 stop_time = start_time + MAX_PROCESSING_TIME;
 
-    if (!sAddQueue.empty())
-    {
-        // Make a copy of sAddQueue since decrementValidationWaiting
-        // can theoretically add more items
-        std::set<LLUUID> add_queue(sAddQueue);
-        sAddQueue.clear();
-
-        std::set<LLUUID>::const_iterator id_it = add_queue.begin();
-        std::set<LLUUID>::const_iterator id_end = add_queue.end();
-        // First, count the number of items in this list...
-        S32 count = 0;
-        for (; id_it != id_end; ++id_it)
-        {
-            LLInventoryObject* obj = gInventory.getObject(*id_it);
-            if (obj && (LLAssetType::AT_CATEGORY != obj->getType()))
-            {
-                count++;
-            }
-        }
-        // Then, decrement the folders of that amount
-        // Note that of all of those, only one folder will be a listing folder (if at all).
-        // The other will be ignored by the decrement method.
-        id_it = add_queue.begin();
-        for (; id_it != id_end; ++id_it)
-        {
-            LLInventoryObject* obj = gInventory.getObject(*id_it);
-            if (obj && (LLAssetType::AT_CATEGORY == obj->getType()))
-            {
-                // can trigger notifyObservers
-                LLMarketplaceData::instance().decrementValidationWaiting(obj->getUUID(), count);
-            }
-        }
-    }
-
     while (!sStructureQueue.empty() && LLTimer::getTotalTime() < stop_time)
     {
         std::set<LLUUID>::const_iterator id_it = sStructureQueue.begin();
@@ -722,7 +678,7 @@ void LLMarketplaceInventoryObserver::onIdleProcessQueue(void *userdata)
         sStructureQueue.erase(id_it);
     }
 
-    if (LLApp::isExiting() || (sAddQueue.empty() && sStructureQueue.empty()))
+    if (LLApp::isExiting() || sStructureQueue.empty())
     {
         // Nothing to do anymore
         gIdleCallbacks.deleteFunction(onIdleProcessQueue, NULL);
diff --git a/indra/newview/llmarketplacenotifications.cpp b/indra/newview/llmarketplacenotifications.cpp
index 0886f9a99046605cef305496c0fc97c57ec072f9..02bd9e1f342372e480e74b078cf2381ae6545f29 100644
--- a/indra/newview/llmarketplacenotifications.cpp
+++ b/indra/newview/llmarketplacenotifications.cpp
@@ -33,7 +33,6 @@
 
 #include "llerror.h"
 
-#include <boost/foreach.hpp>
 #include <boost/signals2.hpp>
 
 
@@ -54,7 +53,7 @@ namespace LLMarketplaceInventoryNotifications
 			llassert(!no_copy_payloads.empty());
 			llassert(no_copy_cb_action != NULL);
 			
-			BOOST_FOREACH(const LLSD& payload, no_copy_payloads)
+			for (const LLSD& payload : no_copy_payloads)
 			{
 				(*no_copy_cb_action)(payload);
 			}
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 1f5974c74dd6801b6d506740d3393dc2b4251bc4..b7828db3a9b05ee33ca6ae6489563303d963155a 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -43,6 +43,7 @@
 #include "llnotificationsutil.h"
 #include "lltexturectrl.h"
 #include "lltrans.h"
+#include "llviewercontrol.h"
 #include "llviewermenufile.h"
 #include "llviewertexture.h"
 #include "llsdutil.h"
@@ -448,6 +449,8 @@ BOOL LLMaterialEditor::postBuild()
     mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY));
     mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_NORMAL_TEX_DIRTY));
 
+    mNormalTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
+
     if (mIsOverride)
     {
         // Live editing needs a recovery mechanism on cancel
@@ -1376,10 +1379,23 @@ bool LLMaterialEditor::saveIfNeeded()
         LLPermissions local_permissions;
         local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
 
-        U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
-        U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
-        U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
-        local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
+        if (mIsOverride)
+        {
+            // Shouldn't happen, but just in case it ever changes
+            U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
+            U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
+            U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
+            local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
+
+        }
+        else
+        {
+            // Uploads are supposed to use Upload permissions, not material permissions
+            U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Uploads");
+            U32 group_perm = LLFloaterPerms::getGroupPerms("Uploads");
+            U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads");
+            local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
+        }
 
         std::string res_desc = buildMaterialDescription();
         createInventoryItem(buffer, mMaterialName, res_desc, local_permissions);
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index 3b59b2f05e9559639da812c167c4492fba38bfef..577ab0048f011b31d390588b6ac46ed263dd0a32 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -68,7 +68,7 @@ class LLMaterialHttpHandler : public LLHttpSDHandler
 {
 public: 
 	typedef boost::function<void(bool, const LLSD&)> CallbackFunction;
-	typedef boost::shared_ptr<LLMaterialHttpHandler> ptr_t;
+	typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t;
 
 	LLMaterialHttpHandler(const std::string& method, CallbackFunction cback);
 
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index 58f8bad3e444cf931fc35ef5b31eadd4a686e170..8cd47931061ada60987be58c4b31f204c6104d8e 100644
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -116,10 +116,10 @@ class LLMediaDataClient : public LLRefCount
     
 	// Request (pure virtual base class for requests in the queue)
     class Request: 
-        public boost::enable_shared_from_this<Request>
+        public std::enable_shared_from_this<Request>
     {
     public:
-        typedef boost::shared_ptr<Request> ptr_t;
+        typedef std::shared_ptr<Request> ptr_t;
 
         // Subclasses must implement this to build a payload for their request type.
         virtual LLSD getPayload() const = 0;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 01d6469010c6daee1fe821a957233cbfd1d7a092..a5601dafbeceff4fcd9bdfe4b68fe28354a4449b 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -411,7 +411,7 @@ namespace {
 static S32 dump_num = 0;
 std::string make_dump_name(std::string prefix, S32 num)
 {
-	return prefix + boost::lexical_cast<std::string>(num) + std::string(".xml");
+	return prefix + std::to_string(num) + std::string(".xml");
 }
 void dump_llsd_to_file(const LLSD& content, std::string filename);
 LLSD llsd_from_file(std::string filename);
@@ -572,10 +572,10 @@ S32 LLMeshRepoThread::sRequestWaterLevel = 0;
 //   LLMeshUploadThread
 
 class LLMeshHandlerBase : public LLCore::HttpHandler,
-    public boost::enable_shared_from_this<LLMeshHandlerBase>
+    public std::enable_shared_from_this<LLMeshHandlerBase>
 {
 public:
-    typedef boost::shared_ptr<LLMeshHandlerBase> ptr_t;
+    typedef std::shared_ptr<LLMeshHandlerBase> ptr_t;
 
 	LOG_CLASS(LLMeshHandlerBase);
 	LLMeshHandlerBase(U32 offset, U32 requested_bytes)
@@ -1360,7 +1360,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
 				U8* buffer = new(std::nothrow) U8[size];
 				if (!buffer)
 				{
-					LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
+					LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
 					return false;
 				}
 				LLMeshRepository::sCacheBytesRead += size;
@@ -1473,7 +1473,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
 				U8* buffer = new(std::nothrow) U8[size];
 				if (!buffer)
 				{
-					LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
+					LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
 					return false;
 				}
 				LLMeshRepository::sCacheBytesRead += size;
@@ -1575,7 +1575,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
 				U8* buffer = new(std::nothrow) U8[size];
 				if (!buffer)
 				{
-					LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
+					LL_WARNS(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
 					return false;
 				}
 				file.read(buffer, size);
@@ -1770,7 +1770,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
 				U8* buffer = new(std::nothrow) U8[size];
 				if (!buffer)
 				{
-					LL_WARNS_ONCE(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
+					LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
 					// todo: for now it will result in indefinite constant retries, should result in timeout
 					// or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
 					return false;
@@ -5503,7 +5503,7 @@ void on_new_single_inventory_upload_complete(
         }
         else
         {
-            LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE);
+            LLInventoryPanel::openInventoryPanelAndSetSelection(true, server_response["new_inventory_item"].asUUID(), true, false, true);
         }
 
         // restore keyboard focus
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index ccae1030f11f8715705a6f79509a6b7d10c09db2..a3eab3c26da90fe2aa0a2f192dc3c21e98812bc5 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -220,6 +220,16 @@ LLModelPreview::~LLModelPreview()
         mPreviewAvatar->markDead();
         mPreviewAvatar = NULL;
     }
+
+    mUploadData.clear();
+    mTextureSet.clear();
+
+    for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+    {
+        clearModel(i);
+    }
+    mBaseModel.clear();
+    mBaseScene.clear();
 }
 
 void LLModelPreview::updateDimentionsAndOffsets()
@@ -249,7 +259,7 @@ void LLModelPreview::updateDimentionsAndOffsets()
         {
             accounted.insert(instance.mModel);
 
-            //update instance skin info for each lods pelvisZoffset 
+            // update instance skin info for each lods pelvisZoffset
             for (int j = 0; j<LLModel::NUM_LODS; ++j)
             {
                 if (instance.mLOD[j])
@@ -271,6 +281,7 @@ void LLModelPreview::rebuildUploadData()
 {
     assert_main_thread();
 
+    mDefaultPhysicsShapeP = NULL;
     mUploadData.clear();
     mTextureSet.clear();
 
@@ -310,7 +321,7 @@ void LLModelPreview::rebuildUploadData()
         mat *= scale_mat;
 
         for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end();)
-        { //for each instance with said transform applied 
+        { // for each instance with said transform applied
             LLModelInstance instance = *model_iter++;
 
             LLModel* base_model = instance.mModel;
@@ -573,7 +584,7 @@ void LLModelPreview::rebuildUploadData()
     else if (getLoadState() == LLModelLoader::ERROR_MATERIALS
              || getLoadState() == LLModelLoader::WARNING_BIND_SHAPE_ORIENTATION)
     {
-        // This is only valid for these two error types because they are 
+        // This is only valid for these two error types because they are
         // only used inside rebuildUploadData() and updateStatusMessages()
         // updateStatusMessages() is called after rebuildUploadData()
         setLoadState(LLModelLoader::DONE);
@@ -798,7 +809,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
         // it tends to force the UI into strange checkbox options
         // which cannot be altered.
 
-        //only try to load from slm if viewer is configured to do so and this is the 
+        //only try to load from slm if viewer is configured to do so and this is the
         //initial model load (not an LoD or physics shape)
         mModelLoader->mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mUploadData.empty();
     }
@@ -884,12 +895,13 @@ void LLModelPreview::clearIncompatible(S32 lod)
 
         // Check if already started
         bool subscribe_for_generation = mLodsQuery.empty();
-        
+
         // Remove previously scheduled work
         mLodsQuery.clear();
 
         LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
-        if (!fmp) return;
+        if (!fmp)
+            return;
 
         // Schedule new work
         for (S32 i = LLModel::LOD_HIGH; i >= 0; --i)
@@ -1719,7 +1731,7 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
 
     ll_aligned_free_16(output_indices);
     ll_aligned_free_16(shadow_indices);
-     
+
     if (size_new_indices < 3)
     {
         // At least one triangle is needed
@@ -1912,7 +1924,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
                 {
                     precise_ratio = genMeshOptimizerPerModel(base, target_model, indices_decimator, lod_error_threshold, MESH_OPTIMIZER_NO_UVS);
                 }
-                
+
                 if (precise_ratio < 0 || (precise_ratio * allowed_ratio_drift < indices_decimator))
                 {
                     // Try sloppy variant if normal one failed to simplify model enough.
diff --git a/indra/newview/llmodelpreview.h b/indra/newview/llmodelpreview.h
index df7320768cfb1a07407a73f72bce7d19b056af0d..d4d5d087bd3bd1c9cec6007aff8f2cdaa7f9e5d9 100644
--- a/indra/newview/llmodelpreview.h
+++ b/indra/newview/llmodelpreview.h
@@ -310,7 +310,6 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
     vv_LLVolumeFace_t mBaseModelFacesCopy;
 
     U32 mGroup;
-    std::map<LLPointer<LLModel>, U32> mObject;
 
     // Amount of triangles in original(base) model
     U32 mMaxTriangleLimit;
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index b06131cf38e535c90389222f61e416b52c45e0f0..3f6a86106a077f5dbd6ff174d4e206216b467132 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -34,9 +34,6 @@
 #include "llfloaterimnearbychathandler.h"
 #include "llnotifications.h"
 
-#include <boost/bind.hpp>
-#include <boost/foreach.hpp>
-
 using namespace LLNotificationsUI;
 
 //--------------------------------------------------------------------------
@@ -53,15 +50,15 @@ LLNotificationManager::~LLNotificationManager()
 //--------------------------------------------------------------------------
 void LLNotificationManager::init()
 {
-	mChannels.push_back(new LLScriptHandler());
-	mChannels.push_back(new LLTipHandler());
-	mChannels.push_back(new LLGroupHandler());
-	mChannels.push_back(new LLAlertHandler("Alerts", "alert", false));
-	mChannels.push_back(new LLAlertHandler("AlertModal", "alertmodal", true));
-	mChannels.push_back(new LLOfferHandler());
-	mChannels.push_back(new LLHintHandler());
-	mChannels.push_back(new LLBrowserNotification());
-	mChannels.push_back(new LLIMHandler());
+	mChannels.emplace_back(new LLScriptHandler());
+	mChannels.emplace_back(new LLTipHandler());
+	mChannels.emplace_back(new LLGroupHandler());
+	mChannels.emplace_back(new LLAlertHandler("Alerts", "alert", false));
+	mChannels.emplace_back(new LLAlertHandler("AlertModal", "alertmodal", true));
+	mChannels.emplace_back(new LLOfferHandler());
+	mChannels.emplace_back(new LLHintHandler());
+	mChannels.emplace_back(new LLBrowserNotification());
+	mChannels.emplace_back(new LLIMHandler());
   
 	mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
 }
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index de988555c5d80775bc3d73520a67e70c920b471f..efffcefc4a741edafdbe2d725b7b4d37349be93e 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -28,8 +28,6 @@
 #include "llviewerprecompiledheaders.h" // must be first include
 #include "lloutfitgallery.h"
 
-#include <boost/foreach.hpp>
-
 // llcommon
 #include "llcommonutils.h"
 #include "llfilesystem.h"
@@ -433,8 +431,7 @@ bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2)
 }
 
 void LLOutfitGallery::reArrangeRows(S32 row_diff)
-{
- 
+{ 
     std::vector<LLOutfitGalleryItem*> buf_items = mItems;
     for (std::vector<LLOutfitGalleryItem*>::const_reverse_iterator it = buf_items.rbegin(); it != buf_items.rend(); ++it)
     {
@@ -446,16 +443,24 @@ void LLOutfitGallery::reArrangeRows(S32 row_diff)
     }
     mHiddenItems.clear();
     
-    mItemsInRow+= row_diff;
+    mItemsInRow += row_diff;
     updateGalleryWidth();
     std::sort(buf_items.begin(), buf_items.end(), compareGalleryItem);
-    
+
+    std::string cur_filter = getFilterSubString();
+    LLStringUtil::toUpper(cur_filter);
+
     for (std::vector<LLOutfitGalleryItem*>::const_iterator it = buf_items.begin(); it != buf_items.end(); ++it)
     {
-    	(*it)->setHidden(false);
-    	applyFilter(*it,sFilterSubString);
+        std::string outfit_name = (*it)->getItemName();
+        LLStringUtil::toUpper(outfit_name);
+
+        bool hidden = (std::string::npos == outfit_name.find(cur_filter));
+        (*it)->setHidden(hidden);
+
     	addToGallery(*it);
     }
+
     updateMessageVisibility();
 }
 
@@ -725,9 +730,9 @@ LLOutfitGallery::~LLOutfitGallery()
     }
 }
 
-void LLOutfitGallery::setFilterSubString(const std::string& string)
+// virtual
+void LLOutfitGallery::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
 {
-    sFilterSubString = string;
     reArrangeRows();
 }
 
@@ -743,20 +748,6 @@ void LLOutfitGallery::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id)
     }
 }
 
-void LLOutfitGallery::applyFilter(LLOutfitGalleryItem* item, const std::string& filter_substring)
-{
-    if (!item) return;
-
-    std::string outfit_name = item->getItemName();
-    LLStringUtil::toUpper(outfit_name);
-
-    std::string cur_filter = filter_substring;
-    LLStringUtil::toUpper(cur_filter);
-
-    bool hidden = (std::string::npos == outfit_name.find(cur_filter));
-    item->setHidden(hidden);
-}
-
 void LLOutfitGallery::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
 {
 }
@@ -904,11 +895,11 @@ bool LLOutfitGallery::hasDefaultImage(const LLUUID& outfit_cat_id)
 
 void LLOutfitGallery::updateMessageVisibility()
 {
-    if(mItems.empty())
+    if (mItems.empty())
     {
         mMessageTextBox->setVisible(TRUE);
         mScrollPanel->setVisible(FALSE);
-        std::string message = sFilterSubString.empty()? getString("no_outfits_msg") : getString("no_matched_outfits_msg");
+        std::string message = getString(getFilterSubString().empty() ? "no_outfits_msg" : "no_matched_outfits_msg");
         mMessageTextBox->setValue(message);
     }
     else
@@ -1101,8 +1092,11 @@ bool LLOutfitGalleryItem::openOutfitsContent()
             {
                 outfit_list->setSelectedOutfitByUUID(mUUID);
                 LLAccordionCtrlTab* tab = accordion->getSelectedTab();
-                tab->showAndFocusHeader();
-                return true;
+                if (tab)
+                {
+                    tab->showAndFocusHeader();
+                    return true;
+                }
             }
         }
     }
@@ -1155,22 +1149,13 @@ LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
     registrar.add("Outfit.Delete", boost::bind(LLOutfitGallery::onRemoveOutfit, selected_id));
     registrar.add("Outfit.Create", boost::bind(&LLOutfitGalleryContextMenu::onCreate, this, _2));
     registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitGalleryContextMenu::onThumbnail, this, selected_id));
+    registrar.add("Outfit.Save", boost::bind(&LLOutfitGalleryContextMenu::onSave, this, selected_id));
     enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitGalleryContextMenu::onEnable, this, _2));
     enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitGalleryContextMenu::onVisible, this, _2));
     
     return createFromFile("menu_gallery_outfit_tab.xml");
 }
 
-void LLOutfitGalleryContextMenu::onThumbnail(const LLUUID& outfit_cat_id)
-{
-    LLOutfitGallery* gallery = dynamic_cast<LLOutfitGallery*>(mOutfitList);
-    if (gallery && outfit_cat_id.notNull())
-    {
-        LLSD data(outfit_cat_id);
-        LLFloaterReg::showInstance("change_item_thumbnail", data);
-    }
-}
-
 void LLOutfitGalleryContextMenu::onCreate(const LLSD& data)
 {
     LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
@@ -1205,7 +1190,6 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
     mMenu->setItemVisible("expand", FALSE);
     mMenu->setItemVisible("collapse", FALSE);
     mMenu->setItemVisible("thumbnail", have_selection);
-    mMenu->setItemVisible("sepatator3", TRUE);
     mMenu->setItemVisible("sort_folders_by_name", TRUE);
     LLOutfitListGearMenuBase::onUpdateItemsVisibility();
 }
@@ -1253,7 +1237,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
                 sub_cat_array,
                 outfit_item_array,
                 LLInventoryModel::EXCLUDE_TRASH);
-            BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+            for (LLViewerInventoryItem* outfit_item : outfit_item_array)
             {
                 LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
                 LLUUID asset_id, inv_id;
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 9915752962e93e5858d5e8c59edfffe4f4ba1295..99371b1cec25a8715e32851b3804752f670c94ea 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -90,7 +90,7 @@ class LLOutfitGallery : public LLOutfitListBase
     void wearSelectedOutfit();
 
 
-    /*virtual*/ void setFilterSubString(const std::string& string);
+    /*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
 
     /*virtual*/ void getCurrentCategories(uuid_vec_t& vcur);
     /*virtual*/ void updateAddedCategory(LLUUID cat_id);
@@ -117,8 +117,6 @@ class LLOutfitGallery : public LLOutfitListBase
     /*virtual*/ void onExpandAllFolders() {}
     /*virtual*/ LLOutfitListGearMenuBase* createGearMenu();
 
-    void applyFilter(LLOutfitGalleryItem* item, const std::string& filter_substring);
-
 private:
     LLUUID getPhotoAssetId(const LLUUID& outfit_id);
     LLUUID getDefaultPhoto();
@@ -195,17 +193,13 @@ class LLOutfitGalleryContextMenu : public LLOutfitContextMenu
     
     friend class LLOutfitGallery;
     LLOutfitGalleryContextMenu(LLOutfitListBase* outfit_list)
-    : LLOutfitContextMenu(outfit_list),
-    mOutfitList(outfit_list){}
+    : LLOutfitContextMenu(outfit_list){}
 
 protected:
     /* virtual */ LLContextMenu* createMenu();
     bool onEnable(LLSD::String param);
     bool onVisible(LLSD::String param);
-    void onThumbnail(const LLUUID& outfit_cat_id);
     void onCreate(const LLSD& data);
-private:
-    LLOutfitListBase*	mOutfitList;
 };
 
 
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 5c7792b0dfaed15e279e6a51e69d945ff1876e56..1a6c5db5356768ced0dcf5a13207878dae43eb90 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -37,6 +37,7 @@
 #include "llappearancemgr.h"
 #include "llfloaterreg.h"
 #include "llfloatersidepanelcontainer.h"
+#include "llinspecttexture.h"
 #include "llinventoryfunctions.h"
 #include "llinventorymodel.h"
 #include "llmenubutton.h"
@@ -62,7 +63,7 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL
     return (LLStringUtil::compareDict(name1, name2) < 0);
 }
 
-struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLAccordionCtrlTab::Params>
+struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLOutfitAccordionCtrlTab::Params>
 {
 	Mandatory<LLWearableItemsList::Params> wearable_list;
 
@@ -144,7 +145,8 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
     std::string name = cat->getName();
 
     outfit_accordion_tab_params tab_params(get_accordion_tab_params());
-    LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params);
+    tab_params.cat_id = cat_id;
+    LLOutfitAccordionCtrlTab *tab = LLUICtrlFactory::create<LLOutfitAccordionCtrlTab>(tab_params);
     if (!tab) return;
     LLWearableItemsList* wearable_list = LLUICtrlFactory::create<LLWearableItemsList>(tab_params.wearable_list);
     wearable_list->setShape(tab->getLocalRect());
@@ -188,7 +190,7 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
     list->setCommitCallback(boost::bind(&LLOutfitsList::onListSelectionChange, this, _1));
 
     // Setting list refresh callback to apply filter on list change.
-    list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1));
+    list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onRefreshComplete, this, _1));
 
     list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3));
 
@@ -199,19 +201,17 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
     // Further list updates will be triggered by the category observer.
     list->updateList(cat_id);
 
-    // If filter is currently applied we store the initial tab state and
-    // open it to show matched items if any.
-    if (!sFilterSubString.empty())
+    // If filter is currently applied we store the initial tab state.
+    if (!getFilterSubString().empty())
     {
         tab->notifyChildren(LLSD().with("action", "store_state"));
-        tab->setDisplayChildren(true);
 
         // Setting mForceRefresh flag will make the list refresh its contents
         // even if it is not currently visible. This is required to apply the
         // filter to the newly added list.
         list->setForceRefresh(true);
 
-        list->setFilterSubString(sFilterSubString);
+        list->setFilterSubString(getFilterSubString(), false);
     }
 }
 
@@ -313,14 +313,6 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
 	}
 }
 
-// virtual
-void LLOutfitsList::setFilterSubString(const std::string& string)
-{
-	applyFilter(string);
-
-	sFilterSubString = string;
-}
-
 // virtual
 bool LLOutfitListBase::isActionEnabled(const LLSD& userdata)
 {
@@ -494,9 +486,9 @@ void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID
 	}
 }
 
-void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
+void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl)
 {
-	if (!ctrl || sFilterSubString.empty())
+	if (!ctrl || getFilterSubString().empty())
 		return;
 
 	for (outfits_map_t::iterator
@@ -510,57 +502,50 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
 		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
 		if (list != ctrl) continue;
 
-		applyFilterToTab(iter->first, tab, sFilterSubString);
+		applyFilterToTab(iter->first, tab, getFilterSubString());
 	}
 }
 
-void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
+// virtual
+void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
 {
-	mAccordion->setFilterSubString(new_filter_substring);
+	mAccordion->setFilterSubString(new_string);
 
-	for (outfits_map_t::iterator
-			 iter = mOutfitsMap.begin(),
-			 iter_end = mOutfitsMap.end();
-		 iter != iter_end; ++iter)
+	outfits_map_t::iterator iter = mOutfitsMap.begin(), iter_end = mOutfitsMap.end();
+	while (iter != iter_end)
 	{
-		LLAccordionCtrlTab* tab = iter->second;
+		const LLUUID& category_id = iter->first;
+		LLAccordionCtrlTab* tab = iter++->second;
 		if (!tab) continue;
 
-		bool more_restrictive = sFilterSubString.size() < new_filter_substring.size() && !new_filter_substring.substr(0, sFilterSubString.size()).compare(sFilterSubString);
-
-		// Restore tab visibility in case of less restrictive filter
-		// to compare it with updated string if it was previously hidden.
-		if (!more_restrictive)
-		{
-			tab->setVisible(TRUE);
-		}
-
 		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
 		if (list)
 		{
-			list->setFilterSubString(new_filter_substring);
+			list->setFilterSubString(new_string, tab->getDisplayChildren());
 		}
 
-		if(sFilterSubString.empty() && !new_filter_substring.empty())
+		if (old_string.empty())
 		{
-			//store accordion tab state when filter is not empty
-			tab->notifyChildren(LLSD().with("action","store_state"));
+			// Store accordion tab state when filter is not empty
+			tab->notifyChildren(LLSD().with("action", "store_state"));
 		}
 
-		if (!new_filter_substring.empty())
+		if (!new_string.empty())
 		{
-			applyFilterToTab(iter->first, tab, new_filter_substring);
+			applyFilterToTab(category_id, tab, new_string);
 		}
 		else
 		{
-			// restore tab title when filter is empty
+			tab->setVisible(TRUE);
+
+			// Restore tab title when filter is empty
 			tab->setTitle(tab->getTitle());
 
-			//restore accordion state after all those accodrion tab manipulations
-			tab->notifyChildren(LLSD().with("action","restore_state"));
+			// Restore accordion state after all those accodrion tab manipulations
+			tab->notifyChildren(LLSD().with("action", "restore_state"));
 
 			// Try restoring the tab selection.
-			restoreOutfitSelection(tab, iter->first);
+			restoreOutfitSelection(tab, category_id);
 		}
 	}
 
@@ -586,11 +571,11 @@ void LLOutfitsList::applyFilterToTab(
 
 	if (std::string::npos == title.find(cur_filter))
 	{
-		// hide tab if its title doesn't pass filter
-		// and it has no visible items
+		// Hide tab if its title doesn't pass filter
+		// and it has no matched items
 		tab->setVisible(list->hasMatchedItems());
 
-		// remove title highlighting because it might
+		// Remove title highlighting because it might
 		// have been previously highlighted by less restrictive filter
 		tab->setTitle(tab->getTitle());
 
@@ -602,18 +587,6 @@ void LLOutfitsList::applyFilterToTab(
 		// Try restoring the tab selection.
 		restoreOutfitSelection(tab, category_id);
 	}
-
-	if (tab->getVisible())
-	{
-		// Open tab if it has passed the filter.
-		tab->setDisplayChildren(true);
-	}
-	else
-	{
-		// Set force refresh flag to refresh not visible list
-		// when some changes occur in it.
-		list->setForceRefresh(true);
-	}
 }
 
 bool LLOutfitsList::canWearSelected()
@@ -698,11 +671,10 @@ void LLOutfitsList::onCOFChanged()
 	// These links UUIDs are not the same UUIDs that we have in each wearable items list.
 	// So we collect base items' UUIDs to find them or links that point to them in wearable
 	// items lists and update their worn state there.
-	for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
-		iter != item_array.end();
-		++iter)
+	LLInventoryModel::item_array_t::const_iterator array_iter = item_array.begin(), array_end = item_array.end();
+	while (array_iter < array_end)
 	{
-		vnew.push_back((*iter)->getLinkedUUID());
+		vnew.push_back((*(array_iter++))->getLinkedUUID());
 	}
 
 	// We need to update only items that were added or removed from COF.
@@ -711,20 +683,20 @@ void LLOutfitsList::onCOFChanged()
 	// Store the ids of items currently linked from COF.
 	mCOFLinkedItems = vnew;
 
-	for (outfits_map_t::iterator iter = mOutfitsMap.begin();
-			iter != mOutfitsMap.end();
-			++iter)
+	// Append removed ids to added ids because we should update all of them.
+	vadded.reserve(vadded.size() + vremoved.size());
+	vadded.insert(vadded.end(), vremoved.begin(), vremoved.end());
+	vremoved.clear();
+
+	outfits_map_t::iterator map_iter = mOutfitsMap.begin(), map_end = mOutfitsMap.end();
+	while (map_iter != map_end)
 	{
-		LLAccordionCtrlTab* tab = iter->second;
+		LLAccordionCtrlTab* tab = (map_iter++)->second;
 		if (!tab) continue;
 
 		LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
 		if (!list) continue;
 
-		// Append removed ids to added ids because we should update all of them.
-		vadded.reserve(vadded.size() + vremoved.size());
-		vadded.insert(vadded.end(), vremoved.begin(), vremoved.end());
-
 		// Every list updates the labels of changed items  or
 		// the links that point to these items.
 		list->updateChangedItems(vadded);
@@ -835,7 +807,6 @@ void LLOutfitListBase::onOpen(const LLSD& info)
         // arrive.
         category->fetch();
         refreshList(outfits);
-        highlightBaseOutfit();
 
         mIsInitialized = true;
     }
@@ -843,6 +814,9 @@ void LLOutfitListBase::onOpen(const LLSD& info)
 
 void LLOutfitListBase::refreshList(const LLUUID& category_id)
 {
+    bool wasNull = mRefreshListState.CategoryUUID.isNull();
+    mRefreshListState.CategoryUUID.setNull();
+
     LLInventoryModel::cat_array_t cat_array;
     LLInventoryModel::item_array_t item_array;
 
@@ -855,27 +829,81 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
         LLInventoryModel::EXCLUDE_TRASH,
         is_category);
 
-    uuid_vec_t vadded;
-    uuid_vec_t vremoved;
+    // Memorize item names for each UUID
+    std::map<LLUUID, std::string> names;
+    for (const LLPointer<LLViewerInventoryCategory>& cat : cat_array)
+    {
+        names.emplace(std::make_pair(cat->getUUID(), cat->getName()));
+    }
+
+    // Fill added and removed items vectors.
+    mRefreshListState.Added.clear();
+    mRefreshListState.Removed.clear();
+    computeDifference(cat_array, mRefreshListState.Added, mRefreshListState.Removed);
+    // Sort added items vector by item name.
+    std::sort(mRefreshListState.Added.begin(), mRefreshListState.Added.end(),
+        [names](const LLUUID& a, const LLUUID& b)
+        {
+            return LLStringUtil::compareDict(names.at(a), names.at(b)) < 0;
+        });
+    // Initialize iterators for added and removed items vectors.
+    mRefreshListState.AddedIterator = mRefreshListState.Added.begin();
+    mRefreshListState.RemovedIterator = mRefreshListState.Removed.begin();
+
+    LL_INFOS() << "added: " << mRefreshListState.Added.size() <<
+        ", removed: " << mRefreshListState.Removed.size() <<
+        ", changed: " << gInventory.getChangedIDs().size() <<
+        LL_ENDL;
+
+    mRefreshListState.CategoryUUID = category_id;
+    if (wasNull)
+    {
+        gIdleCallbacks.addFunction(onIdle, this);
+    }
+}
 
-    // Create added and removed items vectors.
-    computeDifference(cat_array, vadded, vremoved);
+// static
+void LLOutfitListBase::onIdle(void* userdata)
+{
+    LLOutfitListBase* self = (LLOutfitListBase*)userdata;
+
+    self->onIdleRefreshList();
+}
+
+void LLOutfitListBase::onIdleRefreshList()
+{
+    if (mRefreshListState.CategoryUUID.isNull())
+        return;
+
+    const F64 MAX_TIME = 0.05f;
+    F64 curent_time = LLTimer::getTotalSeconds();
+    const F64 end_time = curent_time + MAX_TIME;
 
     // Handle added tabs.
-    for (uuid_vec_t::const_iterator iter = vadded.begin();
-        iter != vadded.end();
-        ++iter)
+    while (mRefreshListState.AddedIterator < mRefreshListState.Added.end())
     {
-        const LLUUID cat_id = (*iter);
+        const LLUUID cat_id = (*mRefreshListState.AddedIterator++);
         updateAddedCategory(cat_id);
+
+        curent_time = LLTimer::getTotalSeconds();
+        if (curent_time >= end_time)
+            return;
     }
+    mRefreshListState.Added.clear();
+    mRefreshListState.AddedIterator = mRefreshListState.Added.end();
 
     // Handle removed tabs.
-    for (uuid_vec_t::const_iterator iter = vremoved.begin(); iter != vremoved.end(); ++iter)
+    while (mRefreshListState.RemovedIterator < mRefreshListState.Removed.end())
     {
-        const LLUUID cat_id = (*iter);
+        const LLUUID cat_id = (*mRefreshListState.RemovedIterator++);
         updateRemovedCategory(cat_id);
+
+        curent_time = LLTimer::getTotalSeconds();
+        if (curent_time >= end_time)
+            return;
     }
+    mRefreshListState.Removed.clear();
+    mRefreshListState.RemovedIterator = mRefreshListState.Removed.end();
 
     // Get changed items from inventory model and update outfit tabs
     // which might have been renamed.
@@ -888,9 +916,9 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
         if (!cat)
         {
             LLInventoryObject* obj = gInventory.getObject(*items_iter);
-            if(!obj || (obj->getType() != LLAssetType::AT_CATEGORY))
+            if (!obj || (obj->getType() != LLAssetType::AT_CATEGORY))
             {
-                return;
+                break;
             }
             cat = (LLViewerInventoryCategory*)obj;
         }
@@ -900,6 +928,12 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
     }
 
     sortOutfits();
+    highlightBaseOutfit();
+
+    gIdleCallbacks.deleteFunction(onIdle, this);
+    mRefreshListState.CategoryUUID.setNull();
+
+    LL_INFOS() << "done" << LL_ENDL;
 }
 
 void LLOutfitListBase::computeDifference(
@@ -936,7 +970,6 @@ void LLOutfitListBase::highlightBaseOutfit()
         mHighlightedOutfitUUID = base_id;
         onHighlightBaseOutfit(base_id, prev_id);
     }
-
 }
 
 void LLOutfitListBase::removeSelected()
@@ -1028,6 +1061,8 @@ LLContextMenu* LLOutfitContextMenu::createMenu()
     registrar.add("Outfit.Edit", boost::bind(editOutfit));
     registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id));
     registrar.add("Outfit.Delete", boost::bind(&LLOutfitListBase::removeSelected, mOutfitList));
+    registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitContextMenu::onThumbnail, this, selected_id));
+    registrar.add("Outfit.Save", boost::bind(&LLOutfitContextMenu::onSave, this, selected_id));
 
     enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2));
     enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2));
@@ -1092,6 +1127,31 @@ void LLOutfitContextMenu::renameOutfit(const LLUUID& outfit_cat_id)
     LLAppearanceMgr::instance().renameOutfit(outfit_cat_id);
 }
 
+void LLOutfitContextMenu::onThumbnail(const LLUUID &outfit_cat_id)
+{
+    if (outfit_cat_id.notNull())
+    {
+        LLSD data(outfit_cat_id);
+        LLFloaterReg::showInstance("change_item_thumbnail", data);
+    }
+}
+
+void LLOutfitContextMenu::onSave(const LLUUID &outfit_cat_id)
+{
+    if (outfit_cat_id.notNull())
+    {
+        LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+            [outfit_cat_id](const LLSD &notif, const LLSD &resp)
+        {
+            S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+            if (opt == 0)
+            {
+                LLAppearanceMgr::getInstance()->onOutfitFolderCreated(outfit_cat_id, true);
+            }
+        });
+    }
+}
+
 LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
     :   mOutfitList(olist),
         mMenu(NULL)
@@ -1110,6 +1170,7 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
     registrar.add("Gear.Expand", boost::bind(&LLOutfitListBase::onExpandAllFolders, mOutfitList));
 
     registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenuBase::onAdd, this));
+    registrar.add("Gear.Save", boost::bind(&LLOutfitListGearMenuBase::onSave, this));
 
     registrar.add("Gear.Thumbnail", boost::bind(&LLOutfitListGearMenuBase::onThumbnail, this));
     registrar.add("Gear.SortByName", boost::bind(&LLOutfitListGearMenuBase::onChangeSortOrder, this));
@@ -1135,8 +1196,7 @@ void LLOutfitListGearMenuBase::onUpdateItemsVisibility()
     if (!mMenu) return;
 
     bool have_selection = getSelectedOutfitID().notNull();
-    mMenu->setItemVisible("sepatator1", have_selection);
-    mMenu->setItemVisible("sepatator2", have_selection);
+    mMenu->setItemVisible("wear_separator", have_selection);
     mMenu->arrangeAndClear(); // update menu height
 }
 
@@ -1181,6 +1241,20 @@ void LLOutfitListGearMenuBase::onAdd()
     }
 }
 
+void LLOutfitListGearMenuBase::onSave()
+{
+    const LLUUID &selected_id = getSelectedOutfitID();
+    LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+        [selected_id](const LLSD &notif, const LLSD &resp)
+    {
+        S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+        if (opt == 0)
+        {
+            LLAppearanceMgr::getInstance()->onOutfitFolderCreated(selected_id, true);
+        }
+    });
+}
+
 void LLOutfitListGearMenuBase::onTakeOff()
 {
     // Take off selected outfit.
@@ -1234,15 +1308,6 @@ bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
         return false;
     }
 
-    // *TODO This condition leads to menu item behavior inconsistent with
-    // "Wear" button behavior and should be modified or removed.
-    bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
-
-    if ("wear" == param)
-    {
-        return !is_worn;
-    }
-
     return true;
 }
 
@@ -1270,10 +1335,29 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility()
     if (!mMenu) return;
     mMenu->setItemVisible("expand", TRUE);
     mMenu->setItemVisible("collapse", TRUE);
-    mMenu->setItemVisible("thumbnail", FALSE); // Never visible?
-    mMenu->setItemVisible("sepatator3", FALSE);
+    mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
     mMenu->setItemVisible("sort_folders_by_name", FALSE);
     LLOutfitListGearMenuBase::onUpdateItemsVisibility();
 }
 
+BOOL LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
+{
+    if (y >= getLocalRect().getHeight() - getHeaderHeight()) 
+    {
+        LLSD params;
+        params["inv_type"] = LLInventoryType::IT_CATEGORY;
+        params["thumbnail_id"] = gInventory.getCategory(mFolderID)->getThumbnailUUID();
+        params["item_id"] = mFolderID;
+
+        LLToolTipMgr::instance().show(LLToolTip::Params()
+                                    .message(getToolTip())
+                                    .sticky_rect(calcScreenRect())
+                                    .delay_time(LLView::getTooltipTimeout())
+                                    .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
+                                    .create_params(params));
+        return TRUE;
+    }
+
+    return LLAccordionCtrlTab::handleToolTip(x, y, mask);
+}
 // EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 66b3165169361cb48a97926b35352f9341b81fe6..89821f933318925f1f9ee06fd7dfe976efb805d5 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -31,6 +31,7 @@
 #include "llpanel.h"
 
 // newview
+#include "llaccordionctrltab.h"
 #include "llinventorymodel.h"
 #include "lllistcontextmenu.h"
 #include "llpanelappearancetab.h"
@@ -116,8 +117,20 @@ class LLOutfitListBase : public LLPanelAppearanceTab
     void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response);
     virtual void onChangeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) = 0;
 
+    static void onIdle(void* userdata);
+    void onIdleRefreshList();
+
+    struct
+    {
+        LLUUID						CategoryUUID;
+        uuid_vec_t					Added;
+        uuid_vec_t					Removed;
+        uuid_vec_t::const_iterator	AddedIterator;
+        uuid_vec_t::const_iterator	RemovedIterator;
+    } mRefreshListState;
+
     bool                            mIsInitialized;
-    LLInventoryCategoriesObserver* 	mCategoriesObserver;    
+    LLInventoryCategoriesObserver* 	mCategoriesObserver;
     LLUUID							mSelectedOutfitUUID;
     // id of currently highlited outfit
     LLUUID							mHighlightedOutfitUUID;
@@ -147,6 +160,9 @@ class LLOutfitContextMenu : public LLListContextMenu
 
     static void renameOutfit(const LLUUID& outfit_cat_id);
 
+    void onThumbnail(const LLUUID &outfit_cat_id);
+    void onSave(const LLUUID &outfit_cat_id);
+
 private:
     LLOutfitListBase*	mOutfitList;
 };
@@ -178,6 +194,7 @@ class LLOutfitListGearMenuBase
     void onAdd();
     void onTakeOff();
     void onRename();
+    void onSave();
     void onCreate(const LLSD& data);
     bool onEnable(LLSD::String param);
     bool onVisible(LLSD::String param);
@@ -193,7 +210,27 @@ class LLOutfitListGearMenu : public LLOutfitListGearMenuBase
     /*virtual*/ void onUpdateItemsVisibility();
 };
 
-/**
+class LLOutfitAccordionCtrlTab : public LLAccordionCtrlTab
+{
+public:
+    struct Params : public LLInitParam::Block<Params, LLAccordionCtrlTab::Params>
+    {
+        Optional<LLUUID> cat_id;
+        Params() : cat_id("cat_id") {}
+    };
+
+    virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+
+ protected:
+    LLOutfitAccordionCtrlTab(const LLOutfitAccordionCtrlTab::Params &p) 
+        : LLAccordionCtrlTab(p), 
+          mFolderID(p.cat_id)
+    {}
+    friend class LLUICtrlFactory;
+
+    LLUUID mFolderID;
+};
+  /**
  * @class LLOutfitsList
  *
  * A list of agents's outfits from "My Outfits" inventory category
@@ -225,7 +262,7 @@ class LLOutfitsList : public LLOutfitListBase
 	//void performAction(std::string action);
 
 
-	/*virtual*/ void setFilterSubString(const std::string& string);
+	/*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
 
 	/*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const;
 
@@ -295,12 +332,7 @@ class LLOutfitsList : public LLOutfitListBase
 	 * Called upon list refresh event to update tab visibility depending on
 	 * the results of applying filter to the title and list items of the tab.
 	 */
-	void onFilteredWearableItemsListRefresh(LLUICtrl* ctrl);
-
-	/**
-	 * Highlights filtered items and hides tabs which haven't passed filter.
-	 */
-	void applyFilter(const std::string& new_filter_substring);
+	void onRefreshComplete(LLUICtrl* ctrl);
 
 	/**
 	 * Applies filter to the given tab
diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp
index 8fa8867c696fca1358eda2c37a006b8899bac65c..16bd8a1380d4bb19c8b123f7e4e348494ae4f011 100644
--- a/indra/newview/llpanelappearancetab.cpp
+++ b/indra/newview/llpanelappearancetab.cpp
@@ -28,12 +28,35 @@
 
 #include "llpanelappearancetab.h"
 
-
 #include "llinventoryfunctions.h"
 #include "llinventorymodel.h"
 #include "llviewerinventory.h"
 
-//virtual
+std::string LLPanelAppearanceTab::sRecentFilterSubString;
+
+void LLPanelAppearanceTab::setFilterSubString(const std::string& new_string)
+{
+    if (new_string != mFilterSubString)
+    {
+        std::string old_string = mFilterSubString;
+        mFilterSubString = new_string;
+        onFilterSubStringChanged(mFilterSubString, old_string);
+    }
+
+    sRecentFilterSubString = new_string;
+}
+
+void LLPanelAppearanceTab::checkFilterSubString()
+{
+    if (sRecentFilterSubString != mFilterSubString)
+    {
+        std::string old_string = mFilterSubString;
+        mFilterSubString = sRecentFilterSubString;
+        onFilterSubStringChanged(mFilterSubString, old_string);
+    }
+}
+
+// virtual
 bool LLPanelAppearanceTab::canTakeOffSelected()
 {
 	uuid_vec_t selected_uuids;
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
index 2ed6b004977009cad0e13242f8acc6adde2c45e9..e81394dd3ce989f4caf9aa2d89d42bf68b37bf9b 100644
--- a/indra/newview/llpanelappearancetab.h
+++ b/indra/newview/llpanelappearancetab.h
@@ -35,13 +35,17 @@ class LLPanelAppearanceTab : public LLPanel
 	LLPanelAppearanceTab() : LLPanel() {}
 	virtual ~LLPanelAppearanceTab() {}
 
-	virtual void setFilterSubString(const std::string& string) = 0;
+	void setFilterSubString(const std::string& new_string);
+
+    void checkFilterSubString();
+
+    virtual void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string) = 0;
 
 	virtual bool isActionEnabled(const LLSD& userdata) = 0;
 
 	virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {}
 
-	static const std::string& getFilterSubString() { return sFilterSubString; }
+	const std::string& getFilterSubString() { return mFilterSubString; }
 
 protected:
 
@@ -50,7 +54,10 @@ class LLPanelAppearanceTab : public LLPanel
 	 */
 	bool canTakeOffSelected();
 
-	static std::string		sFilterSubString;
+private:
+    std::string mFilterSubString;
+
+    static std::string sRecentFilterSubString;
 };
 
 #endif //LL_LLPANELAPPEARANCETAB_H
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index a09964e17dcb0290f743eb0d4bc9588e783a4a7e..cf536dd87e3e2413457007a65d38632a27aac47d 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -89,7 +89,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
     getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
 
     mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
-    mTxtNormalMap->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+    mTxtNormalMap->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
     mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
 
     getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index cb69f722887e3c676d0e02256be9fc0c299ab562..c06d17410efbd23d95dac4560fa7837df3e297ee 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -97,7 +97,7 @@ enum ESubpart {
         SUBPART_SKIRT,
         SUBPART_ALPHA,
         SUBPART_TATTOO,
-		SUBPART_UNIVERSAL,
+        SUBPART_UNIVERSAL,
         SUBPART_PHYSICS_BREASTS_UPDOWN,
         SUBPART_PHYSICS_BREASTS_INOUT,
         SUBPART_PHYSICS_BREASTS_LEFTRIGHT,
@@ -120,7 +120,7 @@ class LLEditWearableDictionary : public LLSingleton<LLEditWearableDictionary>
         //--------------------------------------------------------------------
         LLSINGLETON(LLEditWearableDictionary);
         virtual ~LLEditWearableDictionary();
-        
+
         //--------------------------------------------------------------------
         // Wearable Types
         //--------------------------------------------------------------------
@@ -214,7 +214,6 @@ class LLEditWearableDictionary : public LLSingleton<LLEditWearableDictionary>
 
 LLEditWearableDictionary::LLEditWearableDictionary()
 {
-
 }
 
 //virtual 
@@ -227,23 +226,23 @@ LLEditWearableDictionary::Wearables::Wearables()
         // note the subpart that is listed first is treated as "default", regardless of what order is in enum.
         // Please match the order presented in XUI. -Nyx
         // this will affect what camera angle is shown when first editing a wearable
-        addEntry(LLWearableType::WT_SHAPE,              new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD,        SUBPART_SHAPE_EYES,     SUBPART_SHAPE_EARS,     SUBPART_SHAPE_NOSE,     SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS}));
-        addEntry(LLWearableType::WT_SKIN,               new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text", texture_vec_t(), texture_vec_t{TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT}, subpart_vec_t{SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL}));
-        addEntry(LLWearableType::WT_HAIR,               new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text", texture_vec_t(), texture_vec_t{TEX_HAIR}, subpart_vec_t{SUBPART_HAIR_COLOR,       SUBPART_HAIR_STYLE,     SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL}));
-        addEntry(LLWearableType::WT_EYES,               new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text", texture_vec_t(), texture_vec_t{TEX_EYES_IRIS}, subpart_vec_t{SUBPART_EYES}));
-        addEntry(LLWearableType::WT_SHIRT,              new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text", texture_vec_t{TEX_UPPER_SHIRT}, texture_vec_t{TEX_UPPER_SHIRT}, subpart_vec_t{SUBPART_SHIRT}));
-        addEntry(LLWearableType::WT_PANTS,              new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text", texture_vec_t{TEX_LOWER_PANTS}, texture_vec_t{TEX_LOWER_PANTS}, subpart_vec_t{SUBPART_PANTS}));
-        addEntry(LLWearableType::WT_SHOES,              new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text", texture_vec_t{TEX_LOWER_SHOES}, texture_vec_t{TEX_LOWER_SHOES}, subpart_vec_t{SUBPART_SHOES}));
-        addEntry(LLWearableType::WT_SOCKS,              new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text", texture_vec_t{TEX_LOWER_SOCKS}, texture_vec_t{TEX_LOWER_SOCKS}, subpart_vec_t{SUBPART_SOCKS}));
+        addEntry(LLWearableType::WT_SHAPE,      new WearableEntry(LLWearableType::WT_SHAPE,"edit_shape_title","shape_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_SHAPE_WHOLE, SUBPART_SHAPE_HEAD,        SUBPART_SHAPE_EYES,     SUBPART_SHAPE_EARS,     SUBPART_SHAPE_NOSE,     SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS}));
+        addEntry(LLWearableType::WT_SKIN,       new WearableEntry(LLWearableType::WT_SKIN,"edit_skin_title","skin_desc_text", texture_vec_t(), texture_vec_t{TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT}, subpart_vec_t{SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL}));
+        addEntry(LLWearableType::WT_HAIR,       new WearableEntry(LLWearableType::WT_HAIR,"edit_hair_title","hair_desc_text", texture_vec_t(), texture_vec_t{TEX_HAIR}, subpart_vec_t{SUBPART_HAIR_COLOR,       SUBPART_HAIR_STYLE,     SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL}));
+        addEntry(LLWearableType::WT_EYES,       new WearableEntry(LLWearableType::WT_EYES,"edit_eyes_title","eyes_desc_text", texture_vec_t(), texture_vec_t{TEX_EYES_IRIS}, subpart_vec_t{SUBPART_EYES}));
+        addEntry(LLWearableType::WT_SHIRT,      new WearableEntry(LLWearableType::WT_SHIRT,"edit_shirt_title","shirt_desc_text", texture_vec_t{TEX_UPPER_SHIRT}, texture_vec_t{TEX_UPPER_SHIRT}, subpart_vec_t{SUBPART_SHIRT}));
+        addEntry(LLWearableType::WT_PANTS,      new WearableEntry(LLWearableType::WT_PANTS,"edit_pants_title","pants_desc_text", texture_vec_t{TEX_LOWER_PANTS}, texture_vec_t{TEX_LOWER_PANTS}, subpart_vec_t{SUBPART_PANTS}));
+        addEntry(LLWearableType::WT_SHOES,      new WearableEntry(LLWearableType::WT_SHOES,"edit_shoes_title","shoes_desc_text", texture_vec_t{TEX_LOWER_SHOES}, texture_vec_t{TEX_LOWER_SHOES}, subpart_vec_t{SUBPART_SHOES}));
+        addEntry(LLWearableType::WT_SOCKS,      new WearableEntry(LLWearableType::WT_SOCKS,"edit_socks_title","socks_desc_text", texture_vec_t{TEX_LOWER_SOCKS}, texture_vec_t{TEX_LOWER_SOCKS}, subpart_vec_t{SUBPART_SOCKS}));
         addEntry(LLWearableType::WT_JACKET,     new WearableEntry(LLWearableType::WT_JACKET,"edit_jacket_title","jacket_desc_text", texture_vec_t{TEX_UPPER_JACKET}, texture_vec_t{TEX_UPPER_JACKET, TEX_LOWER_JACKET}, subpart_vec_t{SUBPART_JACKET}));
         addEntry(LLWearableType::WT_GLOVES,     new WearableEntry(LLWearableType::WT_GLOVES,"edit_gloves_title","gloves_desc_text", texture_vec_t{TEX_UPPER_GLOVES}, texture_vec_t{TEX_UPPER_GLOVES}, subpart_vec_t{SUBPART_GLOVES}));
         addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(LLWearableType::WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text", texture_vec_t{TEX_UPPER_UNDERSHIRT}, texture_vec_t{TEX_UPPER_UNDERSHIRT}, subpart_vec_t{SUBPART_UNDERSHIRT}));
         addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(LLWearableType::WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text", texture_vec_t{TEX_LOWER_UNDERPANTS}, texture_vec_t{TEX_LOWER_UNDERPANTS}, subpart_vec_t{SUBPART_UNDERPANTS}));
-        addEntry(LLWearableType::WT_SKIRT,              new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT}));
-        addEntry(LLWearableType::WT_ALPHA,              new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA}));
+        addEntry(LLWearableType::WT_SKIRT,      new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT}));
+        addEntry(LLWearableType::WT_ALPHA,      new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA}));
         addEntry(LLWearableType::WT_TATTOO,     new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text", texture_vec_t{TEX_HEAD_TATTOO}, texture_vec_t{TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO}, subpart_vec_t{SUBPART_TATTOO}));
-		addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(LLWearableType::WT_UNIVERSAL, "edit_universal_title", "universal_desc_text", texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO }, texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO, TEX_UPPER_UNIVERSAL_TATTOO, TEX_LOWER_UNIVERSAL_TATTOO, TEX_SKIRT_TATTOO, TEX_HAIR_TATTOO, TEX_EYES_TATTOO, TEX_LEFT_ARM_TATTOO, TEX_LEFT_LEG_TATTOO, TEX_AUX1_TATTOO, TEX_AUX2_TATTOO, TEX_AUX3_TATTOO }, subpart_vec_t{ SUBPART_UNIVERSAL }));
-		addEntry(LLWearableType::WT_PHYSICS,    new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED}));
+        addEntry(LLWearableType::WT_UNIVERSAL,  new WearableEntry(LLWearableType::WT_UNIVERSAL, "edit_universal_title", "universal_desc_text", texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO }, texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO, TEX_UPPER_UNIVERSAL_TATTOO, TEX_LOWER_UNIVERSAL_TATTOO, TEX_SKIRT_TATTOO, TEX_HAIR_TATTOO, TEX_EYES_TATTOO, TEX_LEFT_ARM_TATTOO, TEX_LEFT_LEG_TATTOO, TEX_AUX1_TATTOO, TEX_AUX2_TATTOO, TEX_AUX3_TATTOO }, subpart_vec_t{ SUBPART_UNIVERSAL }));
+        addEntry(LLWearableType::WT_PHYSICS,    new WearableEntry(LLWearableType::WT_PHYSICS, "edit_physics_title", "physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{ SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED }));
 }
 
 LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type,
@@ -259,52 +258,59 @@ LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType typ
         mSubparts(subparts),
         mColorSwatchCtrls(color_swatches),
         mTextureCtrls(texture_pickers)
-{}
+{
+}
 
 LLEditWearableDictionary::Subparts::Subparts()
 {
-        addEntry(SUBPART_SHAPE_WHOLE, new SubpartEntry(SUBPART_SHAPE_WHOLE, "mPelvis", "shape_body","shape_body_param_list", "shape_body_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_HEAD, new SubpartEntry(SUBPART_SHAPE_HEAD, "mHead", "shape_head", "shape_head_param_list", "shape_head_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_EYES, new SubpartEntry(SUBPART_SHAPE_EYES, "mHead", "shape_eyes", "shape_eyes_param_list", "shape_eyes_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_EARS, new SubpartEntry(SUBPART_SHAPE_EARS, "mHead", "shape_ears", "shape_ears_param_list", "shape_ears_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_NOSE, new SubpartEntry(SUBPART_SHAPE_NOSE, "mHead", "shape_nose", "shape_nose_param_list", "shape_nose_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_MOUTH, new SubpartEntry(SUBPART_SHAPE_MOUTH, "mHead", "shape_mouth", "shape_mouth_param_list", "shape_mouth_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_CHIN, new SubpartEntry(SUBPART_SHAPE_CHIN, "mHead", "shape_chin", "shape_chin_param_list", "shape_chin_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_TORSO, new SubpartEntry(SUBPART_SHAPE_TORSO, "mTorso", "shape_torso", "shape_torso_param_list", "shape_torso_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
-        addEntry(SUBPART_SHAPE_LEGS, new SubpartEntry(SUBPART_SHAPE_LEGS, "mPelvis", "shape_legs", "shape_legs_param_list", "shape_legs_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-
-        addEntry(SUBPART_SKIN_COLOR, new SubpartEntry(SUBPART_SKIN_COLOR, "mHead", "skin_color", "skin_color_param_list", "skin_color_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        // WT_SHAPE
+        addEntry(SUBPART_SHAPE_WHOLE,     new SubpartEntry(SUBPART_SHAPE_WHOLE, "mPelvis", "shape_body","shape_body_param_list", "shape_body_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_HEAD,      new SubpartEntry(SUBPART_SHAPE_HEAD, "mHead", "shape_head", "shape_head_param_list", "shape_head_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_EYES,      new SubpartEntry(SUBPART_SHAPE_EYES, "mHead", "shape_eyes", "shape_eyes_param_list", "shape_eyes_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_EARS,      new SubpartEntry(SUBPART_SHAPE_EARS, "mHead", "shape_ears", "shape_ears_param_list", "shape_ears_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_NOSE,      new SubpartEntry(SUBPART_SHAPE_NOSE, "mHead", "shape_nose", "shape_nose_param_list", "shape_nose_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_MOUTH,     new SubpartEntry(SUBPART_SHAPE_MOUTH, "mHead", "shape_mouth", "shape_mouth_param_list", "shape_mouth_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_CHIN,      new SubpartEntry(SUBPART_SHAPE_CHIN, "mHead", "shape_chin", "shape_chin_param_list", "shape_chin_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_TORSO,     new SubpartEntry(SUBPART_SHAPE_TORSO, "mTorso", "shape_torso", "shape_torso_param_list", "shape_torso_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
+        addEntry(SUBPART_SHAPE_LEGS,      new SubpartEntry(SUBPART_SHAPE_LEGS, "mPelvis", "shape_legs", "shape_legs_param_list", "shape_legs_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+
+        // WT_SKIN
+        addEntry(SUBPART_SKIN_COLOR,      new SubpartEntry(SUBPART_SKIN_COLOR, "mHead", "skin_color", "skin_color_param_list", "skin_color_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
         addEntry(SUBPART_SKIN_FACEDETAIL, new SubpartEntry(SUBPART_SKIN_FACEDETAIL, "mHead", "skin_facedetail", "skin_face_param_list", "skin_face_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_SKIN_MAKEUP, new SubpartEntry(SUBPART_SKIN_MAKEUP, "mHead", "skin_makeup", "skin_makeup_param_list", "skin_makeup_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_SKIN_MAKEUP,     new SubpartEntry(SUBPART_SKIN_MAKEUP, "mHead", "skin_makeup", "skin_makeup_param_list", "skin_makeup_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
         addEntry(SUBPART_SKIN_BODYDETAIL, new SubpartEntry(SUBPART_SKIN_BODYDETAIL, "mPelvis", "skin_bodydetail", "skin_body_param_list", "skin_body_tab", LLVector3d(0.f, 0.f, -0.2f), LLVector3d(-2.5f, 0.5f, 0.5f),SEX_BOTH));
 
-        addEntry(SUBPART_HAIR_COLOR, new SubpartEntry(SUBPART_HAIR_COLOR, "mHead", "hair_color", "hair_color_param_list", "hair_color_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH));
-        addEntry(SUBPART_HAIR_STYLE, new SubpartEntry(SUBPART_HAIR_STYLE, "mHead", "hair_style", "hair_style_param_list", "hair_style_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH));
-        addEntry(SUBPART_HAIR_EYEBROWS, new SubpartEntry(SUBPART_HAIR_EYEBROWS, "mHead", "hair_eyebrows", "hair_eyebrows_param_list", "hair_eyebrows_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-        addEntry(SUBPART_HAIR_FACIAL, new SubpartEntry(SUBPART_HAIR_FACIAL, "mHead", "hair_facial", "hair_facial_param_list", "hair_facial_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_MALE));
-
-        addEntry(SUBPART_EYES, new SubpartEntry(SUBPART_EYES, "mHead", "eyes", "eyes_main_param_list", "eyes_main_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
-
-        addEntry(SUBPART_SHIRT, new SubpartEntry(SUBPART_SHIRT, "mTorso", "shirt", "shirt_main_param_list", "shirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
-        addEntry(SUBPART_PANTS, new SubpartEntry(SUBPART_PANTS, "mPelvis", "pants", "pants_main_param_list", "pants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_SHOES, new SubpartEntry(SUBPART_SHOES, "mPelvis", "shoes", "shoes_main_param_list", "shoes_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_SOCKS, new SubpartEntry(SUBPART_SOCKS, "mPelvis", "socks", "socks_main_param_list", "socks_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_JACKET, new SubpartEntry(SUBPART_JACKET, "mTorso", "jacket", "jacket_main_param_list", "jacket_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-2.f, 0.1f, 0.3f),SEX_BOTH));
-        addEntry(SUBPART_SKIRT, new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_GLOVES, new SubpartEntry(SUBPART_GLOVES, "mTorso", "gloves", "gloves_main_param_list", "gloves_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-1.f, 0.15f, 0.f),SEX_BOTH));
-        addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
-        addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
-        addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
-        addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
-		addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
-
-		addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
-        addEntry(SUBPART_PHYSICS_BREASTS_INOUT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
+        // WT_HAIR
+        addEntry(SUBPART_HAIR_COLOR,      new SubpartEntry(SUBPART_HAIR_COLOR, "mHead", "hair_color", "hair_color_param_list", "hair_color_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f),SEX_BOTH));
+        addEntry(SUBPART_HAIR_STYLE,      new SubpartEntry(SUBPART_HAIR_STYLE, "mHead", "hair_style", "hair_style_param_list", "hair_style_tab", LLVector3d(0.f, 0.f, 0.10f), LLVector3d(-0.4f, 0.05f, 0.10f), SEX_BOTH));
+        addEntry(SUBPART_HAIR_EYEBROWS,   new SubpartEntry(SUBPART_HAIR_EYEBROWS, "mHead", "hair_eyebrows", "hair_eyebrows_param_list", "hair_eyebrows_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+        addEntry(SUBPART_HAIR_FACIAL,     new SubpartEntry(SUBPART_HAIR_FACIAL, "mHead", "hair_facial", "hair_facial_param_list", "hair_facial_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_MALE));
+
+        // WT_EYES
+        addEntry(SUBPART_EYES,            new SubpartEntry(SUBPART_EYES, "mHead", "eyes", "eyes_main_param_list", "eyes_main_tab", LLVector3d(0.f, 0.f, 0.05f), LLVector3d(-0.5f, 0.05f, 0.07f),SEX_BOTH));
+
+        // WT_SHIRT, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT, WT_UNDERPANTS, WT_SKIRT, WT_ALPHA, WT_TATTOO, WT_UNIVERSAL
+        addEntry(SUBPART_SHIRT,           new SubpartEntry(SUBPART_SHIRT, "mTorso", "shirt", "shirt_main_param_list", "shirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
+        addEntry(SUBPART_PANTS,           new SubpartEntry(SUBPART_PANTS, "mPelvis", "pants", "pants_main_param_list", "pants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+        addEntry(SUBPART_SHOES,           new SubpartEntry(SUBPART_SHOES, "mPelvis", "shoes", "shoes_main_param_list", "shoes_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+        addEntry(SUBPART_SOCKS,           new SubpartEntry(SUBPART_SOCKS, "mPelvis", "socks", "socks_main_param_list", "socks_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+        addEntry(SUBPART_JACKET,          new SubpartEntry(SUBPART_JACKET, "mTorso", "jacket", "jacket_main_param_list", "jacket_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-2.f, 0.1f, 0.3f),SEX_BOTH));
+        addEntry(SUBPART_GLOVES,          new SubpartEntry(SUBPART_GLOVES, "mTorso", "gloves", "gloves_main_param_list", "gloves_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-1.f, 0.15f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_UNDERSHIRT,      new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
+        addEntry(SUBPART_UNDERPANTS,      new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+        addEntry(SUBPART_SKIRT,           new SubpartEntry(SUBPART_SKIRT, "mPelvis", "skirt", "skirt_main_param_list", "skirt_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
+        addEntry(SUBPART_ALPHA,           new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
+        addEntry(SUBPART_TATTOO,          new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
+        addEntry(SUBPART_UNIVERSAL,       new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
+
+        // WT_PHYSICS
+        addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN,    new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f), SEX_FEMALE));
+        addEntry(SUBPART_PHYSICS_BREASTS_INOUT,     new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
         addEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, "mTorso", "physics_breasts_leftright", "physics_breasts_leftright_param_list", "physics_breasts_leftright_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
-        addEntry(SUBPART_PHYSICS_BELLY_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
-        addEntry(SUBPART_PHYSICS_BUTT_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
-        addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
-        addEntry(SUBPART_PHYSICS_ADVANCED, new SubpartEntry(SUBPART_PHYSICS_ADVANCED, "mTorso", "physics_advanced", "physics_advanced_param_list", "physics_advanced_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_BELLY_UPDOWN,      new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_BUTT_UPDOWN,       new SubpartEntry(SUBPART_PHYSICS_BUTT_UPDOWN, "mTorso", "physics_butt_updown", "physics_butt_updown_param_list", "physics_butt_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT,    new SubpartEntry(SUBPART_PHYSICS_BUTT_LEFTRIGHT, "mTorso", "physics_butt_leftright", "physics_butt_leftright_param_list", "physics_butt_leftright_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
+        addEntry(SUBPART_PHYSICS_ADVANCED,          new SubpartEntry(SUBPART_PHYSICS_ADVANCED, "mTorso", "physics_advanced", "physics_advanced_param_list", "physics_advanced_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
 }
 
 LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,
@@ -329,55 +335,55 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,
 
 LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls()
 {
-        addEntry ( TEX_UPPER_SHIRT,  new PickerControlEntry (TEX_UPPER_SHIRT, "Color/Tint" ));
-        addEntry ( TEX_LOWER_PANTS,  new PickerControlEntry (TEX_LOWER_PANTS, "Color/Tint" ));
-        addEntry ( TEX_LOWER_SHOES,  new PickerControlEntry (TEX_LOWER_SHOES, "Color/Tint" ));
-        addEntry ( TEX_LOWER_SOCKS,  new PickerControlEntry (TEX_LOWER_SOCKS, "Color/Tint" ));
-        addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Color/Tint" ));
-        addEntry ( TEX_SKIRT,  new PickerControlEntry (TEX_SKIRT, "Color/Tint" ));
-        addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" ));
-        addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" ));
-        addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" ));
-        addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint" ));
-		addEntry (TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Color/Tint"));
+        addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Color/Tint"));
+        addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Color/Tint"));
+        addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Color/Tint"));
+        addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Color/Tint"));
+        addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Color/Tint"));
+        addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Color/Tint"));
+        addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Color/Tint"));
+        addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Color/Tint"));
+        addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Color/Tint"));
+        addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint"));
+        addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Color/Tint"));
 }
 
 LLEditWearableDictionary::TextureCtrls::TextureCtrls()
 {
-        addEntry ( TEX_HEAD_BODYPAINT,  new PickerControlEntry (TEX_HEAD_BODYPAINT,  "Head", LLUUID::null, TRUE ));
-        addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE ));
-        addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE ));
-        addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE ));
-        addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE ));
-        addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE ));
-        addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE ));
-        addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE ));
-        addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE ));
-        addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE ));
-        addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
-        addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
-        addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
-        addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
-        addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
-        addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE ));
-        addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE ));
-        addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE ));
-		addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE));
-		addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE));
-		addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE));
-		addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE));
-		addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE));
-		addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE));
-		addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE));
-		addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE));
-		addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE));
-		addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE));
-		addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_HEAD_BODYPAINT, new PickerControlEntry(TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE));
+        addEntry(TEX_UPPER_BODYPAINT, new PickerControlEntry(TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE));
+        addEntry(TEX_LOWER_BODYPAINT, new PickerControlEntry(TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE));
+        addEntry(TEX_HAIR, new PickerControlEntry(TEX_HAIR, "Texture", LLUUID(gSavedSettings.getString("UIImgDefaultHairUUID")), FALSE));
+        addEntry(TEX_EYES_IRIS, new PickerControlEntry(TEX_EYES_IRIS, "Iris", LLUUID(gSavedSettings.getString("UIImgDefaultEyesUUID")), FALSE));
+        addEntry(TEX_UPPER_SHIRT, new PickerControlEntry(TEX_UPPER_SHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShirtUUID")), FALSE));
+        addEntry(TEX_LOWER_PANTS, new PickerControlEntry(TEX_LOWER_PANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultPantsUUID")), FALSE));
+        addEntry(TEX_LOWER_SHOES, new PickerControlEntry(TEX_LOWER_SHOES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultShoesUUID")), FALSE));
+        addEntry(TEX_LOWER_SOCKS, new PickerControlEntry(TEX_LOWER_SOCKS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSocksUUID")), FALSE));
+        addEntry(TEX_UPPER_JACKET, new PickerControlEntry(TEX_UPPER_JACKET, "Upper Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE));
+        addEntry(TEX_LOWER_JACKET, new PickerControlEntry(TEX_LOWER_JACKET, "Lower Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultJacketUUID")), FALSE));
+        addEntry(TEX_SKIRT, new PickerControlEntry(TEX_SKIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultSkirtUUID")), FALSE));
+        addEntry(TEX_UPPER_GLOVES, new PickerControlEntry(TEX_UPPER_GLOVES, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultGlovesUUID")), FALSE));
+        addEntry(TEX_UPPER_UNDERSHIRT, new PickerControlEntry(TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE));
+        addEntry(TEX_LOWER_UNDERPANTS, new PickerControlEntry(TEX_LOWER_UNDERPANTS, "Fabric", LLUUID(gSavedSettings.getString("UIImgDefaultUnderwearUUID")), FALSE));
+        addEntry(TEX_LOWER_ALPHA, new PickerControlEntry(TEX_LOWER_ALPHA, "Lower Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
+        addEntry(TEX_UPPER_ALPHA, new PickerControlEntry(TEX_UPPER_ALPHA, "Upper Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
+        addEntry(TEX_HEAD_ALPHA, new PickerControlEntry(TEX_HEAD_ALPHA, "Head Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
+        addEntry(TEX_EYES_ALPHA, new PickerControlEntry(TEX_EYES_ALPHA, "Eye Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
+        addEntry(TEX_HAIR_ALPHA, new PickerControlEntry(TEX_HAIR_ALPHA, "Hair Alpha", LLUUID(gSavedSettings.getString("UIImgDefaultAlphaUUID")), TRUE));
+        addEntry(TEX_LOWER_TATTOO, new PickerControlEntry(TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_UPPER_TATTOO, new PickerControlEntry(TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE));
+        addEntry(TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE));
 }
 
 LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index,
@@ -490,8 +496,8 @@ template <typename CtrlType, class Predicate>
 const LLEditWearableDictionary::PickerControlEntry*
 find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred)
 {
-        const LLEditWearableDictionary::WearableEntry *wearable_entry
-                = LLEditWearableDictionary::getInstance()->getWearable(type);
+        const LLEditWearableDictionary::WearableEntry *wearable_entry =
+                LLEditWearableDictionary::getInstance()->getWearable(type);
         if (!wearable_entry)
         {
                 LL_WARNS() << "could not get wearable dictionary entry for wearable of type: " << type << LL_ENDL;
@@ -520,8 +526,7 @@ find_picker_ctrl_entry_if(LLWearableType::EType type, const Predicate pred)
 }
 
 template <typename CtrlType>
-void
-for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun)
+void for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_t fun)
 {
         if (!panel)
         {
@@ -542,14 +547,13 @@ for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, function_
                  iter != iter_end; ++iter)
         {
                 const ETextureIndex te = *iter;
-                const LLEditWearableDictionary::PickerControlEntry*     entry
-                        = get_picker_entry<CtrlType>(te);
+                const LLEditWearableDictionary::PickerControlEntry* entry = get_picker_entry<CtrlType>(te);
                 if (!entry)
                 {
                         LL_WARNS() << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << LL_ENDL;
                         continue;
                 }
-                fun (panel, entry);
+                fun(panel, entry);
         }
 }
 
@@ -594,7 +598,7 @@ static void update_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const
         {
                 LLUUID new_id;
                 LLLocalTextureObject *lto = self->getWearable()->getLocalTextureObject(entry->mTextureIndex);
-                if( lto && (lto->getID() != IMG_DEFAULT_AVATAR) )
+                if (lto && (lto->getID() != IMG_DEFAULT_AVATAR))
                 {
                         new_id = lto->getID();
                 }
@@ -644,7 +648,6 @@ LLPanelEditWearable::LLPanelEditWearable()
 //virtual
 LLPanelEditWearable::~LLPanelEditWearable()
 {
-
 }
 
 bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value)
@@ -659,7 +662,7 @@ void LLPanelEditWearable::updateMetricLayout(BOOL new_value)
         LLUIString current_metric, replacment_metric;
         current_metric = new_value ? mMeters : mFeet;
         replacment_metric = new_value ? mFeet : mMeters;
-        mHeigthValue.setArg( "[METRIC1]", current_metric.getString() );
+        mHeightValue.setArg( "[METRIC1]", current_metric.getString() );
         mReplacementMetricUrl.setArg( "[URL_METRIC2]", std::string("[secondlife:///app/metricsystem ") + replacment_metric.getString() + std::string("]"));
 }
 
@@ -667,11 +670,11 @@ void LLPanelEditWearable::updateAvatarHeightLabel()
 {
         mTxtAvatarHeight->setText(LLStringUtil::null);
         LLStyle::Params param;
-        param.color = mAvatarHeigthLabelColor;
-        mTxtAvatarHeight->appendText(mHeigth, false, param);
-        param.color = mAvatarHeigthValueLabelColor;
-        mTxtAvatarHeight->appendText(mHeigthValue, false, param);
-        param.color = mAvatarHeigthLabelColor; // using mAvatarHeigthLabelColor for '/' separator
+        param.color = mAvatarHeightLabelColor;
+        mTxtAvatarHeight->appendText(mHeight, false, param);
+        param.color = mAvatarHeightValueLabelColor;
+        mTxtAvatarHeight->appendText(mHeightValue, false, param);
+        param.color = mAvatarHeightLabelColor; // using mAvatarHeightLabelColor for '/' separator
         mTxtAvatarHeight->appendText(" / ", false, param);
         mTxtAvatarHeight->appendText(this->mReplacementMetricUrl, false, param);
 }
@@ -754,7 +757,7 @@ BOOL LLPanelEditWearable::postBuild()
         mPanelSkirt = getChild<LLPanel>("edit_skirt_panel");
         mPanelAlpha = getChild<LLPanel>("edit_alpha_panel");
         mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel");
-		mPanelUniversal = getChild<LLPanel>("edit_universal_panel");
+        mPanelUniversal = getChild<LLPanel>("edit_universal_panel");
         mPanelPhysics = getChild<LLPanel>("edit_physics_panel");
 
         mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height");
@@ -778,29 +781,27 @@ BOOL LLPanelEditWearable::postBuild()
                         continue;
                 }
                 U8 num_subparts = (U8)(wearable_entry->mSubparts.size());
-        
+
                 for (U8 index = 0; index < num_subparts; ++index)
                 {
                         // dive into data structures to get the panel we need
                         ESubpart subpart_e = wearable_entry->mSubparts[index];
                         const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e);
-        
+
                         if (!subpart_entry)
                         {
                                 LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL;
                                 continue;
                         }
-        
+
                         const std::string accordion_tab = subpart_entry->mAccordionTab;
-        
                         LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab);
-        
                         if (!tab)
                         {
                                 LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
                                 continue;
                         }
-        
+
                         // initialize callback to ensure camera view changes appropriately.
                         tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index));
                 }
@@ -813,14 +814,14 @@ BOOL LLPanelEditWearable::postBuild()
         // init all strings
         mMeters         = mPanelShape->getString("meters");
         mFeet           = mPanelShape->getString("feet");
-        mHeigth         = mPanelShape->getString("height") + " ";
-        mHeigthValue    = "[HEIGHT] [METRIC1]";
+        mHeight         = mPanelShape->getString("height") + " ";
+        mHeightValue    = "[HEIGHT] [METRIC1]";
         mReplacementMetricUrl   = "[URL_METRIC2]";
 
-        std::string color = mPanelShape->getString("heigth_label_color");
-        mAvatarHeigthLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
-        color = mPanelShape->getString("heigth_value_label_color");
-        mAvatarHeigthValueLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
+        std::string color = mPanelShape->getString("height_label_color");
+        mAvatarHeightLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
+        color = mPanelShape->getString("height_value_label_color");
+        mAvatarHeightValueLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
         gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2));
         updateMetricLayout(gSavedSettings.getBOOL("HeightUnits"));
 
@@ -834,14 +835,16 @@ BOOL LLPanelEditWearable::isDirty() const
         BOOL isDirty = FALSE;
         if (mWearablePtr)
         {
-			if (mWearablePtr->isDirty() ||
-				( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 ))
-			{
-				isDirty = TRUE;
-			}
+                if (mWearablePtr->isDirty() ||
+                        (mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0))
+                {
+                        isDirty = TRUE;
+                }
         }
         return isDirty;
 }
+
+
 //virtual
 void LLPanelEditWearable::draw()
 {
@@ -857,8 +860,8 @@ void LLPanelEditWearable::draw()
 
 void LLPanelEditWearable::onClose()
 {
-	// any unsaved changes should be reverted at this point
-	revertChanges();
+        // any unsaved changes should be reverted at this point
+        revertChanges();
 }
 
 void LLPanelEditWearable::setVisible(BOOL visible)
@@ -880,11 +883,11 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c
 //static 
 void LLPanelEditWearable::onBackButtonClicked(void* userdata)
 {
-    LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
-	if ( panel->isDirty() )
-	{
-		LLAppearanceMgr::instance().setOutfitDirty( true );		
-	}
+        LLPanelEditWearable* panel = (LLPanelEditWearable*)userdata;
+        if (panel->isDirty())
+        {
+                LLAppearanceMgr::instance().setOutfitDirty(true);
+        }
 }
 
 //static 
@@ -909,7 +912,7 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r
         {
                 std::string wearable_name = response["message"].asString();
                 LLStringUtil::trim(wearable_name);
-                if( !wearable_name.empty() )
+                if (!wearable_name.empty())
                 {
                         mNameEditor->setText(wearable_name);
                         saveChanges(true);
@@ -919,24 +922,27 @@ void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& r
 
 void LLPanelEditWearable::onCommitSexChange()
 {
-        if (!isAgentAvatarValid()) return;
+        if (!isAgentAvatarValid())
+        {
+                return;
+        }
 
         LLWearableType::EType type = mWearablePtr->getType();
         U32 index;
-        if( !gAgentWearables.getWearableIndex(mWearablePtr, index) ||
-			!gAgentWearables.isWearableModifiable(type, index))
+        if (!gAgentWearables.getWearableIndex(mWearablePtr, index) ||
+                !gAgentWearables.isWearableModifiable(type, index))
         {
-			return;
+                return;
         }
 
         LLViewerVisualParam* param = static_cast<LLViewerVisualParam*>(gAgentAvatarp->getVisualParam( "male" ));
-        if( !param )
+        if (!param)
         {
-			return;
+                return;
         }
 
         bool is_new_sex_male = (gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE) == SEX_MALE;
-        LLViewerWearable*     wearable = gAgentWearables.getViewerWearable(type, index);
+        LLViewerWearable* wearable = gAgentWearables.getViewerWearable(type, index);
         if (wearable)
         {
                 wearable->setVisualParamWeight(param->getID(), is_new_sex_male);
@@ -969,23 +975,23 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
                 {
                         // Set the new version
                         LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_ctrl->getImageAssetID());
-                        if( image->getID() == IMG_DEFAULT )
+                        if (image->getID() == IMG_DEFAULT)
                         {
                                 image = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR);
                         }
                         if (getWearable())
                         {
-							U32 index;
-							if (gAgentWearables.getWearableIndex(getWearable(), index))
-							{
-								gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
-								LLVisualParamHint::requestHintUpdates();
-								gAgentAvatarp->wearableUpdated(type);
-							}
-							else
-							{
-								LL_WARNS() << "wearable not found in gAgentWearables" << LL_ENDL;
-							}
+                                U32 index;
+                                if (gAgentWearables.getWearableIndex(getWearable(), index))
+                                {
+                                        gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
+                                        LLVisualParamHint::requestHintUpdates();
+                                        gAgentAvatarp->wearableUpdated(type);
+                                }
+                                else
+                                {
+                                        LL_WARNS() << "wearable not found in gAgentWearables" << LL_ENDL;
+                                }
                         }
                 }
                 else
@@ -1001,13 +1007,13 @@ void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl)
         {
                 LLWearableType::EType type = getWearable()->getType();
                 const PickerControlEntryNamePredicate name_pred(ctrl->getName());
-                const LLEditWearableDictionary::PickerControlEntry* entry
-                        = find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred);
+                const LLEditWearableDictionary::PickerControlEntry* entry =
+                        find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred);
                 if (entry)
                 {
                         const LLColor4& old_color = getWearable()->getClothesColor(entry->mTextureIndex);
                         const LLColor4& new_color = LLColor4(ctrl->getValue());
-                        if( old_color != new_color )
+                        if (old_color != new_color)
                         {
                                 getWearable()->setClothesColor(entry->mTextureIndex, new_color);
                                 LLVisualParamHint::requestHintUpdates();
@@ -1025,11 +1031,13 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
 {
         LLPanel* panel = getPanel(type);
         if (!panel)
+        {
                 return;
+        }
 
         bool is_modifiable = false;
 
-        if(mWearableItem)
+        if (mWearableItem)
         {
                 const LLPermissions& perm = mWearableItem->getPermissions();
                 is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
@@ -1051,7 +1059,6 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
 
 void LLPanelEditWearable::incrementCofVersionLegacy()
 {
-
 }
 
 void LLPanelEditWearable::saveChanges(bool force_save_as)
@@ -1063,59 +1070,57 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
         }
 
         U32 index;
-		if (!gAgentWearables.getWearableIndex(mWearablePtr, index))
-		{
-			LL_WARNS() << "wearable not found" << LL_ENDL;
-			return;
-		}
+        if (!gAgentWearables.getWearableIndex(mWearablePtr, index))
+        {
+                LL_WARNS() << "wearable not found" << LL_ENDL;
+                return;
+        }
 
         std::string new_name = mNameEditor->getText();
 
-		// Find an existing link to this wearable's inventory item, if any, and its description field.
-		LLInventoryItem *link_item = NULL;
-		std::string description;
-		LLInventoryModel::item_array_t links =
-			LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
-		if (links.size()>0)
-		{
-			link_item = links.at(0).get();
-			if (link_item && link_item->getIsLinkType())
-			{
-				description = link_item->getActualDescription();
-			}
-		}
+        // Find an existing link to this wearable's inventory item, if any, and its description field.
+        LLInventoryItem* link_item = NULL;
+        std::string description;
+        LLInventoryModel::item_array_t links =
+                LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
+        if (links.size() > 0)
+        {
+                link_item = links.at(0).get();
+                if (link_item && link_item->getIsLinkType())
+                {
+                        description = link_item->getActualDescription();
+                }
+        }
 
         if (force_save_as)
         {
-			// the name of the wearable has changed, re-save wearable with new name
-			LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),gAgentAvatarp->mEndCustomizeCallback);
-			gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
-			mNameEditor->setText(mWearableItem->getName());
+                // the name of the wearable has changed, re-save wearable with new name
+                LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(), gAgentAvatarp->mEndCustomizeCallback);
+                gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
+                mNameEditor->setText(mWearableItem->getName());
         }
         else
         {
-			// Make another copy of this link, with the same
-			// description.  This is needed to bump the COF
-			// version so texture baking service knows appearance has changed.
-			if (link_item)
-			{
-				// Create new link
-				LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID()
-									<< " removing old link at " << link_item->getUUID()
-									<< " wearable item id " << mWearablePtr->getItemID() << LL_ENDL;
-
-				LLInventoryObject::const_object_list_t obj_array;
-				obj_array.push_back(LLConstPointer<LLInventoryObject>(link_item));
-				link_inventory_array(LLAppearanceMgr::instance().getCOF(),
-									 obj_array, 
-									 gAgentAvatarp->mEndCustomizeCallback);
-				// Remove old link
-				remove_inventory_item(link_item->getUUID(), gAgentAvatarp->mEndCustomizeCallback);
-			}
-			gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name);
-        }
-
-	
+                // Make another copy of this link, with the same
+                // description.  This is needed to bump the COF
+                // version so texture baking service knows appearance has changed.
+                if (link_item)
+                {
+                        // Create new link
+                        LL_DEBUGS("Avatar") << "link refresh, creating new link to " << link_item->getLinkedUUID()
+                                << " removing old link at " << link_item->getUUID()
+                                << " wearable item id " << mWearablePtr->getItemID() << LL_ENDL;
+
+                        LLInventoryObject::const_object_list_t obj_array;
+                        obj_array.push_back(LLConstPointer<LLInventoryObject>(link_item));
+                        link_inventory_array(LLAppearanceMgr::instance().getCOF(),
+                                obj_array,
+                                gAgentAvatarp->mEndCustomizeCallback);
+                        // Remove old link
+                        remove_inventory_item(link_item->getUUID(), gAgentAvatarp->mEndCustomizeCallback);
+                }
+                gAgentWearables.saveWearable(mWearablePtr->getType(), index, new_name);
+        }
 }
 
 void LLPanelEditWearable::revertChanges()
@@ -1165,15 +1170,15 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
 
         targetPanel->setVisible(show);
         toggleTypeSpecificControls(type);
-		// Update type controls here
-		updateTypeSpecificControls(type);
+        // Update type controls here
+        updateTypeSpecificControls(type);
 
         if (show)
         {
                 mPanelTitle->setText(title);
                 mPanelTitle->setToolTip(title);
                 mDescTitle->setText(description_title);
-                
+
                 // set name
                 mNameEditor->setText(mWearableItem->getName());
 
@@ -1181,51 +1186,51 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
 
                 // clear and rebuild visual param list
                 U8 num_subparts = (U8)(wearable_entry->mSubparts.size());
-        
+
                 for (U8 index = 0; index < num_subparts; ++index)
                 {
                         // dive into data structures to get the panel we need
                         ESubpart subpart_e = wearable_entry->mSubparts[index];
                         const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e);
-        
+
                         if (!subpart_entry)
                         {
                                 LL_WARNS() << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << LL_ENDL;
                                 continue;
                         }
-        
+
                         const std::string scrolling_panel = subpart_entry->mParamList;
                         const std::string accordion_tab = subpart_entry->mAccordionTab;
-        
+
                         LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel);
                         LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab);
-			
+
                         if (!panel_list)
                         {
                                 LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
                                 continue;
                         }
-        
+
                         if (!tab)
                         {
                                 LL_WARNS() << "could not get llaccordionctrltab from UI with name: " << accordion_tab << LL_ENDL;
                                 continue;
                         }
 
-			// Don't show female subparts if you're not female, etc.
-			if (!(gAgentAvatarp->getSex() & subpart_entry->mSex))
-			{
-				tab->setVisible(FALSE);
-				continue;
-			}
-			else
-			{
-				tab->setVisible(TRUE);
-			}
-			
+                        // Don't show female subparts if you're not female, etc.
+                        if (!(gAgentAvatarp->getSex() & subpart_entry->mSex))
+                        {
+                                tab->setVisible(FALSE);
+                                continue;
+                        }
+                        else
+                        {
+                                tab->setVisible(TRUE);
+                        }
+
                         // what edit group do we want to extract params for?
                         const std::string edit_group = subpart_entry->mEditGroup;
-        
+
                         // storage for ordered list of visual params
                         value_map_t sorted_params;
                         getSortedParams(sorted_params, edit_group);
@@ -1237,9 +1242,10 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO
                         }
 
                         buildParamList(panel_list, sorted_params, tab, jointp);
-        
+
                         updateScrollingPanelUI();
                 }
+
                 if (!disable_camera_switch)
                 {
                         showDefaultSubpart();
@@ -1268,17 +1274,17 @@ void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index)
         {
                 changeCamera(index);
         }
-
 }
 
 void LLPanelEditWearable::changeCamera(U8 subpart)
 {
-	// Don't change the camera if this type doesn't have a camera switch.
-	// Useful for wearables like physics that don't have an associated physical body part.
-	if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType()))
-	{
-		return;
-	}
+        // Don't change the camera if this type doesn't have a camera switch.
+        // Useful for wearables like physics that don't have an associated physical body part.
+        if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType()))
+        {
+                return;
+        }
+
         const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType());
         if (!wearable_entry)
         {
@@ -1307,9 +1313,9 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
         gMorphView->setCameraOffset( subpart_entry->mCameraOffset );
         if (gSavedSettings.getBOOL("AppearanceCameraMovement"))
         {
-            // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE
-            gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating());
-            gMorphView->updateCamera();
+                // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE
+                gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating());
+                gMorphView->updateCamera();
         }
 }
 
@@ -1345,7 +1351,7 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type)
                 }
 
                 std::string avatar_height_str = llformat("%.2f", new_size);
-                mHeigthValue.setArg("[HEIGHT]", avatar_height_str);
+                mHeightValue.setArg("[HEIGHT]", avatar_height_str);
                 updateAvatarHeightLabel();
         }
 
@@ -1368,14 +1374,18 @@ void LLPanelEditWearable::updateScrollingPanelUI()
         LLWearableType::EType type = mWearablePtr->getType();
         LLPanel *panel = getPanel(type);
 
-        if(panel && (mWearablePtr->getItemID().notNull()))
+        if (panel && (mWearablePtr->getItemID().notNull()))
         {
                 const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type);
                 llassert(wearable_entry);
-                if (!wearable_entry) return;
-                U8 num_subparts = (U8)(wearable_entry->mSubparts.size());
+                if (!wearable_entry)
+                {
+                        return;
+                }
 
                 LLScrollingPanelParam::sUpdateDelayFrames = 0;
+
+                U8 num_subparts = (U8)(wearable_entry->mSubparts.size());
                 for (U8 index = 0; index < num_subparts; ++index)
                 {
                         // dive into data structures to get the panel we need
@@ -1385,13 +1395,13 @@ void LLPanelEditWearable::updateScrollingPanelUI()
                         const std::string scrolling_panel = subpart_entry->mParamList;
 
                         LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel);
-        
+
                         if (!panel_list)
                         {
                                 LL_WARNS() << "could not get scrolling panel list: " << scrolling_panel << LL_ENDL;
                                 continue;
                         }
-                        
+
                         panel_list->updatePanels(TRUE);
                 }
         }
@@ -1403,76 +1413,58 @@ LLPanel* LLPanelEditWearable::getPanel(LLWearableType::EType type)
         {
                 case LLWearableType::WT_SHAPE:
                         return mPanelShape;
-                        break;
 
                 case LLWearableType::WT_SKIN:
                         return mPanelSkin;
-                        break;
 
                 case LLWearableType::WT_HAIR:
                         return mPanelHair;
-                        break;
 
                 case LLWearableType::WT_EYES:
                         return mPanelEyes;
-                        break;
 
                 case LLWearableType::WT_SHIRT:
                         return mPanelShirt;
-                        break;
 
                 case LLWearableType::WT_PANTS:
                         return mPanelPants;
-                        break;
 
                 case LLWearableType::WT_SHOES:
                         return mPanelShoes;
-                        break;
 
                 case LLWearableType::WT_SOCKS:
                         return mPanelSocks;
-                        break;
 
                 case LLWearableType::WT_JACKET:
                         return mPanelJacket;
-                        break;
 
                 case LLWearableType::WT_GLOVES:
                         return mPanelGloves;
-                        break;
 
                 case LLWearableType::WT_UNDERSHIRT:
                         return mPanelUndershirt;
-                        break;
 
                 case LLWearableType::WT_UNDERPANTS:
                         return mPanelUnderpants;
-                        break;
 
                 case LLWearableType::WT_SKIRT:
                         return mPanelSkirt;
-                        break;
 
                 case LLWearableType::WT_ALPHA:
                         return mPanelAlpha;
-                        break;
 
                 case LLWearableType::WT_TATTOO:
                         return mPanelTattoo;
-                        break;
-				
-				case LLWearableType::WT_UNIVERSAL:
-					return mPanelUniversal;
-					break;
+
+                case LLWearableType::WT_UNIVERSAL:
+                        return mPanelUniversal;
 
                 case LLWearableType::WT_PHYSICS:
                         return mPanelPhysics;
-                        break;
 
                 default:
-                        break;
+                        return NULL;
         }
-        return NULL;
 }
 
 void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group)
@@ -1507,11 +1499,11 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
         // sorted_params is sorted according to magnitude of effect from
         // least to greatest.  Adding to the front of the child list
         // reverses that order.
-        if( panel_list )
+        if (panel_list)
         {
                 panel_list->clearPanels();
                 value_map_t::iterator end = sorted_params.end();
-                for(value_map_t::iterator it = sorted_params.begin(); it != end; ++it)
+                for (value_map_t::iterator it = sorted_params.begin(); it != end; ++it)
                 {
                         LLPanel::Params p;
                         p.name("LLScrollingPanelParam");
@@ -1534,7 +1526,7 @@ void LLPanelEditWearable::updateVerbs()
 {
         bool can_copy = false;
 
-        if(mWearableItem)
+        if (mWearableItem)
         {
                 can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID);
         }
@@ -1544,7 +1536,7 @@ void LLPanelEditWearable::updateVerbs()
         mBtnRevert->setEnabled(is_dirty);
         getChildView("save_as_button")->setEnabled(is_dirty && can_copy);
 
-        if(isAgentAvatarValid())
+        if (isAgentAvatarValid())
         {
                 // Update viewer's radio buttons (of RadioGroup with control_name="AvatarSex") of Avatar's gender
                 // with value from "AvatarSex" setting
@@ -1585,17 +1577,20 @@ void LLPanelEditWearable::configureAlphaCheckbox(LLAvatarAppearanceDefines::ETex
 
 void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te)
 {
-        if (!checkbox_ctrl) return;
-        if (!getWearable()) return;
+        if (!checkbox_ctrl || !getWearable())
+        {
+                return;
+        }
 
         LL_INFOS() << "onInvisibilityCommit, self " << this << " checkbox_ctrl " << checkbox_ctrl << LL_ENDL;
 
-		U32 index;
-		if (!gAgentWearables.getWearableIndex(getWearable(),index))
-		{
-			LL_WARNS() << "wearable not found" << LL_ENDL;
-			return;
-		}
+        U32 index;
+        if (!gAgentWearables.getWearableIndex(getWearable(), index))
+        {
+                LL_WARNS() << "wearable not found" << LL_ENDL;
+                return;
+        }
+
         bool new_invis_state = checkbox_ctrl->get();
         if (new_invis_state)
         {
@@ -1603,8 +1598,8 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
                 mPreviousAlphaTexture[te] = lto->getID();
                 
                 LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE );
-				gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
-				gAgentAvatarp->wearableUpdated(getWearable()->getType());
+                gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
+                gAgentAvatarp->wearableUpdated(getWearable()->getType());
         }
         else
         {
@@ -1614,10 +1609,16 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
                 {
                         prev_id = LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) );
                 }
-                if (prev_id.isNull()) return;
-                
+                if (prev_id.isNull())
+                {
+                        return;
+                }
+
                 LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id);
-                if (!image) return;
+                if (!image)
+                {
+                        return;
+                }
 
                 gAgentAvatarp->setLocalTexture(te, image, FALSE, index);
                 gAgentAvatarp->wearableUpdated(getWearable()->getType());
@@ -1628,7 +1629,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL
 
 void LLPanelEditWearable::updateAlphaCheckboxes()
 {
-        for(string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin();
+        for (string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin();
                 iter != mAlphaCheckbox2Index.end(); ++iter )
         {
                 LLAvatarAppearanceDefines::ETextureIndex te = (LLAvatarAppearanceDefines::ETextureIndex)iter->second;
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 43d6a3595fdc7eaca0e2f6934cf1b771c35b33fe..5a40e945c23088971b1047e17becf309ddf7f8e5 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -135,14 +135,14 @@ class LLPanelEditWearable : public LLPanel
 	// localized and parameterized strings that used to build avatar_height_label
 	std::string mMeters;
 	std::string mFeet;
-	std::string mHeigth;
-	LLUIString  mHeigthValue;
+	std::string mHeight;
+	LLUIString  mHeightValue;
 	LLUIString  mReplacementMetricUrl;
 
-	// color for mHeigth string
-	LLUIColor mAvatarHeigthLabelColor;
-	// color for mHeigthValue string
-	LLUIColor mAvatarHeigthValueLabelColor;
+	// color for mHeight string
+	LLUIColor mAvatarHeightLabelColor;
+	// color for mHeightValue string
+	LLUIColor mAvatarHeightValueLabelColor;
 
 	// This text editor reference will change each time we edit a new wearable - 
 	// it will be grabbed from the currently visible panel
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 0fdb9a57f3e25e2395eca615a11533c2383ca62d..854a32621a44fb0ced3023d9f4aede59d4be3dde 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -40,7 +40,6 @@
 #include "lltextbox.h"
 #include "lltrans.h"
 #include "llsdutil.h"
-#include <boost/foreach.hpp>
 
 
 static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor");
@@ -96,7 +95,7 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience
 void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids )
 {
 	mExperienceIds.clear();
-	BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids))
+	for (LLSD uuid : llsd::inArray(experience_ids))
 	{
 		// Using insert(range) doesn't work here because the conversion from
 		// LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry.
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 5f8071d3ebf61e99accce1d477bdc30f71086500..a527ebe47fa07186f2afe844ab32324f304bf8ed 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -227,6 +227,17 @@ LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
     return LLRender::eTexIndex(MATTYPE_DIFFUSE);
 }
 
+LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
+{
+    if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
+    {
+        LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
+        return texture_info_from_pbrtype(radio_pbr_type->getSelectedIndex());
+    }
+
+    return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
+}
+
 // Things the UI provides...
 //
 LLUUID	LLPanelFace::getCurrentNormalMap()			{ return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID();	}
@@ -330,13 +341,13 @@ BOOL	LLPanelFace::postBuild()
         pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
         pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
         pbr_ctrl->setBakeTextureEnabled(false);
-        pbr_ctrl->setInventoryPickType(LLTextureCtrl::PICK_MATERIAL);
+        pbr_ctrl->setInventoryPickType(PICK_MATERIAL);
     }
 
 	mTextureCtrl = getChild<LLTextureCtrl>("texture control");
 	if(mTextureCtrl)
 	{
-		mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
+		mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
 		mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
 		mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
 		mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
@@ -353,7 +364,7 @@ BOOL	LLPanelFace::postBuild()
 	mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
 	if(mShinyTextureCtrl)
 	{
-		mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectSpecularTexture" )));
+		mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
 		mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
 		mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
 		mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
@@ -370,8 +381,8 @@ BOOL	LLPanelFace::postBuild()
 	mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
 	if(mBumpyTextureCtrl)
 	{
-		mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectNormalTexture" )));
-		mBumpyTextureCtrl->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
+		mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
+		mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
 		mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
 		mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
 		mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
@@ -4413,7 +4424,7 @@ void LLPanelFace::onCopyTexture()
                         LLUUID id = mat_data["NormMap"].asUUID();
                         if (id.notNull() && !get_can_copy_texture(id))
                         {
-                            mat_data["NormMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+                            mat_data["NormMap"] = DEFAULT_OBJECT_TEXTURE;
                             mat_data["NormMapNoCopy"] = true;
                         }
 
@@ -4423,7 +4434,7 @@ void LLPanelFace::onCopyTexture()
                         LLUUID id = mat_data["SpecMap"].asUUID();
                         if (id.notNull() && !get_can_copy_texture(id))
                         {
-                            mat_data["SpecMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
+                            mat_data["SpecMap"] = DEFAULT_OBJECT_TEXTURE;
                             mat_data["SpecMapNoCopy"] = true;
                         }
 
@@ -4653,7 +4664,8 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
                         LLToolDragAndDrop::dropTextureAllFaces(objectp,
                             itemp_res,
                             from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
-                            LLUUID::null);
+                            LLUUID::null,
+                            false);
                     }
                     else // one face
                     {
@@ -4662,6 +4674,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
                             itemp_res,
                             from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
                             LLUUID::null,
+                            false,
                             0);
                     }
                 }
@@ -5176,8 +5189,9 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
         bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material?
         bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent?
         bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale?
+        bool from_library = ALEXANDRIA_LINDEN_ID == itemp->getPermissions().getOwner();
 
-        if (can_copy && can_transfer && can_modify)
+        if ((can_copy && can_transfer && can_modify) || from_library)
         {
             pbr_ctrl->setCanApply(true, true);
             return;
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 5ca6a956994686fd6448fae33d240d25e02fbe76..a64b85815f7462b7f30f6e104289d6d99e8acc42 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -126,6 +126,7 @@ class LLPanelFace : public LLPanel
 
 	LLRender::eTexIndex getTextureChannelToEdit();
     LLRender::eTexIndex getTextureDropChannel();
+    LLGLTFMaterial::TextureInfo getPBRDropChannel();
 
 protected:
     void			navigateToTitleMedia(const std::string url);
diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp
index cf1f0bc32f0222bdaa1c6d465e00524a9bb65a24..2b6bf1bcd6311b37e90b3b5f16707d97b48c328f 100644
--- a/indra/newview/llpanelgroupbulkban.cpp
+++ b/indra/newview/llpanelgroupbulkban.cpp
@@ -49,8 +49,6 @@
 #include "lluictrlfactory.h"
 #include "llviewerwindow.h"
 
-#include <boost/foreach.hpp>
-
 LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupBulk(group_id)
 {
 	// Pass on construction of this panel to the control factory.
@@ -163,8 +161,8 @@ void LLPanelGroupBulkBan::submit()
 	// remove already banned users and yourself from request.
 	std::vector<LLAvatarName> banned_avatar_names;
 	std::vector<LLAvatarName> out_of_limit_names;
-	bool banning_self = FALSE;
-	std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID());
+	bool banning_self{ false };
+	std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgentID);
 	if (conflict != banned_agent_list.end())
 	{
 		banned_agent_list.erase(conflict);
@@ -172,18 +170,17 @@ void LLPanelGroupBulkBan::submit()
 	}
 	if (group_datap)
 	{
-		BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList)
+		for (const auto& [group_ban_agent_id, group_ban_data] : group_datap->mBanList)
 		{
-			const LLUUID& group_ban_agent_id = group_ban_pair.first;
 			std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id);
 			if (conflict != banned_agent_list.end())
 			{
 				LLAvatarName av_name;
 				LLAvatarNameCache::get(group_ban_agent_id, &av_name);
-				banned_avatar_names.push_back(av_name);
+				banned_avatar_names.emplace_back(av_name);
 
 				banned_agent_list.erase(conflict);
-				if (banned_agent_list.size() == 0)
+				if (banned_agent_list.empty())
 				{
 					break;
 				}
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index c6254f72cfbf0fa47eee0719885f9d1b5ef41413..5c4f8e9135524bd68e9886de920e6ec71e6d268d 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -112,7 +112,7 @@ class LLPanelLogin:
 	static void updateServerCombo();
 
 private:
-	boost::scoped_ptr<LLPanelLoginListener> mListener;
+	std::unique_ptr<LLPanelLoginListener> mListener;
 
 	void updateLoginButtons();
 	void populateUserList(LLPointer<LLCredential> credential);
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index f3a41f2e255725b2915f6bdd9c2c4ee4d092f24a..632e902d70da48105364b1d7f218d33de020ae74 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -964,9 +964,15 @@ void LLTaskLSLBridge::openItem()
 		LLSD floater_key;
 		floater_key["taskid"] = mPanel->getTaskUUID();
 		floater_key["itemid"] = mUUID;
+
 		LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
 		if (preview)
 		{
+            LLSelectNode *node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, TRUE);
+            if (node && node->mValid)
+            {
+                preview->setObjectName(node->mName);
+            }
 			preview->setObjectID(mPanel->getTaskUUID());
 		}
 	}
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 4a755a6e93198cb7fb2559a1c8bbb5ff0e7bc4ea..c7ae4eb0d9f27abe6c4bd3a9da6c12b55a57e082 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -733,7 +733,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
 	if (mSearchString == "")
 	{
 		mInventoryItemsPanel->setFilterSubString(LLStringUtil::null);
-		mWearableItemsList->setFilterSubString(LLStringUtil::null);
+		mWearableItemsList->setFilterSubString(LLStringUtil::null, true);
 		// re-open folders that were initially open
 		mSavedFolderState->setApply(TRUE);
 		mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
@@ -763,8 +763,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
 	
 	// set new filter string
 	mInventoryItemsPanel->setFilterSubString(mSearchString);
-	mWearableItemsList->setFilterSubString(mSearchString);
-
+	mWearableItemsList->setFilterSubString(mSearchString, true);
 }
 
 void LLPanelOutfitEdit::onPlusBtnClicked(void)
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index d8c34d5c404afc2bf8758628076165572fa0edb7..af06de379d8f79a39f259d0406bcde9610abf2e7 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -28,19 +28,19 @@
 
 #include "llpaneloutfitsinventory.h"
 
-#include "llnotificationsutil.h"
-#include "lltabcontainer.h"
-
+#include "llagentwearables.h"
+#include "llappearancemgr.h"
 #include "llfloatersidepanelcontainer.h"
 #include "llinventoryfunctions.h"
 #include "llinventorymodelbackgroundfetch.h"
-#include "llagentwearables.h"
-#include "llappearancemgr.h"
-#include "lloutfitobserver.h"
+#include "llnotificationsutil.h"
 #include "lloutfitgallery.h"
+#include "lloutfitobserver.h"
 #include "lloutfitslist.h"
+#include "llpanelappearancetab.h"
 #include "llpanelwearing.h"
 #include "llsidepanelappearance.h"
+#include "lltabcontainer.h"
 #include "llviewercontrol.h"
 #include "llviewerfoldertype.h"
 
@@ -159,25 +159,12 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
 {
 	if (!mActivePanel) return;
 
-	mFilterSubString = string;
-
-	if (string == "")
-	{
-		mActivePanel->setFilterSubString(LLStringUtil::null);
-	}
-
     if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted())
     {
         llassert(false); // this should have been done on startup
         LLInventoryModelBackgroundFetch::instance().start();
     }
 
-	if (mActivePanel->getFilterSubString().empty() && string.empty())
-	{
-		// current filter and new filter empty, do nothing
-		return;
-	}
-
 	// set new filter string
 	mActivePanel->setFilterSubString(string);
 }
@@ -302,6 +289,7 @@ bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
 {
 	return mActivePanel && mActivePanel->isActionEnabled(userdata);
 }
+
 // List Commands                                                                //
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -330,7 +318,7 @@ void LLPanelOutfitsInventory::onTabChange()
 	mActivePanel = dynamic_cast<LLPanelAppearanceTab*>(mAppearanceTabs->getCurrentPanel());
 	if (!mActivePanel) return;
 
-	mActivePanel->setFilterSubString(mFilterSubString);
+	mActivePanel->checkFilterSubString();
 	mActivePanel->onOpen(LLSD());
 
 	updateVerbs();
@@ -357,8 +345,6 @@ bool LLPanelOutfitsInventory::isOutfitsGalleryPanelActive() const
 	return mActivePanel->getName() == OUTFIT_GALLERY_TAB_NAME;
 }
 
-
-
 void LLPanelOutfitsInventory::setWearablesLoading(bool val)
 {
 	updateVerbs();
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 50d7074d4b77429b1f046f74ffc5998cc6e2f38e..63f9f599f1b7b0dc169952cc2958761048ee4b23 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -61,19 +61,19 @@ class LLPanelOutfitsInventory : public LLPanel
 
 	void openApearanceTab(const std::string& tab_name);
 
+    bool isCOFPanelActive() const;
+
 protected:
 	void updateVerbs();
 
 private:
 	LLTabContainer*			mAppearanceTabs;
-	std::string 			mFilterSubString;
 
 	//////////////////////////////////////////////////////////////////////////////////
 	// tab panels                                                                   //
 protected:
 	void 					initTabPanels();
 	void 					onTabChange();
-	bool 					isCOFPanelActive() const;
 	bool 					isOutfitsListPanelActive() const;
 	bool 					isOutfitsGalleryPanelActive() const;
 
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 132b710620dcb4e320da5ad25ab5c950962576d5..fd46c4ca7deac93d9b09374b92b5d044082f1106 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1969,7 +1969,8 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
                 PERM_NONE,
                 PERM_NONE,
                 FALSE,
-                NULL);
+                NULL,
+                PICK_TEXTURE);
 
             mFloaterTexturePickerHandle = texture_floaterp->getHandle();
 
@@ -2304,7 +2305,8 @@ void LLPanelProfileFirstLife::onChangePhoto()
                 PERM_NONE,
                 PERM_NONE,
                 FALSE,
-                NULL);
+                NULL,
+                PICK_TEXTURE);
 
             mFloaterTexturePickerHandle = texture_floaterp->getHandle();
 
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 3fbaad4dee7de4ed7cebc71a2735b12fdd8c9cec..307935f45fa0e01a51c04cd1f65fc7695d441692 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -650,6 +650,8 @@ BOOL LLPanelProfileClassified::postBuild()
     mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelProfileClassified::onTextureSelected, this));
     mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseEnter, this));
     mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseLeave, this));
+    mSnapshotCtrl->setAllowLocalTexture(FALSE);
+    mSnapshotCtrl->setBakeTextureEnabled(FALSE);
     mEditIcon->setVisible(false);
 
     mMapButton->setCommitCallback(boost::bind(&LLPanelProfileClassified::onMapClick, this));
@@ -667,7 +669,7 @@ BOOL LLPanelProfileClassified::postBuild()
         mCategoryCombo->add(LLTrans::getString(iter->second));
     }
 
-    mClassifiedNameEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onChange, this), NULL);
+    mClassifiedNameEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onTitleChange, this), NULL);
     mClassifiedDescEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
     mCategoryCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
     mContentTypeCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
@@ -935,6 +937,8 @@ void LLPanelProfileClassified::onCancelClick()
     }
     else
     {
+        updateTabLabel(mClassifiedNameText->getValue());
+
         // Reload data to undo changes to forms
         LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
     }
@@ -955,7 +959,7 @@ void LLPanelProfileClassified::onSaveClick()
     }
     if(isNew() || isNewWithErrors())
     {
-        if(gStatusBar->getBalance() < getPriceForListing())
+        if(gStatusBar->getBalance() < MINIMUM_PRICE_FOR_LISTING)
         {
             LLNotificationsUtil::add("ClassifiedInsufficientFunds");
             return;
@@ -1403,6 +1407,12 @@ void LLPanelProfileClassified::onChange()
     enableSave(isDirty());
 }
 
+void LLPanelProfileClassified::onTitleChange()
+{
+    updateTabLabel(getClassifiedName());
+    onChange();
+}
+
 void LLPanelProfileClassified::doSave()
 {
     //*TODO: Fix all of this
@@ -1428,6 +1438,14 @@ void LLPanelProfileClassified::doSave()
 
 void LLPanelProfileClassified::onPublishFloaterPublishClicked()
 {
+    if (mPublishFloater->getPrice() < MINIMUM_PRICE_FOR_LISTING)
+    {
+        LLSD args;
+        args["MIN_PRICE"] = MINIMUM_PRICE_FOR_LISTING;
+        LLNotificationsUtil::add("MinClassifiedPrice", args);
+        return;
+    }
+
     setPriceForListing(mPublishFloater->getPrice());
 
     doSave();
diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h
index 912819e86bce0729096def3ede8c3c0b76c48a05..d1aa5f55e3729cb2dd9ad049a9dad5e14723b1e8 100644
--- a/indra/newview/llpanelprofileclassifieds.h
+++ b/indra/newview/llpanelprofileclassifieds.h
@@ -257,6 +257,7 @@ class LLPanelProfileClassified
 
     void onSetLocationClick();
     void onChange();
+    void onTitleChange();
 
     void onPublishFloaterPublishClicked();
 
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index ff3f654d0eaaaa6ae835b9a8a96f5db7e2289938..8bbd4a748dfd59e3d67ff05dcc70654c30aca6ce 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -488,6 +488,8 @@ LLPanelProfilePick::LLPanelProfilePick()
  , mLocationChanged(false)
  , mNewPick(false)
  , mIsEditing(false)
+ , mRegionCallbackConnection()
+ , mParcelCallbackConnection()
 {
 }
 
@@ -505,6 +507,15 @@ LLPanelProfilePick::~LLPanelProfilePick()
     {
         LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this);
     }
+
+    if (mRegionCallbackConnection.connected())
+    {
+        mRegionCallbackConnection.disconnect();
+    }
+    if (mParcelCallbackConnection.connected())
+    {
+        mParcelCallbackConnection.disconnect();
+    }
 }
 
 void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
@@ -562,7 +573,6 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
     {
         mPickName->setEnabled(TRUE);
         mPickDescription->setEnabled(TRUE);
-        mSetCurrentLocationButton->setVisible(TRUE);
     }
     else
     {
@@ -577,10 +587,11 @@ BOOL LLPanelProfilePick::postBuild()
     mSaveButton = getChild<LLButton>("save_changes_btn");
     mCreateButton = getChild<LLButton>("create_changes_btn");
     mCancelButton = getChild<LLButton>("cancel_changes_btn");
-    mSetCurrentLocationButton = getChild<LLButton>("set_to_curr_location_btn");
 
     mSnapshotCtrl = getChild<LLTextureCtrl>("pick_snapshot");
     mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this));
+    mSnapshotCtrl->setAllowLocalTexture(FALSE);
+    mSnapshotCtrl->setBakeTextureEnabled(FALSE);
 
     childSetAction("teleport_btn", boost::bind(&LLPanelProfilePick::onClickTeleport, this));
     childSetAction("show_on_map_btn", boost::bind(&LLPanelProfilePick::onClickMap, this));
@@ -588,7 +599,6 @@ BOOL LLPanelProfilePick::postBuild()
     mSaveButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this));
     mCreateButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this));
     mCancelButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickCancel, this));
-    mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this));
 
     mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL);
     mPickName->setEnabled(FALSE);
@@ -670,6 +680,7 @@ void LLPanelProfilePick::setSnapshotId(const LLUUID& id)
 void LLPanelProfilePick::setPickName(const std::string& name)
 {
     mPickName->setValue(name);
+    mPickNameStr = name;
 }
 
 const std::string LLPanelProfilePick::getPickName()
@@ -750,34 +761,16 @@ BOOL LLPanelProfilePick::isDirty() const
     return FALSE;
 }
 
-void LLPanelProfilePick::onClickSetLocation()
+void LLPanelProfilePick::onClickSave()
 {
-    // Save location for later use.
-    setPosGlobal(gAgent.getPositionGlobal());
-
-    std::string parcel_name, region_name;
-
-    LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
-    if (parcel)
+    if (mRegionCallbackConnection.connected())
     {
-        mParcelId = parcel->getID();
-        parcel_name = parcel->getName();
+        mRegionCallbackConnection.disconnect();
     }
-
-    LLViewerRegion* region = gAgent.getRegion();
-    if (region)
+    if (mParcelCallbackConnection.connected())
     {
-        region_name = region->getName();
+        mParcelCallbackConnection.disconnect();
     }
-
-    setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal()));
-
-    mLocationChanged = true;
-    enableSaveButton(TRUE);
-}
-
-void LLPanelProfilePick::onClickSave()
-{
     sendUpdate();
 
     mLocationChanged = false;
@@ -785,6 +778,7 @@ void LLPanelProfilePick::onClickSave()
 
 void LLPanelProfilePick::onClickCancel()
 {
+    updateTabLabel(mPickNameStr);
     LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId());
     mLocationChanged = false;
     enableSaveButton(FALSE);
diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h
index f84463cc9b7f1cd2ee0b15cc6b89f62c730ea2b1..76b1452431a3b734a1a33a0c9244f3a3b47b3f60 100644
--- a/indra/newview/llpanelprofilepicks.h
+++ b/indra/newview/llpanelprofilepicks.h
@@ -140,7 +140,7 @@ class LLPanelProfilePick
     void setParcelID(const LLUUID& parcel_id) override { mParcelId = parcel_id; }
     void setErrorStatus(S32 status, const std::string& reason) override {};
 
-protected:
+  protected:
 
     /**
      * Sends remote parcel info request to resolve parcel name from its ID.
@@ -201,11 +201,6 @@ class LLPanelProfilePick
      */
     void resetDirty() override;
 
-    /**
-     * Callback for "Set Location" button click
-     */
-    void onClickSetLocation();
-
     /**
      * Callback for "Save" and "Create" button click
      */
@@ -228,7 +223,6 @@ class LLPanelProfilePick
     LLTextureCtrl*      mSnapshotCtrl;
     LLLineEditor*       mPickName;
     LLTextEditor*       mPickDescription;
-    LLButton*           mSetCurrentLocationButton;
     LLButton*           mSaveButton;
     LLButton*           mCreateButton;
     LLButton*           mCancelButton;
@@ -237,6 +231,10 @@ class LLPanelProfilePick
     LLUUID mParcelId;
     LLUUID mPickId;
     LLUUID mRequestedId;
+    std::string mPickNameStr;
+
+    boost::signals2::connection mRegionCallbackConnection;
+    boost::signals2::connection mParcelCallbackConnection;
 
     bool mLocationChanged;
     bool mNewPick;
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index b938b304792e1d9bac22cdba389f713b5ed64139..3ed444a5af94e1618318a51ebdbadceea475b289 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -1067,6 +1067,12 @@ void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata)
         LLLandmarkActions::getSLURLfromPosGlobal(globalPos,
             boost::bind(&LLTeleportHistoryPanel::gotSLURLCallback, _1));
     }
+    else if ("remove" == command_name)
+    {
+        LLTeleportHistoryStorage::getInstance()->removeItem(index);
+        LLTeleportHistoryStorage::getInstance()->save();
+        showTeleportHistory();
+    }
 }
 
 bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
@@ -1121,7 +1127,8 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
     if ("teleport" == command_name
         || "view" == command_name
         || "show_on_map" == command_name
-        || "copy_slurl" == command_name)
+        || "copy_slurl" == command_name
+        || "remove" == command_name)
     {
         if (!mLastSelectedFlatlList)
         {
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index 1ecf67017980331746285cc0135e0fbb4fe09914..0f87bf197dc39443e6969d414786be9153279dc9 100644
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -32,6 +32,7 @@
 // Viewer includes
 #include "llcombobox.h"
 #include "llsliderctrl.h"
+#include "llstartup.h"
 #include "llviewercontrol.h"
 #include "llvoiceclient.h"
 #include "llvoicechannel.h"
@@ -70,11 +71,14 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
 
 	mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
 	mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
+    mUnmuteBtn = getChild<LLButton>("unmute_btn");
 
 	mCtrlInputDevices->setCommitCallback(
 		boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
 	mCtrlOutputDevices->setCommitCallback(
 		boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
+    mUnmuteBtn->setCommitCallback(
+        boost::bind(&LLPanelVoiceDeviceSettings::onCommitUnmute, this));
 
 	mLocalizedDeviceNames[DEFAULT_DEVICE]				= getString("default_text");
 	mLocalizedDeviceNames["No Device"]					= getString("name_no_device");
@@ -108,11 +112,27 @@ void LLPanelVoiceDeviceSettings::draw()
 
 	// let user know that volume indicator is not yet available
 	bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode();
-	getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
+    bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled();
+    if (voice_enabled)
+    {
+        getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
+        getChildView("disabled_text")->setVisible(FALSE);
+        mUnmuteBtn->setVisible(FALSE);
+    }
+    else
+    {
+        getChildView("wait_text")->setVisible(FALSE);
+
+        static LLCachedControl<bool> chat_enabled(gSavedSettings, "EnableVoiceChat");
+        // If voice isn't enabled, it is either disabled or muted
+        bool voice_disabled = chat_enabled() || LLStartUp::getStartupState() <= STATE_LOGIN_WAIT;
+        getChildView("disabled_text")->setVisible(voice_disabled);
+        mUnmuteBtn->setVisible(!voice_disabled);
+    }
 
 	LLPanel::draw();
 
-	if (is_in_tuning_mode)
+	if (is_in_tuning_mode && voice_enabled)
 	{
 		const S32 num_bars = 5;
 		F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
@@ -348,3 +368,8 @@ void LLPanelVoiceDeviceSettings::onInputDevicesClicked()
 {
 	LLVoiceClient::getInstance()->refreshDeviceLists(false);  // fill in the pop up menus again if needed.
 }
+
+void LLPanelVoiceDeviceSettings::onCommitUnmute()
+{
+    gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
+}
diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h
index 355bc02b05473627abea9311b615d09da5dfc62d..e704394d4a45bee172ed0ce675db4ce398c68a7d 100644
--- a/indra/newview/llpanelvoicedevicesettings.h
+++ b/indra/newview/llpanelvoicedevicesettings.h
@@ -55,12 +55,14 @@ class LLPanelVoiceDeviceSettings : public LLPanel
 	void onCommitOutputDevice();
 	void onOutputDevicesClicked();
 	void onInputDevicesClicked();
+    void onCommitUnmute();
 
 	F32 mMicVolume;
 	std::string mInputDevice;
 	std::string mOutputDevice;
 	class LLComboBox		*mCtrlInputDevices;
 	class LLComboBox		*mCtrlOutputDevices;
+    class LLButton          *mUnmuteBtn;
 	BOOL mDevicesUpdated;
 	bool mUseTuningMode;
 	std::map<std::string, std::string> mLocalizedDeviceNames;
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index 6f11e76a72d304fa5923bd5fcf20371ac5a04552..09038ac95aba97383879e802139d884076dc8887 100644
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -50,7 +50,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown()
 {
 	mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));
 	mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this));
-	mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox",	boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1));
+	mCommitCallbackRegistrar.add("Vol.updateCheckbox",	boost::bind(&LLPanelVolumePulldown::updateCheckbox, this, _1, _2));
 	mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2));
 	buildFromFile( "panel_volume_pulldown.xml");
 }
@@ -90,19 +90,23 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data)
 		control->set(LLSD(FALSE));
 }
 
-void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
+void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data)
 {
-	std::string name = ctrl->getName();
+    std::string control_name = user_data.asString();
+    if (control_name == "MediaAutoPlay")
+    {
+        std::string name = ctrl->getName();
 
-	// Disable "Allow Media to auto play" only when both
-	// "Streaming Music" and "Media" are unchecked. STORM-513.
-	if ((name == "enable_music") || (name == "enable_media"))
-	{
-		bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
-		bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
+        // Disable "Allow Media to auto play" only when both
+        // "Streaming Music" and "Media" are unchecked. STORM-513.
+        if ((name == "enable_music") || (name == "enable_media"))
+        {
+            bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
+            bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
 
-		getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled);
-	}
+            getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled);
+        }
+    }
 }
 
 void LLPanelVolumePulldown::onClickSetSounds()
diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h
index e907bb0c78fa36dbd4623c8187a14bc39d2e0799..3243d2e968fb63b3b52e26badb3b136e22817b4a 100644
--- a/indra/newview/llpanelvolumepulldown.h
+++ b/indra/newview/llpanelvolumepulldown.h
@@ -43,7 +43,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown
 	void onClickSetSounds();
 	// Disables "Allow Media to auto play" check box only when both
 	// "Streaming Music" and "Media" are unchecked. Otherwise enables it.
-	void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl);
+	void updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data);
 	void onAdvancedButtonClick(const LLSD& user_data);
 };
 
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 5242c4fef9a2776431f019171d792984969c7cc1..bfdb0fbc88ed61f4175875d1dc77e570d6f37f70 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -209,8 +209,6 @@ class LLTempAttachmentsContextMenu : public LLListContextMenu
 
 //////////////////////////////////////////////////////////////////////////
 
-std::string LLPanelAppearanceTab::sFilterSubString = LLStringUtil::null;
-
 static LLPanelInjector<LLPanelWearing> t_panel_wearing("panel_wearing");
 
 LLPanelWearing::LLPanelWearing()
@@ -328,10 +326,11 @@ void LLPanelWearing::startUpdateTimer()
 }
 
 // virtual
-void LLPanelWearing::setFilterSubString(const std::string& string)
+void LLPanelWearing::onFilterSubStringChanged(const std::string& new_string, const std::string& old_string)
 {
-	sFilterSubString = string;
-	mCOFItemsList->setFilterSubString(sFilterSubString);
+	mCOFItemsList->setFilterSubString(new_string, true);
+
+	mAccordionCtrl->arrange();
 }
 
 // virtual
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 18e543eec656dbba0c00604ae30b3d1bcbe8561f..2f3f14956a5b425010e4459ad2faf659a6dd2578 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -61,7 +61,7 @@ class LLPanelWearing : public LLPanelAppearanceTab
 
 	/*virtual*/ void onOpen(const LLSD& info);
 
-	/*virtual*/ void setFilterSubString(const std::string& string);
+	/*virtual*/ void onFilterSubStringChanged(const std::string& new_string, const std::string& old_string);
 
 	/*virtual*/ bool isActionEnabled(const LLSD& userdata);
 
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 17b8ec0683fd04499444a8c376261568de603373..664e240484906ffbaa0abf487d2aab63fc07e994 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -114,7 +114,7 @@ class LinksetsResponder
 	void handleTerrainLinksetsResult(const LLSD &pContent);
 	void handleTerrainLinksetsError();
 
-    typedef boost::shared_ptr<LinksetsResponder> ptr_t;
+    typedef std::shared_ptr<LinksetsResponder> ptr_t;
 
 protected:
 
@@ -139,7 +139,7 @@ class LinksetsResponder
 	LLPathfindingObjectPtr                          mTerrainLinksetPtr;
 };
 
-typedef boost::shared_ptr<LinksetsResponder> LinksetsResponderPtr;
+typedef std::shared_ptr<LinksetsResponder> LinksetsResponderPtr;
 
 //---------------------------------------------------------------------------
 // LLPathfindingManager
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index bb44f780c8e09e465b600cfad3afc700ae5be965..258d0fdef70580d4138a4729e3be6da2ab60eda7 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -107,8 +107,8 @@ class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
     void navMeshStatusRequestCoro(std::string url, U64 regionHandle, bool isGetStatusOnly);
     void navAgentStateRequestCoro(std::string url);
     void navMeshRebakeCoro(std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback);
-    void linksetObjectsCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
-    void linksetTerrainCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
+    void linksetObjectsCoro(std::string url, std::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
+    void linksetTerrainCoro(std::string url, std::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
     void charactersCoro(std::string url, request_id_t requestId, object_request_callback_t callback) const;
 
 	//void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index 87f32b8d56487245b7ff0ba0d890845b483cfb4a..ddc886f01cd2af9170ea37e74bdf8422b882478b 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -39,7 +39,7 @@
 class LLPathfindingNavMesh;
 class LLUUID;
 
-typedef boost::shared_ptr<LLPathfindingNavMesh> LLPathfindingNavMeshPtr;
+typedef std::shared_ptr<LLPathfindingNavMesh> LLPathfindingNavMeshPtr;
 
 class LLPathfindingNavMesh
 {
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index baa1cc59799d4e51e1aac97dd513b55e6a2dc34c..b76f4421a62dba89516677d92f37557d9c396bb3 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -114,7 +114,7 @@ class LLPathfindingNavMeshZone
 		LLPathfindingNavMesh::navmesh_slot_t        mNavMeshSlot;
 	};
 
-	typedef boost::shared_ptr<NavMeshLocation> NavMeshLocationPtr;
+	typedef std::shared_ptr<NavMeshLocation> NavMeshLocationPtr;
 	typedef std::vector<NavMeshLocationPtr> NavMeshLocationPtrs;
 
 	void handleNavMeshLocation();
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index b8d3ca236413f08be20eafa37b6a8c28acb89ebc..0114cce3f19b5f7324dd74e74536c0024ec7df62 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -41,7 +41,7 @@
 class LLPathfindingObject;
 class LLSD;
 
-typedef boost::shared_ptr<LLPathfindingObject> LLPathfindingObjectPtr;
+typedef std::shared_ptr<LLPathfindingObject> LLPathfindingObjectPtr;
 
 class LLPathfindingObject
 {
diff --git a/indra/newview/llpathfindingobjectlist.h b/indra/newview/llpathfindingobjectlist.h
index 61580582d370bdd4d2356d54ab6d9ab6678c640e..e2e0dce4da5a63a401e5e0cdcc7b18c5fa6d28ca 100644
--- a/indra/newview/llpathfindingobjectlist.h
+++ b/indra/newview/llpathfindingobjectlist.h
@@ -36,7 +36,7 @@
 
 class LLPathfindingObjectList;
 
-typedef boost::shared_ptr<LLPathfindingObjectList> LLPathfindingObjectListPtr;
+typedef std::shared_ptr<LLPathfindingObjectList> LLPathfindingObjectListPtr;
 typedef std::map<std::string, LLPathfindingObjectPtr> LLPathfindingObjectMap;
 
 class LLPathfindingObjectList
diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp
index 64e66d520b85877da249314a61235b1851fbd3e1..8718f7e7b02cc31337531cc51301d14399bbb275 100644
--- a/indra/newview/llperfstats.cpp
+++ b/indra/newview/llperfstats.cpp
@@ -69,7 +69,7 @@ namespace LLPerfStats
     {
         assert_main_thread();
         // these following variables are proxies for pipeline statics we do not need a two way update (no llviewercontrol handler)
-        if( tuningFlag & NonImpostors ){ gSavedSettings.setU32("IndirectMaxNonImpostors", nonImpostors); };
+        if( tuningFlag & NonImpostors ){ gSavedSettings.setU32("RenderAvatarMaxNonImpostors", nonImpostors); };
         if( tuningFlag & ReflectionDetail ){ gSavedSettings.setS32("RenderReflectionDetail", reflectionDetail); };
         if( tuningFlag & FarClip ){ gSavedSettings.setF32("RenderFarClip", farClip); };
         if( tuningFlag & UserMinDrawDistance ){ gSavedSettings.setF32("AutoTuneRenderFarClipMin", userMinDrawDistance); };
@@ -378,7 +378,7 @@ namespace LLPerfStats
             auto count = countNearbyAvatars(std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance));
             if( count != tunables.nonImpostors )
             {
-                tunables.updateNonImposters( (count < LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER)?count : LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER );
+                tunables.updateNonImposters( (count < LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER)?count : 0 );
                 LL_DEBUGS("AutoTune") << "There are " << count << "avatars within " << std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance) << "m of the camera" << LL_ENDL;
             }
         }
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 1c14acd843489d115c4ee39360295dbf23094b81..f3455bb4f0f2974e19f2f4f17809c58de3088c1d 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -120,3 +120,13 @@ S32	LLPlacesInventoryPanel::notify(const LLSD& info)
 	}
 	return 0;
 }
+
+BOOL LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+                                                      EAcceptance *accept, std::string &tooltip_msg)
+{
+    if (mAcceptsDragAndDrop) 
+    {
+        return LLInventoryPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+    }
+    return FALSE;
+}
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 3c27964ec58b774f46e3a372d729b3d27980dbe4..81b623b045ef3fb65f2e7c5c6720b7612d7c5320 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -47,11 +47,14 @@ class LLPlacesInventoryPanel : public LLAssetFilteredInventoryPanel
 	LLPlacesInventoryPanel(const Params& p);
 	~LLPlacesInventoryPanel();
 
-    LLFolderView * createFolderRoot(LLUUID root_id );
+    LLFolderView * createFolderRoot(LLUUID root_id ) override;
 	void saveFolderState();
 	void restoreFolderState();
 
-	virtual S32	notify(const LLSD& info) ;
+	virtual S32	notify(const LLSD& info) override;
+
+    BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
+                            EAcceptance *accept, std::string &tooltip_msg) override;
 
 private:
 	LLSaveFolderState*			mSavedFolderState;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index aceb8539d2a30a79a37e714c1205b47f728dfb16..7095275c52dca07368b26a3b990b657419f6fdbb 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -87,6 +87,9 @@
 #include "llexperiencecache.h"
 #include "llfloaterexperienceprofile.h"
 #include "llviewerassetupload.h"
+#include "lltoggleablemenu.h"
+#include "llmenubutton.h"
+#include "llinventoryfunctions.h"
 
 const std::string HELLO_LSL =
 	"default\n"
@@ -322,6 +325,38 @@ void LLFloaterScriptSearch::onSearchBoxCommit()
 	}
 }
 
+/// ---------------------------------------------------------------------------
+
+class LLScriptMovedObserver : public LLInventoryObserver
+{
+  public:
+    LLScriptMovedObserver(LLPreviewLSL *floater) : mPreview(floater) { gInventory.addObserver(this); }
+    virtual ~LLScriptMovedObserver() { gInventory.removeObserver(this); }
+    virtual void changed(U32 mask);
+
+  private:
+    LLPreviewLSL *mPreview;
+};
+
+void LLScriptMovedObserver::changed(U32 mask)
+{
+    const std::set<LLUUID> &mChangedItemIDs = gInventory.getChangedIDs();
+    std::set<LLUUID>::const_iterator it;
+
+    const LLUUID &item_id = mPreview->getScriptID();
+
+    for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++)
+    {
+        if (*it == item_id)
+        {
+            if ((mask & (LLInventoryObserver::STRUCTURE)) != 0)
+            {
+                mPreview->setDirty();
+            }
+        }
+    }
+}
+
 /// ---------------------------------------------------------------------------
 /// LLScriptEdCore
 /// ---------------------------------------------------------------------------
@@ -460,6 +495,13 @@ BOOL LLScriptEdCore::postBuild()
 	LLSyntaxIdLSL::getInstance()->initialize();
 	processKeywords();
 
+    mCommitCallbackRegistrar.add("FontSize.Set", boost::bind(&LLScriptEdCore::onChangeFontSize, this, _2));
+    mEnableCallbackRegistrar.add("FontSize.Check", boost::bind(&LLScriptEdCore::isFontSizeChecked, this, _2));
+
+    LLToggleableMenu *context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
+        "menu_lsl_font_size.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+    getChild<LLMenuButton>("font_btn")->setMenu(context_menu, LLMenuButton::MP_BOTTOM_LEFT, true);
+
 	return TRUE;
 }
 
@@ -788,7 +830,7 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string)
 
 	LLUIString url_string = gSavedSettings.getString("LSLHelpURL");
 
-	url_string.setArg("[LSL_STRING]", help_string);
+	url_string.setArg("[LSL_STRING]", help_string.empty() ? HELP_LSL_PORTAL_TOPIC : help_string);
 
 	addHelpItemToHistory(help_string);
 
@@ -1288,7 +1330,21 @@ LLUUID LLScriptEdCore::getAssociatedExperience()const
 	return mAssociatedExperience;
 }
 
-void LLLiveLSLEditor::setExperienceIds( const LLSD& experience_ids )
+void LLScriptEdCore::onChangeFontSize(const LLSD &userdata)
+{
+    const std::string font_name = userdata.asString();
+    gSavedSettings.setString("LSLFontSizeName", font_name);
+}
+
+bool LLScriptEdCore::isFontSizeChecked(const LLSD &userdata)
+{
+    const std::string current_size_name = LLScriptEditor::getScriptFontSize();
+    const std::string size_name = userdata.asString();
+
+    return (size_name == current_size_name);
+}
+
+    void LLLiveLSLEditor::setExperienceIds( const LLSD& experience_ids )
 {
 	mExperienceIds=experience_ids;
 	updateExperiencePanel();
@@ -1476,7 +1532,21 @@ bool LLScriptEdContainer::onExternalChange(const std::string& filename)
 	return true;
 }
 
-/// ---------------------------------------------------------------------------
+BOOL LLScriptEdContainer::handleKeyHere(KEY key, MASK mask) 
+{
+    if (('A' == key) && (MASK_CONTROL == (mask & MASK_MODIFIERS)))
+    {
+        mScriptEd->selectAll();
+        return TRUE;
+    }
+
+    if (!LLPreview::handleKeyHere(key, mask)) 
+    {
+        return mScriptEd->handleKeyHere(key, mask);
+    }
+    return TRUE;
+}
+    /// ---------------------------------------------------------------------------
 /// LLPreviewLSL
 /// ---------------------------------------------------------------------------
 
@@ -1517,6 +1587,14 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key )
 	mPendingUploads(0)
 {
 	mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this);
+
+    mItemObserver = new LLScriptMovedObserver(this);
+}
+
+LLPreviewLSL::~LLPreviewLSL() 
+{ 
+    delete mItemObserver;
+    mItemObserver = NULL;
 }
 
 // virtual
@@ -1528,10 +1606,14 @@ BOOL LLPreviewLSL::postBuild()
 	if (item)
 	{
 		getChild<LLUICtrl>("desc")->setValue(item->getDescription());
+
+        std::string item_path = get_category_path(item->getParentUUID());
+        getChild<LLUICtrl>("path_txt")->setValue(item_path);
+        getChild<LLUICtrl>("path_txt")->setToolTip(item_path);
 	}
 	childSetCommitCallback("desc", LLPreview::onText, this);
 	getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
-
+ 
 	return LLPreview::postBuild();
 }
 
@@ -1543,7 +1625,12 @@ void LLPreviewLSL::draw()
 		setTitle(LLTrans::getString("ScriptWasDeleted"));
 		mScriptEd->setItemRemoved(TRUE);
 	}
-
+    else if (mDirty) 
+    {
+        std::string item_path = get_category_path(item->getParentUUID());
+        getChild<LLUICtrl>("path_txt")->setValue(item_path);
+        getChild<LLUICtrl>("path_txt")->setToolTip(item_path);
+    }
 	LLPreview::draw();
 }
 // virtual
@@ -1856,7 +1943,8 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
 	mPendingUploads(0),
 	mIsModifiable(FALSE),
 	mIsNew(false),
-	mIsSaving(FALSE)
+	mIsSaving(FALSE),
+    mObjectName("")
 {
 	mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
 }
@@ -1993,6 +2081,7 @@ void LLLiveLSLEditor::loadAsset()
 			}
 
 			refreshFromItem();
+            getChild<LLUICtrl>("obj_name")->setValue(mObjectName);
 			// This is commented out, because we don't completely
 			// handle script exports yet.
 			/*
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index b01c7fd4ad291e98fcd446654eb18abb086d8031..dc49770699d3fa52ae19c83945d515516724c3fa 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -36,6 +36,7 @@
 #include "llfloatergotoline.h"
 #include "lllivefile.h"
 #include "llsyntaxid.h"
+#include "llscripteditor.h"
 
 class LLLiveLSLFile;
 class LLMessageSystem;
@@ -52,6 +53,7 @@ class LLViewerInventoryItem;
 class LLScriptEdContainer;
 class LLFloaterGotoLine;
 class LLFloaterExperienceProfile;
+class LLScriptMovedObserver;
 
 class LLLiveLSLFile : public LLLiveFile
 {
@@ -145,7 +147,13 @@ class LLScriptEdCore : public LLPanel
     void 			setAssetID( const LLUUID& asset_id){ mAssetID = asset_id; };
     LLUUID 			getAssetID() { return mAssetID; }
 
-private:
+    bool isFontSizeChecked(const LLSD &userdata);
+    void onChangeFontSize(const LLSD &size_name);
+
+    virtual BOOL handleKeyHere(KEY key, MASK mask);
+    void selectAll() { mEditor->selectAll(); }
+
+  private:
 	void		onBtnDynamicHelp();
 	void		onBtnUndoChanges();
 
@@ -153,8 +161,6 @@ class LLScriptEdCore : public LLPanel
 
 	void selectFirstError();
 
-	virtual BOOL handleKeyHere(KEY key, MASK mask);
-	
 	void enableSave(BOOL b) {mEnableSave = b;}
 
 protected:
@@ -207,6 +213,8 @@ class LLScriptEdContainer : public LLPreview
 	LLScriptEdContainer(const LLSD& key);
 	LLScriptEdContainer(const LLSD& key, const bool live);
 
+    BOOL handleKeyHere(KEY key, MASK mask);
+
 protected:
 	std::string		getTmpFileName(const std::string& script_name);
 	bool			onExternalChange(const std::string& filename);
@@ -220,6 +228,12 @@ class LLPreviewLSL : public LLScriptEdContainer
 {
 public:
 	LLPreviewLSL(const LLSD& key );
+    ~LLPreviewLSL();
+
+    LLUUID getScriptID() { return mItemUUID; }
+
+    void setDirty() { mDirty = true; }
+
 	virtual void callbackLSLCompileSucceeded();
 	virtual void callbackLSLCompileFailed(const LLSD& compile_errors);
 
@@ -251,6 +265,8 @@ class LLPreviewLSL : public LLScriptEdContainer
 	// Can safely close only after both text and bytecode are uploaded
 	S32 mPendingUploads;
 
+    LLScriptMovedObserver* mItemObserver;
+
 };
 
 
@@ -283,6 +299,8 @@ class LLLiveLSLEditor : public LLScriptEdContainer
 	void requestExperiences();
 	void experienceChanged();
 	void addAssociatedExperience(const LLSD& experience);
+
+    void setObjectName(std::string name) { mObjectName = name; }
 	
 private:
 	virtual BOOL canClose();
@@ -341,6 +359,7 @@ class LLLiveLSLEditor : public LLScriptEdContainer
 	LLSD			mExperienceIds;
 
 	LLHandle<LLFloater> mExperienceProfile;
+    std::string mObjectName;
 };
 
 #endif  // LL_LLPREVIEWSCRIPT_H
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 975e2bb91039d39c1d79f23999e04fcfa65c07c5..ea7d4800e055fd9bec5315e6fcdb5b515d1cedab 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -653,7 +653,7 @@ void LLPreviewTexture::adjustAspectRatio()
 			{
 				// No existing ratio found, create an element that will show image at original ratio
 				populateRatioList(); // makes sure previous custom ratio is cleared
-				std::string ratio = boost::lexical_cast<std::string>(num)+":" + boost::lexical_cast<std::string>(denom);
+				std::string ratio = std::to_string(num)+":" + std::to_string(denom);
 				mRatiosList.push_back(ratio);
 				combo->add(ratio);
 				combo->setCurrentByIndex(mRatiosList.size()- 1);
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 8d86e2de4c90b15573671fdf697055d2764eb9e4..ce0a8d69a965efaa43cccac9a2595dc92f84e351 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -657,19 +657,6 @@ void LLSceneMonitor::dumpToFile(const std::string &file_name)
 			}
 		}
 
-		typedef LLTrace::StatType<LLTrace::MemAccumulator> trace_mem;
-		for (auto& it : trace_mem::instance_snapshot())
-		{
-			os << it.getName() << "(KiB)";
-
-			for (S32 frame = 1; frame <= frame_count; frame++)
-			{
-				os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(it).valueInUnits<LLUnits::Kilobytes>();
-			}
-
-			os << '\n';
-		}
-
 		os.flush();
 		os.close();
 	}
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 3278bd3aa9be423451364ae385a2ef81f9b5f0a3..693491e7e785c54d4843ffb1ba47b3c0caef5f0d 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -30,19 +30,22 @@
 
 #include "llsyntaxid.h"
 #include "lllocalcliprect.h"
+#include "llviewercontrol.h"
 
 const S32	UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32;
 
 static LLDefaultChildRegistry::Register<LLScriptEditor> r("script_editor");
 
 LLScriptEditor::Params::Params()
-:	show_line_numbers("show_line_numbers", true)
+:	show_line_numbers("show_line_numbers", true),
+    default_font_size("default_font_size", false)
 {}
 
 
 LLScriptEditor::LLScriptEditor(const Params& p)
 :	LLTextEditor(p)
-,	mShowLineNumbers(p.show_line_numbers)
+,	mShowLineNumbers(p.show_line_numbers),
+    mUseDefaultFontSize(p.default_font_size)
 {
 	if (mShowLineNumbers)
 	{
@@ -51,6 +54,12 @@ LLScriptEditor::LLScriptEditor(const Params& p)
 	}
 }
 
+BOOL LLScriptEditor::postBuild()
+{
+    gSavedSettings.getControl("LSLFontSizeName")->getCommitSignal()->connect(boost::bind(&LLScriptEditor::onFontSizeChange, this));
+    return LLTextEditor::postBuild();
+}
+
 void LLScriptEditor::draw()
 {
 	{
@@ -110,12 +119,11 @@ void LLScriptEditor::drawLineNumbers()
 			// draw the line numbers
 			if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop)
 			{
-				const LLFontGL *num_font = LLFontGL::getFontMonospace();
 				const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum ));
 				BOOL is_cur_line = cursor_line == line.mLineNum;
 				const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
 				const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
-				num_font->render(
+                getScriptFont()->render(
 								 ltext, // string to draw
 								 0, // begin offset
 								 UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x
@@ -143,8 +151,10 @@ void LLScriptEditor::loadKeywords()
     LL_PROFILE_ZONE_SCOPED;
 	mKeywords.processTokens();
 	
+    LLStyleConstSP style = new LLStyle(LLStyle::Params().font(getScriptFont()).color(mDefaultColor.get()));
+
 	segment_vec_t segment_list;
-	mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
+    mKeywords.findSegments(&segment_list, getWText(), *this, style);
 	
 	mSegments.clear();
 	segment_set_t::iterator insert_it = mSegments.begin();
@@ -159,9 +169,12 @@ void LLScriptEditor::updateSegments()
 	if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly)
 	{
         LL_PROFILE_ZONE_SCOPED;
+
+        LLStyleConstSP style = new LLStyle(LLStyle::Params().font(getScriptFont()).color(mDefaultColor.get()));
+
 		// HACK:  No non-ascii keywords for now
 		segment_vec_t segment_list;
-		mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
+        mKeywords.findSegments(&segment_list, getWText(), *this, style);
 		
 		clearSegments();
 		for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)
@@ -211,3 +224,23 @@ void LLScriptEditor::drawSelectionBackground()
 		}
 	}
 }
+
+std::string LLScriptEditor::getScriptFontSize()
+{ 
+    static LLCachedControl<std::string> size_name(gSavedSettings, "LSLFontSizeName", "Monospace");
+    return size_name;
+}
+
+LLFontGL* LLScriptEditor::getScriptFont()
+{
+    std::string font_size_name = mUseDefaultFontSize ? "Monospace" : getScriptFontSize();
+    return LLFontGL::getFont(LLFontDescriptor("Monospace", font_size_name, 0));
+}
+
+void LLScriptEditor::onFontSizeChange() 
+{
+    if (!mUseDefaultFontSize)
+    {
+        needsReflow();
+    }
+}
diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h
index f458203a396ac6638ec883ca0feb8757825f6a7a..ef941f552a25a67a0188fdc9928ae8dcdfbbd685 100644
--- a/indra/newview/llscripteditor.h
+++ b/indra/newview/llscripteditor.h
@@ -37,7 +37,7 @@ class LLScriptEditor : public LLTextEditor
 	struct Params : public LLInitParam::Block<Params, LLTextEditor::Params>
 	{
 		Optional<bool>		show_line_numbers;
-		
+        Optional<bool> default_font_size;
 		Params();
 	};
 	
@@ -45,6 +45,7 @@ class LLScriptEditor : public LLTextEditor
 	
 	// LLView override
 	virtual void	draw();
+    BOOL postBuild();
 	
 	void	initKeywords();
 	void	loadKeywords();
@@ -52,7 +53,11 @@ class LLScriptEditor : public LLTextEditor
 	LLKeywords::keyword_iterator_t keywordsBegin()	{ return mKeywords.begin(); }
 	LLKeywords::keyword_iterator_t keywordsEnd()	{ return mKeywords.end(); }
 	
-protected:
+    static std::string getScriptFontSize();
+    LLFontGL* getScriptFont();
+    void onFontSizeChange();
+
+  protected:
 	friend class LLUICtrlFactory;
 	LLScriptEditor(const Params& p);
 	
@@ -65,6 +70,7 @@ class LLScriptEditor : public LLTextEditor
 	
 	LLKeywords	mKeywords;
 	bool		mShowLineNumbers;
+    bool mUseDefaultFontSize;
 };
 
 #endif // LL_SCRIPTEDITOR_H
diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp
index 5d051d0ebf060bf093d1e48a408e0647701fbc39..bedee3221387bbbea3f77f0434b5ce32a0ef1de4 100644
--- a/indra/newview/llsculptidsize.cpp
+++ b/indra/newview/llsculptidsize.cpp
@@ -66,7 +66,7 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz)
 	if (itLU.first == itLU.second)
 	{ //register
 		//llassert(mSizeInfo.get<tag_BY_DRAWABLE>().end() == mSizeInfo.get<tag_BY_DRAWABLE>().find(pdrawable));
-		mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, boost::make_shared<SizeSum>(sz), sculptId));
+		mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, std::make_shared<SizeSum>(sz), sculptId));
 		total_size = sz;
 	}
 	else
diff --git a/indra/newview/llsculptidsize.h b/indra/newview/llsculptidsize.h
index 87ee417b867317e15bb91bcf1e2ff569cc7a8ca8..679fcbd44c082994b11d23ca6a6992c161ca13a1 100644
--- a/indra/newview/llsculptidsize.h
+++ b/indra/newview/llsculptidsize.h
@@ -52,7 +52,7 @@ class LLSculptIDSize
 
 	struct Info
 	{
-		typedef boost::shared_ptr<SizeSum> PtrSizeSum;
+		typedef std::shared_ptr<SizeSum> PtrSizeSum;
 
 		Info(const LLDrawable *drawable, int size, PtrSizeSum sizeInfo, LLUUID sculptId)
 			: mDrawable(drawable)
diff --git a/indra/newview/llsearchableui.h b/indra/newview/llsearchableui.h
index 31f11eb8ef037ea16e269ba335dd142d806b0280..84fcefb835614192956c9fd105f42836f20a128c 100644
--- a/indra/newview/llsearchableui.h
+++ b/indra/newview/llsearchableui.h
@@ -93,7 +93,7 @@ namespace ll
 	{
 		struct SearchableItem;
 
-		typedef boost::shared_ptr< SearchableItem > SearchableItemPtr;
+		typedef std::shared_ptr< SearchableItem > SearchableItemPtr;
 
 		typedef std::vector< SearchableItemPtr > tSearchableItemList;
 
diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp
index 449e0080f0e52eea772ec4ea4a36cf4227b4368c..66e377cb8d19db98a35c7f24d021369b3e6f3be8 100644
--- a/indra/newview/llsearchhistory.cpp
+++ b/indra/newview/llsearchhistory.cpp
@@ -75,6 +75,17 @@ bool LLSearchHistory::save()
 {
 	// build filename for each user
 	std::string resolved_filename = getHistoryFilePath();
+
+    // delete the file if it is empty or contains only empty entries
+    if (std::find_if(mSearchHistory.begin(), mSearchHistory.end(), [](const LLSearchHistoryItem& x)
+        {
+            return !x.search_query.empty();
+        }) == mSearchHistory.end())
+    {
+        remove(resolved_filename.c_str());
+        return true;
+    }
+
 	// open a file for writing
 	llofstream file(resolved_filename.c_str());
 	if (!file.is_open())
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 4745bda6411238edeaa76b1b6957c7c198e07281..b50c0f60bdf0091cba35bc76a264f64f95c27aaf 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1879,7 +1879,8 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
                                                       te,
                                                       mItem,
                                                       LLToolDragAndDrop::SOURCE_AGENT,
-                                                      LLUUID::null);
+                                                      LLUUID::null,
+                                                      false);
 			}
 			else // not an inventory item
 			{
@@ -1959,26 +1960,30 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
             {
                 return false;
             }
-            if (mItem && objectp->isAttachment())
+            LLUUID asset_id = mMatId;
+            if (mItem)
             {
                 const LLPermissions& perm = mItem->getPermissions();
-                BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
-                if (!unrestricted)
+                bool from_library = perm.getOwner() == ALEXANDRIA_LINDEN_ID;
+                if (objectp->isAttachment())
                 {
-                    // Attachments are in world and in inventory simultaneously,
-                    // at the moment server doesn't support such a situation.
-                    return false;
+                    bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
+
+                    if (!unrestricted && !from_library)
+                    {
+                        // Attachments are in world and in inventory simultaneously,
+                        // at the moment server doesn't support such a situation.
+                        return false;
+                    }
                 }
-            }
-            LLUUID asset_id = mMatId;
-            if (mItem)
-            {
-                // If success, the material may be copied into the object's inventory
-                BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
-                if (!success)
+
+                if (!from_library
+                    // Check if item may be copied into the object's inventory
+                    && !LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null))
                 {
                     return false;
                 }
+
                 asset_id = mItem->getAssetUUID();
                 if (asset_id.isNull())
                 {
@@ -1994,11 +1999,13 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
     };
 
     bool success = true;
-    if (item &&
-            (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
+    if (item
+        &&  (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
              !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) ||
              !item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())
-            ))
+            )
+        && item->getPermissions().getOwner() != ALEXANDRIA_LINDEN_ID
+        )
     {
         success = success && getSelection()->applyRestrictedPbrMaterialToTEs(item);
     }
@@ -4308,9 +4315,12 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r
 
 BOOL LLSelectMgr::isMovableAvatarSelected()
 {
-	if (mAllowSelectAvatar)
+	if (mAllowSelectAvatar && getSelection()->getObjectCount() == 1)
 	{
-		return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject()->isAvatar()) && getSelection()->getFirstMoveableNode(TRUE);
+        // nothing but avatar should be selected, so check that
+        // there is only one selected object and it is a root
+        LLViewerObject* obj = getSelection()->getFirstRootObject();
+		return obj && obj->isAvatar() && getSelection()->getFirstMoveableNode(TRUE);
 	}
 	return FALSE;
 }
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 7009fb98ab6421e3503d646cedc84e50947fae5a..c07c939862e442878a5ce8075c092921deb8e46a 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -739,7 +739,6 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
     static LLCachedControl<F32> auto_adjust_blue_horizon_scale(gSavedSettings, "RenderSkyAutoAdjustBlueHorizonScale", 1.f);
     static LLCachedControl<F32> auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f);
     static LLCachedControl<F32> auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f);
-    static LLCachedControl<F32> auto_adjust_probe_ambiance(gSavedSettings, "RenderSkyAutoAdjustProbeAmbiance", 1.f);
     static LLCachedControl<F32> sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f);
     static LLCachedControl<F32> ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f);
 
@@ -772,8 +771,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
             shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV);
             shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV);
 
-            LLSettingsSky::sAutoAdjustProbeAmbiance = auto_adjust_probe_ambiance;
-            probe_ambiance = auto_adjust_probe_ambiance;  // NOTE -- must match LLSettingsSky::getReflectionProbeAmbiance value for "auto_adjust" true
+            probe_ambiance = sAutoAdjustProbeAmbiance;
         }
         else
         {
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index aed9dba7ef825a427721f36b00db3f90e3e45112..7571d361a42a299c903cd464a38d871bc95b4235 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -361,6 +361,15 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string
     }
 }
 
+bool LLSidepanelAppearance::isCOFPanelVisible()
+{
+    if (mPanelOutfitsInventory && mPanelOutfitsInventory->getVisible())
+    {
+        return mPanelOutfitsInventory->isCOFPanelActive();
+    }
+    return false;
+}
+
 void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
 {
 	if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index bb9709a2b84c89c385def7e54d47bae059ed0f2b..e67652d6f706f4ebe104a76922652b0383d8388d 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -66,6 +66,8 @@ class LLSidepanelAppearance : public LLPanel
 	void updateToVisibility( const LLSD& new_visibility );
 	LLPanelEditWearable* getWearable(){ return mEditWearable; }
 
+    bool isCOFPanelVisible();
+
 private:
 	void onFilterEdit(const std::string& search_string);
 	void onVisibilityChanged ( const LLSD& new_visibility );
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index a3a8247268383f31fbabeef1daadb74f691db9ff..e43fb993ce0909197ab39b1f09d02e421a75b150 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file llurlsimstring.cpp (was llsimurlstring.cpp)
  * @brief Handles "SLURL fragments" like Ahern/123/45 for
  * startup processing, login screen, prefs, etc.
@@ -6,21 +6,21 @@
  * $LicenseInfo:firstyear=2010&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2010, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
@@ -36,7 +36,7 @@
 #include "curl/curl.h"
 const char* LLSLURL::SLURL_HTTP_SCHEME		 = "http";
 const char* LLSLURL::SLURL_HTTPS_SCHEME		 = "https";
-const char* LLSLURL::SLURL_SECONDLIFE_SCHEME	 = "secondlife";
+const char* LLSLURL::SLURL_SECONDLIFE_SCHEME = "secondlife";
 const char* LLSLURL::SLURL_SECONDLIFE_PATH	 = "secondlife";
 const char* LLSLURL::SLURL_COM		         = "slurl.com";
 // For DnD - even though www.slurl.com redirects to slurl.com in a browser, you  can copy and drag
@@ -54,473 +54,469 @@ const char* LLSLURL::SIM_LOCATION_LAST           = "last";
 // resolve a simstring from a slurl
 LLSLURL::LLSLURL(const std::string& slurl)
 {
-	// by default we go to agni.
-	mType = INVALID;
-
-	if(slurl == SIM_LOCATION_HOME)
-	{
-		mType = HOME_LOCATION;
-	}
-	else if(slurl.empty() || (slurl == SIM_LOCATION_LAST))
-	{
-		mType = LAST_LOCATION;
-	}
-	else
-	{
-		LLURI slurl_uri;
-		// parse the slurl as a uri
-		if(slurl.find(':') == std::string::npos)
-		{
-			// There may be no scheme ('secondlife:' etc.) passed in.  In that case
-			// we want to normalize the slurl by putting the appropriate scheme
-			// in front of the slurl.  So, we grab the appropriate slurl base
-			// from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or
-			// https://<hostname>/region/ for Standalone grid (the word region, not the region name)
-			// these slurls are typically passed in from the 'starting location' box on the login panel,
-			// where the user can type in <regionname>/<x>/<y>/<z>
-			std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase();
-
-			// the slurl that was passed in might have a prepended /, or not.  So,
-			// we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z>
-			// or some such.
-			
-			if(slurl[0] == '/')
-		    {
-				fixed_slurl += slurl.substr(1);
-		    }
-			else
-		    {
-				fixed_slurl += slurl;
-		    }
-			// We then load the slurl into a LLURI form
-			slurl_uri = LLURI(fixed_slurl);
-		}
-		else
-		{
-		    // as we did have a scheme, implying a URI style slurl, we
-		    // simply parse it as a URI
-		    slurl_uri = LLURI(slurl);
-		}
-		
-		LLSD path_array = slurl_uri.pathArray();
-		
-		// determine whether it's a maingrid URI or an Standalone/open style URI
-		// by looking at the scheme.  If it's a 'secondlife:' slurl scheme or
-		// 'sl:' scheme, we know it's maingrid
-		
-		// At the end of this if/else block, we'll have determined the grid,
-		// and the slurl type (APP or LOCATION)
-		if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
-		{
-			// parse a maingrid style slurl.  We know the grid is maingrid
-			// so grab it.
-			// A location slurl for maingrid (with the special schemes) can be in the form
-			// secondlife://<regionname>/<x>/<y>/<z>
-			// or
-			// secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z>
-			// where if grid is empty, it specifies Agni
-			
-			// An app style slurl for maingrid can be
-			// secondlife://<Grid>/app/<app parameters>
-			// where an empty grid implies Agni
-			
-			// we'll start by checking the top of the 'path' which will be 
-			// either 'app', 'secondlife', or <x>.
-			
-			// default to maingrid
-			
-			mGrid = MAINGRID;
-			
-			if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) ||
-				(path_array[0].asString() == LLSLURL::SLURL_APP_PATH))
-		    {
-				// it's in the form secondlife://<grid>/(app|secondlife)
-				// so parse the grid name to derive the grid ID
-				if (!slurl_uri.hostName().empty())
-				{
-					mGrid = LLGridManager::getInstance()->getGridId(slurl_uri.hostName());
-				}
-				else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
-				{
-					// If the slurl is in the form secondlife:///secondlife/<region> form, 
-					// then we are in fact on maingrid.  
-					mGrid = MAINGRID;
-				}
-				else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
-				{
-					// for app style slurls, where no grid name is specified, assume the currently
-					// selected or logged in grid.
-					mGrid =  LLGridManager::getInstance()->getGridId();
-				}
-
-				if(mGrid.empty())
-				{
-					// we couldn't find the grid in the grid manager, so bail
-					LL_WARNS("AppInit")<<"unable to find grid"<<LL_ENDL;
-					return;
-				}
-				// set the type as appropriate.
-				if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
-				{
-					mType = LOCATION;
-				}
-				else
-				{
-					mType = APP;
-				}
-				path_array.erase(0);
-		    }
-			else
-		    {
-				if(slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH)
+    // by default we go to agni.
+    mType = INVALID;
+
+    if (slurl.empty() || (slurl == SIM_LOCATION_LAST))
+    {
+        mType = LAST_LOCATION;
+    }
+    else if (slurl == SIM_LOCATION_HOME)
+    {
+        mType = HOME_LOCATION;
+    }
+    else
+    {
+        LLURI slurl_uri;
+        // parse the slurl as a uri
+        if (slurl.find(':') == std::string::npos)
+        {
+            // There may be no scheme ('secondlife:' etc.) passed in.  In that case
+            // we want to normalize the slurl by putting the appropriate scheme
+            // in front of the slurl.  So, we grab the appropriate slurl base
+            // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or
+            // https://<hostname>/region/ for Standalone grid (the word region, not the region name)
+            // these slurls are typically passed in from the 'starting location' box on the login panel,
+            // where the user can type in <regionname>/<x>/<y>/<z>
+            std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase();
+
+            // the slurl that was passed in might have a prepended /, or not.  So,
+            // we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z>
+            // or some such.
+
+            if (slurl[0] == '/')
+            {
+                fixed_slurl += slurl.substr(1);
+            }
+            else
+            {
+                fixed_slurl += slurl;
+            }
+            // We then load the slurl into a LLURI form
+            slurl_uri = LLURI(fixed_slurl);
+        }
+        else
+        {
+            // as we did have a scheme, implying a URI style slurl, we
+            // simply parse it as a URI
+            slurl_uri = LLURI(slurl);
+        }
+
+        LLSD path_array = slurl_uri.pathArray();
+
+        // determine whether it's a maingrid URI or an Standalone/open style URI
+        // by looking at the scheme.  If it's a 'secondlife:' slurl scheme or
+        // 'sl:' scheme, we know it's maingrid
+
+        // At the end of this if/else block, we'll have determined the grid,
+        // and the slurl type (APP or LOCATION)
+        if (slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
+        {
+            if (path_array.size() == 0
+                && slurl_uri.authority().empty()
+                && slurl_uri.escapedQuery().empty())
+            {
+                mType = EMPTY;
+                // um, we need a path...
+                return;
+            }
+
+            // parse a maingrid style slurl.  We know the grid is maingrid
+            // so grab it.
+            // A location slurl for maingrid (with the special schemes) can be in the form
+            // secondlife://<regionname>/<x>/<y>/<z>
+            // or
+            // secondlife://<Grid>/secondlife/<region>/<x>/<y>/<z>
+            // where if grid is empty, it specifies Agni
+
+            // An app style slurl for maingrid can be
+            // secondlife://<Grid>/app/<app parameters>
+            // where an empty grid implies Agni
+
+            // we'll start by checking the top of the 'path' which will be
+            // either 'app', 'secondlife', or <x>.
+
+            // default to maingrid
+
+            mGrid = MAINGRID;
+
+            if ((path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH) ||
+                (path_array[0].asString() == LLSLURL::SLURL_APP_PATH))
+            {
+                // it's in the form secondlife://<grid>/(app|secondlife)
+                // so parse the grid name to derive the grid ID
+                if (!slurl_uri.hostName().empty())
+                {
+                    mGrid = LLGridManager::getInstance()->getGridId(slurl_uri.hostName());
+                }
+                else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
+                {
+                    // If the slurl is in the form secondlife:///secondlife/<region> form,
+                    // then we are in fact on maingrid.
+                    mGrid = MAINGRID;
+                }
+                else if(path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+                {
+                    // for app style slurls, where no grid name is specified, assume the currently
+                    // selected or logged in grid.
+                    mGrid =  LLGridManager::getInstance()->getGridId();
+                }
+
+                if (mGrid.empty())
+                {
+                    // we couldn't find the grid in the grid manager, so bail
+                    LL_WARNS("AppInit")<<"unable to find grid"<<LL_ENDL;
+                    return;
+                }
+                // set the type as appropriate.
+                if (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
+                {
+                    mType = LOCATION;
+                }
+                else
+                {
+                    mType = APP;
+                }
+                path_array.erase(0);
+            }
+            else
+            {
+                if (slurl_uri.hostName() == LLSLURL::SLURL_APP_PATH)
                 {
                     mType = APP;
                 }
                 else
                 {
                     // it wasn't a /secondlife/<region> or /app/<params>, so it must be secondlife://<region>
-				// therefore the hostname will be the region name, and it's a location type
-				mType = LOCATION;
-				// 'normalize' it so the region name is in fact the head of the path_array
-				path_array.insert(0, slurl_uri.hostName());
+                    // therefore the hostname will be the region name, and it's a location type
+                    mType = LOCATION;
+                    // 'normalize' it so the region name is in fact the head of the path_array
+                    path_array.insert(0, slurl_uri.hostName());
+                }
+            }
+        }
+        else if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) ||
+            (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) ||
+            (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME))
+        {
+            // We're dealing with either a Standalone style slurl or slurl.com slurl
+            if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) ||
+                (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) ||
+                (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM))
+            {
+                // slurl.com implies maingrid
+                mGrid = MAINGRID;
+            }
+            else
+            {
+                // Don't try to match any old http://<host>/ URL as a SLurl.
+                // SLE SLurls will have the grid hostname in the URL, so only
+                // match http URLs if the hostname matches the grid hostname
+                // (or its a slurl.com or maps.secondlife.com URL).
+                if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME ||
+                     slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) &&
+                    slurl_uri.hostName() != LLGridManager::getInstance()->getGrid())
+                {
+                    return;
                 }
-		    }
-		}
-		else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME) ||
-		   (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || 
-		   (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME))
-		{
-		    // We're dealing with either a Standalone style slurl or slurl.com slurl
-		  if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) ||
-		      (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || 
-		      (slurl_uri.hostName() == LLSLURL::MAPS_SECONDLIFE_COM))
-			{
-				// slurl.com implies maingrid
-				mGrid = MAINGRID;
-			}
-		    else
-			{
-				// Don't try to match any old http://<host>/ URL as a SLurl.
-				// SLE SLurls will have the grid hostname in the URL, so only
-				// match http URLs if the hostname matches the grid hostname
-				// (or its a slurl.com or maps.secondlife.com URL).
-				if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME ||
-					 slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) &&
-					slurl_uri.hostName() != LLGridManager::getInstance()->getGrid())
-				{
-					return;
-				}
-
-				// As it's a Standalone grid/open, we will always have a hostname, as Standalone/open  style
-				// urls are properly formed, unlike the stinky maingrid style
-				mGrid = slurl_uri.hostName();
-			}
-		    if (path_array.size() == 0)
-			{
-				// um, we need a path...
-				return;
-			}
-			
-			// we need to normalize the urls so
-			// the path portion starts with the 'command' that we want to do
-			// it can either be region or app.  
-		    if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) ||
-				(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH))
-			{
-				// strip off 'region' or 'secondlife'
-				path_array.erase(0);
-				// it's a location
-				mType = LOCATION;
-			}
-			else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
-			{
-				mType = APP;
-				path_array.erase(0);
-				// leave app appended.  
-			}
-			else
-			{
-				// not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL
-				return;
-			}
-		}
-		else
-		{
-		    // invalid scheme, so bail
-		    return;
-		}
-		
-		
-		if(path_array.size() == 0)
-		{
-			// we gotta have some stuff after the specifier as to whether it's a region or command
-			return;
-		}
-		
-		// now that we know whether it's an app slurl or a location slurl,
-		// parse the slurl into the proper data structures.
-		if(mType == APP)
-		{		
-			// grab the app command type and strip it (could be a command to jump somewhere, 
-			// or whatever )
-			mAppCmd = path_array[0].asString();
-			path_array.erase(0);
-			
-			// Grab the parameters
-			mAppPath = path_array;
-			// and the query
-			mAppQuery = slurl_uri.query();
-			mAppQueryMap = slurl_uri.queryMap();
-			return;
-		}
-		else if(mType == LOCATION)
-		{
-			// at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z 
-			// are collectively optional
-			// are optional
-
-			mRegion = LLURI::unescape(path_array[0].asString());
-
-			if(LLStringUtil::containsNonprintable(mRegion))
-			{
-				LLStringUtil::stripNonprintable(mRegion);
-			}
-
-			path_array.erase(0);
-			
-			// parse the x, y, and optionally z
-			if(path_array.size() >= 2)
-			{	
-			  
-			  mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
-			  if((F32(mPosition[VX]) < 0.f) || 
-                             (mPosition[VX] > REGION_WIDTH_METERS) ||
-			     (F32(mPosition[VY]) < 0.f) || 
-                             (mPosition[VY] > REGION_WIDTH_METERS) ||
-			     (F32(mPosition[VZ]) < 0.f) || 
-                             (mPosition[VZ] > REGION_HEIGHT_METERS))
-			    {
-			      mType = INVALID;
-			      return;
-			    }
- 
-			}
-			else
-			{
-				// if x, y and z were not fully passed in, go to the middle of the region.
-				// teleport will adjust the actual location to make sure you're on the ground
-				// and such
-				mPosition = LLVector3(REGION_WIDTH_METERS/2, REGION_WIDTH_METERS/2, 0);
-			}
-		}
-	}
-}
 
+                // As it's a Standalone grid/open, we will always have a hostname, as Standalone/open  style
+                // urls are properly formed, unlike the stinky maingrid style
+                mGrid = slurl_uri.hostName();
+            }
+            if (path_array.size() == 0)
+            {
+                // um, we need a path...
+                return;
+            }
+
+            // we need to normalize the urls so
+            // the path portion starts with the 'command' that we want to do
+            // it can either be region or app.
+            if ((path_array[0].asString() == LLSLURL::SLURL_REGION_PATH) ||
+                (path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH))
+            {
+                // strip off 'region' or 'secondlife'
+                path_array.erase(0);
+                // it's a location
+                mType = LOCATION;
+            }
+            else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+            {
+                mType = APP;
+                path_array.erase(0);
+                // leave app appended.
+            }
+            else
+            {
+                // not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL
+                return;
+            }
+        }
+        else
+        {
+            // invalid scheme, so bail
+            return;
+        }
+
+        if (path_array.size() == 0)
+        {
+            // we gotta have some stuff after the specifier as to whether it's a region or command
+            return;
+        }
+
+        // now that we know whether it's an app slurl or a location slurl,
+        // parse the slurl into the proper data structures.
+        if (mType == APP)
+        {
+            // grab the app command type and strip it (could be a command to jump somewhere,
+            // or whatever )
+            mAppCmd = path_array[0].asString();
+            path_array.erase(0);
+
+            // Grab the parameters
+            mAppPath = path_array;
+            // and the query
+            mAppQuery = slurl_uri.query();
+            mAppQueryMap = slurl_uri.queryMap();
+            return;
+        }
+        else if (mType == LOCATION)
+        {
+            // at this point, head of the path array should be [ <region>, <x>, <y>, <z> ] where x, y and z
+            // are collectively optional
+            // are optional
+
+            mRegion = LLURI::unescape(path_array[0].asString());
+
+            if (LLStringUtil::containsNonprintable(mRegion))
+            {
+                LLStringUtil::stripNonprintable(mRegion);
+            }
+
+            path_array.erase(0);
+
+            // parse the x, y, and optionally z
+            if (path_array.size() >= 2)
+            {
+                mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
+                if ((F32(mPosition[VX]) < 0.f) || (mPosition[VX] > REGION_WIDTH_METERS) ||
+                    (F32(mPosition[VY]) < 0.f) || (mPosition[VY] > REGION_WIDTH_METERS) ||
+                    (F32(mPosition[VZ]) < 0.f) || (mPosition[VZ] > REGION_HEIGHT_METERS))
+                {
+                    mType = INVALID;
+                    return;
+                }
+            }
+            else
+            {
+                // if x, y and z were not fully passed in, go to the middle of the region.
+                // teleport will adjust the actual location to make sure you're on the ground
+                // and such
+                mPosition = LLVector3(REGION_WIDTH_METERS / 2, REGION_WIDTH_METERS / 2, 0);
+            }
+        }
+    }
+}
 
 // Create a slurl for the middle of the region
-LLSLURL::LLSLURL(const std::string& grid, 
-				 const std::string& region)
+LLSLURL::LLSLURL(const std::string& grid, const std::string& region)
 {
-	mGrid = grid;
-	mRegion = region;
-	mType = LOCATION;
-	mPosition = LLVector3((F64)REGION_WIDTH_METERS/2, (F64)REGION_WIDTH_METERS/2, 0);
+    mGrid = grid;
+    mRegion = region;
+    mType = LOCATION;
+    mPosition = LLVector3((F64)REGION_WIDTH_METERS / 2, (F64)REGION_WIDTH_METERS / 2, 0);
 }
 
-
-
 // create a slurl given the position.  The position will be modded with the region
 // width handling global positions as well
-LLSLURL::LLSLURL(const std::string& grid, 
-		 const std::string& region, 
-		 const LLVector3& position)
+LLSLURL::LLSLURL(const std::string& grid,
+        const std::string& region,
+        const LLVector3& position)
 {
-	mGrid = grid;
-	mRegion = region;
-	S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
-	S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
-	S32 z = ll_round( (F32)position[VZ] );
-	mType = LOCATION;
-	mPosition = LLVector3(x, y, z);
+    mGrid = grid;
+    mRegion = region;
+    S32 x = ll_round((F32)fmod(position[VX], (F32)REGION_WIDTH_METERS));
+    S32 y = ll_round((F32)fmod(position[VY], (F32)REGION_WIDTH_METERS));
+    S32 z = ll_round((F32)position[VZ]);
+    mType = LOCATION;
+    mPosition = LLVector3(x, y, z);
 }
 
-
 // create a simstring
-LLSLURL::LLSLURL(const std::string& region, 
-		 const LLVector3& position)
+LLSLURL::LLSLURL(const std::string& region,
+        const LLVector3& position)
 {
-  *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
-		  region, position);
+    *this = LLSLURL(LLGridManager::getInstance()->getGridId(), region, position);
 }
 
 // create a slurl from a global position
-LLSLURL::LLSLURL(const std::string& grid, 
-		 const std::string& region, 
-		 const LLVector3d& global_position)
+LLSLURL::LLSLURL(const std::string& grid,
+         const std::string& region,
+         const LLVector3d& global_position)
 {
-	*this = LLSLURL(LLGridManager::getInstance()->getGridId(grid),
-		  region, LLVector3(global_position.mdV[VX],
-				    global_position.mdV[VY],
-				    global_position.mdV[VZ]));
+    *this = LLSLURL(LLGridManager::getInstance()->getGridId(grid), region,
+        LLVector3(global_position.mdV[VX], global_position.mdV[VY], global_position.mdV[VZ]));
 }
 
 // create a slurl from a global position
-LLSLURL::LLSLURL(const std::string& region, 
-		 const LLVector3d& global_position)
+LLSLURL::LLSLURL(const std::string& region,
+        const LLVector3d& global_position)
 {
-  *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
-		  region, global_position);
+    *this = LLSLURL(LLGridManager::getInstance()->getGridId(),
+        region, global_position);
 }
 
 LLSLURL::LLSLURL(const std::string& command, const LLUUID&id, const std::string& verb)
 {
-  mType = APP;
-  mAppCmd = command;
-  mAppPath = LLSD::emptyArray();
-  mAppPath.append(LLSD(id));
-  mAppPath.append(LLSD(verb));
+    mType = APP;
+    mAppCmd = command;
+    mAppPath = LLSD::emptyArray();
+    mAppPath.append(LLSD(id));
+    mAppPath.append(LLSD(verb));
 }
 
-
 std::string LLSLURL::getSLURLString() const
 {
-	switch(mType)
-	{
-		case HOME_LOCATION:
-			return SIM_LOCATION_HOME;
-		case LAST_LOCATION:
-			return SIM_LOCATION_LAST;
-		case LOCATION:
-			{
-				// lookup the grid
-				S32 x = ll_round( (F32)mPosition[VX] );
-				S32 y = ll_round( (F32)mPosition[VY] );
-				S32 z = ll_round( (F32)mPosition[VZ] );	
-				return LLGridManager::getInstance()->getSLURLBase(mGrid) + 
-				LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z); 
-			}
-		case APP:
-		{
-			std::ostringstream app_url;
-			app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd;
-			for(LLSD::array_const_iterator i = mAppPath.beginArray();
-				i != mAppPath.endArray();
-				i++)
-			{
-				app_url << "/" << i->asString();
-			}
-			if(mAppQuery.length() > 0)
-			{
-				app_url << "?" << mAppQuery;
-			}
-			return app_url.str();
-		}	
-		default:
-			LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL;			
-			return std::string();
-	}
+    switch (mType)
+    {
+        case HOME_LOCATION:
+            return SIM_LOCATION_HOME;
+        case LAST_LOCATION:
+            return SIM_LOCATION_LAST;
+        case LOCATION:
+        {
+            // lookup the grid
+            S32 x = ll_round((F32)mPosition[VX]);
+            S32 y = ll_round((F32)mPosition[VY]);
+            S32 z = ll_round((F32)mPosition[VZ]);
+            return LLGridManager::getInstance()->getSLURLBase(mGrid) +
+                LLURI::escape(mRegion) + llformat("/%d/%d/%d", x, y, z);
+        }
+        case APP:
+        {
+            std::ostringstream app_url;
+            app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd;
+            for (LLSD::array_const_iterator i = mAppPath.beginArray();
+                i != mAppPath.endArray();
+                i++)
+            {
+                app_url << "/" << i->asString();
+            }
+            if (mAppQuery.length() > 0)
+            {
+                app_url << "?" << mAppQuery;
+            }
+            return app_url.str();
+        }
+        default:
+            LL_WARNS("AppInit") << "Unexpected SLURL type for SLURL string" << (int)mType << LL_ENDL;
+            return std::string();
+    }
 }
 
 std::string LLSLURL::getLoginString() const
 {
-	
-	std::stringstream unescaped_start;
-	switch(mType)
-	{
-		case LOCATION:
-			unescaped_start << "uri:" 
-			<< mRegion << "&" 
-			<< ll_round(mPosition[0]) << "&" 
-			<< ll_round(mPosition[1]) << "&" 
-			<< ll_round(mPosition[2]);
-			break;
-		case HOME_LOCATION:
-			unescaped_start << "home";
-			break;
-		case LAST_LOCATION:
-			unescaped_start << "last";
-			break;
-		default:
-			LL_WARNS("AppInit") << "Unexpected SLURL type ("<<(int)mType <<")for login string"<< LL_ENDL;
-			break;
-	}
-	return  xml_escape_string(unescaped_start.str());
+    std::stringstream unescaped_start;
+    switch (mType)
+    {
+        case LOCATION:
+            unescaped_start << "uri:"
+                << mRegion << "&"
+                << ll_round(mPosition[0]) << "&"
+                << ll_round(mPosition[1]) << "&"
+                << ll_round(mPosition[2]);
+            break;
+        case HOME_LOCATION:
+            unescaped_start << "home";
+            break;
+        case LAST_LOCATION:
+            unescaped_start << "last";
+            break;
+        default:
+            LL_WARNS("AppInit") << "Unexpected SLURL type (" << (int)mType << ")for login string" << LL_ENDL;
+            break;
+    }
+    return  xml_escape_string(unescaped_start.str());
 }
 
-bool LLSLURL::operator==(const LLSLURL& rhs)
+bool LLSLURL::operator ==(const LLSLURL& rhs)
 {
-	if(rhs.mType != mType) return false;
-	switch(mType)
-	{
-		case LOCATION:
-			return ((mGrid == rhs.mGrid) &&
-					(mRegion == rhs.mRegion) &&
-					(mPosition == rhs.mPosition));
-		case APP:
-			return getSLURLString() == rhs.getSLURLString();
-			
-		case HOME_LOCATION:
-		case LAST_LOCATION:
-			return true;
-		default:
-			return false;
-	}
+    if (rhs.mType != mType)
+        return false;
+
+    switch (mType)
+    {
+        case LOCATION:
+            return (mGrid == rhs.mGrid) &&
+                    (mRegion == rhs.mRegion) &&
+                    (mPosition == rhs.mPosition);
+
+        case APP:
+            return getSLURLString() == rhs.getSLURLString();
+
+        case HOME_LOCATION:
+        case LAST_LOCATION:
+            return true;
+
+        default:
+            return false;
+    }
 }
 
 bool LLSLURL::operator !=(const LLSLURL& rhs)
 {
-	return !(*this == rhs);
+    return !(*this == rhs);
 }
 
 std::string LLSLURL::getLocationString() const
 {
-	return llformat("%s/%d/%d/%d",
-					mRegion.c_str(),
-					(int)ll_round(mPosition[0]),
-					(int)ll_round(mPosition[1]),
-					(int)ll_round(mPosition[2]));						 
+    return llformat("%s/%d/%d/%d",
+        mRegion.c_str(),
+        (int)ll_round(mPosition[0]),
+        (int)ll_round(mPosition[1]),
+        (int)ll_round(mPosition[2]));
 }
 
 // static
-const std::string LLSLURL::typeName[NUM_SLURL_TYPES] = 
+const std::string LLSLURL::typeName[NUM_SLURL_TYPES] =
 {
-	"INVALID", 
-	"LOCATION",
-	"HOME_LOCATION",
-	"LAST_LOCATION",
-	"APP",
-	"HELP"
+    "INVALID",
+    "LOCATION",
+    "HOME_LOCATION",
+    "LAST_LOCATION",
+    "APP",
+    "HELP",
+    "EMPTY"
 };
-		
+
 std::string LLSLURL::getTypeString(SLURL_TYPE type)
 {
-	std::string name;
-	if ( type >= INVALID && type < NUM_SLURL_TYPES )
-	{
-		name = LLSLURL::typeName[type];
-	}
-	else
-	{
-		name = llformat("Out of Range (%d)",type);
-	}
-	return name;
+    std::string name;
+    if (type >= INVALID && type < NUM_SLURL_TYPES)
+    {
+        name = LLSLURL::typeName[type];
+    }
+    else
+    {
+        name = llformat("Out of Range (%d)", type);
+    }
+    return name;
 }
 
-
 std::string LLSLURL::asString() const
 {
     std::ostringstream result;
     result
-		<< "   mType: " << LLSLURL::getTypeString(mType)
-		<< "   mGrid: " + getGrid()
-		<< "   mRegion: " + getRegion()
-		<< "   mPosition: " << mPosition
-		<< "   mAppCmd:"  << getAppCmd()
-		<< "   mAppPath:" + getAppPath().asString()
-		<< "   mAppQueryMap:" + getAppQueryMap().asString()
-		<< "   mAppQuery: " + getAppQuery()
-		;
-	
+        << "   mType: " << LLSLURL::getTypeString(mType)
+        << "   mGrid: " + getGrid()
+        << "   mRegion: " + getRegion()
+        << "   mPosition: " << mPosition
+        << "   mAppCmd:"  << getAppCmd()
+        << "   mAppPath:" + getAppPath().asString()
+        << "   mAppQueryMap:" + getAppQueryMap().asString()
+        << "   mAppQuery: " + getAppQuery()
+        ;
+
     return result.str();
 }
-
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index b86cf7949ba021e9a921063215f091933ab2a160..6132a4a8b010df3e63bd66cc2f03b4123393488a 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -52,13 +52,14 @@ class LLSLURL
 	static const char* SLURL_REGION_PATH;	
 	
 	// if you modify this enumeration, update typeName as well
-	enum SLURL_TYPE { 
-		INVALID, 
+	enum SLURL_TYPE {
+		INVALID,
 		LOCATION,
 		HOME_LOCATION,
 		LAST_LOCATION,
 		APP,
 		HELP,
+		EMPTY,
 		NUM_SLURL_TYPES // must be last
 	};
 		
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 931880a47548dbb552209b4e2ff9de6e071692c5..faf6f1501541cbbca46ea83ed6de72951b962efc 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -854,10 +854,9 @@ void LLSpatialGroup::rebound()
             LLControlAvatar* controlAvatar = bridge->mDrawable->getVObj()->getControlAvatar();
             if (controlAvatar &&
                 controlAvatar->mDrawable &&
-                controlAvatar->mControlAVBridge)
+                controlAvatar->mControlAVBridge &&
+                controlAvatar->mControlAVBridge->mOctree)
             {
-                llassert(controlAvatar->mControlAVBridge->mOctree);
-
                 LLSpatialGroup* root = (LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0);
                 if (this == root)
                 {
@@ -1322,17 +1321,8 @@ void drawBox(const LLVector4a& c, const LLVector4a& r)
 
 void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
 {
-
-	llassert(pos.isFinite());
-	llassert(size.isFinite());
-
-	llassert(!llisnan(pos.mV[0]));
-	llassert(!llisnan(pos.mV[1]));
-	llassert(!llisnan(pos.mV[2]));
-
-	llassert(!llisnan(size.mV[0]));
-	llassert(!llisnan(size.mV[1]));
-	llassert(!llisnan(size.mV[2]));
+    if (!pos.isFinite() || !size.isFinite())
+        return;
 
 	LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
 	LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e86ea5f2e3cf32c314882d6ef06cefdd9738d929..82f16a151876e1db8cdf392c778b2c28def7007a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1511,9 +1511,6 @@ bool idle_startup()
 		gXferManager->registerCallbacks(gMessageSystem);
 		display_startup();
 
-		LLGLTFMaterialList::registerCallbacks();
-		display_startup();
-
 		LLStartUp::initNameCache();
 		display_startup();
 
@@ -2480,6 +2477,34 @@ void login_callback(S32 option, void *userdata)
 	}
 }
 
+void release_notes_coro(const std::string url)
+{
+    if (url.empty())
+    {
+        return;
+    }
+
+    LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+    LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+        httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy));
+    LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+    LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+
+    httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that
+
+    LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
+
+    LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+    LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+    if (!status)
+    {
+        return;
+    }
+
+    LLWeb::loadURLInternal(url);
+}
+
 /**
 * Check if user is running a new version of the viewer.
 * Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting.
@@ -2512,7 +2537,8 @@ void show_release_notes_if_required()
             LLEventPumps::instance().obtain("relnotes").listen(
                 "showrelnotes",
                 [](const LLSD& url) {
-                LLWeb::loadURLInternal(url.asString());
+                    LLCoros::instance().launch("releaseNotesCoro",
+                    boost::bind(&release_notes_coro, url.asString()));
                 return false;
             });
         }
@@ -2520,7 +2546,9 @@ void show_release_notes_if_required()
 #endif // LL_RELEASE_FOR_DOWNLOAD
         {
             LLSD info(LLAppViewer::instance()->getViewerInfo());
-            LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+            std::string url = info["VIEWER_RELEASE_NOTES_URL"].asString();
+            LLCoros::instance().launch("releaseNotesCoro",
+                                       boost::bind(&release_notes_coro, url));
         }
         release_notes_shown = true;
     }
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 1ef5d1c50b987c1a2233c90bfddfe1c5f9bd6f1c..5bd203cb65865b570ce969a927a062894d89873e 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -190,6 +190,13 @@ BOOL LLStatusBar::postBuild()
 	LLHints::getInstance()->registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle());
 
 	gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
+    gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2));
+
+    if (!gSavedSettings.getBOOL("EnableVoiceChat") && LLAppViewer::instance()->isSecondInstance())
+    {
+        // Indicate that second instance started without sound
+        mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off"));
+    }
 
 	// Adding Net Stat Graph
 	S32 x = getRect().getWidth() - 2;
@@ -640,6 +647,16 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue)
 	refresh();
 }
 
+void LLStatusBar::onVoiceChanged(const LLSD& newvalue)
+{
+    if (newvalue.asBoolean())
+    {
+        // Second instance starts with "VoiceMute_Off" icon, fix it
+        mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off"));
+    }
+    refresh();
+}
+
 void LLStatusBar::onUpdateFilterTerm()
 {
 	LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() );
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 3002b91c107479ec544d0e33c0003232c6f47aef..3e9190652d7fd79b3c4b26f2317a4819445a5b26 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -99,12 +99,12 @@ class LLStatusBar
 	
 	void onClickBuyCurrency();
 	void onVolumeChanged(const LLSD& newvalue);
+    void onVoiceChanged(const LLSD& newvalue);
 
 	void onMouseEnterPresetsCamera();
 	void onMouseEnterPresets();
 	void onMouseEnterVolume();
 	void onMouseEnterNearbyMedia();
-	void onClickScreen(S32 x, S32 y);
 
 	static void onClickMediaToggle(void* data);
 	static void onClickBalance(void* data);
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 28e01c6c219234a8cd753bfbcef95fe9b95e57e1..62d3fa28bf13237a4ea35f7a5f536d97c343a461 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -82,9 +82,11 @@
 //static
 bool get_is_predefined_texture(LLUUID asset_id)
 {
-    if (asset_id == LLUUID(gSavedSettings.getString("DefaultObjectTexture"))
-        || asset_id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID"))
-        || asset_id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"))
+    if (asset_id == DEFAULT_OBJECT_TEXTURE
+        || asset_id == DEFAULT_OBJECT_SPECULAR
+        || asset_id == DEFAULT_OBJECT_NORMAL
+        || asset_id == BLANK_OBJECT_NORMAL
+        || asset_id == IMG_WHITE
         || asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE))
     {
         return true;
@@ -151,7 +153,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
 	PermissionMask immediate_filter_perm_mask,
 	PermissionMask dnd_filter_perm_mask,
 	BOOL can_apply_immediately,
-	LLUIImagePtr fallback_image)
+	LLUIImagePtr fallback_image,
+    EPickInventoryType pick_type)
 :	LLFloater(LLSD()),
 	mOwner( owner ),
 	mImageAssetID( image_asset_id ),
@@ -181,7 +184,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
 	mSetImageAssetIDCallback(NULL),
 	mOnUpdateImageStatsCallback(NULL),
 	mBakeTextureEnabled(FALSE),
-    mInventoryPickType(LLTextureCtrl::PICK_TEXTURE)
+    mInventoryPickType(pick_type)
 {
 	mCanApplyImmediately = can_apply_immediately;
 	buildFromFile("floater_texture_ctrl.xml");
@@ -225,7 +228,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
 
                 LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
 
-                if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
+                if (mInventoryPickType == PICK_MATERIAL
                     && mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
                     && itemp && itemp->getAssetUUID().isNull())
                 {
@@ -266,7 +269,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
 void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bool set_selection)
 {
     LLUUID asset_id = itemp->getAssetUUID();
-    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
+    if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
     {
         // If an inventory item has a null asset, consider it a valid blank material(gltf)
         asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
@@ -425,11 +428,11 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
     bool is_material = cargo_type == DAD_MATERIAL;
 
     bool allow_dnd = false;
-    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    if (mInventoryPickType == PICK_MATERIAL)
     {
         allow_dnd = is_material;
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+    else if (mInventoryPickType == PICK_TEXTURE)
     {
         allow_dnd = is_texture || is_mesh;
     }
@@ -602,9 +605,7 @@ BOOL LLFloaterTexturePicker::postBuild()
 		// don't put keyboard focus on selected item, because the selection callback
 		// will assume that this was user input
 
-		
-
-		if(!mImageAssetID.isNull())
+		if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
 		{
 			mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
 		}
@@ -661,7 +662,7 @@ void LLFloaterTexturePicker::draw()
         mGLTFMaterial = NULL;
         if (mImageAssetID.notNull())
         {
-            if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+            if (mInventoryPickType == PICK_MATERIAL)
             {
                 mGLTFMaterial = (LLFetchedGLTFMaterial*) gGLTFMaterialList.getMaterial(mImageAssetID);
                 llassert(mGLTFMaterial == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(gGLTFMaterialList.getMaterial(mImageAssetID)) != nullptr);
@@ -786,27 +787,43 @@ void LLFloaterTexturePicker::draw()
 
 const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
 {
-    LLUUID loockup_id = asset_id;
-	if (loockup_id.isNull())
+	if (asset_id.isNull())
 	{
-        if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
-        {
-            loockup_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
-        }
-        else
-        {
-            return LLUUID::null;
-        }
+        // null asset id means, no material or texture assigned
+        return LLUUID::null;
 	}
 
+    LLUUID loockup_id = asset_id;
+    if (mInventoryPickType == PICK_MATERIAL && loockup_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
+    {
+        // default asset id means we are looking for an inventory item with a default asset UUID (null)
+        loockup_id = LLUUID::null;
+    }
+
 	LLViewerInventoryCategory::cat_array_t cats;
 	LLViewerInventoryItem::item_array_t items;
-	LLAssetIDMatches asset_id_matches(loockup_id);
-	gInventory.collectDescendentsIf(LLUUID::null,
-							cats,
-							items,
-							LLInventoryModel::INCLUDE_TRASH,
-							asset_id_matches);
+
+    if (loockup_id.isNull())
+    {
+        // looking for a material with a null id, null id is shared by a lot
+        // of objects as a default value, so have to filter by type as well
+        LLAssetIDAndTypeMatches matches(loockup_id, LLAssetType::AT_MATERIAL);
+        gInventory.collectDescendentsIf(LLUUID::null,
+                                        cats,
+                                        items,
+                                        LLInventoryModel::INCLUDE_TRASH,
+                                        matches);
+    }
+    else
+    {
+        LLAssetIDMatches asset_id_matches(loockup_id);
+        gInventory.collectDescendentsIf(LLUUID::null,
+                                        cats,
+                                        items,
+                                        LLInventoryModel::INCLUDE_TRASH,
+                                        asset_id_matches);
+    }
+
 
 	if (items.size())
 	{
@@ -871,7 +888,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
 
                     LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
 
-                    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
+                    if (mInventoryPickType == PICK_MATERIAL
                         && mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
                         && itemp && itemp->getAssetUUID().isNull())
                     {
@@ -1064,15 +1081,15 @@ void LLFloaterTexturePicker::onBtnAdd(void* userdata)
 {
     LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
 
-    if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
+    if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
     {
         LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL_TEXTURE, true);
     }
-    else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+    else if (self->mInventoryPickType == PICK_TEXTURE)
     {
         LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_IMAGE, true);
     }
-    else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    else if (self->mInventoryPickType == PICK_MATERIAL)
     {
         LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL, true);
     }
@@ -1351,7 +1368,7 @@ void LLFloaterTexturePicker::changeMode()
     getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
 
     bool pipette_visible = (index == PICKER_INVENTORY)
-        && (mInventoryPickType != LLTextureCtrl::PICK_MATERIAL);
+        && (mInventoryPickType != PICK_MATERIAL);
     mPipetteBtn->setVisible(pipette_visible);
 
     if (index == PICKER_BAKE)
@@ -1414,16 +1431,16 @@ void LLFloaterTexturePicker::refreshLocalList()
 {
     mLocalScrollCtrl->clearRows();
 
-    if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
+    if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
     {
         LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
         LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+    else if (mInventoryPickType == PICK_TEXTURE)
     {
         LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    else if (mInventoryPickType == PICK_MATERIAL)
     {
         LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
     }
@@ -1433,18 +1450,18 @@ void LLFloaterTexturePicker::refreshInventoryFilter()
 {
     U32 filter_types = 0x0;
 
-    if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
+    if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
     {
         filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
         filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
         filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+    else if (mInventoryPickType == PICK_TEXTURE)
     {
         filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
         filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    else if (mInventoryPickType == PICK_MATERIAL)
     {
         filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
     }
@@ -1479,13 +1496,13 @@ void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
 	onModeSelect(0, this);
 }
 
-void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryType type)
+void LLFloaterTexturePicker::setInventoryPickType(EPickInventoryType type)
 {
     mInventoryPickType = type;
     refreshLocalList();
     refreshInventoryFilter();
 
-    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    if (mInventoryPickType == PICK_MATERIAL)
     {
         getChild<LLButton>("Pipette")->setVisible(false);
     }
@@ -1501,7 +1518,7 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
 
         setTitle(pick + mLabel);
     }
-    else if(mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    else if(mInventoryPickType == PICK_MATERIAL)
     {
         setTitle(getString("pick_material"));
     }
@@ -1509,6 +1526,12 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
     {
         setTitle(getString("pick_texture"));
     }
+
+    // refresh selection
+    if (!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
+    {
+        mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+    }
 }
 
 void LLFloaterTexturePicker::setImmediateFilterPermMask(PermissionMask mask)
@@ -1543,16 +1566,16 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& fi
         LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)handle.get();
         self->mLocalScrollCtrl->clearRows();
 
-        if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
+        if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
         {
             LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
             LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
         }
-        else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+        else if (self->mInventoryPickType == PICK_TEXTURE)
         {
             LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
         }
-        else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+        else if (self->mInventoryPickType == PICK_MATERIAL)
         {
             LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
         }
@@ -1565,7 +1588,7 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
 	if (inventory_item_id.notNull())
 	{
 		LLToolPipette::getInstance()->setResult(TRUE, "");
-        if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+        if (mInventoryPickType == PICK_MATERIAL)
         {
             // tes have no data about material ids
             // Plus gltf materials are layered with overrides,
@@ -1625,8 +1648,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
 
 	// Default of defaults is white image for diff tex
 	//
-	LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) );
-	setBlankImageAssetID( whiteImage );
+	setBlankImageAssetID(IMG_WHITE);
 
 	setAllowNoTexture(p.allow_no_texture);
 	setCanApplyImmediately(p.can_apply_immediately);
@@ -1807,7 +1829,8 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 			mImmediateFilterPermMask,
 			mDnDFilterPermMask,
 			mCanApplyImmediately,
-			mFallbackImage);
+			mFallbackImage,
+			mInventoryPickType);
 		mFloaterHandle = floaterp->getHandle();
 
 		LLFloaterTexturePicker* texture_floaterp = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
@@ -1828,7 +1851,6 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
 			texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
 
 			texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
-            texture_floaterp->setInventoryPickType(mInventoryPickType);
 		}
 
 		LLFloater* root_floater = gFloaterView->getParentFloater(this);
@@ -1891,7 +1913,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
 		if (!mOpenTexPreview)
 		{
 			showPicker(FALSE);
-            if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+            if (mInventoryPickType == PICK_MATERIAL)
             {
                 //grab materials first...
                 LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_MATERIAL));
@@ -2089,11 +2111,11 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
     bool is_material = cargo_type == DAD_MATERIAL;
 
     bool allow_dnd = false;
-    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+    if (mInventoryPickType == PICK_MATERIAL)
     {
         allow_dnd = is_material;
     }
-    else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
+    else if (mInventoryPickType == PICK_TEXTURE)
     {
         allow_dnd = is_texture || is_mesh;
     }
@@ -2156,7 +2178,7 @@ void LLTextureCtrl::draw()
 
 		if (texture.isNull())
 		{
-            if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
+            if (mInventoryPickType == PICK_MATERIAL)
             {
                 LLPointer<LLFetchedGLTFMaterial> material = gGLTFMaterialList.getMaterial(mImageAssetID);
                 if (material)
@@ -2313,7 +2335,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
     // no callback installed, so just set the image ids and carry on.
     LLUUID asset_id = item->getAssetUUID();
 
-    if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
+    if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
     {
         // If an inventory material has a null asset, consider it a valid blank material(gltf)
         asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 7a96eea60dccf2d69ba324756fedc21de6f3380e..cb6ce636e0be37c70ccdd0e071bf2305c97b1b70 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -72,6 +72,13 @@ enum LLPickerSource
     PICKER_UNKNOWN, // on cancel, default ids
 };
 
+typedef enum e_pick_inventory_type
+{
+    PICK_TEXTURE_MATERIAL = 0,
+    PICK_TEXTURE = 1,
+    PICK_MATERIAL = 2,
+} EPickInventoryType;
+
 //////////////////////////////////////////////////////////////////////////////////////////
 // LLTextureCtrl
 
@@ -87,13 +94,6 @@ class LLTextureCtrl
 		TEXTURE_CANCEL
 	} ETexturePickOp;
 
-    typedef enum e_pick_inventory_type
-    {
-        PICK_TEXTURE_MATERIAL = 0,
-        PICK_TEXTURE = 1,
-        PICK_MATERIAL = 2,
-    } EPickInventoryType;
-
 public:
 	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
 	{
@@ -276,7 +276,7 @@ class LLTextureCtrl
 	S32						 	mLabelWidth;
 	bool						mOpenTexPreview;
 	bool						mBakeTextureEnabled;
-    LLTextureCtrl::EPickInventoryType mInventoryPickType;
+    EPickInventoryType mInventoryPickType;
 };
 
 //////////////////////////////////////////////////////////////////////////////////////////
@@ -300,8 +300,8 @@ class LLFloaterTexturePicker : public LLFloater
 		PermissionMask immediate_filter_perm_mask,
 		PermissionMask dnd_filter_perm_mask,
 		BOOL can_apply_immediately,
-		LLUIImagePtr fallback_image_name
-		);
+		LLUIImagePtr fallback_image_name,
+		EPickInventoryType pick_type);
 
 	virtual ~LLFloaterTexturePicker();
 
@@ -369,7 +369,7 @@ class LLFloaterTexturePicker : public LLFloater
 	void 			setLocalTextureEnabled(BOOL enabled);
 	void 			setBakeTextureEnabled(BOOL enabled);
 
-    void setInventoryPickType(LLTextureCtrl::EPickInventoryType type);
+    void setInventoryPickType(EPickInventoryType type);
     void setImmediateFilterPermMask(PermissionMask mask);
 
     static void		onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle);
@@ -428,7 +428,7 @@ class LLFloaterTexturePicker : public LLFloater
     bool mLimitsSet;
     S32 mMaxDim;
     S32 mMinDim;
-    LLTextureCtrl::EPickInventoryType mInventoryPickType;
+    EPickInventoryType mInventoryPickType;
 
 
 	texture_selected_callback mTextureSelectedCallback;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 38c9b3717dc29f1f75a8977f483696d8940b8dbe..40bbe2b934abbc3c3440e12850d091b143fcd803 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -348,13 +348,13 @@ class LLTextureFetchWorker : public LLWorkerClass, public LLCore::HttpHandler
 		}
 
 		// Threads:  Tid
-		virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux)
+		virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux, U32 request_id)
 		{
             LL_PROFILE_ZONE_SCOPED;
 			LLTextureFetchWorker* worker = mFetcher->getWorker(mID);
 			if (worker)
 			{
- 				worker->callbackDecoded(success, raw, aux);
+ 				worker->callbackDecoded(success, raw, aux, request_id);
 			}
 		}
 	private:
@@ -398,7 +398,7 @@ class LLTextureFetchWorker : public LLWorkerClass, public LLCore::HttpHandler
 	void callbackCacheWrite(bool success);
 
 	// Threads:  Tid
-	void callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux);
+	void callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux, S32 decode_id);
 	
 	// Threads:  T*
 	void setGetStatus(LLCore::HttpStatus status, const std::string& reason)
@@ -1800,8 +1800,22 @@ bool LLTextureFetchWorker::doWork(S32 param)
 		setState(DECODE_IMAGE_UPDATE);
 		LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard
 						   << " All Data: " << mHaveAllData << LL_ENDL;
-		mDecodeHandle = LLAppViewer::getImageDecodeThread()->decodeImage(mFormattedImage, discard, mNeedsAux,
-																  new DecodeResponder(mFetcher, mID, this));
+
+        // In case worked manages to request decode, be shut down,
+        // then init and request decode again with first decode
+        // still in progress, assign a sufficiently unique id
+        mDecodeHandle = LLAppViewer::getImageDecodeThread()->decodeImage(mFormattedImage,
+                                                                       discard,
+                                                                       mNeedsAux,
+                                                                       new DecodeResponder(mFetcher, mID, this));
+        if (mDecodeHandle == 0)
+        {
+            // Abort, failed to put into queue.
+            // Happens if viewer is shutting down
+            setState(DONE);
+            LL_DEBUGS(LOG_TXT) << mID << " DECODE_IMAGE abort: failed to post for decoding" << LL_ENDL;
+            return true;
+        }
 		// fall though
 	}
 	
@@ -2305,16 +2319,24 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success)
 //////////////////////////////////////////////////////////////////////////////
 
 // Threads:  Tid
-void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux)
+void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImageRaw* aux, S32 decode_id)
 {
 	LLMutexLock lock(&mWorkMutex);										// +Mw
 	if (mDecodeHandle == 0)
 	{
 		return; // aborted, ignore
 	}
+    if (mDecodeHandle != decode_id)
+    {
+        // Queue doesn't support canceling old requests.
+        // This shouldn't normally happen, but in case it's possible that a worked
+        // will request decode, be aborted, reinited then start a new decode
+        LL_DEBUGS(LOG_TXT) << mID << " received obsolete decode's callback" << LL_ENDL;
+        return; // ignore
+    }
 	if (mState != DECODE_IMAGE_UPDATE)
 	{
-// 		LL_WARNS(LOG_TXT) << "Decode callback for " << mID << " with state = " << mState << LL_ENDL;
+		LL_DEBUGS(LOG_TXT) << "Decode callback for " << mID << " with state = " << mState << LL_ENDL;
 		mDecodeHandle = 0;
 		return;
 	}
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp
index 999be07dbafa4d261f5578db18e762361cb84b02..5b75db37d0814676b393129849f2af4cfd91c256 100644
--- a/indra/newview/lltinygltfhelper.cpp
+++ b/indra/newview/lltinygltfhelper.cpp
@@ -178,6 +178,7 @@ LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tiny
     {
         rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
         rawImage->verticalFlip();
+        rawImage->optimizeAwayAlpha();
     }
 
     return rawImage;
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index f6628293ee0ffc524c67a280f6a401dd0c1c8a38..9157d20f9887afa2e8bcfce7c5888266b658a8ad 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -46,8 +46,6 @@
 #include "llviewercontrol.h"  // HACK for destinations guide on startup
 #include "llinventorymodel.h" // HACK to disable starter avatars button for NUX
 
-#include <boost/foreach.hpp>
-
 LLToolBarView* gToolBarView = NULL;
 
 static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
@@ -282,7 +280,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
 			LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode;
 			mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->setButtonType(button_type);
 		}
-		BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands)
+		for (const LLCommandId::Params& command_params : toolbar_set.left_toolbar.commands)
 		{
 			if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_LEFT]))
 			{
@@ -297,7 +295,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
 			LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode;
 			mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]->setButtonType(button_type);
 		}
-		BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands)
+		for (const LLCommandId::Params& command_params : toolbar_set.right_toolbar.commands)
 		{
 			if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]))
 			{
@@ -312,7 +310,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
 			LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode;
 			mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]->setButtonType(button_type);
 		}
-		BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands)
+		for (const LLCommandId::Params& command_params : toolbar_set.bottom_toolbar.commands)
 		{
 			if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]))
 			{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index e7f96239fdcc34aa181b558e9e9714fa917d4101..bfa9386cd4db7e41ea95e177daffe5acbf70ff76 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1071,10 +1071,64 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
 	return TRUE;
 }
 
+void set_texture_to_material(LLViewerObject* hit_obj,
+                             S32 hit_face,
+                             const LLUUID& asset_id,
+                             LLGLTFMaterial::TextureInfo drop_channel)
+{
+    LLTextureEntry* te = hit_obj->getTE(hit_face);
+    if (te)
+    {
+        LLPointer<LLGLTFMaterial> material = te->getGLTFMaterialOverride();
+
+        // make a copy to not invalidate existing
+        // material for multiple objects
+        if (material.isNull())
+        {
+            // Start with a material override which does not make any changes
+            material = new LLGLTFMaterial();
+        }
+        else
+        {
+            material = new LLGLTFMaterial(*material);
+        }
+
+        switch (drop_channel)
+        {
+            case LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR:
+            default:
+                {
+                    material->setBaseColorId(asset_id);
+                }
+                break;
+
+            case LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS:
+                {
+                    material->setOcclusionRoughnessMetallicId(asset_id);
+                }
+                break;
+
+            case LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE:
+                {
+                    material->setEmissiveId(asset_id);
+                }
+                break;
+
+            case LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL:
+                {
+                    material->setNormalId(asset_id);
+                }
+                break;
+        }
+        LLGLTFMaterialList::queueModify(hit_obj, hit_face, material);
+    }
+}
+
 void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
 											LLInventoryItem* item,
 											LLToolDragAndDrop::ESource source,
-											const LLUUID& src_id)
+											const LLUUID& src_id,
+                                            bool remove_pbr)
 {
 	if (!item)
 	{
@@ -1091,28 +1145,46 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
             break;
         }
     }
-    if (!has_non_pbr_faces)
+
+    if (has_non_pbr_faces || remove_pbr)
     {
-        return;
+        BOOL res = handleDropMaterialProtections(hit_obj, item, source, src_id);
+        if (!res)
+        {
+            return;
+        }
     }
 	LLUUID asset_id = item->getAssetUUID();
-	BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
-	if (!success)
-	{
-		return;
-	}
+
+    // Overrides require textures to be copy and transfer free
+    LLPermissions item_permissions = item->getPermissions();
+    bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
+    allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+
 	LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
 	add(LLStatViewer::EDIT_TEXTURE, 1);
 	for( S32 face = 0; face < num_faces; face++ )
 	{
-        if (hit_obj->getRenderMaterialID(face).isNull())
+        if (remove_pbr)
+        {
+            hit_obj->setRenderMaterialID(face, LLUUID::null);
+            hit_obj->setTEImage(face, image);
+            dialog_refresh_all();
+        }
+        else if (hit_obj->getRenderMaterialID(face).isNull())
         {
-            // update viewer side image in anticipation of update from simulator
+            // update viewer side
             hit_obj->setTEImage(face, image);
             dialog_refresh_all();
         }
+        else if (allow_adding_to_override)
+        {
+            set_texture_to_material(hit_obj, face, asset_id, LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR);
+        }
 	}
+
 	// send the update to the simulator
+    LLGLTFMaterialList::flushUpdates(nullptr);
 	hit_obj->sendTEUpdate();
 }
 
@@ -1260,21 +1332,13 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
 	dialog_refresh_all();
 }
 
-/*
-void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_face, LLInventoryItem* item)
-{
-	if (hit_face == -1) return;
-	LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID());
-	
-	avatar->userSetOptionalTE( hit_face, image);
-}
-*/
 void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
                                     S32 hit_face,
                                     LLInventoryItem* item,
                                     ESource source,
                                     const LLUUID& src_id,
                                     bool all_faces,
+                                    bool remove_pbr,
                                     S32 tex_channel)
 {
     LLSelectNode* nodep = nullptr;
@@ -1286,13 +1350,15 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
 
     if (all_faces)
     {
-        dropTextureAllFaces(hit_obj, item, source, src_id);
+        dropTextureAllFaces(hit_obj, item, source, src_id, remove_pbr);
 
         // If user dropped a texture onto face it implies
         // applying texture now without cancel, save to selection
         if (nodep)
         {
             uuid_vec_t texture_ids;
+            uuid_vec_t material_ids;
+            gltf_materials_vec_t override_materials;
             S32 num_faces = hit_obj->getNumTEs();
             for (S32 face = 0; face < num_faces; face++)
             {
@@ -1305,13 +1371,35 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
                 {
                     texture_ids.push_back(LLUUID::null);
                 }
+
+                // either removed or modified materials
+                if (remove_pbr)
+                {
+                    material_ids.push_back(LLUUID::null);
+                }
+                else
+                {
+                    material_ids.push_back(hit_obj->getRenderMaterialID(face));
+                }
+
+                LLTextureEntry* te = hit_obj->getTE(hit_face);
+                if (te && !remove_pbr)
+                {
+                    override_materials.push_back(te->getGLTFMaterialOverride());
+                }
+                else
+                {
+                    override_materials.push_back(nullptr);
+                }
             }
+
             nodep->saveTextures(texture_ids);
+            nodep->saveGLTFMaterials(material_ids, override_materials);
         }
     }
     else
     {
-        dropTextureOneFace(hit_obj, hit_face, item, source, src_id);
+        dropTextureOneFace(hit_obj, hit_face, item, source, src_id, remove_pbr, tex_channel);
 
         // If user dropped a texture onto face it implies
         // applying texture now without cancel, save to selection
@@ -1331,6 +1419,16 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
             {
                 nodep->mSavedTextures[hit_face] = LLUUID::null;
             }
+
+            LLTextureEntry* te = hit_obj->getTE(hit_face);
+            if (te && !remove_pbr)
+            {
+                nodep->mSavedGLTFOverrideMaterials[hit_face] = te->getGLTFMaterialOverride();
+            }
+            else
+            {
+                nodep->mSavedGLTFOverrideMaterials[hit_face] = nullptr;
+            }
         }
     }
 }
@@ -1340,6 +1438,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
 										   LLInventoryItem* item,
 										   LLToolDragAndDrop::ESource source,
 										   const LLUUID& src_id,
+                                           bool remove_pbr,
                                            S32 tex_channel)
 {
 	if (hit_face == -1) return;
@@ -1348,21 +1447,44 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
 		LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL;
 		return;
 	}
-    if (hit_obj->getRenderMaterialID(hit_face).notNull())
+
+    LLUUID asset_id = item->getAssetUUID();
+
+    if (hit_obj->getRenderMaterialID(hit_face).notNull() && !remove_pbr)
     {
+        // Overrides require textures to be copy and transfer free
+        LLPermissions item_permissions = item->getPermissions();
+        bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
+        allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+
+        if (allow_adding_to_override)
+        {
+            LLGLTFMaterial::TextureInfo drop_channel = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
+            LLPanelFace* panel_face = gFloaterTools->getPanelFace();
+            if (gFloaterTools->getVisible() && panel_face)
+            {
+                drop_channel = panel_face->getPBRDropChannel();
+            }
+            set_texture_to_material(hit_obj, hit_face, asset_id, drop_channel);
+            LLGLTFMaterialList::flushUpdates(nullptr);
+        }
         return;
     }
-	LLUUID asset_id = item->getAssetUUID();
 	BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
 	if (!success)
 	{
 		return;
 	}
+    if (remove_pbr)
+    {
+        hit_obj->setRenderMaterialID(hit_face, LLUUID::null);
+    }
+
 	// update viewer side image in anticipation of update from simulator
 	LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
 	add(LLStatViewer::EDIT_TEXTURE, 1);
 
-	LLTextureEntry* tep = hit_obj ? (hit_obj->getTE(hit_face)) : NULL;
+	LLTextureEntry* tep = hit_obj->getTE(hit_face);
 
 	LLPanelFace* panel_face = gFloaterTools->getPanelFace();
 
@@ -1380,6 +1502,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
 			break;
 
 		case 1:
+            if (tep)
 			{
 				LLMaterialPtr old_mat = tep->getMaterialParams();
 				LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
@@ -1391,6 +1514,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
 			break;
 
 		case 2:
+            if (tep)
 			{
 				LLMaterialPtr old_mat = tep->getMaterialParams();
 				LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
@@ -2200,6 +2324,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
 	LLViewerInventoryCategory* cat;
 	locateInventory(item, cat);
 	if (!item || !item->isFinished()) return ACCEPT_NO;
+    LLPermissions item_permissions = item->getPermissions();
 	EAcceptance rv = willObjectAcceptInventory(obj, item);
 	if((mask & MASK_CONTROL))
 	{
@@ -2214,12 +2339,12 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
 		return ACCEPT_NO_LOCKED;
 	}
 
-    if (cargo_type == DAD_TEXTURE)
+    if (cargo_type == DAD_TEXTURE && (mask & MASK_ALT) == 0)
     {
+        bool has_non_pbr_faces = false;
         if ((mask & MASK_SHIFT))
         {
             S32 num_faces = obj->getNumTEs();
-            bool has_non_pbr_faces = false;
             for (S32 face = 0; face < num_faces; face++)
             {
                 if (obj->getRenderMaterialID(face).isNull())
@@ -2228,14 +2353,19 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
                     break;
                 }
             }
-            if (!has_non_pbr_faces)
-            {
-                return ACCEPT_NO;
-            }
         }
-        else if (obj->getRenderMaterialID(face).notNull())
+        else
+        {
+            has_non_pbr_faces = obj->getRenderMaterialID(face).isNull();
+        }
+
+        if (!has_non_pbr_faces)
         {
-            return ACCEPT_NO;
+            // Only pbr faces selected, texture will be added to an override
+            // Overrides require textures to be copy and transfer free
+            bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
+            allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+            if (!allow_adding_to_override) return ACCEPT_NO;
         }
     }
 
@@ -2244,15 +2374,16 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
 		if (cargo_type == DAD_TEXTURE)
 		{
             bool all_faces = mask & MASK_SHIFT;
-            if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
+            bool remove_pbr = mask & MASK_ALT;
+            if (item_permissions.allowOperationBy(PERM_COPY, gAgent.getID()))
             {
-                dropTexture(obj, face, item, mSource, mSourceID, all_faces);
+                dropTexture(obj, face, item, mSource, mSourceID, all_faces, remove_pbr);
             }
             else
             {
                 ESource source = mSource;
                 LLUUID source_id = mSourceID;
-                LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response)
+                LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces, remove_pbr](const LLSD& notification, const LLSD& response)
                                          {
                                              S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
                                              // if Cancel pressed
@@ -2260,7 +2391,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
                                              {
                                                  return;
                                              }
-                                             dropTexture(obj, face, item, source, source_id, all_faces);
+                                             dropTexture(obj, face, item, source, source_id, all_faces, remove_pbr);
                                          });
             }
 		}
@@ -2327,23 +2458,6 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject(
 	return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH);
 }
 
-
-/*
-EAcceptance LLToolDragAndDrop::dad3dTextureSelf(
-	LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
-{
-	LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL;
-	if(drop)
-	{
-		if( !(mask & MASK_SHIFT) )
-		{
-			dropTextureOneFaceAvatar( (LLVOAvatar*)obj, face, (LLInventoryItem*)mCargoData);
-		}
-	}
-	return (mask & MASK_SHIFT) ? ACCEPT_NO : ACCEPT_YES_SINGLE;
-}
-*/
-
 EAcceptance LLToolDragAndDrop::dad3dWearItem(
 	LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
 {
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index f69774952c4c37034152c2aeb8b44879a0a27c7b..60a2f01107d7f42ba46d68409682a927ff02d6e7 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -249,17 +249,20 @@ class LLToolDragAndDrop : public LLTool, public LLSingleton<LLToolDragAndDrop>
                             ESource source,
                             const LLUUID& src_id,
                             bool all_faces,
+                            bool replace_pbr,
                             S32 tex_channel = -1);
 	static void dropTextureOneFace(LLViewerObject* hit_obj,
                                    S32 hit_face,
 								   LLInventoryItem* item,
 								   ESource source,
 								   const LLUUID& src_id,
+                                   bool remove_pbr,
                                    S32 tex_channel = -1);
 	static void dropTextureAllFaces(LLViewerObject* hit_obj,
 									LLInventoryItem* item,
 									ESource source,
-									const LLUUID& src_id);
+									const LLUUID& src_id,
+                                    bool remove_pbr);
     static void dropMaterial(LLViewerObject* hit_obj,
                              S32 hit_face,
                              LLInventoryItem* item,
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 6526e1df927a4c5b9d189f99959034a1f58f177a..979b495906281b4337ad17bc61f960be6bae1a16 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -254,7 +254,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
 
     try
     {
-        res = this->parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg);
+        res = parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg);
     }
     catch (std::out_of_range&)
     {
@@ -294,8 +294,6 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
         if (!failure.empty())
             failure(status, err_msg);
     }
-
-
 }
 
 //=========================================================================
@@ -354,7 +352,6 @@ class LLGoogleTranslationHandler : public LLTranslationAPIHandler
         std::string& translation,
         std::string& detected_lang);
     static std::string getAPIKey();
-
 };
 
 //-------------------------------------------------------------------------
@@ -392,36 +389,37 @@ bool LLGoogleTranslationHandler::checkVerificationResponse(
 
 // virtual
 bool LLGoogleTranslationHandler::parseResponse(
-    const LLSD& http_response,
+	const LLSD& http_response,
 	int& status,
 	const std::string& body,
 	std::string& translation,
 	std::string& detected_lang,
 	std::string& err_msg) const
 {
+	const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef();
+
 	Json::Value root;
 	Json::Reader reader;
 
-	if (!reader.parse(body, root))
+	if (reader.parse(text, root))
 	{
-		err_msg = reader.getFormatedErrorMessages();
-		return false;
+		if (root.isObject())
+		{
+			// Request succeeded, extract translation from the XML body.
+			if (parseTranslation(root, translation, detected_lang))
+				return true;
+
+			// Request failed. Extract error message from the XML body.
+			parseErrorResponse(root, status, err_msg);
+		}
 	}
-
-	if (!root.isObject()) // empty response? should not happen
+	else
 	{
-		return false;
-	}
-
-	if (status != HTTP_OK)
-	{
-		// Request failed. Extract error message from the response.
-		parseErrorResponse(root, status, err_msg);
-		return false;
+		// XML parsing failed. Extract error message from the XML parser.
+		err_msg = reader.getFormatedErrorMessages();
 	}
 
-	// Request succeeded, extract translation from the response.
-	return parseTranslation(root, translation, detected_lang);
+	return false;
 }
 
 // virtual
@@ -494,7 +492,7 @@ void LLGoogleTranslationHandler::verifyKey(const LLSD &key, LLTranslate::KeyVeri
 /*virtual*/
 void LLGoogleTranslationHandler::initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const
 {
-    headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
+    headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_JSON);
     headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
 }
 
@@ -504,8 +502,7 @@ void LLGoogleTranslationHandler::initHttpHeader(
     const std::string& user_agent,
     const LLSD &key) const
 {
-    headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
-    headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
+    initHttpHeader(headers, user_agent);
 }
 
 LLSD LLGoogleTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
@@ -729,7 +726,7 @@ bool LLAzureTranslationHandler::parseResponse(
         return false;
     }
 
-    translation = first["text"].asString();
+    translation = LLURI::unescape(first["text"].asString());
 
     return true;
 }
@@ -829,8 +826,13 @@ LLSD LLAzureTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCorout
 {
     LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray);
     LLCore::BufferArrayStream outs(rawbody.get());
+
+    static const std::string allowed_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz "
+                                             "0123456789"
+                                             "-._~";
+
     outs << "[{\"text\":\"";
-    outs << msg;
+    outs << LLURI::escape(msg, allowed_chars);
     outs << "\"}]";
 
     return adapter->postRawAndSuspend(request, url, rawbody, options, headers);
@@ -1315,5 +1317,4 @@ LLTranslationAPIHandler& LLTranslate::getHandler(EService service)
     }
 
     return azure;
-
 }
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 76fb138768a91c59e4b63e3e04d17a9072111ab2..07ea8a4ec617cb0ea6afcc38bbfa67c94feb910a 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -134,6 +134,11 @@ bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl,
 								   LLMediaCtrl* web,
 								   bool trusted_browser)
 {
+    // SL-20422 : Clicking the "Bring it back" link on Aditi displays a teleport alert
+    // Stop further processing empty urls like [secondlife:/// Bring it back.]
+    if (slurl.getType() == LLSLURL::EMPTY)
+        return true;
+
 	const bool right_click = false;
 	return dispatchCore(slurl, nav_type, right_click, web, trusted_browser);
 }
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index a2b0b04092f8a2a8d42fd2b429d0cf709b52edc4..e2e321af0d046da92cab6a7cf359db62bc51613b 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -931,7 +931,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
             // Show the preview panel for textures and sounds to let
             // user know that the image (or snapshot) arrived intact.
             LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
-            LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL));
+            LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, false, !panel);
 
             // restore keyboard focus
             gFocusMgr.setKeyboardFocus(focus);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index a936012781612b294c5f5aa0c4b6d62ee8ae089e..e1d6f71cce9b32f377146201161b171430dedf0e 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -730,8 +730,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
 			LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 2")
 			if (gResizeScreenTexture)
 			{
-				gResizeScreenTexture = FALSE;
 				gPipeline.resizeScreenTexture();
+                gResizeScreenTexture = FALSE;
 			}
 
 			gGL.setColorMask(true, true);
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 8353d4d1d78f3c88d359eb4b31b36515925cb444..1b34bed2da9b92ba82af7739b2ec9caadc9b75ae 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -87,6 +87,7 @@
 #include "llfloaterimsession.h"
 #include "llfloaterinspect.h"
 #include "llfloaterinventorysettings.h"
+#include "llfloaterinventorythumbnailshelper.h"
 #include "llfloaterjoystick.h"
 #include "llfloaterlagmeter.h"
 #include "llfloaterland.h"
@@ -249,6 +250,7 @@ class LLFloaterOpenHandler : public LLCommandHandler
                 "group_picker",
                 "hud",
                 "incoming_call",
+                "inventory_thumbnails_helper",
                 "linkreplace",
                 "mem_leaking",
                 "marketplace_validation",
@@ -335,7 +337,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
 	LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
 	LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
-
+    
 	LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
 	LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCameraPresets>);
 	LLFloaterReg::add("chat_voice", "floater_voice_chat_volume.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatVoiceVolume>);
@@ -384,6 +386,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
 	LLFloaterReg::add("inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
 	LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
+    LLFloaterReg::add("inventory_thumbnails_helper", "floater_inventory_thumbnails_helper.xml", (LLFloaterBuildFunc) &LLFloaterReg::build<LLFloaterInventoryThumbnailsHelper>);
 	LLFloaterReg::add("item_properties", "floater_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterItemProperties>);
     LLFloaterReg::add("task_properties", "floater_task_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterItemProperties>);
     LLFloaterReg::add("inventory_settings", "floater_inventory_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventorySettings>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 0a0a19d0959900f6dc94a080f1e0539e499da2dd..b9a7c9448fdf72cd304f92e244bf79d2b17f1dbc 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -668,15 +668,14 @@ void LLViewerInventoryCategory::setVersion(S32 version)
 	mVersion = version;
 }
 
-bool LLViewerInventoryCategory::fetch()
+bool LLViewerInventoryCategory::fetch(S32 expiry_seconds)
 {
 	if((VERSION_UNKNOWN == getVersion())
 	   && mDescendentsRequested.hasExpired())	//Expired check prevents multiple downloads.
 	{
 		LL_DEBUGS(LOG_INV) << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
-		const F32 FETCH_TIMER_EXPIRY = 10.0f;
 		mDescendentsRequested.reset();
-		mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
+		mDescendentsRequested.setTimerExpirySec(expiry_seconds);
 
 		std::string url;
 		if (gAgent.getRegion())
@@ -685,7 +684,7 @@ bool LLViewerInventoryCategory::fetch()
 		}
 		else
 		{
-			LL_WARNS(LOG_INV) << "agent region is null" << LL_ENDL;
+			LL_WARNS_ONCE(LOG_INV) << "agent region is null" << LL_ENDL;
 		}
 		if (!url.empty() || AISAPI::isAvailable())
 		{
@@ -709,7 +708,13 @@ LLViewerInventoryCategory::EFetchType LLViewerInventoryCategory::getFetching()
 
 void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchType fetching)
 {
-    if (fetching > mFetching) // allow a switch from normal to recursive
+    if (fetching == FETCH_FAILED)
+    {
+        const F32 FETCH_FAILURE_EXPIRY = 60.0f;
+        mDescendentsRequested.setTimerExpirySec(FETCH_FAILURE_EXPIRY);
+        mFetching = fetching;
+    }
+    else if (fetching > mFetching) // allow a switch from normal to recursive
     {
         if (mDescendentsRequested.hasExpired() || (mFetching == FETCH_NONE))
         {
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index e043285ffb0cd28afff2fb08fc65c630f85d6a68..0d0ccc6643046eb422c994cacf32cd114ad6f5fb 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -209,13 +209,15 @@ class LLViewerInventoryCategory  : public LLInventoryCategory
 	S32 getVersion() const;
 	void setVersion(S32 version);
 
-	// Returns true if a fetch was issued (not nessesary in progress).
-	bool fetch();
+    // Returns true if a fetch was issued (not nessesary in progress).
+    // no requests will happen during expiry_seconds even if fetch completed
+    bool fetch(S32 expiry_seconds = 10);
 
     typedef enum {
         FETCH_NONE = 0,
         FETCH_NORMAL,
         FETCH_RECURSIVE,
+        FETCH_FAILED, // back off
     } EFetchType;
     EFetchType getFetching();
     // marks as fetch being in progress or as done
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index ad7c4bcefa34c028394744c24fab7c4888a706ee..03899b6b8f94bb7269d7e3c903db6b240042e553 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -431,7 +431,7 @@ class LLViewerMediaImpl
 	
 private:
 	// a single media url with some data and an impl.
-	boost::shared_ptr<LLPluginClassMedia> mMediaSource;
+	std::shared_ptr<LLPluginClassMedia> mMediaSource;
     LLMutex mLock;
 	F64		mZoomFactor;
 	LLUUID mTextureId;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2cf341f87f4442f5e890b9965ebb87cb92a525fe..625d32f59d2db92441e25389efe1223901fec0a6 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -102,6 +102,7 @@
 #include "llsceneview.h"
 #include "llscenemonitor.h"
 #include "llselectmgr.h"
+#include "llsidepanelappearance.h"
 #include "llspellcheckmenuhandler.h"
 #include "llstatusbar.h"
 #include "lltextureview.h"
@@ -289,9 +290,11 @@ void handle_disconnect_viewer(void *);
 
 void force_error_breakpoint(void *);
 void force_error_llerror(void *);
+void force_error_llerror_msg(void*);
 void force_error_bad_memory_access(void *);
 void force_error_infinite_loop(void *);
 void force_error_software_exception(void *);
+void force_error_os_exception(void*);
 void force_error_driver_crash(void *);
 void force_error_coroutine_crash(void *);
 void force_error_thread_crash(void *);
@@ -1461,6 +1464,31 @@ class LLAdvancedCheckDebugUnicode : public view_listener_t
 
 
 
+//////////////////
+// DEBUG CAMERA //
+//////////////////
+
+
+class LLAdvancedToggleDebugCamera : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		LLView::sDebugCamera = !(LLView::sDebugCamera);
+		LLFloaterCamera::onDebugCameraToggled();
+		return true;
+	}
+};
+
+class LLAdvancedCheckDebugCamera : public view_listener_t
+{
+	bool handleEvent(const LLSD& userdata)
+	{
+		return LLView::sDebugCamera;
+	}
+};
+
+
+
 ///////////////////////
 // XUI NAME TOOLTIPS //
 ///////////////////////
@@ -2400,6 +2428,15 @@ class LLAdvancedForceErrorLlerror : public view_listener_t
 	}
 };
 
+class LLAdvancedForceErrorLlerrorMsg: public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        force_error_llerror_msg(NULL);
+        return true;
+    }
+};
+
 class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
@@ -2443,6 +2480,15 @@ class LLAdvancedForceErrorSoftwareException : public view_listener_t
 	}
 };
 
+class LLAdvancedForceOSException: public view_listener_t
+{
+    bool handleEvent(const LLSD& userdata)
+    {
+        force_error_os_exception(NULL);
+        return true;
+    }
+};
+
 class LLAdvancedForceErrorSoftwareExceptionCoro : public view_listener_t
 {
     bool handleEvent(const LLSD& userdata)
@@ -3224,6 +3270,15 @@ bool enable_object_select_in_pathfinding_characters()
 	return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() &&  LLSelectMgr::getInstance()->selectGetViewableCharacters();
 }
 
+bool enable_os_exception()
+{
+#if LL_DARWIN
+    return true;
+#else
+    return false;
+#endif
+}
+
 class LLSelfRemoveAllAttachments : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
@@ -6164,8 +6219,9 @@ class LLCommunicateNearbyChat : public view_listener_t
 	bool handleEvent(const LLSD& userdata)
 	{
 		LLFloaterIMContainer* im_box = LLFloaterIMContainer::getInstance();
-		bool nearby_visible	= LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->isInVisibleChain();
-		if(nearby_visible && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1)
+        LLFloaterIMNearbyChat* floater_nearby = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
+        if (floater_nearby->isInVisibleChain() && !floater_nearby->isTornOff() 
+            && im_box->getSelectedSession() == LLUUID() && im_box->getConversationListItemSize() > 1)
 		{
 			im_box->selectNextorPreviousConversation(false);
 		}
@@ -6679,6 +6735,13 @@ void handle_edit_outfit()
 
 void handle_now_wearing()
 {
+    LLSidepanelAppearance *panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance"));
+    if (panel_appearance && panel_appearance->isInVisibleChain() && panel_appearance->isCOFPanelVisible())
+    {
+        LLFloaterReg::findInstance("appearance")->closeFloater();
+        return;
+    }
+
     LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "now_wearing"));
 }
 
@@ -8379,6 +8442,11 @@ void force_error_llerror(void *)
     LLAppViewer::instance()->forceErrorLLError();
 }
 
+void force_error_llerror_msg(void*)
+{
+    LLAppViewer::instance()->forceErrorLLErrorMsg();
+}
+
 void force_error_bad_memory_access(void *)
 {
     LLAppViewer::instance()->forceErrorBadMemoryAccess();
@@ -8394,6 +8462,11 @@ void force_error_software_exception(void *)
     LLAppViewer::instance()->forceErrorSoftwareException();
 }
 
+void force_error_os_exception(void*)
+{
+    LLAppViewer::instance()->forceErrorOSSpecificException();
+}
+
 void force_error_driver_crash(void *)
 {
     LLAppViewer::instance()->forceErrorDriverCrash();
@@ -9535,6 +9608,8 @@ void initialize_menus()
 	view_listener_t::addMenu(new LLAdvancedToggleDebugViews(), "Advanced.ToggleDebugViews");
 	view_listener_t::addMenu(new LLAdvancedCheckDebugUnicode(), "Advanced.CheckDebugUnicode");
 	view_listener_t::addMenu(new LLAdvancedToggleDebugUnicode(), "Advanced.ToggleDebugUnicode");
+	view_listener_t::addMenu(new LLAdvancedCheckDebugCamera(), "Advanced.CheckDebugCamera");
+	view_listener_t::addMenu(new LLAdvancedToggleDebugCamera(), "Advanced.ToggleDebugCamera");
 	view_listener_t::addMenu(new LLAdvancedToggleXUINameTooltips(), "Advanced.ToggleXUINameTooltips");
 	view_listener_t::addMenu(new LLAdvancedCheckXUINameTooltips(), "Advanced.CheckXUINameTooltips");
 	view_listener_t::addMenu(new LLAdvancedToggleDebugMouseEvents(), "Advanced.ToggleDebugMouseEvents");
@@ -9604,10 +9679,12 @@ void initialize_menus()
 	// Advanced > Debugging
 	view_listener_t::addMenu(new LLAdvancedForceErrorBreakpoint(), "Advanced.ForceErrorBreakpoint");
 	view_listener_t::addMenu(new LLAdvancedForceErrorLlerror(), "Advanced.ForceErrorLlerror");
+    view_listener_t::addMenu(new LLAdvancedForceErrorLlerrorMsg(), "Advanced.ForceErrorLlerrorMsg");
 	view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccess(), "Advanced.ForceErrorBadMemoryAccess");
 	view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccessCoro(), "Advanced.ForceErrorBadMemoryAccessCoro");
 	view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
 	view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException");
+    view_listener_t::addMenu(new LLAdvancedForceOSException(), "Advanced.ForceErrorOSException");
 	view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareExceptionCoro(), "Advanced.ForceErrorSoftwareExceptionCoro");
 	view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash");
     view_listener_t::addMenu(new LLAdvancedForceErrorCoroutineCrash(), "Advanced.ForceErrorCoroutineCrash");
@@ -9793,6 +9870,7 @@ void initialize_menus()
 	enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets));
 	commit.add("Pathfinding.Characters.Select", boost::bind(&LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects));
 	enable.add("EnableSelectInPathfindingCharacters", boost::bind(&enable_object_select_in_pathfinding_characters));
+    enable.add("Advanced.EnableErrorOSException", boost::bind(&enable_os_exception));
 
 	view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible");
 	view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel");
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index ff2ee693fd00e638b7e50492c32764a6f95538a8..6b9df6df287204a50926f7a124becaea0ffc56d4 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -145,7 +145,7 @@ class LLMediaFilePicker : public LLFilePickerThread
     virtual void notify(const std::vector<std::string>& filenames);
 
 private:
-    boost::shared_ptr<LLPluginClassMedia> mPlugin;
+    std::shared_ptr<LLPluginClassMedia> mPlugin;
 };
 
 
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ada898b98cfc2a403e9a7d1dd8cf22c2f3c5a5c8..ff2753d2406ebb0a6e27962af1b7acbf00512944 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -119,8 +119,6 @@
 #include "llviewerregion.h"
 #include "llfloaterregionrestarting.h"
 
-#include <boost/foreach.hpp>
-
 #include "llnotificationmanager.h" //
 #include "llexperiencecache.h"
 
@@ -1563,15 +1561,22 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
         }
         else
         {
-		// Highlight item
-		const BOOL auto_open = 
-			gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
-			!from_name.empty(); // don't open if it's not from anyone.
-            if(auto_open)
+            // Highlight item
+            bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory");
+            bool auto_open =
+                show_in_inventory && // don't open if ShowInInventory is FALSE
+                !from_name.empty();  // don't open if it's not from anyone
+
+            // SL-20419 : Don't change active tab if floater is visible
+            LLFloater* instance = LLFloaterReg::findInstance("inventory");
+            bool use_main_panel = instance && instance->getVisible();
+
+            if (auto_open)
             {
                 LLFloaterReg::showInstance("inventory");
             }
-		LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
+
+            LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel);
         }
 	}
 }
@@ -4158,6 +4163,12 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
 					LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.find(object_id);
 					for (;anim_it != avatarp->mAnimationSources.end(); ++anim_it)
 					{
+						if (anim_it->first != object_id)
+						{
+							// elements with the same key are always contiguous, bail if we went past the
+							// end of this object's animations
+							break;
+						}
 						if (anim_it->second == animation_id)
 						{
 							anim_found = TRUE;
@@ -4222,7 +4233,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
     LLObjectSignaledAnimationMap::instance().getMap()[uuid] = signaled_anims;
     
     LLViewerObject *objp = gObjectList.findObject(uuid);
-    if (!objp)
+    if (!objp || objp->isDead())
     {
 		LL_DEBUGS("AnimatedObjectsNotify") << "Received animation state for unknown object " << uuid << LL_ENDL;
         return;
@@ -5620,7 +5631,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
 		BOOL caution = FALSE;
 		S32 count = 0;
 		std::string perms;
-		BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS)
+		for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS)
 		{
 			if ((orig_questions & script_perm.permbit)
 				&& script_perm.caution)
@@ -5864,7 +5875,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
 		S32 known_questions = 0;
 		bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit;
 		// check the received permission flags against each permission
-		BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS)
+		for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS)
 		{
 			if (questions & script_perm.permbit)
 			{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d4346ee2d954a0e7a8486e2ac183e3d428fbbe09..f1fac106c7ba315dd6f6f11549886c76528617d8 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -391,6 +391,13 @@ LLViewerObject::~LLViewerObject()
 	sNumObjects--;
 	sNumZombieObjects--;
 	llassert(mChildList.size() == 0);
+    llassert(mControlAvatar.isNull()); // Should have been cleaned by now
+    if (mControlAvatar.notNull())
+    {
+        mControlAvatar->markForDeath();
+        mControlAvatar = NULL;
+        LL_WARNS() << "Dead object owned a live control avatar" << LL_ENDL;
+    }
 
 	clearInventoryListeners();
 }
@@ -3106,6 +3113,10 @@ void LLViewerObject::updateControlAvatar()
         return;
     }
 
+    // caller isn't supposed to operate on a dead object,
+    // avatar was already cleaned up
+    llassert(!isDead());
+
     bool should_have_control_avatar = false;
     if (is_animated_object)
     {
@@ -3189,7 +3200,6 @@ void LLViewerObject::unlinkControlAvatar()
         if (mControlAvatar)
         {
             mControlAvatar->markForDeath();
-			mControlAvatar->mRootVolp = NULL;
             mControlAvatar = NULL;
         }
     }
@@ -5041,11 +5051,6 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
                     LLViewerObject* obj = gObjectList.findObject(id);
                     if (obj)
                     {
-                        LLViewerRegion* region = obj->getRegion();
-                        if(region)
-                        {
-                            region->loadCacheMiscExtras(obj->getLocalID());
-                        }
                         obj->markForUpdate();
                     }
                 });
@@ -5124,7 +5129,7 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
 S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
 {
 	LLUUID old_image_id = getTE(te)->getID();
-	const LLUUID& uuid = image->getID();
+	const LLUUID& uuid = image ? image->getID() : LLUUID::null;
 	S32 retval = 0;
 	if (uuid != getTE(te)->getID() ||
 		uuid == LLUUID::null)
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 5bc7523be1c3733298bbeb6a4f52dcc09d8275ca..a53bd982d438d0bea87821e4a97101dcddba0ad7 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -2043,6 +2043,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
 			{
 				LL_WARNS() << objectp->mID << " has self as parent, skipping!" 
 					<< LL_ENDL;
+                ++iter;
 				continue;
 			}
 
diff --git a/indra/newview/llviewerparcelaskplay.cpp b/indra/newview/llviewerparcelaskplay.cpp
index afbe2c94de8e56443501002fd6e2ce1a3a41db3e..aea06834b20dba1d85247e364c2b281508369e33 100644
--- a/indra/newview/llviewerparcelaskplay.cpp
+++ b/indra/newview/llviewerparcelaskplay.cpp
@@ -287,7 +287,7 @@ void LLViewerParcelAskPlay::saveSettings()
             if ((iter_parcel->second.mDate.secondsSinceEpoch() + (F64SecondsImplicit)U32Days(30)) > LLTimer::getTotalSeconds())
             {
                 // write unexpired parcels
-                std::string parcel_id = boost::lexical_cast<std::string>(iter_parcel->first);
+                std::string parcel_id = std::to_string(iter_parcel->first);
                 write_llsd[key][parcel_id] = LLSD();
                 write_llsd[key][parcel_id]["mode"] = (LLSD::Integer)iter_parcel->second.mMode;
                 write_llsd[key][parcel_id]["date"] = iter_parcel->second.mDate;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 39aaac57c174a0575bbc56640bac8a3d8b2ff6a8..e7489fbc5fe2ca3896484d203616ce3172c3381a 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -829,10 +829,17 @@ void LLViewerRegion::saveObjectCache()
 		mCacheDirty = FALSE;
 	}
 
-	// Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
-	sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
-	mImpl->mCacheMap.clear();
-	// TODO - probably need to do the same for overrides cache
+    if (LLAppViewer::instance()->isQuitting())
+    {
+        mImpl->mCacheMap.clear();
+    }
+    else
+    {
+        // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
+        sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
+        mImpl->mCacheMap.clear();
+        // TODO - probably need to do the same for overrides cache
+    }
 }
 
 void LLViewerRegion::sendMessage()
@@ -1879,8 +1886,6 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
 		addActiveCacheEntry(entry);
 	}
 
-    loadCacheMiscExtras(entry->getLocalID());
-
 	return obj;
 }
 
@@ -2467,7 +2472,10 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
 
 		//set parent id
 		U32	parent_id = 0;
-		LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+        if (entry->getDP()) // NULL if nothing cached
+        {
+            LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+        }
 		if(parent_id != entry->getParentID())
 		{				
 			entry->setParentID(parent_id);
@@ -2487,7 +2495,7 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
 	LLQuaternion rot;
 
 	//decode spatial info and parent info
-	U32 parent_id = LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot);
+	U32 parent_id = entry->getDP() ? LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot) : entry->getParentID();
 	
 	U32 old_parent_id = entry->getParentID();
 	bool same_old_parent = false;
@@ -3656,15 +3664,6 @@ std::string LLViewerRegion::getSimHostName()
 	return std::string("...");
 }
 
-void LLViewerRegion::loadCacheMiscExtras(U32 local_id)
-{
-    auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
-    if (iter != mImpl->mGLTFOverridesLLSD.end())
-    {
-        LLGLTFMaterialList::loadCacheOverrides(iter->second);
-    }
-}
-
 void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 5817bd7d8d53e168cd3e93feb62f74c889323474..bff424b38a9a40a39056ef1d83f3f3800c9f98cd 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -436,8 +436,6 @@ class LLViewerRegion: public LLCapabilityProvider // implements this interface
 	bool isNonCacheableObjectCreated(U32 local_id);	
 
 public:
-	void loadCacheMiscExtras(U32 local_id);
-
     void applyCacheMiscExtras(LLViewerObject* obj);
 
 	struct CompareDistance
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 3225299493046e282fcce764a027c3246ea5493e..2bab50300b62f98b4d3f43197a67392e1022c708 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -592,7 +592,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
 
 	std::map<std::string, std::string> attribs;
 	attribs["MAX_JOINTS_PER_MESH_OBJECT"] = 
-		boost::lexical_cast<std::string>(LLSkinningUtil::getMaxJointCount());
+		std::to_string(LLSkinningUtil::getMaxJointCount());
 
     BOOL ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
 
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 56bba5169210ebba3ffc02a50fd98e46f3ac8ccb..04ef441a69bb7a9c4338ac34deab0141b64d114a 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3505,7 +3505,10 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep)
 	
 	if(te && te->getID().notNull()) //should have a texture
 	{
-		LL_ERRS() << "The face does not have a valid texture before media texture." << LL_ENDL;
+        LL_WARNS_ONCE() << "The face's texture " << te->getID() << " is not valid. Face must have a valid texture before media texture." << LL_ENDL;
+        // This might break the object, but it likely isn't a 'recoverable' situation.
+        LLViewerFetchedTexture* tex = LLViewerTextureManager::getFetchedTexture(te->getID());
+        mTextureList.push_back(tex);
 	}
 }
 
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 9a6d40ab0a6006c41da101c1c810bb1b9a3ada2a..8731be6e976041204e95cabe80e1bc01abbfaaff 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -121,8 +121,17 @@ void LLViewerTextureList::doPreloadImages()
 	LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
 	LLUIImageList* image_list = LLUIImageList::getInstance();
 
-	// Set the default flat normal map
-	LLViewerFetchedTexture::sFlatNormalImagep = LLViewerTextureManager::getFetchedTextureFromFile("flatnormal.tga", FTT_LOCAL_FILE, MIPMAP_NO, LLViewerFetchedTexture::BOOST_BUMP);
+    // Set the default flat normal map
+    // BLANK_OBJECT_NORMAL has a version on dataserver, but it has compression artifacts
+    LLViewerFetchedTexture::sFlatNormalImagep =
+        LLViewerTextureManager::getFetchedTextureFromFile("flatnormal.tga",
+                                                          FTT_LOCAL_FILE,
+                                                          MIPMAP_NO,
+                                                          LLViewerFetchedTexture::BOOST_BUMP,
+                                                          LLViewerTexture::FETCHED_TEXTURE,
+                                                          0,
+                                                          0,
+                                                          BLANK_OBJECT_NORMAL);
 
 	// PBR: irradiance
 	LLViewerFetchedTexture::sDefaultIrradiancePBRp = LLViewerTextureManager::getFetchedTextureFromFile("default_irradiance.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
@@ -683,7 +692,6 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
 	assert_main_thread();
 	llassert_always(mInitialized) ;
 	llassert(image);
-    image->validateRefCount();
 
 	S32 count = 0;
 	if (image->isInImageList())
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 47c7eed872ab546af9040a9f1f1c80ff6e141288..37e64dfc17d4f2ed0ffe35435627ea49aea34240 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1957,7 +1957,11 @@ LLViewerWindow::LLViewerWindow(const Params& p)
 	// Initialize OpenGL Renderer
 	LLVertexBuffer::initClass(mWindow);
 	LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
-	gGL.init(true);
+	if (!gGL.init(true))
+    {
+        LLError::LLUserWarningMsg::show(LLTrans::getString("MBVideoDrvErr"));
+        LL_ERRS() << "gGL not initialized" << LL_ENDL;
+    }
 
 	if (LLFeatureManager::getInstance()->isSafe()
 		|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index ccef006a0709336746892cff142d08c455ebf474..346073b8a133fc270811586bbf40bdcb9975d730 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -538,8 +538,8 @@ class LLViewerWindow : public LLWindowCallbacks
 	bool			mStatesDirty;
 	U32			mCurrResolutionIndex;
 
-	boost::scoped_ptr<LLWindowListener> mWindowListener;
-	boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
+	std::unique_ptr<LLWindowListener> mWindowListener;
+	std::unique_ptr<LLViewerWindowListener> mViewerWindowListener;
 
 	// Object temporarily hovered over while dragging
 	LLPointer<LLViewerObject>	mDragHoveredObject;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a600482d5bda9753b7ed74dceca64d6bc47e747c..b5ef3bf19b34f8dde10e9dd62495475dbb9fbc53 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2578,7 +2578,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
 	{
         if (!mIsControlAvatar)
         {
-            idleUpdateNameTag( mLastRootPos );
+            idleUpdateNameTag(idleCalcNameTagPosition(mLastRootPos));
         }
 		return;
 	}
@@ -2662,7 +2662,9 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
 	bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) &&
 						 LLVoiceClient::getInstance()->getVoiceEnabled(mID);
 
-	idleUpdateVoiceVisualizer( voice_enabled );
+    LLVector3 hud_name_pos = idleCalcNameTagPosition(mLastRootPos);
+
+	idleUpdateVoiceVisualizer(voice_enabled, hud_name_pos);
 	idleUpdateMisc( detailed_update );
 	idleUpdateAppearanceAnimation();
 	if (detailed_update)
@@ -2673,7 +2675,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
 		idleUpdateWindEffect();
 	}
 		
-	idleUpdateNameTag( mLastRootPos );
+	idleUpdateNameTag(hud_name_pos);
 
     // Complexity has stale mechanics, but updates still can be very rapid
     // so spread avatar complexity calculations over frames to lesen load from
@@ -2713,7 +2715,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
     idleUpdateDebugInfo();
 }
 
-void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
+void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled, const LLVector3 &position)
 {
 	bool render_visualizer = voice_enabled;
 	
@@ -2802,24 +2804,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
 				}
 			}
 		}
-		
-		//--------------------------------------------------------------------------------------------
-		// here we get the approximate head position and set as sound source for the voice symbol
-		// (the following version uses a tweak of "mHeadOffset" which handle sitting vs. standing)
-		//--------------------------------------------------------------------------------------------
-		
-		if ( isSitting() )
-		{
-			LLVector3 headOffset = LLVector3( 0.0f, 0.0f, mHeadOffset.mV[2] );
-			mVoiceVisualizer->setVoiceSourceWorldPosition( mRoot->getWorldPosition() + headOffset );
-		}
-		else 
-		{
-			LLVector3 tagPos = mRoot->getWorldPosition();
-			tagPos[VZ] -= mPelvisToFoot;
-			tagPos[VZ] += ( mBodySize[VZ] + 0.125f ); // does not need mAvatarOffset -Nyx
-			mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos );
-		}
+        mVoiceVisualizer->setPositionAgent(position);
 	}//if ( voiceEnabled )
 }		
 
@@ -3335,7 +3320,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
 		new_name = TRUE;
     }
 				
-	idleUpdateNameTagPosition(root_pos_last);
+    mNameText->setPositionAgent(root_pos_last);
+
 	idleUpdateNameTagText(new_name);			
 	idleUpdateNameTagAlpha(new_name, alpha);
 }
@@ -3612,7 +3598,7 @@ void LLVOAvatar::invalidateNameTags()
 }
 
 // Compute name tag position during idle update
-void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
+LLVector3 LLVOAvatar::idleCalcNameTagPosition(const LLVector3 &root_pos_last)
 {
 	LLQuaternion root_rot = mRoot->getWorldRotation();
 	LLQuaternion inv_root_rot = ~root_rot;
@@ -3626,7 +3612,6 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
 	local_camera_up.normalize();
 	local_camera_up = local_camera_up * inv_root_rot;
 
-
 	// position is based on head position, does not require mAvatarOffset here. - Nyx
 	LLVector3 avatar_ellipsoid(mBodySize.mV[VX] * 0.4f,
 								mBodySize.mV[VY] * 0.4f,
@@ -3648,7 +3633,26 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
 	name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));	
 	name_position += pixel_up_vec * NAMETAG_VERTICAL_SCREEN_OFFSET;
 
-	mNameText->setPositionAgent(name_position);				
+	const F32 water_height = getRegion()->getWaterHeight();
+	static const F32 WATER_HEIGHT_DELTA = 0.25f;
+	if (name_position[VZ] < water_height + WATER_HEIGHT_DELTA)
+	{
+		if (LLViewerCamera::getInstance()->getOrigin()[VZ] >= water_height)
+		{
+			name_position[VZ] = water_height;
+		}
+		else if (mNameText) // both camera and HUD are below watermark
+		{
+			F32 name_world_height = mNameText->getWorldHeight();
+			F32 max_z_position = water_height - name_world_height;
+			if (name_position[VZ] > max_z_position)
+			{
+				name_position[VZ] = max_z_position;
+			}
+		}
+	}
+
+	return name_position;
 }
 
 void LLVOAvatar::idleUpdateNameTagAlpha(bool new_name, F32 alpha)
@@ -3742,6 +3746,10 @@ bool LLVOAvatar::isVisuallyMuted()
         else if (isInMuteList())
         {
             muted = true;
+        }
+        else if (mIsControlAvatar)
+        {
+            muted = isTooSlow();
         }
 		else 
 		{
@@ -4291,6 +4299,15 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
 				if (mTurning)
 				{
 					pelvis_rot_threshold *= 0.4f;
+                    // account for fps, assume that above value is for ~60fps
+                    constexpr F32 default_frame_sec = 0.016f;
+                    F32 prev_frame_sec = LLFrameTimer::getFrameDeltaTimeF32();
+                    if (default_frame_sec > prev_frame_sec)
+                    {
+                        // reduce threshold since turn rate per second is constant,
+                        // shorter frame means shorter turn.
+                        pelvis_rot_threshold *= prev_frame_sec/default_frame_sec;
+                    }
 				}
 
 				// am I done turning?
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 47526707dd922563e9a00c44b93480d2eeba63db..30135037e7f572cd18b35907950fc49dced2c9c0 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -278,7 +278,7 @@ class LLVOAvatar :
     void			updateTimeStep();
     void			updateRootPositionAndRotation(LLAgent &agent, F32 speed, bool was_sit_ground_constrained);
     
-	void 			idleUpdateVoiceVisualizer(bool voice_enabled);
+	void            idleUpdateVoiceVisualizer(bool voice_enabled, const LLVector3 &position);
 	void 			idleUpdateMisc(bool detailed_update);
 	virtual void	idleUpdateAppearanceAnimation();
 	void 			idleUpdateLipSync(bool voice_enabled);
@@ -286,7 +286,6 @@ class LLVOAvatar :
 	void 			idleUpdateWindEffect();
 	void 			idleUpdateNameTag(const LLVector3& root_pos_last);
 	void			idleUpdateNameTagText(bool new_name);
-	void			idleUpdateNameTagPosition(const LLVector3& root_pos_last);
 	void			idleUpdateNameTagAlpha(bool new_name, F32 alpha);
 	LLColor4		getNameTagColor(bool is_friend);
 	void			clearNameTag();
@@ -345,6 +344,8 @@ class LLVOAvatar :
 
 	static void updateNearbyAvatarCount();
 
+    LLVector3 idleCalcNameTagPosition(const LLVector3 &root_pos_last);
+
 	//--------------------------------------------------------------------
 	// Static preferences (controlled by user settings/menus)
 	//--------------------------------------------------------------------
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7b24b9ee0277bfcf117f31b81717d3238ff9a273..f12fc3babc708529e88d1b74bdc828a7e7ea66fe 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -834,7 +834,11 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
 	for (AnimSourceIterator motion_it = mAnimationSources.find(source_id); motion_it != mAnimationSources.end(); )
 	{
 		gAgent.sendAnimationRequest(motion_it->second, ANIM_REQUEST_STOP);
-		mAnimationSources.erase(motion_it++);
+		mAnimationSources.erase(motion_it);
+		// Must find() after each erase() to deal with potential iterator invalidation
+		// This also ensures that we don't go past the end of this source's animations
+		// into those of another source.
+		motion_it = mAnimationSources.find(source_id);
 	}
 
 
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 34e561174cf0da98f5a29e4f9516fd3f3a2f4552..d4dfd16c3b3a47e762698ebd5574def4b4956b05 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -40,6 +40,7 @@
 #include "llviewertexturelist.h"
 #include "llvoiceclient.h"
 #include "llrender.h"
+#include "llagent.h"
 
 //brent's wave image
 //29de489d-0491-fb00-7dab-f9e686d31e83
@@ -349,7 +350,7 @@ void LLVoiceVisualizer::render()
 		//---------------------------------------------------------------
 		// set the sound symbol position over the source (avatar's head)
 		//---------------------------------------------------------------
-		mSoundSymbol.mPosition = mVoiceSourceWorldPosition + WORLD_UPWARD_DIRECTION * HEIGHT_ABOVE_HEAD;
+        mSoundSymbol.mPosition = gAgent.getPosAgentFromGlobal(mPositionGlobal) + WORLD_UPWARD_DIRECTION * HEIGHT_ABOVE_HEAD;
 	
 		//---------------------------------------------------------------
 		// some gl state
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index ccdd86dd8787686e88a707c16443e5e44212779d..6bbb2f24a6123ed9c52437d8569dbd31f5fb4e9e 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -955,32 +955,52 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
             // cause SLVoice's bind() call to fail with EADDRINUSE. We expect
             // that eventually the OS will time out previous ports, which is
             // why we cycle instead of incrementing indefinitely.
-            U32 portbase = gSavedSettings.getU32("VivoxVoicePort");
-            static U32 portoffset = 0;
+
+            static LLCachedControl<U32> portbase(gSavedSettings, "VivoxVoicePort");
+            static LLCachedControl<std::string> host(gSavedSettings, "VivoxVoiceHost");
+            static LLCachedControl<std::string> loglevel(gSavedSettings, "VivoxDebugLevel");
+            static LLCachedControl<std::string> log_folder(gSavedSettings, "VivoxLogDirectory");
+            static LLCachedControl<std::string> shutdown_timeout(gSavedSettings, "VivoxShutdownTimeout");
             static const U32 portrange = 100;
-            std::string host(gSavedSettings.getString("VivoxVoiceHost"));
-            U32 port = portbase + portoffset;
+            static U32 portoffset = 0;
+            U32 port = 0;
+
+            if (LLAppViewer::instance()->isSecondInstance())
+            {
+                // Ideally need to know amount of instances and
+                // to increment instance_offset on EADDRINUSE.
+                // But for now just use rand
+                static U32 instance_offset = portrange * ll_rand(20);
+                port = portbase + portoffset + instance_offset;
+            }
+            else
+            {
+                // leave main thread with exclusive port set
+                port = portbase + portoffset;
+            }
             portoffset = (portoffset + 1) % portrange;
             params.args.add("-i");
-            params.args.add(STRINGIZE(host << ':' << port));
+            params.args.add(STRINGIZE(host() << ':' << port));
 
-            std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");
-            if (loglevel.empty())
+            params.args.add("-ll");
+            if (loglevel().empty())
             {
-                loglevel = "0";
+                params.args.add("0");
             }
-            params.args.add("-ll");
-            params.args.add(loglevel);
-
-            std::string log_folder = gSavedSettings.getString("VivoxLogDirectory");
-
-            if (log_folder.empty())
+            else
             {
-                log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+                params.args.add(loglevel);
             }
 
             params.args.add("-lf");
-            params.args.add(log_folder);
+            if (log_folder().empty())
+            {
+                params.args.add(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""));
+            }
+            else
+            {
+                params.args.add(log_folder);
+            }
 
             // set log file basename and .log
             params.args.add("-lp");
@@ -995,9 +1015,8 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
             {
                 LLFile::rename(new_log, old_log);
             }
-
-            std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout");
-            if (!shutdown_timeout.empty())
+ 
+            if (!shutdown_timeout().empty())
             {
                 params.args.add("-st");
                 params.args.add(shutdown_timeout);
@@ -1020,7 +1039,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
 
             sGatewayPtr = LLProcess::create(params);
 
-            mDaemonHost = LLHost(host.c_str(), port);
+            mDaemonHost = LLHost(host().c_str(), port);
         }
         else
         {
@@ -5755,7 +5774,7 @@ void LLVivoxVoiceClient::filePlaybackSetMode(bool vox, float speed)
 }
 
 //------------------------------------------------------------------------
-std::set<LLVivoxVoiceClient::sessionState::wptr_t> LLVivoxVoiceClient::sessionState::mSession;
+std::set<LLVivoxVoiceClient::sessionState::wptr_t, std::owner_less<LLVivoxVoiceClient::sessionState::wptr_t>> LLVivoxVoiceClient::sessionState::mSession;
 
 
 LLVivoxVoiceClient::sessionState::sessionState() :
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 6b40ad0cf6c26c4842d8e0d519bfa59b687837d6..899fd149c87951143dc2937ad984850250168e8f 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -309,8 +309,8 @@ class LLVivoxVoiceClient :	public LLSingleton<LLVivoxVoiceClient>,
 		bool mAvatarIDValid;
 		bool mIsSelf;
 	};
-    typedef boost::shared_ptr<participantState> participantStatePtr_t;
-    typedef boost::weak_ptr<participantState> participantStateWptr_t;
+    typedef std::shared_ptr<participantState> participantStatePtr_t;
+    typedef std::weak_ptr<participantState> participantStateWptr_t;
 
     typedef std::map<const std::string, participantStatePtr_t> participantMap;
     typedef std::map<const LLUUID, participantStatePtr_t> participantUUIDMap;
@@ -318,10 +318,10 @@ class LLVivoxVoiceClient :	public LLSingleton<LLVivoxVoiceClient>,
 	struct sessionState
 	{
     public:
-        typedef boost::shared_ptr<sessionState> ptr_t;
-        typedef boost::weak_ptr<sessionState> wptr_t;
+        typedef std::shared_ptr<sessionState> ptr_t;
+        typedef std::weak_ptr<sessionState> wptr_t;
 
-        typedef boost::function<void(const ptr_t &)> sessionFunc_t;
+        typedef std::function<void(const ptr_t &)> sessionFunc_t;
 
         static ptr_t createSession();
 		~sessionState();
@@ -388,7 +388,7 @@ class LLVivoxVoiceClient :	public LLSingleton<LLVivoxVoiceClient>,
     private:
         sessionState();
 
-        static std::set<wptr_t> mSession;   // canonical list of outstanding sessions.
+        static std::set<wptr_t, std::owner_less<wptr_t>> mSession;   // canonical list of outstanding sessions.
         std::set<wptr_t>::iterator  mMyIterator;    // used for delete
 
         static void for_eachPredicate(const wptr_t &a, sessionFunc_t func);
@@ -399,7 +399,7 @@ class LLVivoxVoiceClient :	public LLSingleton<LLVivoxVoiceClient>,
         static bool testByCallerId(const LLVivoxVoiceClient::sessionState::wptr_t &a, LLUUID participantId);
 
 	};
-    typedef boost::shared_ptr<sessionState> sessionStatePtr_t;
+    typedef std::shared_ptr<sessionState> sessionStatePtr_t;
 
     typedef std::map<std::string, sessionStatePtr_t> sessionMap;
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ec2f490742a284d15ccaa576e53c384bd2205974..e3f2afadc5d2c96d30ad3d0a5b3a1e20edec6f15 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4575,6 +4575,11 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
         }
     }
 
+    if (getClickAction() == CLICK_ACTION_IGNORE && !LLFloater::isVisible(gFloaterTools))
+    {
+        return FALSE;
+    }
+
 	BOOL ret = FALSE;
 
 	LLVolume* volume = getVolume();
@@ -5262,8 +5267,9 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
 
 	//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
 
-	U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
-	U8 shiny = facep->getTextureEntry()->getShiny();
+    const LLTextureEntry* te = facep->getTextureEntry();
+	U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? te->getBumpmap() : 0;
+	U8 shiny = te->getShiny();
 	
 	LLViewerTexture* tex = facep->getTexture();
 
@@ -5273,22 +5279,22 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
     
     LLUUID mat_id;
 
-    auto* gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial();
-    llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(facep->getTextureEntry()->getGLTFRenderMaterial()) != nullptr);
+    auto* gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial();
+    llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(te->getGLTFRenderMaterial()) != nullptr);
     if (gltf_mat != nullptr)
     {
         mat_id = gltf_mat->getHash(); // TODO: cache this hash
-        if (!facep->hasMedia())
+        if (!facep->hasMedia() || (tex && tex->getType() != LLViewerTexture::MEDIA_TEXTURE))
         { // no media texture, face texture will be unused
             tex = nullptr;
         }
     }
     else
     {
-        mat = facep->getTextureEntry()->getMaterialParams().get();
+        mat = te->getMaterialParams().get();
         if (mat)
         {
-            mat_id = facep->getTextureEntry()->getMaterialParams()->getHash();
+            mat_id = te->getMaterialParams()->getHash();
         }
     }
 
@@ -5298,7 +5304,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
 
 	if (mat)
 	{
-		BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
+		BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
 		if (type == LLRenderPass::PASS_ALPHA)
 		{
 			shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
@@ -5494,6 +5500,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
     LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME;
     llassert(!gCubeSnapshot);
 
+    if (group->isDead())
+    {
+        return;
+    }
+
 	if (group->changeLOD())
 	{
 		group->mLastUpdateDistance = group->mDistance;
@@ -5577,7 +5588,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 	
 			LLVOVolume* vobj = drawablep->getVOVolume();
             
-			if (!vobj)
+			if (!vobj || vobj->isDead())
 			{
 				continue;
 			}
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 8681f7c14efb7dcc1239c669de8d6f7e7c958485..948fe55e0dfd8ab2ba7ca109b82b9b8867a3f5ab 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -781,35 +781,27 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)
 void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids)
 {
 	// nothing to update
-	if (changed_items_uuids.empty()) return;
-
-	typedef std::vector<LLPanel*> item_panel_list_t;
-
-	item_panel_list_t items;
-	getItems(items);
+	if (changed_items_uuids.empty())
+		return;
 
-	for (item_panel_list_t::iterator items_iter = items.begin();
-			items_iter != items.end();
-			++items_iter)
+	uuid_vec_t::const_iterator uuids_begin = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end();
+	pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end();
+	while (pairs_iter != pairs_end)
 	{
-		LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(*items_iter);
-		if (!item) continue;
+		LLPanel* panel = (*(pairs_iter++))->first;
+		LLPanelInventoryListItemBase* item = dynamic_cast<LLPanelInventoryListItemBase*>(panel);
+		if (!item)
+			continue;
 
 		LLViewerInventoryItem* inv_item = item->getItem();
-		if (!inv_item) continue;
-
-		LLUUID linked_uuid = inv_item->getLinkedUUID();
+		if (!inv_item)
+			continue;
 
-		for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin();
-				iter != changed_items_uuids.end();
-				++iter)
-		{
-			if (linked_uuid == *iter)
-			{
-				item->setNeedsRefresh(true);
-				break;
-			}
-		}
+        const LLUUID& linked_uuid = inv_item->getLinkedUUID();
+        if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end)
+        {
+            item->setNeedsRefresh(true);
+        }
 	}
 }
 
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index aa8c79b0d280a89e6cb30860017f94c18cc854aa..0edabf358f8b01cc000594445f1c46ccf4d138ef 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -388,7 +388,7 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request)
 	LLCoordGL pos(request["x"].asInteger(), request["y"].asInteger());
 	bool has_pos(request.has("x") && request.has("y"));
 
-	boost::scoped_ptr<LLView::TemporaryDrilldownFunc> tempfunc;
+	std::unique_ptr<LLView::TemporaryDrilldownFunc> tempfunc;
 
 	// Documentation for mouseDown(), mouseUp() and mouseMove() claims you
 	// must either specify ["path"], or both of ["x"] and ["y"]. You MAY
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index b816f9a3b5ec2a738aa8b32b3a6a4c7a208593b0..3c2c6d15c45e7845ed302787402508013cf3f48b 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -544,7 +544,7 @@ class Poller
     const std::string mMethod;
     const std::string mReplyPump;
     LLTempBoundListener mBoundListener;
-    boost::scoped_ptr<LLXMLRPCTransaction> mTransaction;
+    std::unique_ptr<LLXMLRPCTransaction> mTransaction;
 	LLXMLRPCTransaction::EStatus mPreviousStatus; // To detect state changes.
 };
 
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index ba7e8d7298cb0d6c00722bc43ec32f44ee2bac63..a77c31eee341855c3d8f1bac03716acaddba6a51 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -188,7 +188,7 @@ class LLXMLRPCTransaction::Handler : public LLCore::HttpHandler
 
 	virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
 
-	typedef boost::shared_ptr<LLXMLRPCTransaction::Handler> ptr_t;
+	typedef std::shared_ptr<LLXMLRPCTransaction::Handler> ptr_t;
 
 private:
 
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3a1edb0d0007d920cbbfdaae51a0a9dc35810055..f5f2ba52bfdb4c89a8e932bea10c778be92bdbbe 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1666,17 +1666,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
 void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar)
 {
     LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE;
-	for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
-		 iter != gPipeline.mNearbyLights.end(); iter++)
-	{
-        const LLViewerObject *vobj = iter->drawable->getVObj();
-        if (vobj && vobj->getAvatar()
-            && vobj->isAttachment() && vobj->getAvatar() == muted_avatar)
-		{
-			gPipeline.mLights.erase(iter->drawable);
-			gPipeline.mNearbyLights.erase(iter);
-		}
-	}
+    light_set_t::iterator iter = gPipeline.mNearbyLights.begin();
+    while (iter != gPipeline.mNearbyLights.end())
+    {
+        const LLViewerObject* vobj = iter->drawable->getVObj();
+        if (vobj
+            && vobj->getAvatar()
+            && vobj->isAttachment()
+            && vobj->getAvatar() == muted_avatar)
+        {
+            gPipeline.mLights.erase(iter->drawable);
+            iter = gPipeline.mNearbyLights.erase(iter);
+        }
+        else
+        {
+            iter++;
+        }
+    }
 }
 
 U32 LLPipeline::addObject(LLViewerObject *vobj)
@@ -8359,7 +8365,7 @@ void LLPipeline::doWaterHaze()
         else
         {
             //render water patches like LLDrawPoolWater does
-            LLGLDepthTest depth(GL_FALSE);
+            LLGLDepthTest depth(GL_TRUE, GL_FALSE);
             LLGLDisable   cull(GL_CULL_FACE);
 
             gGLLastMatrix = NULL;
diff --git a/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png b/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png
new file mode 100644
index 0000000000000000000000000000000000000000..28906001eae619b73ee3db6462995b061eeb8f67
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Color_Palette.png differ
diff --git a/indra/newview/skins/default/textures/icons/Icon_Font_Size.png b/indra/newview/skins/default/textures/icons/Icon_Font_Size.png
new file mode 100644
index 0000000000000000000000000000000000000000..37bdde69aa9e016df0a66153a51a0e380e965d90
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Font_Size.png differ
diff --git a/indra/newview/skins/default/textures/icons/VoiceMute_Off.png b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png
new file mode 100644
index 0000000000000000000000000000000000000000..425ba267a51cd9faf2b30076f81cc612e7876c40
Binary files /dev/null and b/indra/newview/skins/default/textures/icons/VoiceMute_Off.png differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 1a49ec7e24735ce91f856119b16c44457717951c..c733d3feafb6c76c8a44701150a6e66ebe1f09c0 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -63,6 +63,7 @@ with the same filename but different name
 
   <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" />
   <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" />
+  <texture name="VoiceMute_Off" file_name="icons/VoiceMute_Off.png" preload="false" />
 
   <texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" />
   <texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" />
@@ -902,4 +903,6 @@ with the same filename but different name
   <texture name="Single_Folder_Back" file_name="icons/single_folder_back.png" preload="true"/>
   <texture name="Single_Folder_Forward" file_name="icons/single_folder_forward.png" preload="true"/>
   <texture name="Single_Folder_Up" file_name="icons/single_folder_up.png" preload="true"/>
+  <texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/>
+  <texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/>
 </textures>
diff --git a/indra/newview/skins/default/xui/en/alert_button.xml b/indra/newview/skins/default/xui/en/alert_button.xml
index a60e9afab1163f543567b146b325802cb9d47cb0..aa408e2380cdd8789ba5fd558cb391e9f2306ed2 100644
--- a/indra/newview/skins/default/xui/en/alert_button.xml
+++ b/indra/newview/skins/default/xui/en/alert_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <button
   name="Alert Button"
diff --git a/indra/newview/skins/default/xui/en/alert_check_box.xml b/indra/newview/skins/default/xui/en/alert_check_box.xml
index 5535a5dc2ae56478a29e744c99708a3de595cb9f..21266da3b28fca9c79599411fc5a6c0816f610dc 100644
--- a/indra/newview/skins/default/xui/en/alert_check_box.xml
+++ b/indra/newview/skins/default/xui/en/alert_check_box.xml
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <check_box
   label_text.text_color="LabelTextColor"
   label_text.text_readonly_color="LabelDisabledColor"
   font="SansSerif"
   follows="left|top"
-  name="check"/>
\ No newline at end of file
+  name="check"/>
diff --git a/indra/newview/skins/default/xui/en/alert_icon.xml b/indra/newview/skins/default/xui/en/alert_icon.xml
index b0886fce0616ad624447e11b33d22f571251bc24..d62addb98284449f4f69641c1e9925268d82036c 100644
--- a/indra/newview/skins/default/xui/en/alert_icon.xml
+++ b/indra/newview/skins/default/xui/en/alert_icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <icon color="1.0 1.0 1.0 1.0"
       tab_stop="false"
       mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/alert_line_editor.xml b/indra/newview/skins/default/xui/en/alert_line_editor.xml
index 54dbc698c830f7313e2c6ef5762acc45f2b23f33..78b97a2a7e15cbeedd4a8ed288b4f2bce5465092 100644
--- a/indra/newview/skins/default/xui/en/alert_line_editor.xml
+++ b/indra/newview/skins/default/xui/en/alert_line_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <line_editor
   select_on_focus="false"
   revert_on_esc="true"
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_camera.xml b/indra/newview/skins/default/xui/en/control_table_contents_camera.xml
index 24cbb2b8850a0f2cd06132ac45db9ae3aa2d4ee8..74e8b9e5f9fd1c237f803c20c761f2c6681b7f3d 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_camera.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_camera.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <contents>
     <rows
      enabled="false"
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_columns_basic.xml b/indra/newview/skins/default/xui/en/control_table_contents_columns_basic.xml
index e707aaf22c63dda1441fc52aabbf85b49dac04c8..9d57638835dd426ac6d367f3aef278a7404566ac 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_columns_basic.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_columns_basic.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <contents>
     <columns
      relative_width="0.34"
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_editing.xml b/indra/newview/skins/default/xui/en/control_table_contents_editing.xml
index 2a3314840aa20a8445e05ea2a1c1d0dd75a7b33b..9876e43d8f75e3249db54d6c8a10e07ddc59a4c4 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_editing.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_editing.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <contents>
     <rows
      enabled="false"
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_media.xml b/indra/newview/skins/default/xui/en/control_table_contents_media.xml
index 43e8d730cd9679460d8bf6eeb9277c0d46b3a71e..5d5b6ed3ce7db59d6651a047bad78e6ad0b99b8c 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_media.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_media.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <contents>
     <rows
      enabled="false"
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_movement.xml b/indra/newview/skins/default/xui/en/control_table_contents_movement.xml
index b410d2dc1c752c698634daa6c4419d9ac06329f6..c9a1c4654ec9231943c4954e49a116855a4245e9 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_movement.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_movement.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <contents>
     <rows
      enabled="false"
diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
index e7dd62eb6427aa57e3a8a57af92f3108478661cc..ab55c80ba2ce72275f3b6325f781a321df4963ad 100644
--- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml
+++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- *NOTE: mantipov: top & height should be synchronized with <favorites_bar> in the panel_navigation_bar.xml-->
 <!-- All buttons in the Favorites bar will be created from this one -->
 <button
diff --git a/indra/newview/skins/default/xui/en/floater_360capture.xml b/indra/newview/skins/default/xui/en/floater_360capture.xml
index 23d054105f2220a3bfe39f6c36b3beb97b48e19c..70bcaf86be42ff4ad7e99a1447e020a0a4dec6de 100644
--- a/indra/newview/skins/default/xui/en/floater_360capture.xml
+++ b/indra/newview/skins/default/xui/en/floater_360capture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater can_resize="true"
          height="400"
          layout="topleft"
@@ -133,4 +133,4 @@
       Click and drag on the image to pan
     </text>
   </panel>
-</floater>
\ No newline at end of file
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index d11373ce1d574c7a35cd08fcc6df7bf19ffbeb90..950ed192c0daa8ed05a60e0d90bc5a088dcfc3ae 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_minimize="false"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index 1ad7811d85e4e49829392fcde4f674effdab3186..ff2fa93cbbd56021e8b711e92013d7a554c1e05a 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="centered"
  legacy_header_height="18"
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 b1ed2453784faa42cbaac989c2d2f9faac30c0c3..508aba6ae14d81b8b1905ddcf69518e59fae607d 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_activeim.xml b/indra/newview/skins/default/xui/en/floater_activeim.xml
index 42c3e7e93532183e52d0f094c97f3508cf184928..97339f06f471a04b16768fbf362945103b79280d 100644
--- a/indra/newview/skins/default/xui/en/floater_activeim.xml
+++ b/indra/newview/skins/default/xui/en/floater_activeim.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
 	name="floater_activeim"
diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml
index ac88263aa197975fc12c7b47b0dd22afdfcac566..870ddee5548b5fb39d31f7b5e5f6dd96cce86f77 100644
--- a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml
+++ b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="405"
  width="900"
diff --git a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml
index c4ffba33fd4b9365ffb7b201a037a8344c5064d4..1aa96ae261e28b846bfa724414fb9e5eafd2d6a9 100644
--- a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="180"
diff --git a/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml
index 0c62bfe304038196d1be1c3a4ea3b67a3c26c243..ebb81f12667f24a39da025e64b0d235a17397a84 100644
--- a/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_associate_listing.xml b/indra/newview/skins/default/xui/en/floater_associate_listing.xml
index 0f7ed241034e3aee0c1e1263b564be35deb3fcd5..5ebdb6ce424a9124781c61a1bb7f25d563e20164 100644
--- a/indra/newview/skins/default/xui/en/floater_associate_listing.xml
+++ b/indra/newview/skins/default/xui/en/floater_associate_listing.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml
index 9c6d114c4ca1792c875b553bb4655cec7fac0c2b..56a2f51c43da5a68b7d63f9c9c75f7f31326b810 100644
--- a/indra/newview/skins/default/xui/en/floater_auction.xml
+++ b/indra/newview/skins/default/xui/en/floater_auction.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml
index 9cfb562001ac9baf8083044196d6f128b327f9aa..c1752f98696999a4132227108bc8cf4350dd09fa 100644
--- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml
+++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  border="true"
  can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 3df2683ca8ba2948184169c1d8bbe057d7efd02f..f18bad2d4eea006c70cd8340c82fa49cd23afdc1 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="225"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
index af6d11f47e406e8a03aeba6b27ce26dfc1b2bd45..adbce0d9826938912e84829c0e3266c9dffefa92 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml
index d222dca98bbc5569c90e54e27ceec1146be70044..aca5ddf3efcbf89d50783d3fdfd7c0eac92e063b 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_render_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="true"
  positioning="cascading"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
index 6540f5e3488726c8a77b958d081dd54e10650ebe..09026884b9e92f2e4d7ae1574fe1e04b24b0225e 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="700"
@@ -453,4 +453,4 @@ Textures
 </panel>
 </panel>
 </scroll_container>
-</floater>
\ No newline at end of file
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_ban_duration.xml b/indra/newview/skins/default/xui/en/floater_ban_duration.xml
index 6c537cc08d140b23dc111175c6f862a73aae9431..2b3acd2907f210bcf99596fa4a4bcb16ef4ba429 100644
--- a/indra/newview/skins/default/xui/en/floater_ban_duration.xml
+++ b/indra/newview/skins/default/xui/en/floater_ban_duration.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_minimize="false"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml
index d5947fc0af8b016eeccb091ef6716df2e5f9d582..6248829500a7bc46ccef672f13b10e80bc62e82d 100644
--- a/indra/newview/skins/default/xui/en/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/en/floater_beacons.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="310"
@@ -157,7 +157,7 @@
          font="SansSerif"
          left="0"
          top_pad="7"
-         name="label_objects"
+         name="label_direction"
          text_color="White"
          type="string">
            Show direction to:
diff --git a/indra/newview/skins/default/xui/en/floater_big_preview.xml b/indra/newview/skins/default/xui/en/floater_big_preview.xml
index c0bdd3d9bd4d7f7b87972c7d1b09a78567b557f9..362853d06fdb1be0c07d1e27a4577fe97b36f6a6 100644
--- a/indra/newview/skins/default/xui/en/floater_big_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_big_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   positioning="cascading"
   can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml
index 7278e55d574222b901f6347264679e4f5aa49d5a..37797a137980e0546ed3c4300bbc2c62c8327cd9 100644
--- a/indra/newview/skins/default/xui/en/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_build_options.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="170"
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
index 7aa31bed714344876833cac61c600c6a63156825..7636284b4b65c929564f41d8609afdfabb9a3094 100644
--- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_bumps.xml b/indra/newview/skins/default/xui/en/floater_bumps.xml
index 126e3aac480a659a242d1fc54f6e54b808ad9b1f..874c05eec88933f803110abdab8fb0544af6c2ce 100644
--- a/indra/newview/skins/default/xui/en/floater_bumps.xml
+++ b/indra/newview/skins/default/xui/en/floater_bumps.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="180"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
index ac96a7080572de496d1b368eb72eeb9dc72c0cf3..6b6f497808bed5b814af6d99ddeb87766e47cbee 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
index 0637eedfb225f208c8a2633cfd91ca198825ccfc..996937cd45f451e92be45d9c0f9d33de31beaf06 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="false"
  can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml
index 9fe56e447e98128bb72ee8f336f55df7e9b1a4dc..889339c38d0366774bcabb1f40dfdf61fbdd0229 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml
index 1f7d52dbf5b504c6c4d4df0245add2dd998a91f4..2dec53ff7d289f43180bbf6659f8ba16e3c0c577 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 9deb38e3afac6397eaee2208b771c8c14badbb8e..93b306d7d7bd1a4e07b127adf8deafc8ceb71f1c 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="specified"
  right="-460"
@@ -138,13 +138,13 @@
         </panel>
     </panel>
     <panel
-     follows="all"
+     follows="left|top"
      height="102"
      layout="topleft"
      left_pad="2"
+     right="-2"
      name="buttons_panel"
-     top="22"
-     width="212">
+     top="22">
     <panel_camera_item
       name="front_view"
       tool_tip="Front View"
@@ -253,4 +253,22 @@
           function="CameraPresets.Save"/>
       </button>
   </panel>
+  <panel
+    name="viewer_camera_info"
+    left="0"
+    top="135"
+    width="400"
+    height="150"
+    border="true"
+    visible="false"
+    background_visible="true"/>
+  <panel
+    name="agent_camera_info"
+    left="0"
+    top="285"
+    width="400"
+    height="150"
+    border="true"
+    visible="false"
+    background_visible="true"/>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_camera_presets.xml b/indra/newview/skins/default/xui/en/floater_camera_presets.xml
index 930357f5688d88ced839975a44beeb0f9a0e0deb..702d5d1b173d443e73250af63e77365d843d4806 100644
--- a/indra/newview/skins/default/xui/en/floater_camera_presets.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera_presets.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
index 726cb38481b612c673e89cfcbfd3df3d4852f3b7..223069ed0cbccb57d846eeff60e1857655a96023 100644
--- a/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
+++ b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="false"
  height="366"
diff --git a/indra/newview/skins/default/xui/en/floater_choose_group.xml b/indra/newview/skins/default/xui/en/floater_choose_group.xml
index 2cf6e682fde9d484d7c778c5f2246391fc69e090..beb6e490def47b311fea3e51129ea97a3d385473 100644
--- a/indra/newview/skins/default/xui/en/floater_choose_group.xml
+++ b/indra/newview/skins/default/xui/en/floater_choose_group.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="258"
diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml
index e06d10606a3b72e47bfbf87c9ae1ddcc133d3a39..397b66fbd28e9112d0c7d5d6b848f97993af1a2e 100644
--- a/indra/newview/skins/default/xui/en/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
index 19a4cbc11983e430ee7cbf979e7fbed2c2478f88..3fbccfcd844f319fa15b08915380e9131d5a0829 100644
--- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
index 99ad59a7a3fa67de772d30fb387accc52397f707..27913baff6b63232a95459605c2436c2d3fced78 100644
--- a/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_create_landmark.xml b/indra/newview/skins/default/xui/en/floater_create_landmark.xml
index 632daaec7ec33badaa4b5179927d6ab9d23334aa..ba2527e55012fb82b525f8977153ff6a523e0136 100644
--- a/indra/newview/skins/default/xui/en/floater_create_landmark.xml
+++ b/indra/newview/skins/default/xui/en/floater_create_landmark.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="false"
  show_title="false"
diff --git a/indra/newview/skins/default/xui/en/floater_critical.xml b/indra/newview/skins/default/xui/en/floater_critical.xml
index 143bcb44300ad988dbc8590fa0d8bbed27255062..caa4a2292c5b1b3f6c4a0ebf41c63d0f69f9a54e 100644
--- a/indra/newview/skins/default/xui/en/floater_critical.xml
+++ b/indra/newview/skins/default/xui/en/floater_critical.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_close="false"
diff --git a/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
index 3360d7bec9766fd3868ea01850a6c7dd1fd1ce41..ad724fb2aaf9e6b282315258b3f2871ca4c1555b 100644
--- a/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_delete_pref_preset.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="130"
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 4fe8e3bdd1a8cbcbfa85e5c74dbf983fb8c8cb2f..58dc6741b2075969c1572443d9380309b18c7cda 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"	
  legacy_header_height="225"
diff --git a/indra/newview/skins/default/xui/en/floater_display_name.xml b/indra/newview/skins/default/xui/en/floater_display_name.xml
index f3431da858d78c15e9ccdf10845dde815941c8cf..1205b0a1d652dc4ec16566a3c7f1fbc25f060ea4 100644
--- a/indra/newview/skins/default/xui/en/floater_display_name.xml
+++ b/indra/newview/skins/default/xui/en/floater_display_name.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index f3d7c38a763644169023d0020d163151e713dd87..2eacc8150eaef65c835b9c099193c11ef22db218 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
         layout="topleft"
         name="env_edit_extdaycycle"
diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
index 3570456b444eed0b368135e2fc9707d94572378f..c83168459472df279bfc3166f9b88f24e1871d64 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="225"
diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml
index cf61b7d24d4409b1f0db01787af31438a212681f..67eb4931e1be41fde99b944bec80f77a0c2eb551 100644
--- a/indra/newview/skins/default/xui/en/floater_event.xml
+++ b/indra/newview/skins/default/xui/en/floater_event.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="400"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_experience_search.xml b/indra/newview/skins/default/xui/en/floater_experience_search.xml
index 15a4b5665eb5063e26e2e807fdb57266578d7e2c..60c95a8a0c06a572b838c74bd7a95fdde4b4442b 100644
--- a/indra/newview/skins/default/xui/en/floater_experience_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_experience_search.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   positioning="cascading"
   legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
index 588aca38e69d21078a88ee3a776c251d05b85590..d59b292b280f5c45f749ba82d76d2056f23ef606 100644
--- a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
+++ b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
   name="experience_profile"
diff --git a/indra/newview/skins/default/xui/en/floater_experiences.xml b/indra/newview/skins/default/xui/en/floater_experiences.xml
index 442da887c5492d8bcd3d57751f28cd29dfd48f08..72b1a46e65c80823b87b3219ffc80bf896fb79f3 100644
--- a/indra/newview/skins/default/xui/en/floater_experiences.xml
+++ b/indra/newview/skins/default/xui/en/floater_experiences.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
   can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_fast_timers.xml b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
index 645003cc14e07613b6490e2d1f0a7cf7e37453ad..f5852fdfaf0b230f410742818b5073cc7e0ab5af 100644
--- a/indra/newview/skins/default/xui/en/floater_fast_timers.xml
+++ b/indra/newview/skins/default/xui/en/floater_fast_timers.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_fbc_web.xml b/indra/newview/skins/default/xui/en/floater_fbc_web.xml
index 0d35e22a19296bf101fb02246b2d0f9ceff52c65..b0a7305094f2ac0b924e32d55d90ec8d0c3884a8 100644
--- a/indra/newview/skins/default/xui/en/floater_fbc_web.xml
+++ b/indra/newview/skins/default/xui/en/floater_fbc_web.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="floater_fbc_web"
          help_topic="fbc_web"
          width="780"
diff --git a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
index 45f3880a156264b05d45b1576d5ec6e60aedbbb7..f424f67df0c1249b430968abc2f10821f82fc9c3 100644
--- a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
+++ b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
         can_tear_off="false"
         can_resize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_font_test.xml b/indra/newview/skins/default/xui/en/floater_font_test.xml
index 3ab19ec9d92f97481e7a94c2673175f1146e85dc..61cb91e2f3f892e84f76dc9506f02864a80cd5c4 100644
--- a/indra/newview/skins/default/xui/en/floater_font_test.xml
+++ b/indra/newview/skins/default/xui/en/floater_font_test.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_forget_user.xml b/indra/newview/skins/default/xui/en/floater_forget_user.xml
index a9ec1b74a3b4d16c951f06d2eef2a4ba6d44eb9b..62422ba47831ef191eff4f65552d2d47b5f74138 100644
--- a/indra/newview/skins/default/xui/en/floater_forget_user.xml
+++ b/indra/newview/skins/default/xui/en/floater_forget_user.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="258"
diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml
index 9f051d9f8d8de9daea1e4a6044543bc9392df032..832716c6004e758286a94a492992e11757c58e12 100644
--- a/indra/newview/skins/default/xui/en/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_gesture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml
index e7131e20cbd05c92f83f82abd815a184c50c85b4..f8ec696af9f34cec9ad53394bd04323feb7a1584 100644
--- a/indra/newview/skins/default/xui/en/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="384"
diff --git a/indra/newview/skins/default/xui/en/floater_goto_line.xml b/indra/newview/skins/default/xui/en/floater_goto_line.xml
index b2368882199bb3419fdce0c63309271c8fc53fe0..99be81cc1c2d901e2d15dc437a0b01159e690aa6 100644
--- a/indra/newview/skins/default/xui/en/floater_goto_line.xml
+++ b/indra/newview/skins/default/xui/en/floater_goto_line.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  default_tab_group="1"
@@ -41,4 +41,4 @@
      tab_group="1"
      top="21"
      width="85" />
-</floater>
\ No newline at end of file
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_grid_status.xml b/indra/newview/skins/default/xui/en/floater_grid_status.xml
index bf782042824b56651d6bdf8b922079368e63b93b..d42fec3ece2651dd21da947a17eeb4a3bd111364 100644
--- a/indra/newview/skins/default/xui/en/floater_grid_status.xml
+++ b/indra/newview/skins/default/xui/en/floater_grid_status.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   positioning="cascading"
   legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml
index c06cb63f8acd1b414d814a5e708740f7306dcc38..76895df7323edc66d085f385a10e590d36a8535c 100644
--- a/indra/newview/skins/default/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml
index 19e42798af7a65c1d9f3ebfe804474d08c37cb57..5b00d23faaf328ba92f4782b329e91370c8c4e65 100644
--- a/indra/newview/skins/default/xui/en/floater_how_to.xml
+++ b/indra/newview/skins/default/xui/en/floater_how_to.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   legacy_header_height="18"
   can_resize="false"
@@ -13,4 +13,4 @@
   width="310"
   rel_x="-0.469309"
   rel_y="-0.011166"
-  filename="floater_web_content.xml"/>
\ No newline at end of file
+  filename="floater_web_content.xml"/>
diff --git a/indra/newview/skins/default/xui/en/floater_hud.xml b/indra/newview/skins/default/xui/en/floater_hud.xml
index e2d860881a25be8d9cde567b149b13e0247e4e56..2a8d2ad5ef08f985fd2fb00ae35b57fcb7641b8f 100644
--- a/indra/newview/skins/default/xui/en/floater_hud.xml
+++ b/indra/newview/skins/default/xui/en/floater_hud.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 34fa0b0fe90d1eb3a5b2adcd052251988ffabd0a..4df29c47dee18e3fa18905d84a0cbe082fccab03 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <multi_floater
  can_close="true"  
  can_minimize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index a6493c5e24fb73e193e5071660d6d6a9d6905385..a54c28af805f854c86c2266ffffaf548bd0e518e 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  background_visible="true"
  height="355"
diff --git a/indra/newview/skins/default/xui/en/floater_image_preview.xml b/indra/newview/skins/default/xui/en/floater_image_preview.xml
index 773d9aafc9cba2cd75c91f53ea64b67ff2280c6b..79f62c4dbcf7dffcf4c8689e1acad6f5260452dd 100644
--- a/indra/newview/skins/default/xui/en/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_image_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_import_collada.xml b/indra/newview/skins/default/xui/en/floater_import_collada.xml
index 441ab6a2dee648fb348c274d39d4abe46a07c92a..baea660f30329df298393d171131916c202251ff 100644
--- a/indra/newview/skins/default/xui/en/floater_import_collada.xml
+++ b/indra/newview/skins/default/xui/en/floater_import_collada.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater can_close="false" can_drag_on_left="false" can_minimize="false"
      can_resize="false" height="160" min_height="160" width="300" min_width="300"
      name="Import Collada" title="Import Scene">
diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
index e57631016082e25347d5a1d34386dae970844175..2d8089ee35bc48a861ace175c9717fb161ef21d3 100644
--- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_close="false"
diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml
index 802a6649c8ab65c0e2de397bb11fc0915fe1017c..9403d58441d020ce1ec2a97c3644b63bbd3e1493 100644
--- a/indra/newview/skins/default/xui/en/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/en/floater_inspect.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index 850e1be372db8639e780f47916c9d7780d693d10..6c3214a76d774d8b8c3d8b9bfa517f0e4e304d07 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="340"
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
index 2e619d91fb71d9a71631fe84720295db4cb9df0d..156bba6c27cb0b012f9500d1a80ba7b2616cbcfb 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_close="true"
  can_minimize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..aa3500bac2914989453ceaffe0c25032186a0014
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+  legacy_header_height="18"
+  can_resize="false"
+  height="600"
+  layout="topleft"
+  min_height="175"
+  min_width="500"
+  name="contents"
+  help_topic="contents"
+  title="Inventory Thumbnails Helper"
+  width="800">
+    <scroll_list
+       top="20"
+       height="350"
+       draw_stripes="true"
+       draw_heading="true"
+       follows="all"
+       layout="topleft"
+       left="8"
+       multi_select="true"
+       name="inventory_thumbnails_list"
+       right="-8"
+       tool_tip="Paste items from your inventory">
+        <scroll_list.columns
+             dynamic_width="true"
+             label="Inventory Item"
+             name="item_name"
+             relative_width="0.4" />
+        <scroll_list.columns
+             dynamic_width="true"
+             label="Existing Texture"
+             name="existing_texture"
+             relative_width="0.3" />
+        <scroll_list.columns
+             dynamic_width="true"
+             label="New Texture"
+             name="new_texture"
+             relative_width="0.3" />
+    </scroll_list>
+    <text_editor
+      top="375"
+      height="140"
+      follows="all"
+      left="8"
+      right="-8"
+      name="output_log"
+      font="Monospace"
+      text_color="0.1 0.5 0.1 1.0"
+      width="480">
+    </text_editor>
+    <button
+      follows="left|bottom"
+      height="20"
+      label="Paste items from Inventory"
+      layout="topleft"
+      left="10"
+      name="paste_items_btn"
+      bottom="-60"
+      width="235" />
+    <button
+      follows="left|bottom"
+      height="20"
+      label="Paste textures from Inventory"
+      layout="topleft"
+      left_delta="0"
+      name="paste_textures_btn"
+      top_delta="26	"
+      width="235" />
+    <button
+      follows="left|bottom"
+      height="20"
+      label="Write Thumbnails"
+      layout="topleft"
+      left_delta="0"
+      name="write_thumbnails_btn"
+      top_delta="26	"
+      width="235" />
+    <button
+      follows="left|bottom"
+      height="20"
+      label="Log items with no thumbnail"
+      layout="bottomleft"
+      right="-10"
+      name="log_missing_thumbnails_btn"
+      bottom="60"
+      width="235" />
+    <button
+      follows="left|bottom"
+      height="20"
+      label="Clear thumbnails from pasted items"
+      layout="bottomleft"
+      right="-10"
+      name="clear_thumbnails_btn"
+      top_delta="26"
+      width="235" />
+
+
+</floater>
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
index e91efb89b2df2df52251c6ee591bfa9da3f72e08..f908d23d8e0083f0b1500caed4716c6bce8dbab5 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_item_properties.xml b/indra/newview/skins/default/xui/en/floater_item_properties.xml
index 336bb902ca98c2e6c8d1e4b3e373fe17f06ee916..fc9351bff281d3593be9ad8aba49e1cb930f5130 100644
--- a/indra/newview/skins/default/xui/en/floater_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_item_properties.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="570"
diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 7d2cea1fe50f47b589c6b2d0d8317f815a0f170b..e6f0420698e4b7714096d7d4edfcf04d881f874d 100644
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="500"
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
index b24c745bdd0bc67fc0cbf085af4fbd09335b8238..eab66ab83ef4cc0f4120847248f041bba62d6101 100644
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="170"
diff --git a/indra/newview/skins/default/xui/en/floater_land_holdings.xml b/indra/newview/skins/default/xui/en/floater_land_holdings.xml
index 390ec9ab7d4015364fbc0bcd1660fb2acc994377..affd2b196d2e49ab7a8955491e877abbcfa8f864 100644
--- a/indra/newview/skins/default/xui/en/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/en/floater_land_holdings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="centered"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_linkreplace.xml b/indra/newview/skins/default/xui/en/floater_linkreplace.xml
index ece75e2576457c7dd7018660f27fb3f53c4b0cf0..1fa039f2d1f8571d2776424dc329778ae461ab89 100644
--- a/indra/newview/skins/default/xui/en/floater_linkreplace.xml
+++ b/indra/newview/skins/default/xui/en/floater_linkreplace.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  name="linkreplace"
  help_topic="linkreplace"
diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
index e8826034f611219053767c1927d720ab4a400ccc..e30c519c8a6abf13672ae291fb4a473135f345d8 100644
--- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   legacy_header_height="18"
   bevel_style="none"
   border_style="line"
   can_resize="true"
-  height="582"
+  height="607"
   layout="topleft"
   min_height="271"
   min_width="328"
@@ -45,6 +45,21 @@
     name="loading">
     Loading...
   </floater.string>
+  <text
+   type="string"
+   length="1"
+   follows="left|top|right"
+   width="490"
+   use_ellipses="true"
+   font="SansSerif"
+   height="18"
+   layout="topleft"
+   left="13"
+   name="obj_name"
+   text_color="white"
+   top="21">
+    Object name
+  </text>
   <panel
     bevel_style="none"
      
@@ -54,7 +69,7 @@
     layout="topleft"
     left="10"
     name="script ed panel"
-    top="16"
+    top_pad="2"
     width="501" />
   <button
     follows="left|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
index 49c21f1ea794d2e3bbb9f25b15a2f2f44351932e..ba1b812d28b626a76925820f1a763c34ea8a4973 100644
--- a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="130"
diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
index e9676777f439eb94aa3b2179906407e9fe903e93..17a07c5ec2fe7dc13c34668b4562122ea22358b1 100644
--- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 9639e70544a9161a0314451cd9745bd1b7cd0dd0..eba5684819e27dd135fb44995a2a210bd4481675 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  can_minimize="true" 
diff --git a/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml b/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml
index 9035a7c1619b00675bde9bd1d572e1919864af81..368a8b26ca6768d748cae03e72ba7f1a7a353805 100644
--- a/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml
+++ b/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
     title="Audit Marketplace Listings"
     name="floater_marketplace_validation"
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index ce788654aa32ed97a8d4789a273dc25be2f92d4c..5ea751dc7c037aeecd181752494963d947566a37 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_media_settings.xml b/indra/newview/skins/default/xui/en/floater_media_settings.xml
index 0e03c0ab6df324d61bd5788d1c61e926a74768a8..454585581137c0c37caaf776e6786215b3956257 100644
--- a/indra/newview/skins/default/xui/en/floater_media_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_close="true" 
diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
index fb7d09a21eb9e96511f701c9b85c2e05c7926a9c..af45974e0eb5ac80ae63e815e0b594de986b29f0 100644
--- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_mfa.xml b/indra/newview/skins/default/xui/en/floater_mfa.xml
index a649cc6d471101fd6e9b5731c0db7c555ab47d3a..e8be95612d2ab6340f3f90f286c5dc79108ce240 100644
--- a/indra/newview/skins/default/xui/en/floater_mfa.xml
+++ b/indra/newview/skins/default/xui/en/floater_mfa.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  title="MFA Token Requred"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 21c894d3afeef19e9cd40fcdb670579cf13993a1..5dcac85b4ff2ac42a1eed64f387b0bc0f8925f91 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_close="true"
  can_drag_on_left="false"
@@ -745,7 +745,7 @@
              height="0"
              layout="topleft"
              left="10"
-             name="lod_tab_border"
+             name="lod_tab_border1"
              top_pad="20"
              width="614" />
             <check_box
@@ -858,7 +858,7 @@
               height="0"
               layout="topleft"
               left="18"
-              name="physics_tab_border"
+              name="physics_tab_border1"
               top_pad="10"
               width="589"/>
                 <panel
@@ -965,7 +965,7 @@
               height="0"
               layout="topleft"
               left="18"
-              name="physics_tab_border"
+              name="physics_tab_border2"
               top_pad="10"
               width="589"/>
                 <panel
@@ -1073,7 +1073,7 @@
               height="0"
               layout="topleft"
               left="18"
-              name="physics_tab_border"
+              name="physics_tab_border3"
               top_pad="10"
               width="589"/>
                 <panel
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 90166232e97c64d4f982732d22c92519f868edc9..fc7c418ca8b8e702d9666a4b288c884b1cd55775 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="specified"
  right="-693"
diff --git a/indra/newview/skins/default/xui/en/floater_mute_object.xml b/indra/newview/skins/default/xui/en/floater_mute_object.xml
index 22b0a1783ffee0e88803c1e3dd6cd9af91a1fce7..2d992dfa72c3c1b6ca40359b6740816f37d1a0ac 100644
--- a/indra/newview/skins/default/xui/en/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_mute_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_my_scripts.xml b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
index ee6defce9d56ca45b43fe7911475e3ba6fced0e7..ad89787031ad3163b46b5a9f1fd51c3663d601f7 100644
--- a/indra/newview/skins/default/xui/en/floater_my_scripts.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_scripts.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_my_web_profile.xml b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
index df46fc198f2acfca79af55fbd0087fe22c68ff76..e7b2abda620f3324b34a7a39cfebe89df0cb7d42 100644
--- a/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="floater_my_web_profile"
          help_topic="web_profile"
          width="780"
@@ -6,4 +6,4 @@
          save_rect="true"
          single_instance="true"
          reuse_instance="false"
-         filename="floater_web_content.xml"/>
\ No newline at end of file
+         filename="floater_web_content.xml"/>
diff --git a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml
index c8726d36b44d2b8e81590561ba4bf31bdfd4594d..57b74b360aaa3663fe12c198cf412b7fd41e068c 100644
--- a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml
+++ b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="130"
  width="300"
diff --git a/indra/newview/skins/default/xui/en/floater_notification.xml b/indra/newview/skins/default/xui/en/floater_notification.xml
index 1f9ddecac277c996b5cecd6ac85498fb45db93db..32345981e4d888fc0b98d21c71f4e19b51ab4c07 100644
--- a/indra/newview/skins/default/xui/en/floater_notification.xml
+++ b/indra/newview/skins/default/xui/en/floater_notification.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_notifications_console.xml b/indra/newview/skins/default/xui/en/floater_notifications_console.xml
index e243ccd2f91e1401217fdca93e7f76b280609887..46a824a8b02476375e5960856d92f274c31dfb32 100644
--- a/indra/newview/skins/default/xui/en/floater_notifications_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_notifications_console.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml
index 889efa061c1a3765a02866a63987bd3425d5b139..5e4b0175903f8bd46df4d93689f273446e092efc 100644
--- a/indra/newview/skins/default/xui/en/floater_object_weights.xml
+++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_close="true"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index ec03d7d32cd637d1a6827ce0a65e7f90d5782dd9..bc04dc9f468cfae917583e1581ebf6385e7a4af9 100644
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
index bbe280582b5ec833f8acdf94fc56c0038cb6657e..98cb997c6633cf1e43856d8d387747a68b3fe04b 100644
--- a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
+++ b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_close="false"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index ae1fb4cccd24261f286b6f211880cb130027630a..328ee2b8352b14d7d62a658f95b5c0598320f196 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_close="false"
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
index 7242c734cf8f788da092e689d99f86ecb81334be..37fed38af695be47c637dc9bed788c4e10a462a3 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_characters.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
     positioning="cascading"
     can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
index eb37cf214c7738ada3ba92c9a027768d35e897f0..296cec56932abf5d644bea413d890cdeef5956ed 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
     positioning="cascading"
     can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index 59117c01782d85513fa74987116c651adc5b1adf..4a07000db82d9a698213108e93b54f6055508d3c 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
     positioning="cascading"
     can_resize="true"
@@ -372,7 +372,7 @@
       follows="left|bottom|right"
       height="0"
       layout="topleft"
-      name="horiz_separator"
+      name="horiz_separator1"
       top_pad="0"
       left="18"
       width="1039"/>
diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml
index 3e3f8b49ce9072497313646e7b3acf8c3230d4c6..6865bd0a6400dc8141c76feb4b9ddf7a7a01085f 100644
--- a/indra/newview/skins/default/xui/en/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_pay_object.xml b/indra/newview/skins/default/xui/en/floater_pay_object.xml
index f1e27b918ee799914f16369c04bed60e55c77478..3c1d79940c4a8046daf1c6daab7a54de32ee6a9e 100644
--- a/indra/newview/skins/default/xui/en/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
index 0cc0ca1ce49acbb9c046b260990e69d930273e28..41149bfe1b7c229a9e532c8b63cfdca4b263ac05 100644
--- a/indra/newview/skins/default/xui/en/floater_people.xml
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
   positioning="cascading"
diff --git a/indra/newview/skins/default/xui/en/floater_performance.xml b/indra/newview/skins/default/xui/en/floater_performance.xml
index d1a1119f77c4c27de7643dd36f717d766aad3484..dac8a71b2d3a45d9cb98a2ae5c8b49de54829aff 100644
--- a/indra/newview/skins/default/xui/en/floater_performance.xml
+++ b/indra/newview/skins/default/xui/en/floater_performance.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="642"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml
index 9ca61671e1842580e72a1cf7a52ef7c7a7df2ba9..46e4cb47640cf05674b6cee553aea8b083825495 100644
--- a/indra/newview/skins/default/xui/en/floater_perms_default.xml
+++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="266"
diff --git a/indra/newview/skins/default/xui/en/floater_pick_track.xml b/indra/newview/skins/default/xui/en/floater_pick_track.xml
index d8a9877be23e9dd37ade7f84328ff4c0d5c5c940..103422a04dd516683288a049d036333cf66d58f3 100644
--- a/indra/newview/skins/default/xui/en/floater_pick_track.xml
+++ b/indra/newview/skins/default/xui/en/floater_pick_track.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
         legacy_header_height="0"
diff --git a/indra/newview/skins/default/xui/en/floater_post_process.xml b/indra/newview/skins/default/xui/en/floater_post_process.xml
index 05943a10d382f0694ad3b1a67d6a727f311a3394..37339f79c87d4f5a37b4bdeefcb029b926df9222 100644
--- a/indra/newview/skins/default/xui/en/floater_post_process.xml
+++ b/indra/newview/skins/default/xui/en/floater_post_process.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="400"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index c4adf0409d6dca984b7343f7a4681a8c43c0e674..4b0e0bb2214d1656115c72173f806f7316093cb1 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  positioning="centered"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_proxy.xml b/indra/newview/skins/default/xui/en/floater_preferences_proxy.xml
index 659033efd4192a40128586e6c3571dcb072cc801..fb5af724566eaf195010d9335da5caa91072816a 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_proxy.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_proxy.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="500"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_view_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_view_advanced.xml
index 4c3c7e49300f0bdb0b28f46c2aceb80bd018d59d..18d3c66d6358750695eafbd5a5a2de3d5b00c641 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_view_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_view_advanced.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="190"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
index d1f8da55be4337aa72e2d42cb61677386231c8c4..d116e574c62739d91d80339e692e688c69450c3a 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="241"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index c4ac93633493b53bb9d1d8677ef6bf8bec0c994d..615dbdb02522e0e703508dbd7f0293c62777097f 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="460"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index ac5467c0368bac57120acf3cec8e7d9b82e18e20..5ab90f7051f4e6995afc09153a72da05b40375ea 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_sound.xml b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
index 83a1f5a96f63672dd4e00524c13dcf70e7f069db..78d69d3e09799328b5f71574f4f7491f6f0cb892 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="85"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
index 048cf7df6262b0a26c3a40c66eff8616ae8d779e..2957cbd3a788e1649fcb5b26febb695f22adec3e 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_trash.xml b/indra/newview/skins/default/xui/en/floater_preview_trash.xml
index 3fa71e7bfe024c7f44358481d1c42f48ba48d405..f1c87c8c5a09f016afaaf81fddbe5a8432ccbba0 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_trash.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_trash.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_price_for_listing.xml b/indra/newview/skins/default/xui/en/floater_price_for_listing.xml
index 6312366b866f821b45be3458755039f30ac625f1..0b1e23c27e626559108821e10113eb9039e03701 100644
--- a/indra/newview/skins/default/xui/en/floater_price_for_listing.xml
+++ b/indra/newview/skins/default/xui/en/floater_price_for_listing.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_profile_permissions.xml b/indra/newview/skins/default/xui/en/floater_profile_permissions.xml
index 9f3b4d9a00b50c143c9c1f9b9e70a32bc140c7b9..e434face8b8deef9f37eccaed90dc9570be74676 100644
--- a/indra/newview/skins/default/xui/en/floater_profile_permissions.xml
+++ b/indra/newview/skins/default/xui/en/floater_profile_permissions.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="false"
  show_title="false"
diff --git a/indra/newview/skins/default/xui/en/floater_profile_texture.xml b/indra/newview/skins/default/xui/en/floater_profile_texture.xml
index 3b351a332525b541868ca9bd50769166dbb369b5..5da14b75ab67dc5885d5ad84c6af119900d04535 100644
--- a/indra/newview/skins/default/xui/en/floater_profile_texture.xml
+++ b/indra/newview/skins/default/xui/en/floater_profile_texture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_resize="false"
  show_title="false"
diff --git a/indra/newview/skins/default/xui/en/floater_publish_classified.xml b/indra/newview/skins/default/xui/en/floater_publish_classified.xml
index 84e0b489d0eff34783b40f15a69b7338f094162e..04840e1c64b90460609cb6c6d7a283ccd0c86d0b 100644
--- a/indra/newview/skins/default/xui/en/floater_publish_classified.xml
+++ b/indra/newview/skins/default/xui/en/floater_publish_classified.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
@@ -25,6 +25,7 @@ Remember, Classified fees are non-refundable.
     </text>
     <spinner
      decimal_digits="0"
+     allow_digits_only="true"
      follows="left|top"
      font="SansSerif"
      halign="left"
@@ -36,7 +37,6 @@ Remember, Classified fees are non-refundable.
      layout="topleft"
      left="15"
      value="50"
-     min_val="50"
      max_val="999999"
      name="price_for_listing"
      top_pad="10"
diff --git a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml
index 11172d8a3e25edb8844def4752041b3c44045897..c7fd9da219e87d75ca92c35f410f00a03909406b 100644
--- a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   name="region_debug_console"
   title="Region Debug"
diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml
index 3b58cd08f6af229f1bad8ab860be5c3f09651b84..a7bbfc9842a719d54b1f7b1edb409f01b6a63f41 100644
--- a/indra/newview/skins/default/xui/en/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="555"
diff --git a/indra/newview/skins/default/xui/en/floater_region_restarting.xml b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
index 2fe4d0190a8a0eda42467b69f000733ec508daaf..825f90d265344953bfbfec786bbdef437ae0b5ec 100644
--- a/indra/newview/skins/default/xui/en/floater_region_restarting.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  height="150"
  width="290"
diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
index 343e72f057fc0a65a3922fcdfaeadfc660e067e4..59572c79dafecbd69c75a8b81d5a857383c0ca8c 100644
--- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="580"
diff --git a/indra/newview/skins/default/xui/en/floater_save_camera_preset.xml b/indra/newview/skins/default/xui/en/floater_save_camera_preset.xml
index 54fdb6d1670810eefa4628e383a6eb33073e99a1..ce86bd65f70d3e3e5d6e0a7f24765c2e56a69d36 100644
--- a/indra/newview/skins/default/xui/en/floater_save_camera_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_save_camera_preset.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="185"
diff --git a/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
index 62260274f5cfca9e4dd4edc067ae02443952bdfd..dbfbc058c0140aa31e5a0fda6f26648ed04b69a8 100644
--- a/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
+++ b/indra/newview/skins/default/xui/en/floater_save_pref_preset.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="145"
diff --git a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
index b757f4eab80863313f1c2ec18c21273b56e055a7..a73af968aff1e339b9253c32d414ec5e20f81133 100644
--- a/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_scene_load_stats.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater legacy_header_height="18"
          can_resize="true"
          height="400"
@@ -119,7 +119,7 @@
                     tick_spacing="100"
                     show_history="true"
                     show_bar="false"/>
-          <stat_bar name="texture_decode_latency"
+          <stat_bar name="texture_write_latency"
                     label="Cache Write Latency"
                     orientation="horizontal"
                     unit_label="sec"
diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml
index bd4edb81c85dd329f03ecc06dda0cb1decf913b6..ae6e68de175b7b7c93c7eb544026380ad64147b5 100644
--- a/indra/newview/skins/default/xui/en/floater_script.xml
+++ b/indra/newview/skins/default/xui/en/floater_script.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug.xml b/indra/newview/skins/default/xui/en/floater_script_debug.xml
index 6c49cfa1a8179fcd2eaea36bdb8411f449bdeea8..da269e070503a12a04791598c0eec576081572a4 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <multi_floater
  can_resize="true"
  height="233"
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
index b5dd2f97b9237b4e4ab6d65b699b5a4affe8005f..c58f5b9d43eed2228106a8c1f26216852d684344 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml
index 8e4bcb3eb0da36a7da43f7f3b704a6d2d637dab9..0b39d204bec7036f60682c6673381eab20ff4cb1 100644
--- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="false"
@@ -335,6 +335,7 @@
      layout="topleft"
      max_length="300"
      name="Script Preview"
+     default_font_size="true"
      text_color="ScriptText"
      default_color="ScriptText"
      bg_writeable_color="ScriptBackground"
diff --git a/indra/newview/skins/default/xui/en/floater_script_limits.xml b/indra/newview/skins/default/xui/en/floater_script_limits.xml
index 96b2ceec63d5114908b81d4fe33f5dca3a13e73f..a0d2b74b5b55294a9e4ace1c82bc65afcb505189 100644
--- a/indra/newview/skins/default/xui/en/floater_script_limits.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_limits.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_script_preview.xml b/indra/newview/skins/default/xui/en/floater_script_preview.xml
index 91a9e67e4cd0ff3b6761cdd2e99ed0a4513fdf41..b0b105fe580cd269652df4fe2a8744796c268426 100644
--- a/indra/newview/skins/default/xui/en/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_preview.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
- height="570"
+ height="593"
  layout="topleft"
  min_height="271"
- min_width="290"
+ min_width="320"
  name="preview lsl text"
  help_topic="preview_lsl_text"
  save_rect="true"
@@ -21,7 +21,7 @@
      layout="topleft"
      left="10"
      name="script panel"
-     top="42"
+     top="65"
      width="497" />
     <icon
      follows="top|right"
@@ -33,6 +33,21 @@
      name="lock"
      top="4"
      width="18" />
+    <text
+     type="string"
+     length="1"
+     follows="left|top|right"
+     width="490"
+     use_ellipses="true"
+     font="SansSerif"
+     height="18"
+     layout="topleft"
+     left="13"
+     name="path_txt"
+     text_color="white"
+     top="21">
+        File path
+    </text>
     <text
      type="string"
      length="1"
@@ -42,7 +57,7 @@
      layout="topleft"
      left="13"
      name="desc txt"
-     top="19"
+     top_pad="5"
      width="80">
         Description:
     </text>
diff --git a/indra/newview/skins/default/xui/en/floater_script_queue.xml b/indra/newview/skins/default/xui/en/floater_script_queue.xml
index 0982683a7f51769eb10a02c997425f99003053a5..a98437ab1d856ff4b44c09b7bff2e1c0dcfc6608 100644
--- a/indra/newview/skins/default/xui/en/floater_script_queue.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_queue.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_script_search.xml b/indra/newview/skins/default/xui/en/floater_script_search.xml
index ade0156bc798ec48a47cf82ac2f2db181a9db824..9cd621898209a2eaf87f725f28a1b595ec4ca052 100644
--- a/indra/newview/skins/default/xui/en/floater_script_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_search.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  default_tab_group="1"
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index c3e7028dc5b79e2686a0230143d91e691e84a960..fc1e32915a8ba4ccd80e707525f68d71855e4e46 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   positioning="cascading"
   legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_select_key.xml b/indra/newview/skins/default/xui/en/floater_select_key.xml
index 998948fca1cfb374a7671e13ce0999ce267a47c9..13362c26a75eb3b830d5821f90e2012d86464a7f 100644
--- a/indra/newview/skins/default/xui/en/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/en/floater_select_key.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  border="false"
diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml
index 52de9ddd4730be22c7cd71b034f252c721829ed9..ff7a0d031783c3b7414860d2f96a058b130585f6 100644
--- a/indra/newview/skins/default/xui/en/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
index e4fda5cd108320022ef3be55fb44b29f5f72ecbb..a93be6a18d6b9e32ce78d56b6b57566c1c140d17 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_settings_picker.xml b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
index 8931269fe78b1c259faeb8d8cf03401971ef679a..434f2a23964cf62836e23f48f9af3a135110f15f 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
         legacy_header_height="18"
         can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_simple_snapshot.xml b/indra/newview/skins/default/xui/en/floater_simple_snapshot.xml
index 484ad159d13b92cc295492d3a414c45a8adde1ea..0b91e136320ba225595051f893974ac38ef5f2d6 100644
--- a/indra/newview/skins/default/xui/en/floater_simple_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_simple_snapshot.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 1a1131e24c27a22ecad220dd8d9c44770a972313..e6b780728c714f7b723bf73e57798f8e1fdcb434 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="18"
@@ -234,7 +234,7 @@
          height="1"
          left="10"
          layout="topleft"
-         name="advanced_options_hr"
+         name="advanced_options_hr1"
          right="-1"
          top_pad="7"
          />
diff --git a/indra/newview/skins/default/xui/en/floater_sound_preview.xml b/indra/newview/skins/default/xui/en/floater_sound_preview.xml
index 3889b975a91a2ead30a57a48bcea626095878766..61fb22892637263ed9398bceeb65b3e6744e3919 100644
--- a/indra/newview/skins/default/xui/en/floater_sound_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_sound_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="180"
diff --git a/indra/newview/skins/default/xui/en/floater_spellcheck.xml b/indra/newview/skins/default/xui/en/floater_spellcheck.xml
index 76a350dd294729e73dfa72559a2c26c3e730ba45..2575bef48f08e6b96ef8c14c2bcd3629a1777a24 100644
--- a/indra/newview/skins/default/xui/en/floater_spellcheck.xml
+++ b/indra/newview/skins/default/xui/en/floater_spellcheck.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  border="true"
  can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_spellcheck_import.xml b/indra/newview/skins/default/xui/en/floater_spellcheck_import.xml
index 94393a6c77d1bce70d4f06a1a03cc0286d302a3b..a3109a15a8c87ac82acd8181da079a24f4df8603 100644
--- a/indra/newview/skins/default/xui/en/floater_spellcheck_import.xml
+++ b/indra/newview/skins/default/xui/en/floater_spellcheck_import.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  border="true"
  can_close="true"
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 9ee161e611343d2d08d9598dec99f0e9ede5d929..6633e250991153937844331f279c9cc27003e039 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater legacy_header_height="18"
          can_resize="true"
          height="400"
@@ -25,7 +25,7 @@
                     name="statistics_view"
                     top="20"
                     width="250" >
-     <stat_view name="basic"
+      <stat_view name="basic"
                  label="Basic"
                  setting="OpenDebugStatBasic">
         <stat_bar name="fps"
@@ -54,7 +54,7 @@
                   label="jitter"
                   decimal_digits="1"
                   stat="frametimejitter"/>
-       <stat_bar name="bandwidth"
+        <stat_bar name="bandwidth"
                   label="UDP Data Received"
                   stat="activemessagedatareceived"
                   decimal_digits="0"
@@ -68,7 +68,7 @@
                   stat="simpingstat"/>
       </stat_view>
 
-     <stat_view name="advanced"
+      <stat_view name="advanced"
                  label="Advanced"
                  setting="OpenDebugStatAdvanced">
         <stat_view name="render"
@@ -84,28 +84,29 @@
           <stat_bar name="totalobjs"
                     label="Total Objects"
                     stat="numobjectsstat"/>
-					<stat_bar name="cachedobjs"
+          <stat_bar name="cachedobjs"
                     label="Cached Objects"
                     stat="numactivecachedobjects"/>
-					<stat_bar name="newobjs"
+          <stat_bar name="newobjs"
                     label="New Objects"
                     stat="numnewobjectsstat"/>
           <stat_bar name="object_cache_hits"
                     label="Object Cache Hit Rate"
                     stat="object_cache_hits"
                     show_history="true"/>
-					<stat_bar name="occlusion_queries"
-										label="Occlusion Queries Performed"
-										stat="occlusion_queries"/>
-					<stat_bar name="occluded"
-										label="Objects Occluded"
-										stat="occluded_objects"/>
-					<stat_bar name="unoccluded"
-										label="Object Unoccluded"
-										stat="unoccluded_objects"/>
-				</stat_view>
+          <stat_bar name="occlusion_queries"
+                    label="Occlusion Queries Performed"
+                    stat="occlusion_queries"/>
+          <stat_bar name="occluded"
+                    label="Objects Occluded"
+                    stat="occluded_objects"/>
+          <stat_bar name="unoccluded"
+                    label="Object Unoccluded"
+                    stat="unoccluded_objects"/>
+        </stat_view>
         <stat_view name="texture"
-                   label="Texture">
+                   label="Texture"
+                   setting="OpenDebugStatTexture">
           <stat_bar name="texture_cache_hits"
                     label="Cache Hit Rate"
                     stat="texture_cache_hits"
@@ -243,7 +244,8 @@
                   decimal_digits="1"
                   bar_max="45" />
         <stat_view name="physicsdetail"
-                   label="Physics Details">
+                   label="Physics Details"
+                   setting="OpenDebugStatPhysicsDetails">
           <stat_bar name="physicspinnedtasks"
                     label="Pinned Objects"
                     stat="physicspinnedtasks"/>
@@ -282,7 +284,8 @@
                   stat="simscripteps"
                   unit_label="eps"/>
         <stat_view name="simpathfinding"
-                   label="Pathfinding">
+                   label="Pathfinding"
+                   setting="OpenDebugStatPathfinding">
           <stat_bar name="simsimaistepmsec"
                     label="AI Step Time"
                     stat="simsimaistepmsec"/>
@@ -315,7 +318,8 @@
                   stat="simtotalunackedbytes"
                   decimal_digits="1"/>
         <stat_view name="simperf"
-                   label="Time">
+                   label="Time"
+                   setting="OpenDebugStatSimTime">
           <stat_bar name="simframemsec"
                     label="Total Frame Time"
                     stat="simframemsec"/>
@@ -341,7 +345,8 @@
                     label="Spare Time"
                     stat="simsparemsec"/>
           <stat_view name="timedetails"
-                     label="Time Details">
+                     label="Time Details"
+                     setting="OpenDebugStatSimTimeDetails">
             <stat_bar name="simsimphysicsstepmsec"
                       label="Physics Step"
                       stat="simsimphysicsstepmsec"/>
diff --git a/indra/newview/skins/default/xui/en/floater_task_properties.xml b/indra/newview/skins/default/xui/en/floater_task_properties.xml
index 56c236eab48f539d6b1274eb4db1d24faae8f615..ecec41c66300c15ba75f776d9ccfb535a552845b 100644
--- a/indra/newview/skins/default/xui/en/floater_task_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_task_properties.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="590"
diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml
index 547613fb672b0d4c58c2187dfa9c3aa144b15986..9d4fb82ec6fa2980221b706ae5a32b98d3ac2b09 100644
--- a/indra/newview/skins/default/xui/en/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/en/floater_telehub.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Explicit left edge to avoid overlapping build tools -->
 <floater
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_test_button.xml b/indra/newview/skins/default/xui/en/floater_test_button.xml
index 9bc05107a207e5461e5129927cddc3b587a9576c..90eaa09e13ce2463677a4d011b417e575761a316 100644
--- a/indra/newview/skins/default/xui/en/floater_test_button.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
index 95aaadfcf3f565b0a3a19ad20fb5be930d87414b..0b443508467a77062ec64163590fc41eebdff6e8 100644
--- a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_combobox.xml b/indra/newview/skins/default/xui/en/floater_test_combobox.xml
index 45e2e34da76731d32872428bbc9015cd9ddd5c0a..4211d624ac40fc9a45219b7ac7388ad1eeb73c6d 100644
--- a/indra/newview/skins/default/xui/en/floater_test_combobox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_combobox.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml
index 209285da2e8cad6c6bcc0d0253e7f63aac888af9..c195f021e3fc1c85114985421b479b411e15a7ab 100644
--- a/indra/newview/skins/default/xui/en/floater_test_inspectors.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_inspectors.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_test_layout.xml b/indra/newview/skins/default/xui/en/floater_test_layout.xml
index 94f7e0b7980183b58292dc8bad47373fb0c4cba7..bade805cdbde168bd5ec5d6735fe2d656944f992 100644
--- a/indra/newview/skins/default/xui/en/floater_test_layout.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_layout.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
index a3ed22f42211f15b884f8d1633b77df339558672..70361cc8dadac78d0cc386611c2ef89dfceb8484 100644
--- a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
         can_resize="true"
         can_close="true"
@@ -26,7 +26,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex2"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -36,7 +36,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex3"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -46,7 +46,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex4"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -56,7 +56,7 @@
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
     </layout_stack>
-    <layout_stack name="test_stack"
+    <layout_stack name="test_stack1"
             left_pad="5"
             top="0"
             width="100"
@@ -71,7 +71,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex2"
                 auto_resize="true"
                 user_resize="true"
                 visible="false"
@@ -89,7 +89,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="black">fixed</text>
         </layout_panel>
-        <layout_panel name="fixed"
+        <layout_panel name="fixed2"
                 auto_resize="false"
                 user_resize="true"
                 height="50"
@@ -98,7 +98,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="black">fixed</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex3"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -106,7 +106,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex4"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -114,7 +114,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex5"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -122,7 +122,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex6"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -132,7 +132,7 @@
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
     </layout_stack>
-    <layout_stack name="test_stack"
+    <layout_stack name="test_stack2"
             left_pad="5"
             top="0"
             width="100"
@@ -155,7 +155,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="black">fixed</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex2"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -164,7 +164,7 @@
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
     </layout_stack>
-    <layout_stack name="test_stack"
+    <layout_stack name="test_stack3"
             left_pad="5"
             top="0"
             width="100"
@@ -179,7 +179,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="black">fixed</text>
         </layout_panel>
-        <layout_panel name="fixed"
+        <layout_panel name="fixed2"
                 auto_resize="false"
                 user_resize="true"
                 height="50"
@@ -187,7 +187,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="black">fixed</text>
         </layout_panel>
-        <layout_panel name="fixed"
+        <layout_panel name="fixed3"
                 auto_resize="false"
                 user_resize="true"
                 height="50"
@@ -204,7 +204,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex2"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
@@ -213,7 +213,7 @@
                 background_visible="true">
             <text follows="top|left|right" halign="center" text_color="white">flex</text>
         </layout_panel>
-        <layout_panel name="flex"
+        <layout_panel name="flex3"
                 auto_resize="true"
                 user_resize="true"
                 bg_alpha_color="blue"
diff --git a/indra/newview/skins/default/xui/en/floater_test_line_editor.xml b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml
index 2894ad2a325d70964a2a80091a8b9007152d3e6c..2eea5c361f32e805cbaf56a82ebc874a1f2ce283 100644
--- a/indra/newview/skins/default/xui/en/floater_test_line_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
@@ -75,7 +75,7 @@
   <line_editor
    height="20"
    left_delta="0"
-   name="left_pad_editor"
+   name="left_pad_editor1"
    text_pad_right="75"
    top_pad="10"
    width="200">
@@ -84,7 +84,7 @@
   <line_editor
    height="20"
    left_delta="0"
-   name="left_pad_editor"
+   name="left_pad_editor2"
    text_pad_left="25"
    text_pad_right="75"
    top_pad="10"
diff --git a/indra/newview/skins/default/xui/en/floater_test_list_view.xml b/indra/newview/skins/default/xui/en/floater_test_list_view.xml
index 32ccc31dfd4108154c9125192cd7944433428103..9fdeeb08b4cd16eceaf09a20054afc3aa116dc20 100644
--- a/indra/newview/skins/default/xui/en/floater_test_list_view.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_list_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml b/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml
index f4a50ecc9626e7ee9abd0ea8f8af05650090d063..0e54d332cdb37d6d2f82cf46f4e3ab5e92d91d44 100644
--- a/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_radiogroup.xml b/indra/newview/skins/default/xui/en/floater_test_radiogroup.xml
index db14ecae831117e1e7ca9dd6b810003c15c7fa85..505de80f55f28b1cff19f233890c800ace3139f8 100644
--- a/indra/newview/skins/default/xui/en/floater_test_radiogroup.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_radiogroup.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_slider.xml b/indra/newview/skins/default/xui/en/floater_test_slider.xml
index 20bd555a03263a41cd377898860f0c69c26fb721..d86c43b48c2b757947501ac32dad0fb524df2b67 100644
--- a/indra/newview/skins/default/xui/en/floater_test_slider.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_slider.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_spinner.xml b/indra/newview/skins/default/xui/en/floater_test_spinner.xml
index acd49aa492edd01133cc4e3d828fd0d449cecc4c..5fa0b20d4f8d358763a1a1c9083319b2930369d2 100644
--- a/indra/newview/skins/default/xui/en/floater_test_spinner.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_spinner.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
index e1fefc363133250c94dfaa3c8819b24ce71204ff..ab3b819e34bd270651ebf09fe5ed7f44ced92278 100644
--- a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
@@ -24,7 +24,7 @@
    follows="top|left|bottom"
    font="SansSerif" 
    left="10"
-   name="test_text_editor"
+   name="test_text_editor1"
    tool_tip="text editor"
    top_pad="10"
    width="200">
diff --git a/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml
index d11373ce1d574c7a35cd08fcc6df7bf19ffbeb90..950ed192c0daa8ed05a60e0d90bc5a088dcfc3ae 100644
--- a/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  can_minimize="false"
  can_tear_off="false"
diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
index 1d31fbd6dc05f14f2dfd3ef275a800435ff73a74..023df69f0fe2ce6e127a187be3338f2e31c1e1d2 100644
--- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
@@ -82,7 +82,7 @@
   </text>
   <text
  left="10"
- name="v_pad_text"
+ name="v_pad_text1"
  height="40"
  width="300"
  halign="left"
@@ -197,7 +197,7 @@ scroll bar gjyrrr
       follows="top|left|bottom"
       font="Monospace"
  left_delta="0"
- name="monospace_text_editor"
+ name="monospace_text_editor1"
  tool_tip="text editor"
  top_pad="10"
  width="200">
diff --git a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml
index 067c1fed8245488732f2b4bc4bda58e2f0e7c94e..41d95c5a1585b05007fbbf0df0df8e931746b696 100644
--- a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
index 10854f5a499c358bba03f8b2b4a84f69ce2f7e6a..3271cddd525e26a0193e123773461e716d7a6cb7 100644
--- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Sample "floater" window with examples of common widgets.
 
     Notes:
@@ -300,7 +300,7 @@
    layout="topleft"
    width="60"
    use_ellipses="true"
-   name="test_text"
+   name="test_text1"
    tool_tip="text">
     Truncated text here
   </text>
@@ -395,7 +395,7 @@ line to actually fit
        width="250" 
        follows="top|left"
        font.name="SansSerifSmall"
-       name="test_text10"
+       name="test_text101"
        tool_tip="text">
         SansSerifSmall.  Русский 中文 (简体)
       </text>
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 2d3321bb2f504070293642181c9a12a5996a6dbd..6bf54d5e85744cb14e011b70b15efe3bce8dc778 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 9966fe0b56c7e0d7e078e0e2fe59c8c6c2cffa85..490b516ac6ed056236af367870b6607129b034bb 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  positioning="cascading"
  legacy_header_height="18"
diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml
index a8b4b84ab727e89a7b47df2c7fb7cd2dea24f3fa..028c81a84c0748a22ef8026b6e097e59cae131f8 100644
--- a/indra/newview/skins/default/xui/en/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml
index 7e172e138a100d4326263df9d64ecf39f2f08bee..4d840ddde236fd17139ff8d67309353b4395f659 100644
--- a/indra/newview/skins/default/xui/en/floater_tos.xml
+++ b/indra/newview/skins/default/xui/en/floater_tos.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_close="false"
diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml
index bdc04a8a78864d4e32de2a6c5ab6ec9242bdceaf..7fe9830d23e22d8700fb240831b9ff33937b8c56 100644
--- a/indra/newview/skins/default/xui/en/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/en/floater_toybox.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   can_close="true"
   can_dock="false"
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index 3f3331b468af6cf720fa25f6ca39ff31d63bac2a..22dbd80cdaa57023d8875619caf6b39f6f8321a0 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  height="470"
@@ -161,7 +161,7 @@
    layout="topleft"
    left="185"
    length="1"
-   name="google_links_text"
+   name="azure_links_text"
    top_pad="-262"
    type="string"
    width="100">
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index eb0129483152a1db937bffe1e57f015067cc3928..4a523b6d1d7d84e3bfd4cbb4607cec5e4221ad9d 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_url_entry.xml b/indra/newview/skins/default/xui/en/floater_url_entry.xml
index 2dfc0fd1251933276bb9f99ef5372749f864aa5e..769a3b0ec6de5231afc91751eeacca79c3516162 100644
--- a/indra/newview/skins/default/xui/en/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/en/floater_url_entry.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml
index 5c71fd3bc6d9c64737b0471138aa2cf359e7fb6d..51809793d38eb1b7c5d9d7751edf8ee7f4aa2c0c 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_chat_volume.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <floater
  legacy_header_height="25"
@@ -45,4 +45,4 @@
 		name="mute_audio"
 		tab_stop="false"
 		width="16" />
-</floater>
\ No newline at end of file
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
index 146c3d7e30daf841c6afdb1b8c80320cf85dbd14..d037bdb813cfd80a9365d299f45af13db0b58284 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="27"
  can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_voice_volume.xml b/indra/newview/skins/default/xui/en/floater_voice_volume.xml
index 9346295d5b8f9ac058af150f146f596a914c5286..4e3dc5edf107da95ca5af6e42a2213afba92a238 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_volume.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_volume.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index 9a097d933bb513ab03a7f6ee680e63e460296724..2e1dfa00c7a1e849c0da64e31f85ef506be482d9 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   legacy_header_height="18"
   can_resize="true"
diff --git a/indra/newview/skins/default/xui/en/floater_web_profile.xml b/indra/newview/skins/default/xui/en/floater_web_profile.xml
index d0225f78a9b55f9cb2890b3c0c41f725a673944b..51b5336066a381b06e35c811414d8be3dafece56 100644
--- a/indra/newview/skins/default/xui/en/floater_web_profile.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_profile.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater name="floater_web_profile"
          help_topic="web_profile"
          width="780"
          height="775"
-         filename="floater_web_content.xml"/>
\ No newline at end of file
+         filename="floater_web_content.xml"/>
diff --git a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
index 897d959b989f5d38e090d5c08e065248253418df..4e75b2b29c66b305fdfdb84cfa7d756a940a3842 100644
--- a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
+++ b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_minimize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_window_size.xml b/indra/newview/skins/default/xui/en/floater_window_size.xml
index 115fe413f3ca4e3dc96c1375ea660487cfed895f..e5a1c0da8815dbde238d9d5da189df95821f7377 100644
--- a/indra/newview/skins/default/xui/en/floater_window_size.xml
+++ b/indra/newview/skins/default/xui/en/floater_window_size.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
   can_minimize="false" 
   can_resize="false"
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index c965a4427ce4c58a462709a6c57ebc1cdc834387..7efa81d263ce597eaba8851af18b3e7f7d581864 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <floater
  legacy_header_height="18"
  can_resize="true"
@@ -241,7 +241,7 @@
      image_name="legend.tga"
      layout="topleft"
      mouse_opaque="true"
-     name="square2"
+     name="square2_auction"
      left="20"
      top_pad="2"
      width="16" />
@@ -264,7 +264,7 @@
      image_name="legend.tga"
      layout="topleft"
      mouse_opaque="true"
-     name="square2"
+     name="square2_owner"
      left="20"
      top_pad="-5"
      width="16" />
diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml
index 40045625fdd53a4f7374c93ef8ae25f139dc1d0c..45ec1e27f1ac359154b936f63aadec53ec549f34 100644
--- a/indra/newview/skins/default/xui/en/fonts.xml
+++ b/indra/newview/skins/default/xui/en/fonts.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <fonts>
 
   <font name="default" comment="default font files (global fallbacks)">
@@ -176,4 +176,12 @@
 	     comment="Size of small font (points, or 1/72 of an inch)"
 	     size="7.6"
 	     />
+  <font_size name="SmallLSL"
+         comment="Size of small font for LSL editor (points, or 1/72 of an inch)"
+         size="7"
+         />
+  <font_size name="HugeLSL"
+         comment="Size of huge font for LSL editor (points, or 1/72 of an inch)"
+         size="12"
+         />
 </fonts>
diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml
index fceb9b218426432df9757b00b2ef9797b7897f6b..4c72bc4703218c53220ae3f63e8bf5d7e0a9c2b1 100644
--- a/indra/newview/skins/default/xui/en/inspect_avatar.xml
+++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml
index a69585074ca189b505c5433f02495aaadd34d3e6..c190d9610fb78de7938df263a49c3d2fcc229de8 100644
--- a/indra/newview/skins/default/xui/en/inspect_group.xml
+++ b/indra/newview/skins/default/xui/en/inspect_group.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml
index bfeb8fc470144883d6cf27ddc8f20e6e25b0e00f..efe518f2f7a7a9e180b21b3541d030aac2efcf18 100644
--- a/indra/newview/skins/default/xui/en/inspect_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/inspect_remote_object.xml b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
index e83257d2a0da096229b6c9eeee6295b3b8238e63..2d0a9ccb3c3ef6abc69e0e249ca5c74b643f9309 100644
--- a/indra/newview/skins/default/xui/en/inspect_remote_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/inspect_toast.xml b/indra/newview/skins/default/xui/en/inspect_toast.xml
index 0221397a8ca2fd5050395a8bc7fead6487376600..48df86804e2480bffba842c92429a8b3f638bc38 100644
--- a/indra/newview/skins/default/xui/en/inspect_toast.xml
+++ b/indra/newview/skins/default/xui/en/inspect_toast.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
   Not can_close / no title to avoid window chrome
   Single instance - only have one at a time, recycle it each spawn
diff --git a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml
index a7ecc39ed85d84d77c43e6835960afdaf96e6a65..6a89468dc9660146fcb4e7e2efaaca8ee62b21e1 100644
--- a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <button
  chrome="true"
  image_selected="Info_Over"
@@ -6,4 +7,4 @@
  height="12"
  name="inspector_info_ctrl"
  width="12" />
- 
\ No newline at end of file
+ 
diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml
index d418fc38e3ace08ffb601f44d6ed96c94caafc3a..dd521c09d0ef324cbcafe427a849f676dc9096cd 100644
--- a/indra/newview/skins/default/xui/en/language_settings.xml
+++ b/indra/newview/skins/default/xui/en/language_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- This file contains strings that used to be hardcoded in the source.-->
 <strings>
 
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index bab37c625898f459b966d12280f6a4a96c17ee78..a4ef4a57cede6bd7a832701c85dc6e86309e6f4b 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|right|top|bottom"
  height="768"
diff --git a/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml b/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
index 5033ea95469df1709f97dead6d9734cf22cbedd0..e3b248d17bcd0b25bffd92c49d46da40f5c62835 100644
--- a/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_add_wearable_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Add Wearable Gear Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index 22006c287fae8a4cfff3dac204525ae241850b50..d51e568c03997cc6a6d305619621221d1864b185 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- *NOTE: See also menu_avatar_other.xml -->
 <context_menu
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 8e041f8de3d8add5a8fb59bdc40032c9d445f197..d9786193550f1014e2720f54b449351c1c4be63a 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Attachment Pie">
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
index 9f394a4c74ddcaa0cd86bb77451e5c3d83cb4dd9..0d3dd2a479fd97879d45f91397d6967dff7f4e8f 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 665eb9a82fdc1bf91c7ddcc4b323f450dcc08f62..fc4ffde947f55622b7b7043da8602928fa1d7230 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- *NOTE: See also menu_attachment_other.xml -->
 <context_menu
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings.xml b/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings.xml
index 1a18483418d484ad56fd86feadacdfa39c6801db..dc9007c61d8f528902353265460fa28c09b4379f 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Settings">
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml b/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml
index 6e09eb5981f5fa8517f1627fe3b3db35a2604026..7eca0b51a6643f01523b91f18a695fa1fec61c11 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_rendering_settings_add.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_settings_add.xml"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index 20f3ad080bf7e367002943132ec8259ac7c0e472..fc8c7fea9cdc721722a1f482a6c0cdf0bb7b5f46 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Self Pie">
diff --git a/indra/newview/skins/default/xui/en/menu_cof_attachment.xml b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
index 3f545c936d5733147a8b2dd7090b46390f0873fb..23049aae06d44359cb6d04c20903360427848f34 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="COF Attachment">
diff --git a/indra/newview/skins/default/xui/en/menu_cof_body_part.xml b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
index f0e8461360d19de63eb60f2b66db7c44a6fb1375..157d5739e5579a3a4939f199b1e13c2860da2be4 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="COF Body">
diff --git a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
index 206d49e8c748d81b080c95f78f2bc32415351208..a0bd8b4bc936d84c84d890107d037501ff62121f 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="COF Clothing">
diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
index 45cf780557b698ce1183595917a7d17eafffaeed..a491e272cf9ed6a100797c37964e954be2d81e78 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Gear COF">
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 59e6106a28a1120f085f542e2f7d0750ac9ace3c..62cdaa5886d6cb57c41eb768b9c4e84dba7eaef9 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml b/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml
index a1a3afbf6820d2786a55f5dd920ac82fef5f5696..9c803d08777918e2c19db862e29cd192c0fa325c 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation_log_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Conversation Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml b/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml
index ce65b23971a28e593031a063c9689099718638b0..864bec5d9a6773faa38e2c2aee6c6df6ea557690 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation_log_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
      name="menu_conversation_view"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_color.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_color.xml
index 4c12180daf32f53bc78324a03f636e3f449118fb..6605dd8eb9bc530317c3ce5aeada6161784a51eb 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_color.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_color.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Color Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_features.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_features.xml
index 4823d74a261c2ecb57d359a05b4af5708610cf53..6791a5ec8bb9ea621b113bb1cf09fd8c678410cd 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_features.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_features.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Features Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_light.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_light.xml
index 5de23dfee3f9bdd0a4d57d7ea8a4ca9aa7585c22..5a0411ca27a9eb45f5dd2f2fdd86912984cd1230 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_light.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_light.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Light Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_object.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_object.xml
index bdc4537a9dc0d39c0ace17aec056fe448c589ee0..66cfd29ba4485ff3d5dbec9b259994d93f6c8d66 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Object Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_pos.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_pos.xml
index 3ea95b281f08d6e64d558cb1301d3b6b205a819d..6c68994a80b2ba940020009b15f016857acfd6d4 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_pos.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_pos.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Position Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_rot.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_rot.xml
index 06ce80f8977c32488cd7b58d5f3a9cdfe09562e5..400af57371a1216f85f7197a6c6f6bb86e470a3b 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_rot.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_rot.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Rotation Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_size.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_size.xml
index 7082a0e65b37c10df8cf24a7bf3c9f392dcb24b9..3547f3b3677562abcfa04873a7aa89c635568b41 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_size.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_size.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Size Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_copy_paste_texture.xml b/indra/newview/skins/default/xui/en/menu_copy_paste_texture.xml
index f358affc23d2e32d512e8646abaa3ade304e66eb..a6d8fc1c9c59dfdf81b28a1ecb16ad987ae95a3f 100644
--- a/indra/newview/skins/default/xui/en/menu_copy_paste_texture.xml
+++ b/indra/newview/skins/default/xui/en/menu_copy_paste_texture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Copy Paste Texture Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml
index 6f83756f838eedf4116fccf5d66a7565e8e8ee3b..8406c744e27d61b65303a6bdd0943e975a63f941 100644
--- a/indra/newview/skins/default/xui/en/menu_edit.xml
+++ b/indra/newview/skins/default/xui/en/menu_edit.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu create_jump_keys="true"
       label="Edit"
       name="Edit"
@@ -81,4 +81,4 @@
     <menu_item_call.on_enable
      function="Edit.EnableDeselect" />
   </menu_item_call>
-</menu>
\ No newline at end of file
+</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_favorites.xml b/indra/newview/skins/default/xui/en/menu_favorites.xml
index 0eab7c451b8656de6ed4f584978c585b2f539f2b..6345394b46e983c83125a96482d5d1b84d87ad93 100644
--- a/indra/newview/skins/default/xui/en/menu_favorites.xml
+++ b/indra/newview/skins/default/xui/en/menu_favorites.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  bottom="825"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
index d82c453e5f731328d4ca725ceb3108251d1c91ea..c11f1c88cb7991c06fed79d6bfd86f1e8b9e82ef 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
     layout="topleft"
     name="Gallery">
@@ -35,7 +35,7 @@
      layout="topleft"
      name="Folder Wearables Separator" />
     <menu_item_call
-     label="Replace Current Outfit"
+     label="Replace current outfit"
      layout="topleft"
      name="Replace Outfit">
         <menu_item_call.on_click
@@ -43,7 +43,7 @@
          parameter="replaceoutfit" />
     </menu_item_call>
     <menu_item_call
-     label="Add To Current Outfit"
+     label="Add folder items"
      layout="topleft"
      name="Add To Outfit">
         <menu_item_call.on_click
@@ -51,7 +51,7 @@
          parameter="addtooutfit" />
     </menu_item_call>
     <menu_item_call
-     label="Remove From Current Outfit"
+     label="Take off folder items"
      layout="topleft"
      name="Remove From Outfit">
         <menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
index 0ca505dd5d01a667678dd88a1cc6c91b647a14ca..99cee83f4e451054e2c55438092c3675221e5b79 100755
--- a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
     layout="topleft"
     name="Outfit">
     <menu_item_call
-        label="Wear - Replace Current Outfit"
+        label="Replace current outfit"
         layout="topleft"
         name="wear_replace">
         <on_click
@@ -16,7 +16,7 @@
         parameter="wear_replace" />
     </menu_item_call>
     <menu_item_call
-        label="Wear - Add to Current Outfit"
+        label="Add outfit items"
         layout="topleft"
         name="wear_add">
         <on_click
@@ -29,7 +29,7 @@
         parameter="wear_add" />
     </menu_item_call>
     <menu_item_call
-        label="Take Off - Remove from Current Outfit"
+        label="Take off outfit items"
         layout="topleft"
         name="take_off">
         <on_click
@@ -41,17 +41,60 @@
         function="Outfit.OnVisible"
         parameter="take_off" />
     </menu_item_call>
+    <menu_item_separator/>
     <menu_item_call
-     label="Image..."
-     layout="topleft"
-     name="thumbnail">
+        label="Image..."
+        layout="topleft"
+        name="thumbnail">
+        <on_click
+        function="Outfit.Thumbnail" />
+    </menu_item_call>
+    <menu_item_call
+        label="Edit outfit"
+        layout="topleft"
+        name="edit">
+        <on_click
+        function="Outfit.Edit" />
+        <on_visible
+        function="Outfit.OnVisible"
+        parameter="edit" />
+    </menu_item_call>
+    <menu_item_call
+        label="Rename outfit"
+        layout="topleft"
+        name="rename">
+        <on_click
+        function="Outfit.Rename" />
+        <on_enable
+        function="Outfit.OnEnable"
+        parameter="rename" />
+    </menu_item_call>
+    <menu_item_call
+        label="Save to this outfit"
+        layout="topleft"
+        name="save">
+        <on_click
+         function="Outfit.Save" />
+    </menu_item_call>
+    <menu_item_separator>
+        <on_visible
+        function="Outfit.OnVisible"
+        parameter="delete" />
+    </menu_item_separator>
+    <menu_item_call
+        label="Delete outfit"
+        layout="topleft"
+        name="delete">
         <on_click
-         function="Outfit.Thumbnail" />
+        function="Outfit.Delete" />
+        <on_visible
+        function="Outfit.OnVisible"
+        parameter="delete" />
     </menu_item_call>
-    <menu_item_separator name="sepatator1" />
+    <menu_item_separator/>
     <menu
         height="175"
-        label="New Clothes"
+        label="New clothes"
         layout="topleft"
         left_delta="0"
         mouse_opaque="false"
@@ -157,7 +200,7 @@
     </menu>
     <menu
         height="85"
-        label="New Body Parts"
+        label="New body parts"
         layout="topleft"
         left_delta="0"
         mouse_opaque="false"
@@ -197,35 +240,4 @@
             parameter="eyes" />
         </menu_item_call>
     </menu>
-    <menu_item_separator name="sepatator2" />
-    <menu_item_call
-        label="Edit Outfit"
-        layout="topleft"
-        name="edit">
-        <on_click
-        function="Outfit.Edit" />
-        <on_visible
-        function="Outfit.OnVisible"
-        parameter="edit" />
-    </menu_item_call>
-    <menu_item_call
-        label="Rename Outfit"
-        layout="topleft"
-        name="rename">
-        <on_click
-        function="Outfit.Rename" />
-        <on_enable
-        function="Outfit.OnEnable"
-        parameter="rename" />
-    </menu_item_call>
-    <menu_item_call
-        label="Delete Outfit"
-        layout="topleft"
-        name="delete">
-        <on_click
-        function="Outfit.Delete" />
-        <on_visible
-        function="Outfit.OnVisible"
-        parameter="delete" />
-    </menu_item_call>
 </context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
index 359c093eff9fd9584318b2518b8033f2af9de82d..86065210d500ed3af84c2972bca804e177c69a9c 100644
--- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/menu_group_plus.xml b/indra/newview/skins/default/xui/en/menu_group_plus.xml
index eca9e7f3c9fb98e6926fb5c6e8212421fb0f6c6a..71c75743837a1115f75c8fa33afce0e678ec01c7 100644
--- a/indra/newview/skins/default/xui/en/menu_group_plus.xml
+++ b/indra/newview/skins/default/xui/en/menu_group_plus.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu name="menu_group_plus"
      left="0" bottom="0" visible="false"
      mouse_opaque="false">
diff --git a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml
index b517fd7957d03eff614ae5d34b097683ba58b970..22899af15dd67869b6f5e29da03cb36f00b81dda 100644
--- a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="201"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_im_conversation.xml b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
index b38fae440412df33b961e7c7a3cf76bfbfac6a17..09a19b9249fbda8a63f3b9d44e6a909d47fd53a3 100644
--- a/indra/newview/skins/default/xui/en/menu_im_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_im_conversation.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Conversation Gear Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml
index b0adca0e0ec4713a187d5bc8e27818749f56c35a..94022ef1e3c22eb32cded40369a0bfbc3d27ea84 100644
--- a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml
+++ b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  name="menu_modes"
  left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_adhoc.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_adhoc.xml
index eb5e31b57d9c216a704b2ac3c77c84ba796f317d..19fca92818e840ac5f123fe732e2f9dce0a9abb1 100644
--- a/indra/newview/skins/default/xui/en/menu_imchiclet_adhoc.xml
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_adhoc.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml
index 8cbe62cfb01b8cbd83e490f0f726525cca7031ac..a5d656d3405d04234daa99f224ee3d20139f8626 100644
--- a/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
index 038b8328cb59f8d5a5dfafd21c57ef26198c32ad..a6dda4e7fe10696e6793d723b43f2ed4ee0a8824 100644
--- a/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
index 2c420aa1e3d5a3eecd62ed836c35666e57363006..9e1fde95139eec4c86c5e19a58eac2362e828531 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
    create_jump_keys="true"
    layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml
index 45a0a6635baac2fe530002b88b483bac7f31e856..391d8f4db74d971c0f7c06f2d963b3f81fa8c8ea 100644
--- a/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml
+++ b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 0295ef8ccd9dde2ce3e4c5d2aa459a41100b3b91..35ec0bf9e14c4f0e23abeb88e2f16081fd357ad3 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  bottom="825"
  layout="topleft"
@@ -264,7 +264,7 @@
      layout="topleft"
      name="Folder Wearables Separator" />
     <menu_item_call
-     label="Replace Current Outfit"
+     label="Replace current outfit"
      layout="topleft"
      name="Replace Outfit">
         <menu_item_call.on_click
@@ -272,7 +272,7 @@
          parameter="replaceoutfit" />
     </menu_item_call>
     <menu_item_call
-     label="Add To Current Outfit"
+     label="Add folder items"
      layout="topleft"
      name="Add To Outfit">
         <menu_item_call.on_click
@@ -280,7 +280,7 @@
          parameter="addtooutfit" />
     </menu_item_call>
     <menu_item_call
-     label="Remove From Current Outfit"
+     label="Take off folder items"
      layout="topleft"
      name="Remove From Outfit">
         <menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index 284dd8d9fca72f0f2e1cc912d450c22c669dec62..13064db7125647a6343e14159e7926104dc85ff7 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  layout="topleft"
  left="0"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
index 2c630880c230d7e766f41654b28a7071325ab06a..e249acaccd9c9387edf166923ace5cb22cf28f51 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
index 8e34f52f3ac2f846ea2a7bcc1199f8c9c0b71fca..b95a8ad6765cbc5d9dfed032a9eebdee9f590c02 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml
index c7f9822e41b5e0260e683a3056592bfa62a4ec50..33cf01493d992bbcb6421e6c57b5383068ddc179 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_view_default.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml
index 1ce0d65b3e645eafdd3fb8c4afc30deba06175ce..76eecc9391d3b2e29dc00ec4916c88508e54156e 100644
--- a/indra/newview/skins/default/xui/en/menu_land.xml
+++ b/indra/newview/skins/default/xui/en/menu_land.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Land Pie">
diff --git a/indra/newview/skins/default/xui/en/menu_landmark.xml b/indra/newview/skins/default/xui/en/menu_landmark.xml
index 93b6db222a4e1ddad02f70138481348da2d0d550..e879d7b6fa577cf2d4623bc9710fcef983685d63 100644
--- a/indra/newview/skins/default/xui/en/menu_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_landmark.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="201"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index 40399b33ef2337f263625941ae3c87cd0a9f0972..a71cbde21bf75f72428e9df2eb7025347bcc281b 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_bar
  follows="left|top"
  height="18"
diff --git a/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml b/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml
new file mode 100644
index 0000000000000000000000000000000000000000..39a2bc511c20720050bb2acc8eb90d7dbdb220de
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_lsl_font_size.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ bottom="806"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="menu_font_size"
+ visible="false">
+  <menu_item_check
+   label="Small"
+   layout="topleft"
+   name="font_small">
+    <on_click
+     function="FontSize.Set"
+     parameter="SmallLSL" />
+    <on_check
+     function="FontSize.Check"
+     parameter="SmallLSL" />
+  </menu_item_check>
+  <menu_item_check
+   label="Default"
+   layout="topleft"
+   name="font_monospace">
+    <on_click
+     function="FontSize.Set"
+     parameter="Monospace" />
+    <on_check
+     function="FontSize.Check"
+     parameter="Monospace" />
+    </menu_item_check>
+  <menu_item_check
+   label="Medium"
+   layout="topleft"
+   name="font_medium">
+    <on_click
+     function="FontSize.Set"
+     parameter="Medium" />
+    <on_check
+     function="FontSize.Check"
+     parameter="Medium" />
+  </menu_item_check>
+  <menu_item_check
+   label="Large"
+   layout="topleft"
+   name="font_large">
+    <on_click
+     function="FontSize.Set"
+     parameter="Large" />
+    <on_check
+     function="FontSize.Check"
+     parameter="Large" />
+  </menu_item_check>
+  <menu_item_check
+   label="Huge"
+   layout="topleft"
+   name="font_huge">
+    <on_click
+     function="FontSize.Set"
+     parameter="HugeLSL" />
+    <on_check
+     function="FontSize.Check"
+     parameter="HugeLSL" />
+  </menu_item_check>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_marketplace_view.xml b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
index 4b3bb8ee1c0280aef36f2e54ea80428411fc32b5..84395da903fb66e5d6f5a3afb30619a59b138dd0 100644
--- a/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_marketplace_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  name="menu_marketplace_sort"
  left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_media_ctrl.xml b/indra/newview/skins/default/xui/en/menu_media_ctrl.xml
index 960da4bd7a22894f79da0e9c4aa704298db2447e..f9864637a0012cbc31f4ca939fdb3b73d3621de1 100644
--- a/indra/newview/skins/default/xui/en/menu_media_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/menu_media_ctrl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  name="media ctrl context menu">
   <menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml
index 2715c916d42023bac768fbdf59d826c9744a558f..7d16f19e9a5f0ead32c75fa4fc29e87995617014 100644
--- a/indra/newview/skins/default/xui/en/menu_mini_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_model_import_gear_default.xml b/indra/newview/skins/default/xui/en/menu_model_import_gear_default.xml
index 2650903f88c687c9aaf29a92a02ae5063c28af4e..5bdcbc567a03506977ee9b741924b523eb0504ef 100644
--- a/indra/newview/skins/default/xui/en/menu_model_import_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_model_import_gear_default.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_mute_particle.xml b/indra/newview/skins/default/xui/en/menu_mute_particle.xml
index a4261bf39e6ea5f411d477fa195132e765ccdcfd..fe5233c3a3c9d4f072bb789eac2033bba9d2c5da 100644
--- a/indra/newview/skins/default/xui/en/menu_mute_particle.xml
+++ b/indra/newview/skins/default/xui/en/menu_mute_particle.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- *NOTE: See also menu_attachment_other.xml -->
 <context_menu
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_navbar.xml b/indra/newview/skins/default/xui/en/menu_navbar.xml
index b71b866c4b55d295f5c03e9f8790bcb79688788c..e15bb2b5ba8838337e6bd24aa7e6008ef724bc4b 100644
--- a/indra/newview/skins/default/xui/en/menu_navbar.xml
+++ b/indra/newview/skins/default/xui/en/menu_navbar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="201"
  layout="topleft"
@@ -39,7 +39,7 @@
          parameter="landmark" />
     </menu_item_call>
     <menu_item_separator
-     name="Separator" />
+     name="Separator1" />
     <menu_item_call
      label="Cut"
      name="Cut">
diff --git a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
index ff89e20ea52da223c46dea1d82fe77a45aff3dcb..c201b49229829c911a60adfc83f5643371389c97 100644
--- a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu bottom="100" color="MenuDefaultBgColor" drop_shadow="true" height="101" left="100"
      mouse_opaque="false" name="NearBy Chat Menu" opaque="true" width="128" visible="false">
 	<menu_item_call bottom_delta="-18" height="18" label="Show Nearby People..." left="0" mouse_opaque="true"
diff --git a/indra/newview/skins/default/xui/en/menu_notification_well_button.xml b/indra/newview/skins/default/xui/en/menu_notification_well_button.xml
index 263ac40f4eb7d2aa771d7f4695e3d99491ce965d..0f5ba811717f1eccb7fc7c9e940057347bfc9342 100644
--- a/indra/newview/skins/default/xui/en/menu_notification_well_button.xml
+++ b/indra/newview/skins/default/xui/en/menu_notification_well_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Notification Well Button Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 5507c9f3a1aba8e8080bb383b4ef09cb7e2c2321..cbd38b1db87a53b45c75e0ed157a4c66e314fd08 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
     layout="topleft"
     name="Object Pie">
diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml
index 5137aea72ac4825746608ab8c3f0fb8811e04f36..f3e520700be240961ad4d0f4e25503aa697bbafd 100644
--- a/indra/newview/skins/default/xui/en/menu_object_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index e216962d12a4fead02a8316dec8c6c7ca15b1161..8f36c7a00a0b1952e3a8af053a081ec6077d85c8 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  visible="false"
  name="Gear Outfit">
     <menu_item_call
-     label="Wear - Replace Current Outfit"
+     label="Replace current outfit"
      layout="topleft"
      name="wear">
         <on_click
@@ -17,7 +17,7 @@
          parameter="wear" />
     </menu_item_call>
     <menu_item_call
-     label="Wear - Add to Current Outfit"
+     label="Add outfit items"
      layout="topleft"
      name="wear_add">
         <on_click
@@ -25,9 +25,11 @@
         <on_enable
          function="Gear.OnEnable"
          parameter="wear_add" />
+        <on_visible
+         function="Gear.OnVisible"/>
     </menu_item_call>
     <menu_item_call
-     label="Take Off - Remove from Current Outfit"
+     label="Take off outfit items"
      layout="topleft"
      name="take_off">
         <on_click
@@ -39,19 +41,88 @@
          function="Gear.OnVisible"
          parameter="take_off" />
     </menu_item_call>
+    <menu_item_separator name="wear_separator" />
     <menu_item_call
      label="Image..."
      layout="topleft"
      name="thumbnail">
+       <on_click
+        function="Gear.Thumbnail" />
+    </menu_item_call>
+    <menu_item_call
+     label="Rename outfit"
+     layout="topleft"
+     name="rename">
+        <on_click
+         function="Gear.Rename" />
+        <on_enable
+         function="Gear.OnEnable"
+         parameter="rename" />
+        <on_visible
+         function="Gear.OnVisible"
+         parameter="rename" />
+    </menu_item_call>
+    <menu_item_call
+     label="Save to this outfit"
+     layout="topleft"
+     name="save">
+        <on_click
+         function="Gear.Save" />
+        <on_visible
+         function="Gear.OnVisible"/>
+    </menu_item_call>
+    <menu_item_separator>
+        <on_visible
+        function="Gear.OnVisible"
+        parameter="delete" />
+    </menu_item_separator>
+    <menu_item_call
+     label="Delete outfit"
+     layout="topleft"
+     name="delete_outfit">
+        <on_click
+         function="Gear.Delete" />
+        <on_enable
+         function="Gear.OnEnable"
+         parameter="delete" />
+        <on_visible
+         function="Gear.OnVisible"
+         parameter="delete" />
+    </menu_item_call>
+    <menu_item_separator>
+        <on_visible
+         function="Gear.OnVisible"/>
+    </menu_item_separator>
+    <menu_item_check
+     label="Sort folders always by name"
+     layout="topleft"
+     name="sort_folders_by_name">
+        <on_click
+         function="Gear.SortByName" />
+        <on_check
+         function="CheckControl"
+         parameter="OutfitGallerySortByName" />
+    </menu_item_check>
+        <menu_item_call
+     label="Expand all folders"
+     layout="topleft"
+     name="expand">
+        <on_click
+         function="Gear.Expand" />
+    </menu_item_call>
+    <menu_item_call
+     label="Collapse all folders"
+     layout="topleft"
+     name="collapse">
         <on_click
-         function="Gear.Thumbnail" />
+         function="Gear.Collapse" />
     </menu_item_call>
-  <menu_item_separator name="sepatator1" />
+  <menu_item_separator/>
             <!-- copied (with minor modifications) from menu_inventory_add.xml -->
             <!--  *TODO: generate dynamically? -->
             <menu
              height="175"
-             label="New Clothes"
+             label="New clothes"
              layout="topleft"
              left_delta="0"
              mouse_opaque="false"
@@ -165,7 +236,7 @@
             </menu>
             <menu
              height="85"
-             label="New Body Parts"
+             label="New body parts"
              layout="topleft"
              left_delta="0"
              mouse_opaque="false"
@@ -206,57 +277,4 @@
                 </menu_item_call>
             </menu>
             <!-- copied from menu_inventory_add.xml -->
-
-    <menu_item_separator name="sepatator2" />
-    <menu_item_call
-     label="Expand all folders"
-     layout="topleft"
-     name="expand">
-        <on_click
-         function="Gear.Expand" />
-    </menu_item_call>
-    <menu_item_call
-     label="Collapse all folders"
-     layout="topleft"
-     name="collapse">
-        <on_click
-         function="Gear.Collapse" />
-    </menu_item_call>
-    <menu_item_call
-     label="Rename Outfit"
-     layout="topleft"
-     name="rename">
-        <on_click
-         function="Gear.Rename" />
-        <on_enable
-         function="Gear.OnEnable"
-         parameter="rename" />
-        <on_visible
-         function="Gear.OnVisible"
-         parameter="rename" />
-    </menu_item_call>
-    <menu_item_call
-     label="Delete Outfit"
-     layout="topleft"
-     name="delete_outfit">
-        <on_click
-         function="Gear.Delete" />
-        <on_enable
-         function="Gear.OnEnable"
-         parameter="delete" />
-        <on_visible
-         function="Gear.OnVisible"
-         parameter="delete" />
-    </menu_item_call>
-    <menu_item_separator name="sepatator3" />
-    <menu_item_check
-     label="Sort Folders Always by Name"
-     layout="topleft"
-     name="sort_folders_by_name">
-        <on_click
-         function="Gear.SortByName" />
-        <on_check
-         function="CheckControl"
-         parameter="OutfitGallerySortByName" />
-    </menu_item_check>
 </toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index 8c8bb29baf1061876b6ed7b8d8e259e9c9e6b393..c6805edd63e98d9db55c356d33261c2f86dd0389 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Outfit">
     <menu_item_call
-     label="Wear - Replace Current Outfit"
+     label="Replace current outfit"
      layout="topleft"
      name="wear_replace">
         <on_click
@@ -16,7 +16,7 @@
          parameter="wear_replace" />
     </menu_item_call>
     <menu_item_call
-     label="Wear - Add to Current Outfit"
+     label="Add outfit items"
      layout="topleft"
      name="wear_add">
         <on_click
@@ -29,7 +29,7 @@
          parameter="wear_add" />
     </menu_item_call>
     <menu_item_call
-     label="Take Off - Remove from Current Outfit"
+     label="Take off outfit items"
      layout="topleft"
      name="take_off">
         <on_click
@@ -41,19 +41,26 @@
          function="Outfit.OnVisible"
          parameter="take_off" />
     </menu_item_call>
+    <menu_item_separator />
     <menu_item_call
-     label="Edit Outfit"
-     layout="topleft"
-     name="edit">
+        label="Image..."
+        layout="topleft"
+        name="thumbnail">
+        <on_click
+        function="Outfit.Thumbnail" />
+    </menu_item_call>
+    <menu_item_call
+        label="Edit outfit"
+        layout="topleft"
+        name="edit">
         <on_click
          function="Outfit.Edit" />
         <on_visible
          function="Outfit.OnVisible"
          parameter="edit" />
     </menu_item_call>
-    <menu_item_separator />
     <menu_item_call
-     label="Rename Outfit"
+     label="Rename outfit"
      layout="topleft"
      name="rename">
         <on_click
@@ -63,7 +70,19 @@
          parameter="rename" />
     </menu_item_call>
     <menu_item_call
-     label="Delete Outfit"
+     label="Save to this outfit"
+     layout="topleft"
+     name="save">
+        <on_click
+         function="Outfit.Save" />
+    </menu_item_call>
+    <menu_item_separator>
+        <on_visible
+        function="Outfit.OnVisible"
+        parameter="delete" />
+    </menu_item_separator>
+    <menu_item_call
+     label="Delete outfit"
      layout="topleft"
      name="delete">
         <on_click
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index 2c32d9d303e07861a3d05cc976eee8d57e920ca5..caf566859e5b1906853bbaaafc6cd15825bc4682 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Participant List Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml
index b9750284cdf29e61b30b00ada3d99bdc4c788bb4..7591e6e02fcabce0eed160ce516d5419bca085b4 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="participant_manu_view">
diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml
index 5e16707340d8111738e7fdee10f134e8dffddb23..ddf7572e56e635b8d1a7677193fa5909014f2ebb 100644
--- a/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_blocked_gear"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml
index 0c7155667ed13ae52fe642e9cc457b8e860ee2e7..27e2431ce65294d6616f930bcf3dfa5307707e0e 100644
--- a/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_blocked_plus.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_blocked_plus"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml
index 2efb70ee37b7966d991e5d6e3ae602d8f5fd94c3..d9808401df5878d97b25e5d49afc97d5751c9609 100644
--- a/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_blocked_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_blocked_view"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
index b5a4b87acd1bda66124856aaaf4f2d70fa8a3a6a..2b71bd123f5ed8410ffb06f1f76ad59596ef03c5 100644
--- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
      name="menu_group_plus"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups.xml b/indra/newview/skins/default/xui/en/menu_people_groups.xml
index 1e0364b84eb658635cb4ff8aae7558c1a82c3b7d..434a11d4956cecbfc2f1a8e19002ecb906138bad 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu name="menu_group_plus"
  left="0" bottom="0" visible="false"
  mouse_opaque="false" opaque="true" color="MenuDefaultBgColor">
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml
index 73f79f1e70d69fd8811a22afb941ff84b82d338f..e0c199bc27e52c2194417f1a2a2767bd43f52997 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_group_plus"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 425de6cab8d1c86de0d56badafdc29688036401a..7bd2c845a63bf751e106c6127df89648f4efaa5b 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Nearby People Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
index 5f973088fdda3ad89a31eee676b2945d4786fbb5..63185b537cd266e644ce960dd85fab5046c31946 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Multi-Selected People Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml
index 0f7c6a2aa53db54a4e6f0126ea222bf74774a26a..d654c95553e06442aac8cdae8b13d627a094fb00 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  name="menu_group_plus"
  left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml
index 1dbc90dd2be49550ea43950a61f88b9d08cbc923..dd351d520568c11b6879abbabe474719e8a8d748 100644
--- a/indra/newview/skins/default/xui/en/menu_people_recent_view.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_recent_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu 
      name="menu_group_plus"
      left="0" bottom="0" visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_picks.xml b/indra/newview/skins/default/xui/en/menu_picks.xml
index a408e6136c11fdced40ae309e5271e21c5a186a2..9701e784674d866cef48a2cabbd46fc17c52bb89 100644
--- a/indra/newview/skins/default/xui/en/menu_picks.xml
+++ b/indra/newview/skins/default/xui/en/menu_picks.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Picks">
diff --git a/indra/newview/skins/default/xui/en/menu_picks_plus.xml b/indra/newview/skins/default/xui/en/menu_picks_plus.xml
index f3b207e36c750c7fa41a635a40c2e08330e26043..b35df52ae75107ffe602ae18c543a283da0e3685 100644
--- a/indra/newview/skins/default/xui/en/menu_picks_plus.xml
+++ b/indra/newview/skins/default/xui/en/menu_picks_plus.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="201"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_place.xml b/indra/newview/skins/default/xui/en/menu_place.xml
index 288811d2f6b020f3e1ee8aa5bf5d10748ad2b918..34943d807ef55998d161bdd448c5750ebc60dd8b 100644
--- a/indra/newview/skins/default/xui/en/menu_place.xml
+++ b/indra/newview/skins/default/xui/en/menu_place.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="201"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_place_add_button.xml b/indra/newview/skins/default/xui/en/menu_place_add_button.xml
index ad49f7c3a8581926a6f1327dd34b8b1eae876c98..9a6f9c49569fb3713f5ff5e8b016c625ebb18634 100644
--- a/indra/newview/skins/default/xui/en/menu_place_add_button.xml
+++ b/indra/newview/skins/default/xui/en/menu_place_add_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  left="0"
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
index e9ada52a8f6aa1484f48663391be24a3b93cfd14..81ad2c83404c98afb1e8732156e7d8f2ce56a841 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
index c89b498ddf8f934aabe304c72a7e7fc9b5c21371..a89a36de86748b889a59d1be24b6a3ecd4cdfa08 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml b/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml
index 4193a72e2e340defa04e8f68f925a018f4121f5d..6abefc9bb6f07b78d4fdd355c6cab5e1439501f1 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_sorting.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  left="0"
diff --git a/indra/newview/skins/default/xui/en/menu_profile_other.xml b/indra/newview/skins/default/xui/en/menu_profile_other.xml
index 4db4d0922bff01021eaa54012c72ebbafc3b0f1a..101ae33778bae30be9cfef9e9baa87cd73d6a220 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_other.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Avatar Profile Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
index b0b7b554b07ec9a1dad96a85341e9de57400a071..5a9b8e41f79ca7013cd9557f0df1e114d21ab9a9 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="50"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_profile_self.xml b/indra/newview/skins/default/xui/en/menu_profile_self.xml
index d0bd4000f853d56eb0d5c266fab2d8155958416a..1b21c7ae617e6c911f196ace332794e303a46b6d 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_self.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  name="Avatar Profile Menu Self">
diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
index 6285bf741718b9fff81b2b63d7779ef2c4da2896..38f21e8caac1ca3a92adab6846585d1ee34187c0 100644
--- a/indra/newview/skins/default/xui/en/menu_save_outfit.xml
+++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  height="201"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_save_settings.xml b/indra/newview/skins/default/xui/en/menu_save_settings.xml
index 84dacaa8b8a535c8c0612b80abb79c5b319963c2..9f88c5001138b72352e0afa710dd4b4af78933bc 100644
--- a/indra/newview/skins/default/xui/en/menu_save_settings.xml
+++ b/indra/newview/skins/default/xui/en/menu_save_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
         height="602"
         layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml
index 49e52ebb8d6a28eb17b987a19c52c175c2fdfc17..7949618ad377b3b6955355dabf03779fe56debfb 100644
--- a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml
+++ b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_settings_add.xml b/indra/newview/skins/default/xui/en/menu_settings_add.xml
index a4782cfdc351a9409ff68267ddb0f37ae1f8be85..21d70b85156d56b2bb90545e7a94eef25a5417b6 100644
--- a/indra/newview/skins/default/xui/en/menu_settings_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_settings_add.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
         layout="topleft"
         mouse_opaque="false"
@@ -34,4 +34,4 @@
         <menu_item_call.on_enable
                 function="MyEnvironments.EnvironmentEnabled" />
     </menu_item_call>
-</toggleable_menu>
\ No newline at end of file
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_settings_gear.xml b/indra/newview/skins/default/xui/en/menu_settings_gear.xml
index ea8e328407d99cfbe02c1f8e09368be123afb426..57f4aa86559f8eb5af0e6a32c72fb728a813d06b 100644
--- a/indra/newview/skins/default/xui/en/menu_settings_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_settings_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
         layout="topleft"
         mouse_opaque="false"
@@ -49,7 +49,7 @@
     </menu_item_call>
     <menu_item_separator
             layout="topleft" 
-            name="Separator" />
+            name="Separator1" />
     <menu_item_call
             label="Copy"
             layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_slurl.xml b/indra/newview/skins/default/xui/en/menu_slurl.xml
index ee37d4994662dae9a1b0ebc2f8765f0c5eefc32e..f32f6885f08113812c22fb7ea9ebce6e31d83cad 100644
--- a/indra/newview/skins/default/xui/en/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/en/menu_slurl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="101"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
index c11d668698e2cbdacc895967b97da084d3739ca5..0f361d375abbe40988310f25e83012ca8b6fcf30 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  name="Teleport History Gear Context Menu"
  left="0"
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
index 153e5a70a90904454127bbdd343a874d6d55d8d9..e4e86bb911ac1375bc296e8cda8cf5faf05d7cd0 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  name="Teleport History Item Menu"
  layout="topleft"
@@ -49,4 +49,17 @@
          function="TeleportHistory.GearMenu.Enable"
          parameter="copy_slurl" />
     </menu_item_call>
+    <menu_item_separator
+     layout="topleft" />
+    <menu_item_call
+     label="Remove from history"
+     layout="topleft"
+     name="remove_from_history">
+        <on_click
+         function="TeleportHistory.GearMenu.Action"
+         parameter="remove" />
+        <on_enable
+         function="TeleportHistory.GearMenu.Enable"
+         parameter="remove" />
+    </menu_item_call>
 </toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml
index ecc1d8a954b5cda2fbf6620d1e53362c4f8805c6..96216be0171ab14b939b9076ab2b2ad3444c6336 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Teleport History Item Context Menu">
diff --git a/indra/newview/skins/default/xui/en/menu_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml
index 70b40dd89b4cd09aac8b503b2ae7d9bea7e4292e..48657a64356ec8791d72bbaf5344dcae9678446e 100644
--- a/indra/newview/skins/default/xui/en/menu_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  name="Text editor context menu">
   <menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_toolbars.xml b/indra/newview/skins/default/xui/en/menu_toolbars.xml
index fbe40a7244fcc47d89f297d99be9549b7283198c..aaf88a39ebb0d73d4e6063688d5704184a59adf0 100644
--- a/indra/newview/skins/default/xui/en/menu_toolbars.xml
+++ b/indra/newview/skins/default/xui/en/menu_toolbars.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
       layout="topleft"
       name="Toolbars Popup"
diff --git a/indra/newview/skins/default/xui/en/menu_topinfobar.xml b/indra/newview/skins/default/xui/en/menu_topinfobar.xml
index cbe249ed4d8a14b385bf33ee94a23af1a190c274..eaa8aaee511bc320197fa7d66a1f2724d93ae564 100644
--- a/indra/newview/skins/default/xui/en/menu_topinfobar.xml
+++ b/indra/newview/skins/default/xui/en/menu_topinfobar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  height="201"
  layout="topleft"
@@ -40,7 +40,7 @@
          parameter="landmark" />
     </menu_item_call>
     <menu_item_separator
-     name="Separator" />
+     name="Separator1" />
     <menu_item_call
      label="Copy"
      name="Copy">
diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml
index 5ca8be212306c345e2bb55a712db966810e0eca3..cbc6879f99a6993b8748f0fa7d19c0b6f5ea9275 100644
--- a/indra/newview/skins/default/xui/en/menu_url_agent.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">  
diff --git a/indra/newview/skins/default/xui/en/menu_url_email.xml b/indra/newview/skins/default/xui/en/menu_url_email.xml
index 6467fe5c90460271e24f910c621a8ba6676708bf..d513e51d819d6474d73022d4a666cce0411560eb 100644
--- a/indra/newview/skins/default/xui/en/menu_url_email.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_email.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Email Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_experience.xml b/indra/newview/skins/default/xui/en/menu_url_experience.xml
index f4d50e1603f435c0dd9d821e5311751562f0d685..bdc89156823805c7a6e860e03e5f9a5fbf7ad595 100644
--- a/indra/newview/skins/default/xui/en/menu_url_experience.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_experience.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_group.xml b/indra/newview/skins/default/xui/en/menu_url_group.xml
index 2cb125ce09465a3f074bb227cf7a7ffb5178347a..490576cd04da84a9e1706506c22ba1c76af4fc77 100644
--- a/indra/newview/skins/default/xui/en/menu_url_group.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_group.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_http.xml b/indra/newview/skins/default/xui/en/menu_url_http.xml
index 7a4b1e619bf93cc6aa9ffa0b8f8a80b2d990ae43..350e21b44fee47b850b2e1b95cd63309347c4afa 100644
--- a/indra/newview/skins/default/xui/en/menu_url_http.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_http.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_inventory.xml b/indra/newview/skins/default/xui/en/menu_url_inventory.xml
index cf9d1d58817e39a1b8633d3080cd8f1f2b5c2f9d..7d46aa7d3724de4a63cffed6f9a779ff4799b34e 100644
--- a/indra/newview/skins/default/xui/en/menu_url_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_map.xml b/indra/newview/skins/default/xui/en/menu_url_map.xml
index 2ca9e3b3fe63a1fa5dacd0c6dbf18194c9365a14..6627c907bd49d43f250dc4362ef9843de6066c26 100644
--- a/indra/newview/skins/default/xui/en/menu_url_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_map.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
index 41d40b389a6a65e4fbae62606569f702ffecff82..1874c01f8dac55c5923c6a4db3389b2ae722e69d 100644
--- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_parcel.xml b/indra/newview/skins/default/xui/en/menu_url_parcel.xml
index f477c310fb708b20b415632c223aa4a17ed30bcf..e0f1fcf9c38635777a893b761436e1aae8582a7b 100644
--- a/indra/newview/skins/default/xui/en/menu_url_parcel.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_parcel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_slapp.xml b/indra/newview/skins/default/xui/en/menu_url_slapp.xml
index 6d1060b6339b4ff4533c7a0575f08c1b0d58d97f..aab84a63ef96d6aa0a6fea77193b25cdadd0af46 100644
--- a/indra/newview/skins/default/xui/en/menu_url_slapp.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_slapp.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_slurl.xml b/indra/newview/skins/default/xui/en/menu_url_slurl.xml
index 98abc206a590129ca2f23841291911df351f348d..fb3cfbc11688ef0ad8b71384ee9b6f8d63ccf2bb 100644
--- a/indra/newview/skins/default/xui/en/menu_url_slurl.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_slurl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_url_teleport.xml b/indra/newview/skins/default/xui/en/menu_url_teleport.xml
index 289e32bcf418abb7d6f1686ac9bdfb52424f8985..3c4ec4ae4a5851d4af749282fd13a23d3f527bb0 100644
--- a/indra/newview/skins/default/xui/en/menu_url_teleport.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_teleport.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Url Popup">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 38763cd9a8e9110a7ba61fe0782249716b22ff5b..53f703e56de6e2d550c6e223e7c18a66aae9d35d 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_bar
  bg_visible="false"
  follows="left|top|right"
@@ -64,6 +64,14 @@
          function="Floater.ToggleOrBringToFront"
          parameter="camera" />
       </menu_item_call>
+      <menu_item_call
+       label="Notifications..."
+       name="Notifications"
+       shortcut="alt|shift|N">
+        <menu_item_call.on_click
+         function="Floater.ToggleOrBringToFront"
+         parameter="notification_well_window" />
+      </menu_item_call>
 
       <menu_item_separator/>
       <menu_item_check
@@ -487,7 +495,7 @@
      name="Help with avatars">
         <menu_item_call.on_click
             function="Advanced.ShowURL"
-            parameter="https://community.secondlife.com/search/?type=cms_records3&amp;tags=avatar&amp;nodes=30&amp;search_and_or=or"/>
+            parameter="https://community.secondlife.com/knowledgebase/english/controlling-your-avatars-appearance-r216/"/>
       </menu_item_call>
     </menu>
     <menu
@@ -2716,6 +2724,12 @@ function="World.EnvPreset"
                 <menu_item_call.on_click
                  function="Advanced.ForceErrorLlerror" />
             </menu_item_call>
+            <menu_item_call
+             label="Force LLError, Message And Crash"
+             name="Force LLError And Crash">
+                <menu_item_call.on_click
+                 function="Advanced.ForceErrorLlerrorMsg" />
+            </menu_item_call>
             <menu_item_call
              label="Force Bad Memory Access"
              name="Force Bad Memory Access">
@@ -2746,6 +2760,14 @@ function="World.EnvPreset"
                 <menu_item_call.on_click
                  function="Advanced.ForceErrorSoftwareException" />
             </menu_item_call>
+            <menu_item_call
+             label="Force OS Exception"
+             name="Force OS Exception">
+                <menu_item_call.on_click
+                 function="Advanced.ForceErrorOSException" />
+                <menu_item_call.on_visible
+                 function="Advanced.EnableErrorOSException" />
+            </menu_item_call>            
             <menu_item_call
              label="Force a Crash in a Coroutine"
              name="Force a Crash in a Coroutine">
@@ -3529,6 +3551,21 @@ function="World.EnvPreset"
             <menu_item_call.on_click
              function="Advanced.WebContentTest"
              parameter="http://duckduckgo.com"/>
+          </menu_item_call>
+            <menu_item_call
+             label="Inventory Thumbnails Helper"
+             name="Inventory Thumbnails Helper"
+				shortcut="control|alt|shift|X">
+                <menu_item_call.on_click
+                 function="Floater.Show"
+                 parameter="inventory_thumbnails_helper" />
+            </menu_item_call>
+            <menu_item_call
+           label="FB Connect Test"
+           name="FB Connect Test">
+            <menu_item_call.on_click
+             function="Advanced.WebContentTest"
+             parameter="https://cryptic-ridge-1632.herokuapp.com/"/>
           </menu_item_call>
           <menu_item_call
            label="Dump Fonts"
@@ -3618,6 +3655,14 @@ function="World.EnvPreset"
                 <menu_item_check.on_click
                  function="Advanced.ToggleDebugUnicode" />
             </menu_item_check>
+            <menu_item_check
+             label="Debug Camera Controls"
+             name="Debug Camera Controls">
+                <menu_item_check.on_check
+                 function="Advanced.CheckDebugCamera" />
+                <menu_item_check.on_click
+                 function="Advanced.ToggleDebugCamera" />
+            </menu_item_check>
             <menu_item_check
              label="Debug Name Tooltips"
              name="Debug Name Tooltips">
diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
index 20c81c983ba0517fa8773252a9e0e819afd854a4..ee77ef23f08b48ae7cf584346deba53e6e2eb9f4 100644
--- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  name="Outfit Wearable Context Menu">
     <menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
index 57b20dfda9167ef7a00ccb71e77ab96ea1c508ab..eacc5ab365371d9b3463f3369c5390c116f33815 100644
--- a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu
  layout="topleft"
  visible="false"
diff --git a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml
index b8e2b448843f9b10998b7f355980b109e59e1d61..321e8a083181549922c4f30df599d933f12b19fa 100644
--- a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu
  layout="topleft"
  name="Wearing">
diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml
index a9d99dad272bb7c512a36cd6c2a3c83db801f10b..238c7d380bf22ad1569b8b332495d78caed31cc8 100644
--- a/indra/newview/skins/default/xui/en/mime_types.xml
+++ b/indra/newview/skins/default/xui/en/mime_types.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <mimetypes name="default">
 	<defaultlabel>
 		(Unknown)
diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml
index 7188b1e69937899213ce1bf737d156e017981b20..d0ecd0a11cfd6ed45596bac9ee856a680fb046d9 100644
--- a/indra/newview/skins/default/xui/en/mime_types_linux.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <mimetypes name="default">
 	<defaultlabel>
 		(Unknown)
diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml
index 7fa0a676dd88cee85c1fd919407a460cef390566..03ab163601d602abe26e8a020050c8fc34a01a28 100644
--- a/indra/newview/skins/default/xui/en/mime_types_mac.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <mimetypes name="default">
 	<defaultlabel>
 		(Unknown)
diff --git a/indra/newview/skins/default/xui/en/notification_visibility.xml b/indra/newview/skins/default/xui/en/notification_visibility.xml
index db292100d7b19e89a595945c95d0279e96cb9283..68a52a82ce29449183048cffd679706d7ddb639d 100644
--- a/indra/newview/skins/default/xui/en/notification_visibility.xml
+++ b/indra/newview/skins/default/xui/en/notification_visibility.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <notification_visibility>
   <hide tag="custom_skin"/>
 	<show/> 
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d642ea162ca3299984caecadc1ac0a324d87d51e..3e1b1c4a67840b0a946a8834d2e8987910063dee 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" ?><notifications>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<notifications>
     <global name="skipnexttime">
 
 		Don&apos;t show me this again
@@ -6472,14 +6473,6 @@ Your inventory is experiencing issues. Please, contact support.
   <tag>fail</tag>
   </notification>
 
-  <notification
-   icon="notifytip.tga"
-   name="InventoryLimitReachedAIS"
-   type="notifytip">
-Your inventory is experiencing issues. Please, contact support.
-  <tag>fail</tag>
-  </notification>
-
   <notification
    icon="alertmodal.tga"
    name="ConfirmClearBrowserCache"
@@ -9254,7 +9247,7 @@ You locally updated a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME]
    icon="alertmodal.tga"
    name="CannotUploadTexture"
    type="alertmodal">
-Unable to upload texture.
+Unable to upload texture: &apos;[NAME]&apos;
 [REASON]   
   <tag>fail</tag>  
   </notification>
@@ -12261,6 +12254,50 @@ Would you like to save them first?
        notext="No"
        yestext="Yes"/>
   </notification>
+
+  <notification
+   icon="alertmodal.tga"
+   name="ConfirmOverwriteOutfit"
+   type="alertmodal">
+      <unique/>
+This will replace the items in the
+selected outfit with the items you
+are wearing now.
+      <tag>confirm</tag>
+      <usetemplate
+       ignoretext="Confirm before overwriting outfit"
+       name="okcancelignore"
+       notext="Cancel"
+       yestext="Save"/>
+  </notification>
+    
+  <notification
+    icon="alertmodal.tga"
+    name="ClearInventoryThumbnailsWarning"
+    type="alertmodal">
+        You are about to remove thumbnail images from the inventory items in the list. This change cannot be undone.
+
+        Would you like to proceed?
+   <tag>confirm</tag>
+   <usetemplate
+       name="okcancelbuttons"
+       notext="No"
+       yestext="Yes"/>
+  </notification>
+
+  <notification
+    icon="alertmodal.tga"
+    name="WriteInventoryThumbnailsWarning"
+    type="alertmodal">
+        You are about to overwrite thumbnail images for some or all of the inventory items in the list. This change cannot be undone.
+
+        Would you like to proceed?
+   <tag>confirm</tag>
+   <usetemplate
+       name="okcancelbuttons"
+       notext="No"
+       yestext="Yes"/>
+  </notification>
     
   <notification
     icon="notifytip.tga"
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
index d74dca8b95cd804bc128720ae889d81caf3643e9..66c71425a2c2cca94e72e599039a815e1c45b237 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder-->
 <!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->
 <!-- Non of string values of controls below are visible to user. They are not need to be translated. -->
diff --git a/indra/newview/skins/default/xui/en/panel_active_object_row.xml b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
index 656171ff960cc5fd5c04e0ee2fc77e6f87716be7..e21a04698f3a5bf4e425871c816b140146862e49 100644
--- a/indra/newview/skins/default/xui/en/panel_active_object_row.xml
+++ b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   name="panel_activeim_row"
   layout="topleft"
@@ -59,4 +59,4 @@
     image_unselected="Toast_CloseBtn"
     image_selected="Toast_CloseBtn"
   />
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index 54f038c24ff817f827c13d1eeff4b3b5ae457a8c..ca6e94397db33d981dbc05de85e789f91576809f 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="24"
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_tag.xml b/indra/newview/skins/default/xui/en/panel_avatar_tag.xml
index b779b08a63c487e6c637a42d39f8c21a9279ebd4..a0b0459b0e956d7dd7875224437c0eab54062d0e 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_tag.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_tag.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="avatar_tag_notification"
  top="10"
diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
index c324e24a869b2dfda917a3bc6282676b1ea07b9e..6bb891db636b269703ddc278fc218961bb455c4c 100644
--- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml
index 752321b949ff349c3aa492cbd10efadc9fc40a20..5ac0bf54de93e82f92ac278089bb855c51995767 100644
--- a/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_blocked_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
@@ -68,4 +68,4 @@
      top="6"
      use_ellipses="true"
      width="180" />
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
index 216a265164449775c8ba3868ee98763cb09ec2b5..e348306464e005f562370fc85dc761358070dcd2 100644
--- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
index 1c0b205c4f6668f4406e42c5f9bf9e964e55f72f..f86d7cf8d5b3232fc3f5f9e025422ab009a2e8e5 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  mouse_opaque="true"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_camera_preset_item.xml b/indra/newview/skins/default/xui/en/panel_camera_preset_item.xml
index 9417ab4ac2d0de1b36cf36e69b6550bad7dbd1cb..381af3607e942b9c8a375525e0b0fb1c1105eadb 100644
--- a/indra/newview/skins/default/xui/en/panel_camera_preset_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_camera_preset_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml
index 5c5c718bdf9c684fd6e21e6f9c9aab8f07e89f43..4f489113768025c74006ba27d459019a8cb8e582 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_header.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 	 background_visible="true"
      bevel_style="in"
diff --git a/indra/newview/skins/default/xui/en/panel_chat_separator.xml b/indra/newview/skins/default/xui/en/panel_chat_separator.xml
index 357dbc07ccf2f87680850864037495fd839cff49..dffd73c2aa00d06d6b9fa59b1c2f7e11aaa184c5 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_separator.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_separator.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  bg_alpha_color="black"
diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
index fc321fdd2355026ce7d936e8605af3a762ed3460..540649793083cfeab1835e9b581c8e51da745344 100644
--- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="false"
  chrome="true"
diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml
index 04a0bc800d8882ff2870aea6d18f1b024d4317a7..afd3f9410b59fb2874b61b9d2427c64dfcfc779a 100644
--- a/indra/newview/skins/default/xui/en/panel_classified_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
index d1175a9fe18926a444a102af31cbaa8440efead3..8bd6bc066c2f364fcd8e85d12d17374a1228e41f 100644
--- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="top|left|right"
diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
index cc0541e65c03bdffc517b8cd8d8891097ff0390f..68d4296743bdd1814a5fa83a248e892c524d4f8a 100644
--- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index aa8e3d07a6e3044c8a7dd3567b7df0b0b6afce12..9544042e9402a6217050f28fe3b0778a6a1c9cc7 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  bg_alpha_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
index 4372cf69bf208029e88c52361ea6e21d6c48cce5..7902588598418a8f834cfc26838e0203e5d3e438 100644
--- a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|top|right"
  height="24"
diff --git a/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml
index 78d4c174d2cf7f01140c0cf82c97e9af34bba991..0766e8504f884e239d4bae543c3d01e58e32caa4 100644
--- a/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_conversation_log_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
@@ -104,4 +104,4 @@
      height="14"
      width="14"
      tab_stop="false"/>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
index de2ff0afc934af7d23f5465f43bc5d704b810bf1..d12da0ca62d7255949148286220d50cc2bf2a7f6 100644
--- a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
index 4b05ab27e4690c4ed6240e4eb8332e67f2fc204e..766b6298244c48123b6008ccc443f3d18efb26d2 100644
--- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
index 813aa5d7a93dfa69ad9a2a07d865007b37404c1b..30fee7361f85f953e1ffd33c40701061340994fc 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
index f173a2f3cb03c82df93678c8ca841c93d08c4b4f..f1b265334047d1c1b30b1be6048e89a5a39c8606 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index 8c0c543d716fe1c2e4164e8475746a040b4066d2..6ae21e1273675361de2a8b32ac4f0a7e43073223 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
index 6bb5d2fa9bec58d4202664fb1598d5be45c0c2f5..25f7d8a5724ea1dac56145db785d95fa640a5279 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index 0f8c37c691931f992c909d025e95b6377ec01d36..62ee69b43c8bc37e0e7f6997f2f95e6a7e2e951d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index dd749a92596747d72091904363ec3683c72f4afb..d2ba71f905a4a12e1e8638ac0e87a445c55f10f4 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_physics.xml b/indra/newview/skins/default/xui/en/panel_edit_physics.xml
index 0092ceb0ddcf8fc7b421e99456b1d5a3767a6d71..837fb83b64aa81d3c75cf44b0a94a3e36c9074f8 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_physics.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_physics.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml
index d295f5fe4a7b496e57b5ce9f5bf02c6d3369bfdf..c1d743c3daa048b20a591f7dcb2ffd48d0bc5af0 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
@@ -11,8 +11,8 @@
      <string name="meters">Meters</string>
      <string name="feet">Feet</string>
      <string name="height">Height:</string>
-     <string name="heigth_label_color" translate="false">White_50</string>
-     <string name="heigth_value_label_color" translate="false">White</string>
+     <string name="height_label_color" translate="false">White_50</string>
+     <string name="height_value_label_color" translate="false">White</string>
      <text
          follows="top|left|right"
          font="SansSerifSmallBold"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index 5424b805e18ad4542d0ef7903d43c18dcb38bfeb..059103e2331988f213494fb81a968bb3d2df7e58 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index 859e7454a4c9154a3a7e0106122bd1fba9447585..199b1437194a93918071713b2a45216187851455 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
index b61f65a3d16a62fde197aea0c9a9284a2886ce85..f3a5791ef8974b9c142fd442637ef167d0434c0b 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index 76d66cc5dcf0c618ff16aaf37d08ef3fc9468612..adb7632e0a321a23095371f72cd53d5974b14557 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index 5f978174b3a2c0befa7c19ef71b458c22fedf2a4..1658e5707b5ea9064ebbb7e84f0a52f3011cc8f9 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
index 8fa85dce5f2d4dcb72d17965873c5eac2685f4b2..b4f09e262fd16cec68d8f197b6d2557557581576 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
     background_visible="true"
   follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index 16f28377fb6319a429a16a1412f1687456b490ba..9ca67ed562a7ef6e67aafe13a5e41788cf4c8209 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index 059485cfb4eed75a941944633cb952dfd78910a6..4a340fe340b03a36036073e6af18bbae66ad97e8 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
      background_visible="true"
 	 follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_universal.xml b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
index 11cabdfe6ee342cd292a31ea8ed523ea1cbadbd8..a71f6c6c2e2abad8a9622da9242881f67db8b691 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_universal.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
     background_visible="true"
   follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 85d73ece48ab41ad1442b065c669e7462696a767..347efa50da6943b220324ec3516e61f0e57acce1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  bevel_style="in"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_info.xml b/indra/newview/skins/default/xui/en/panel_experience_info.xml
index 5b6dab3ac6d1e47a7e5851ba7b0cda082811dcc4..b5150216fe550f5bb470e47081094c995b3c7574 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   background_visible="true"
   follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml b/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml
index c357f9e7d501ae2cee6fd2f043dc2ced4c4b38e6..9377f14fc061de1e76975fa51849031751d4bc67 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_list_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   layout="topleft"
   left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_list_item.xml b/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
index 58c18b8bb15d9d76694a80c543b86c05b80b4893..97dfccb31a5990e75ffdacc07a6a49088c83c01a 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <panel
   name="panel_experience_list_item"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_log.xml b/indra/newview/skins/default/xui/en/panel_experience_log.xml
index bf7295b1875e0b8044663e7eccaa99be4e4ce5d4..7d2bf83be3c4b07892ed1e08b045a009f6d72d09 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_log.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_log.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <panel
   name="panel_experience_log"
diff --git a/indra/newview/skins/default/xui/en/panel_experience_search.xml b/indra/newview/skins/default/xui/en/panel_experience_search.xml
index c2fe9fb0851c48b2355e1f2c0dfe835f29bc3d8f..bb07476ad0208d11ddd20ee00e15c52441ebcec2 100644
--- a/indra/newview/skins/default/xui/en/panel_experience_search.xml
+++ b/indra/newview/skins/default/xui/en/panel_experience_search.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   name="panel_experience_search"
   layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_experiences.xml b/indra/newview/skins/default/xui/en/panel_experiences.xml
index 9d306154425950fa1930a413010b2d32b0a1dcda..2dd4ba57fee9e70159448708d9d195a25e14aa5c 100644
--- a/indra/newview/skins/default/xui/en/panel_experiences.xml
+++ b/indra/newview/skins/default/xui/en/panel_experiences.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <panel
   name="panel_experiences"
diff --git a/indra/newview/skins/default/xui/en/panel_favorites.xml b/indra/newview/skins/default/xui/en/panel_favorites.xml
index 1e8ea34ad289ae93bacaa3f765b044b0b28110e1..67148ad24e9011ff6bc16eef4b56ac5805ffa5ef 100644
--- a/indra/newview/skins/default/xui/en/panel_favorites.xml
+++ b/indra/newview/skins/default/xui/en/panel_favorites.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    name="Favorites"
    layout="topleft" 
diff --git a/indra/newview/skins/default/xui/en/panel_generic_tip.xml b/indra/newview/skins/default/xui/en/panel_generic_tip.xml
index eea92895f58191928cde40d1fabf5d1ea460968e..47379b69b8b74aa0625d14108e4914094a0194dd 100644
--- a/indra/newview/skins/default/xui/en/panel_generic_tip.xml
+++ b/indra/newview/skins/default/xui/en/panel_generic_tip.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="40"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml
index 509dcf354ea311abb0a3179f97e12149ed48cef6..43ed304ee83c6da545e7b2033a8695631bd4dde5 100644
--- a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="330"
  label="Ban Residents"
diff --git a/indra/newview/skins/default/xui/en/panel_group_creation_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_creation_sidetray.xml
index 466fb91dd07e788a772c775507ea9bdc18fd2622..a305001ca3d55cdeec068edcbb28478116a3ea54 100644
--- a/indra/newview/skins/default/xui/en/panel_group_creation_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_creation_sidetray.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 background_visible="true"
  follows="all"
@@ -229,7 +229,7 @@ background_visible="true"
     <layout_panel
       background_visible="false"
       background_opaque="true"
-      name="create_actions"
+      name="create_actions1"
       follows="all"
       layout="topleft"
       auto_resize="false"
@@ -258,7 +258,7 @@ background_visible="true"
         <layout_panel
           follows="bottom|left|right"
           layout="bottomleft"
-          name="layout_crt"
+          name="layout_crt1"
           auto_resize="false"
           height="23"
           width="245">
@@ -287,7 +287,7 @@ background_visible="true"
         <layout_panel
           follows="bottom|left|right"
           layout="bottomleft"
-          name="layout_crt"
+          name="layout_crt2"
           auto_resize="true"
           height="23"
           width="91">
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 5eafb5cdf1542b20c0660a77bde220b1a6309def..3043a30dcb6cb728b783c328aa6f117691dbef26 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  label="General"
  height="420"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 05de249d226f9f404ecd9c6ce31759b41a06c143..cc50c6202f0df41ed2d837eb8ed8bc1c0268b475 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 background_visible="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml
index ebb460deb0cb452e1e0567f3fa83b3c4c93785ac..fa45bc8aebd44dfebc35364a739944aad1a26732 100644
--- a/indra/newview/skins/default/xui/en/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  label="Invite a Member"
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index d4da55e32e9881af3d78011cbdfe0eb3ee4fb742..ad9ce8f37e8a6a6c131e41e6d0d7d4ee5476783c 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="false"
  height="500"
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
index e758a8ce302bc3c0d1b47aced6ce1aa87b99b332..9e31ff604a7a3e32c68a189ca9f9c69710547afe 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="24"
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
index b72af7221e4890c9f9767e68b07431c01e58dc5d..6a1466867d81c625b88c19cff29bbea3e9fed8c4 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="group_list_item"
  top="0"
@@ -71,7 +71,6 @@
      name="visibility_show_btn"
      tool_tip="Show group on my profile"
      top_delta="0"
-     right_delta="0"
      height="20"
      width="20"
      follows="right"
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index a5aca5c72b75a8da673423ba578f385a4fc22ee8..0131f1d97d40b10f7cf0002f9a6cd554111f5bf4 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="530"
  label="Notices"
diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml
index 60e5a03d5183ca711b53db37c0af727d5e5a6fb2..be34a2e02fb93456f1390b6f0634fba32680f350 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notify.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  height="90"
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index f15f79e9aaffbd42686d2fd774766e338891f4a8..02e135a2c71484922340920f5f885eb3a4a22a93 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="750"
  label="Members &amp; Roles"
diff --git a/indra/newview/skins/default/xui/en/panel_hide_beacon.xml b/indra/newview/skins/default/xui/en/panel_hide_beacon.xml
index 7cab285f77dc37e1cba722b0ad44a6652fe3b6bc..0516db96e0aecc60e07f5caa91452d5f73b573f2 100644
--- a/indra/newview/skins/default/xui/en/panel_hide_beacon.xml
+++ b/indra/newview/skins/default/xui/en/panel_hide_beacon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="25"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_hint.xml b/indra/newview/skins/default/xui/en/panel_hint.xml
index f7434f03307c18543d2d640b88dc1f13099119d8..744213676149dbdeb42f2542c44a14aad50c598b 100644
--- a/indra/newview/skins/default/xui/en/panel_hint.xml
+++ b/indra/newview/skins/default/xui/en/panel_hint.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  width="205"
  height="34">
diff --git a/indra/newview/skins/default/xui/en/panel_hint_image.xml b/indra/newview/skins/default/xui/en/panel_hint_image.xml
index df05d50dc520c32fdbb983d44179587614a7adcc..d712245df841408065747faf46df7e51d5e27269 100644
--- a/indra/newview/skins/default/xui/en/panel_hint_image.xml
+++ b/indra/newview/skins/default/xui/en/panel_hint_image.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  width="305"
  height="40"
diff --git a/indra/newview/skins/default/xui/en/panel_hud.xml b/indra/newview/skins/default/xui/en/panel_hud.xml
index 3e9614a9b7d0af5c4366400823d37aec9ca7e785..15b3c3b44471f872992f6a21bd0585695ee9645d 100644
--- a/indra/newview/skins/default/xui/en/panel_hud.xml
+++ b/indra/newview/skins/default/xui/en/panel_hud.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|right|top|bottom"
  height="728"
diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
index 433a3181cd3d9dc8b817009abf386f428115ad58..18dcc86649114fbdb5011646e67432fa68b3980a 100644
--- a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inbox_inventory_panel
     accepts_drag_and_drop="false"
     name="inventory_inbox"
diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml
index 2e5d65090227d73ef8be4f64582cfcf9f39f1d26..7c0a928d694f2bb31b37baaf71795669f27f7c15 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  height="152"
@@ -7,7 +7,7 @@
  left="0"
  name="im_panel"
  top="0"
- width="305">
+ width="310">
     <string
      name="message_max_lines_count">
         6
@@ -24,7 +24,7 @@
      mouse_opaque="false"
      name="im_header"
      top="5"
-     width="295">
+     width="300">
         <avatar_icon
          follows="right"
          height="18"
@@ -65,11 +65,11 @@
          name="user_name"
          parse_urls="false"
          text_color="White"
-         top="8"
+         top="7"
          translate="false"
          use_ellipses="true"
-         value="TestString PleaseIgnore"
-         width="205" />
+         value="TestString PleaseIgnore (testing plsignore)"
+         width="172" />
 	 <!-- TIME STAMP -->
         <text
         font="SansSerifSmall"
@@ -79,9 +79,9 @@
 	 halign="right"
          right="-5"
          name="time_box"
-         top="8"
-         value="23:30"
-         width="50" />
+         top="7"
+         value="2022/09/23 23:30"
+         width="96" />
     </panel>
     <text
         font="SansSerifSmall"
@@ -94,7 +94,7 @@
      top="33"
      use_ellipses="true"
      value=""
-     width="285"
+     width="290"
      word_wrap="true"
      max_length="350" />
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml b/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml
index ed04e121932941b003d1326fbf4de52f5680a2e4..fcff9e3bececf7ba356b62484353aefae062852b 100644
--- a/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml
+++ b/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="true"
    bg_alpha_color="InventoryBackgroundColor"
diff --git a/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml b/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml
index 574872a8701a7bc3bda6f3c2cc9a4fff1093cd15..73cb9b080f554779116b04293f7e889905f02ab8 100644
--- a/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_inventory_gallery_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="false"
    background_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_inventory_item.xml b/indra/newview/skins/default/xui/en/panel_inventory_item.xml
index 2e38835810c73ba2ad79a5ec9373a348c48ae750..b9bbf7689d6adc4c41e8010692dc18519c63d6fd 100644
--- a/indra/newview/skins/default/xui/en/panel_inventory_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_inventory_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index e82305ef1722ab0461cc60e473e87158696369a1..2fbf32201913f7e67c6a299b8081c32f3604a267 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index 10b925ec93e9fbf67ae4115c4e0e76d19a7df0f0..ee96e7ede864e0bc0f2c270816069827b34d69e5 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    name="Landmarks"
    layout="topleft" 
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 3aba80909aa7a46da981a986f4b552b1b94e297c..2088a443fd8125822777136d6d23f08adacb0c07 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   follows="all"
   height="768"
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 d36c83d292e342c4da499cc773bce9557e49588c..d002e24782c88390382ca38b99015082e635a3d3 100644
--- a/indra/newview/skins/default/xui/en/panel_login_first.xml
+++ b/indra/newview/skins/default/xui/en/panel_login_first.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   follows="all"
   height="768"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 4aadc0591c4933704647dca41a974d994b58f7bd..190ff4ef283e967cd0c507f3d403b5e4f5e31099 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="all"
  height="423"
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
index 2b17473a84d2cee0de4fd09f7378906ab1b5cc1a..61cd6a83d4954ddf2dd39b99bcd1ee622eca02ab 100644
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   label="Marketplace"
   name="Marketplace Panel"
@@ -114,4 +114,4 @@
           Drop folders here to create new listings
       </text>
   </panel>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml
index 8d5fa265e264770251765ab702cdbcdf92c3cf73..a8a306bea96c23cb2b54b722ce1fc4ffdcd66c3e 100644
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_panel
     label="ALL"
     name="All Items"
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml
index 44f507ad84f6bab3b6eee3a68226b416cbaa67ff..0c665fb07ef068d98eb17ed83d53db3886061015 100644
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_listed.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_panel
     label="LISTED"
     name="Active Items"
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml
index 871e8773c46bb289f9a58d82398129fd9b130ddd..0be405c5b871a6f2350984592303d459d0b8f2c0 100644
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unassociated.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_panel
     label="UNASSOCIATED"
     name="Unassociated Items"
diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml
index 98bef04aa793b8b61eeb58939d5da5a255274cc0..58122db7f4f4837aa48f51c5f778ff1885b345fa 100644
--- a/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml
+++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings_unlisted.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_panel
     label="UNLISTED"
     name="Inactive Items"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 4c566dc60a13ce971b51c2f840c132512b713ddc..5e7830f27c6a2628801895a1d12a7012523953c3 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel 
  border="true" 
  enabled="true" 
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
index d3a58fed5842e2977ca7f992d0378f8faa450d76..082aad2816ad5906d6947de279a71e763679560b 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel 
  border="true" 
  enabled="true" 
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
index 1f580831f92f28ac5563cb3990442ec936ab0366..82e9c25b1c5868d235e554eff251936cbc0787f5 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel 
  border="true" 
  enabled="true" 
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 b44c19810b76c5252a150b73fe466f84c6a071bf..85cf4419a398dc153d19bf95d830e4643ac54fbc 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_opaque="true"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 1e43db08f782a36ee2c1c9611f78b487885cd2c6..1a89d07cbbc9f3c291ebc01eef6e62adb4c21afd 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|bottom|right"
  height="25"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
index d1cb64f7ad3570270b5ad03808f1bd28f477ac7c..f305a161f2ec819f115920627d15d2af6b9739c6 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bg_opaque_image="Volume_Background" 
  bg_alpha_image="Volume_Background" 
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index c1a68fb9af46a12237ccfc73b96335bdf622271c..56d871406464ab072c9b7d306693f3be7919a132 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   background_opaque="false"
   border_visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
index efaaefd0e4ea1ded51503e416f1dcf20d827791c..80db209b5980b98c1ccbae629a3422f723583bd7 100644
--- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
@@ -68,7 +68,7 @@
                 </panel>
               </panel>
             </layout_panel>
-            <layout_panel width="18" height="48" follows="right|top|bottom" name="layout_panel_right">
+            <layout_panel width="18" height="48" follows="right|top|bottom" name="layout_panel_right1">
               <panel top="0" left="0" width="17"  height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel">
                 <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true"
                   tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" />
diff --git a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml
index c3dc588ba2bd0eef928b1466abc04cc39fece045..f1e990e68f76dab7fa5a7f79abd034fd234725a7 100644
--- a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml
+++ b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="100"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
index 6dc1bf9e9ed44b748d97b23356ec5c78db7c7c58..27d0f7d383277fae0e23612bc4e9d848f1108622 100644
--- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
+++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="true"
    height="215"
diff --git a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
index dadbd9c9abc807f0a50674cb63254938494fcc22..9819d2008b81842502883a83e195981178355d0e 100644
--- a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="false"
  height="40"
@@ -32,4 +32,4 @@
      width="189"
      word_wrap="true"
      max_length="350" />
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index d625f89f3b87c30ecf2df1f38a56555f34e3c03c..a0e33443047c239f44f5c38471cacfc245f1026f 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Side tray Outfit Edit panel -->
 <panel
         background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
index e951d25391315395ad62792b79c4f4bfa91c6eb4..6bd491f7a3a36140b31bd9ad575a4982c80619dc 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="true"
    bg_alpha_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
index e3f0f1128b6a57c70ea42d28985f6cc91cf1c1ae..65bbc3a4b47c03d88b4e79efd24add37768fd200 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="false"
    background_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfit_snapshot_inventory.xml
index 441cf97e870208479566276655644efe4d3f2b06..14b41aced347ffe4c37007b51a5a101673082c52 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_snapshot_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_snapshot_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index 7b898dbd7f9fef7fd5ffcad7a8133a504952c405..d58c2ec2e9963012374329376433f57943637f30 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel name="Outfits"
  bg_alpha_color="DkGray"
  bg_opaque_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
index 2c7a51f0e78f6921e56462d6f0558a1e0e9df614..f600b2bd310d4f2e05b6ec67b8c0b29f162aca66 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu
  bottom="806"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index a0096adc0167614308428e3d7d2f77106410cd9e..9281a21fbf04fe5ddc882819883a4dfb5a28ece2 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
    background_visible="true"
    bg_alpha_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
index ceaff0ea69112e4fde8ccdcd4780cacb8ae58c72..a486c03ac7a67e66f4c252333c4aea55aea20e7b 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  bg_alpha_color="DkGray"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 50035fd0e3ebdd516399f601abf47c0618936044..c31e6c94ea949f12c850cddfbb85a36e053626e7 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Side tray panel -->
 <panel
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml b/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml
index 904ce1cc523b8c9befc2fe6af7fd18ec1eeddea4..9f930d1557d6f4763d6f8030cdfeb688206b51ab 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_autoadjustments.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_complexity.xml b/indra/newview/skins/default/xui/en/panel_performance_complexity.xml
index cd3f610a923643091ca26c8d608f43ff70e9e75f..fc38c056ad80fd71b50d32d0e15fd860fa7795d2 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_complexity.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_complexity.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_huds.xml b/indra/newview/skins/default/xui/en/panel_performance_huds.xml
index 2fddcb3b9edea80fb7fa4eb7fd8ef4024f163edb..f0054800c7dcf355932d419aff6d67d5c7761ba3 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_huds.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_huds.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
index cb795e59a91db91f7c3870daf8816e5fc2be3acf..ca961747c4c0f218e201554d132a76126f3f5ecb 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_nearby.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
index 83db17b679c5c145adb97222908eb591af64c87e..7ba7b1d5796bc7e60331265f85ce37dcfc51c7a6 100644
--- a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
+++ b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="left|top"
@@ -156,7 +156,7 @@
    layout="topleft"
    left_pad="10"
    top_delta="1"
-   name="quality_lbl"
+   name="best_quality_lbl"
    width="70">
     Best quality
   </text>
@@ -325,7 +325,7 @@
     bevel_style="in"
     height="0"
     layout="topleft"
-    name="border3"
+    name="border31"
     top_pad="7"
     left="20"
     width="540"/>
@@ -416,7 +416,7 @@
    layout="topleft"
    top_delta="3"
    left_pad="10"
-   name="photo_desc"
+   name="photo_dist_det_desc"
    width="180">
       (Enter value between 0.0 and 4.0)
   </text>
diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
index 4c0cdd321e16f2879d8d90c2ad3919b288813e77..db3e42fa967a1bd7a76d4e068194e72668770b05 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  bevel_style="none"
  follows="top|left|right"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index bdde2cab203acc100180aff3a48be8d2eb7852af..8f5292c5319ac5378e57dd506dbd40e8f5715ddf 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 58be4d4c5ee4906356607728840952704d06d79a..a3a2f7c47eeb239027c3170d4ccffc92b2cc88ff 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 background_visible="true"
  default_tab_group="1"
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_message.xml b/indra/newview/skins/default/xui/en/panel_postcard_message.xml
index 63c7259878687f5727a6bceb0d416430a7c1d155..f9d288ea59ed31ed4cbb2efb73525f3b4dcd4b30 100644
--- a/indra/newview/skins/default/xui/en/panel_postcard_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_message.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="319"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
index 525149d7eee40a3168a2c290655c57f2abe70e7b..f121338c2a9a06d8cf244ccf49c4a98187624e8f 100644
--- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index d0518aa2450ebf9ae95267ca7193a090cf0897f6..8051ffa8ec89b648c56c6833828acf2b866fd7f7 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="all"
@@ -166,7 +166,7 @@
    left_pad="0"
    max_val="2.0"
    min_val="1.0"
-   name="ui_scale_slider"
+   name="hud_scale_slider"
    top_pad="-14"
    width="250" />
     <check_box
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
index 93c97ded251b9ce9a33719a8047d324d30e979ba..fb528bf98ff33c8fc0b1df3772933b9d21b3633a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  height="408"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index f4181b21520267e1074875a640b2cdcc9f96974d..88716c7f9614bfe6713377669aae98b1e6213784 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
     border="true"
     height="408"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
index 9e825fe516866445ba706e1535a2790b77d9684f..5d93846ce573575840ff593faaad9fd7f59edf23 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_controls.xml b/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
index 9dab7d34e6cf4a4054a9e73cc75620c831892885..f8801f9c89ce07d6b5bd87ae3869a729d096564b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_controls.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 335d7caa5112e2c5ebac828358061649ce744ce0..101c506309ff85c24391fa91cd72f362e578be1b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 8a9d3b755e9dc69c0edfe36725487d0e337bf615..adc0337eddba176f82e01b9963c55646990cb294 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
index 864223e616c3e0bffa0def77f92471be9c9da7df..0412466b4f01d228390212821097d2e0016ec793 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index ef08fdf7c46c37cdf7c9d09b74d7793570dd4e33..5041fb487846d47111505e4cdf82c3e522647cc7 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
     border="true"
     follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 5e41ba4ae19fdba7477ee22102aacc04953c141b..28c2d2af6e00e9dcded39ec00beb549230fd5d28 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 3dba5d060b2dfb62518fdc1a383044be3a245a4d..569f2318ae71732443b7445e74d4f6a772a1c758 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="all"
@@ -107,7 +107,7 @@
 		is_toggle="true"
 		layout="topleft"
 		left_pad="5"
-		name="mute_audio"
+		name="mute_audio_ui"
 		tab_stop="false"
 		width="16" />
     <slider
@@ -141,7 +141,7 @@
      is_toggle="true"
      layout="topleft"
      left_pad="5"
-     name="mute_audio"
+     name="mute_audio_ambient"
      tab_stop="false"
      width="16" />
     <slider
@@ -175,7 +175,7 @@
      is_toggle="true"
      layout="topleft"
      left_pad="5"
-     name="mute_audio"
+     name="mute_audio_sounds"
      tab_stop="false"
      width="16">
       <button.commit_callback
@@ -212,7 +212,7 @@
      is_toggle="true"
      layout="topleft"
 	   left_pad="5"
-     name="mute_audio"
+     name="mute_audio_music"
      tab_stop="false"
 	 width="16" />
 	<check_box
@@ -258,7 +258,7 @@
 		is_toggle="true"
 		layout="topleft"
 		left_pad="5"
-		name="mute_audio"
+		name="mute_audio_media"
 		tab_stop="false"
 		width="16" />
 	<check_box
@@ -306,7 +306,7 @@
 		is_toggle="true"
 		layout="topleft"
 		left_pad="5"
-		name="mute_audio"
+		name="mute_audio_voice"
 		tab_stop="false"
 		width="16" />
 	<check_box
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
index 08ff3d4d533d719730a24b131ce6d81c20202cc0..4b13fcfa2471c20f7aa9944952156d5a0d4d30cf 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_uploads.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_presets_camera_pulldown.xml b/indra/newview/skins/default/xui/en/panel_presets_camera_pulldown.xml
index 25d9c47449fac1ba042d2b7c32f3b8029a7b0fa8..d5f1bc81ee580ab7371013bdef681ecf8dff2b80 100644
--- a/indra/newview/skins/default/xui/en/panel_presets_camera_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_presets_camera_pulldown.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_opaque="true"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
index b3d165c4fd2e824c03486f7489fd425aaffa7a89..5ea92e3973461137e3dd5bc2153247055645105b 100644
--- a/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_presets_pulldown.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_opaque="true"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 068e4420bc02296149b93cad7a02f54a121fe272..b507da8b48e446af87565b8a981f3d390d3a0b4a 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 	follows="left|right|top|bottom"
 	name="MediaControls"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_classified.xml b/indra/newview/skins/default/xui/en/panel_profile_classified.xml
index c9e8b242d47533d2a2fad8a0aadcbf811c16a99a..3d61eecf8676161cbe1e3faf46226c06a8dbcc05 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_classified.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_profile_classified"
  top="0"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_classifieds.xml b/indra/newview/skins/default/xui/en/panel_profile_classifieds.xml
index 2b2f60e0c20ab4c2fada2f6e9435ccbc4e108153..c74053d58e883ea664d6ad9ae0aa0ab38c08536a 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_classifieds.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_classifieds.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_profile_classifieds"
  label="Classified"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
index f899f83ad48650198c4c25f2664edf694986e6b8..f596b876aba7321808c92bd0b100ce2bfbe520c5 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_profile_firstlife"
  label="Profile"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_notes.xml b/indra/newview/skins/default/xui/en/panel_profile_notes.xml
index 16e7365042b05baba529f2cb8c6920049418534a..77d8689518b1f7d60561c634c731038779b9f40b 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_notes.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_notes"
  label="Notes &amp; Privacy"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_pick.xml b/indra/newview/skins/default/xui/en/panel_profile_pick.xml
index 3e91640093855a3785f3b6ec6477a90d7e3f5d48..024120931f6076250c9c181fb5569404bd5700b0 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_pick.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_pick_info"
  top="0"
@@ -138,11 +138,11 @@
     <layout_panel
      follows="all"
      layout="bottomleft"
-     name="save_changes_lp"
+     name="util_buttons_lp"
      auto_resize="false"
      height="25">
       <layout_stack
-       name="save_changes_stack"
+       name="util_buttons_stack"
        left="1"
        right="-1"
        top="0"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_picks.xml b/indra/newview/skins/default/xui/en/panel_profile_picks.xml
index 44d5c448c00446d9512c890ac57f860324ada2f4..db0d46b75873c50361101e594575a472bd42c5be 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_picks.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_picks"
  label="Picks"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index fea7d1bcb8052657f48ed7ba29c3f19b9d55f5c6..dd9a146265adf3d102c2e42e960d3a7878b1fa11 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_profile"
  label="Profile"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_web.xml b/indra/newview/skins/default/xui/en/panel_profile_web.xml
index e0cb4d3d06f9ec6130db17b96a39d0fc9c3fbc47..591effd4f40be5f950c5556d0e8a176a7a633bc5 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_web.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_web.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  name="panel_profile_web"
  label="Web"
diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml
index e77d097d5f6db9cbec8669a19ff03b7c44a178d0..242b96b695f8f86b570d32d94725bc4361b9fe21 100644
--- a/indra/newview/skins/default/xui/en/panel_progress.xml
+++ b/indra/newview/skins/default/xui/en/panel_progress.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|bottom|right|top"
  height="768"
diff --git a/indra/newview/skins/default/xui/en/panel_region_access.xml b/indra/newview/skins/default/xui/en/panel_region_access.xml
index 4be073195b7c4dda226a2fead884374e700e9d93..3028357b870e541c43391160d0ee0caec627b537 100644
--- a/indra/newview/skins/default/xui/en/panel_region_access.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_access.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
index 112f12500df2f95a4409a42e7bc4453db7bf8bd8..bc764ecc5519287c560ffd06e1271ed3d28daf97 100644
--- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index fea5f1b19f87f8ede892d403a1152bfe81fb2154..04a510d4e826c8c4dd9504bc5360313ccb960072 100644
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml
index 0b3639f7792cf4d0b355d3f947b48684b80e3210..6d235929480aaa02d119800063367acacc94dfe2 100644
--- a/indra/newview/skins/default/xui/en/panel_region_environment.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <panel
         border="true"
diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml
index 33e99a46aecf4a62d341ead9666955bb21e76679..0910a3ef90d7dd785d78c27e3048059ca263fb99 100644
--- a/indra/newview/skins/default/xui/en/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_region_experiences.xml b/indra/newview/skins/default/xui/en/panel_region_experiences.xml
index bced46f7dc037644db713648308118e72dd47cfb..199dca4853d740f6ab06a71c29b2485edd89ab2f 100644
--- a/indra/newview/skins/default/xui/en/panel_region_experiences.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_experiences.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   border="true"
   follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml
index d1cfb8ead6ee0876ba8487d32174670f0ee3e7dd..74d21c436ec49207f98591251ca21b2af2f40242 100644
--- a/indra/newview/skins/default/xui/en/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_general.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
index 2aaea04a6d306f6058c580f2d44d52c7a07e2272..ad41691323407af21d11942a182007f6b9a1ef3a 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index 545c01935ba7f4bdfbc69f06dfff8261009a5f66..f8761d2b24d6aa006435ec627cd22111c915221f 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   bevel_style="none"
   border_style="line"
@@ -44,10 +44,12 @@
       layout="topleft"
       left="0"
       mouse_opaque="false"
+      font="SansSerif"
       name="File"
       width="138">
       <menu_item_call
         label="Save"
+        shortcut="control|S"
         layout="topleft"
         name="Save" />
       <menu_item_separator
@@ -66,16 +68,6 @@
         label="Save to file..."
         layout="topleft"
         name="SaveToFile" />
-          <menu_item_separator
-           layout="topleft" />
-          <menu_item_call
-           label="Colors..."
-           layout="topleft"
-           name="Colors">
-            <menu_item_call.on_click
-             function="Floater.Toggle"
-             parameter="script_colors"/>
-          </menu_item_call>
     </menu>
     <menu
       top="0"
@@ -83,6 +75,7 @@
       label="Edit"
       layout="topleft"
       mouse_opaque="false"
+      font="SansSerif"
       name="Edit"
       width="139">
       <menu_item_call
@@ -117,6 +110,7 @@
         name="separator2" />
       <menu_item_call
         label="Select All"
+        shortcut="control|A"
         layout="topleft"
         name="Select All" />
       <menu_item_call
@@ -142,6 +136,7 @@
       label="Help"
       layout="topleft"
       mouse_opaque="false"
+      font="SansSerif"
       name="Help"
       width="112">
       <menu_item_call
@@ -150,12 +145,34 @@
         name="Keyword Help..." />
     </menu>
   </menu_bar>
+  <menu_button
+   follows="right|top"
+   height="24"
+   image_overlay="Icon_Font_Size"
+   layout="topleft"
+   top_delta="-2"
+   right="453"
+   name="font_btn"
+   width="32" />
+  <button
+   follows="right|top"
+   height="24"
+   image_overlay="Icon_Color_Palette"
+   layout="topleft"
+   top_delta="0"
+   right="487"
+   name="color_btn"
+   width="32">
+    <button.commit_callback
+      function="Floater.Toggle"
+      parameter="script_colors"/>
+  </button>
     <script_editor
     left="0"
     type="string"
     length="1"
     follows="left|top|right|bottom"
-    font="Monospace"
+
      height="376"
     ignore_tab="false"
     layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_script_experience.xml b/indra/newview/skins/default/xui/en/panel_script_experience.xml
index 9ae5b201a6735293fdc573db138724dc5a5ce135..1a1ee16628aaafc4895ed596f3d94d6acaa4f104 100644
--- a/indra/newview/skins/default/xui/en/panel_script_experience.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_experience.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   name="script_experience"
   title="EXPERIENCE"
diff --git a/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml b/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml
index 2c2803a503cd7bd20f2a306b0815f96ef248762a..3be3e23d4769cddd47203da1ef6214ffb9f71f2d 100644
--- a/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_limits_my_avatar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml
index 79bb781bc6ff77bb73c3afb5a8cb2bb6e958967f..18ebb2f13358a7c291feb0750a71db365682a911 100644
--- a/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  border="true"
  follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_script_question_toast.xml b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml
index b0436bb6dcd452f5df2ea05b48485ef4fd650869..1b1e31165afed5ba8cac8b350041f9416650de50 100644
--- a/indra/newview/skins/default/xui/en/panel_script_question_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_question_toast.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   background_opaque="false"
   border_visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index a8cd380f2045a1c488fd47728b2d7144fc73d29e..2035bc2caa43e7cfed721c9f80955e6a813b483f 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="157"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param_base.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param_base.xml
index 1351f75623e96293c4e3027cc7c972dfb010aa44..03c624627f191f3467a2dd2310441c0c96ca3771 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param_base.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param_base.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  layout="topleft"
  left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
index da82c95c8384fbddb98c8df85c734b9dbe98a3c5..59ee0c6ad5caf00fd3d8b1eb4ace1fb3f662c218 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
         border="true"
         follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
index 9bdfa94a335b29cfcfde95e45c3b28dc59aa9d79..7687f7cd96240dee6698d612f07dee78372c0b22 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
         border="true"
         follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_density.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_density.xml
index 9b3789697945a8f9799a75fa562f3bc531e282f1..60ab520cd535bdb159d4a43b011dd6ac30080d98 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_density.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_density.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
         border="true"
         follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
index 35adb262bbfd11c23616cf4365efe39417c9c45a..bd68434aab689f5ca20f85a45998e6c55be7a829 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
         border="true"
         follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index f19629df264c33e18db53dae7403d508df38fe2e..5e65b0e8a202cf0c1618f0d12f1a1fa38ab02edd 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
         border="true"
         follows="all"
@@ -65,7 +65,7 @@
                 Density Exponent:
             </text>
             <slider
-                    decimal_digits="1"
+                    decimal_digits="2"
                     follows="left|top"
                     height="16"
                     increment="0.01"
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
index 557b04d281fbbc4e89ce78b31a8998593621c63a..4cb1364ff3058d74b68d97703be3f6db22e2b5bb 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  bottom="0"
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index 912f81f915f9901a31158548071f7eca65acb4fc..cc3fb4abdb72fbc34407ce103fb5b3e2d820084f 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- the web-based Home panel of the side tray -->
 <panel
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
index 8cc27d9eef1b3a1ab77ed77dd7cb3a67da613e54..f8040b9a65c59f2f9720364f22ede0027ef6f056 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
@@ -144,4 +144,4 @@
       <button.commit_callback
        function="Inventory.Save" />
     </button>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
index 188c9f87078329a592101ba52d3b3f55b2b5ff23..52f9068264ebe0e3c6ca147b0c5a6bc7da9228fa 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
@@ -196,4 +196,4 @@
          name="saveas_item"
          value="save as" />
     </flyout_button>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
index 8fc5cd7e63b029d8561f87e256346922eb3ddb9e..3a7731d2356bd58e4e921c2b71870898ebcb0808 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="all"
  height="240"
@@ -87,4 +87,4 @@
    word_wrap="true">
     Fee is based on your subscription level. Higher levels are charged lower fees.
   </text>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
index 8e9255292173f715f7fedecb39d6bcb520686416..60e99c04c38e50c93c348415728d8467c8c7eaea 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
@@ -99,4 +99,4 @@
       <button.commit_callback
        function="Postcard.Send" />
     </button>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
index 2fdbee49f0389991f64fa5be59baf009550160b3..f0219da88ff49066cfba97a521a8155850c66941 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  height="380"
  layout="topleft"
@@ -165,4 +165,4 @@
       <button.commit_callback
        function="PostToProfile.Send" />
     </button>
-</panel>
\ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
index 3dbb7fb7fc2b3309a6ef7d2b48026803ea30483a..7598f7d7e5750b9892e6f71139313c9b5a7ca175 100644
--- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="false"
  bg_alpha_color="DkGray"
@@ -122,7 +123,7 @@
      layout="topleft"
      left_pad="5"
      name="wait_text"
-     top_delta="-1"
+     top_delta="2"
      width="110">
         Please wait
     </text>
@@ -132,7 +133,7 @@
      layout="topleft"
      left_delta="0"
      name="bar0"
-     top_delta="-2"
+     top_delta="-5"
      width="20" />
   <locate
      follows="right|top"
@@ -166,4 +167,26 @@
      name="bar4"
      top_delta="0"
      width="20" />
-</panel>
\ No newline at end of file
+    <text
+     type="string"
+     name="disabled_text"
+     text_color="EmphasisColor"
+     length="1"
+     follows="right|top"
+     height="18"
+     layout="topleft"
+     left_delta="-100"
+     top_delta="5"
+     width="110">
+        Disabled
+    </text>
+    <button
+       follows="right|top"
+       height="23"
+       layout="topleft"
+       left_delta="0"
+       name="unmute_btn"
+       label="Unmute"
+       top_delta="-6"
+       width="110" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
index 07642946f843d8fe19ed6ea16cda32901f1b515f..76b6713d4367b8667cd0c8c924d20edaf93112c1 100644
--- a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
+++ b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Width and height of this panel should be synchronized with "panel_modes" in the floater_moveview.xml-->
 <panel
  height="25"
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 b711ed0e1ce5dccb461871154bd5216e424593f5..4501e0df3a06a85e8ebabd6423aec99066332e92 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_opaque="true"
  background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
index 55c47c90a49c661e95f705a6af25f3e1e89cffc4..2154b9983d3bf220571d26e06a63e1b7376ad467 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel name="Teleport History" bottom="0" height="400" left="0" width="313"
      help_topic="panel_teleport_history"
      border="false" follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
index 5c728718ef19d5ce75be85d89bb45290565b37d4..6331458eb793e09d2d169cd91a60cdcbd5569e26 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="top|right|left"
  height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index a3348f28c7317adf250d1de172f3a67174bd7e11..5e724be7652781d79dbb04afb10b1e8c4ab09af7 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toolbar_view
  follows="all"
  layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index fe0199662383b321147c705a5aad6711a82cfcc2..e80f315259f8c6f95b37c84d157c4f1b56d070e4 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
          border="false"
          follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
index fc527f5f9d2182fb20b04d31e68445c8e6acf7f2..839bf71c402c371dc99b99a2249085e2137d1d15 100644
--- a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_visible="true"
  background_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml
index 93e79b73281bd902d787a3f77ec4ea6fc2d01c04..42cd510efda0c8a524a22decb83a6d0225bd6113 100644
--- a/indra/newview/skins/default/xui/en/panel_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/panel_voice_effect.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="all"
  height="26"
diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
index b4eb1ade9476c79fb2b551087810c1e454c0e3ae..75e76f599b948a147be27471a2964e08a36624a8 100644
--- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  background_opaque="true"
  background_visible="true"
@@ -74,7 +74,7 @@
         is_toggle="true"
         layout="topleft"
         left_pad="5"
-        name="mute_audio"
+        name="mute_audio_ui"
         tab_stop="false"
         width="16" />
     <slider
@@ -107,7 +107,7 @@
      is_toggle="true"
      layout="topleft"
      left_pad="5"
-     name="mute_audio"
+     name="mute_audio_ambient"
      tab_stop="false"
      width="16" />
     <slider
@@ -140,7 +140,7 @@
      is_toggle="true"
      layout="topleft"
      left_pad="5"
-     name="mute_audio"
+     name="mute_audio_sounds"
      tab_stop="false"
      width="16">
       <button.commit_callback
@@ -186,7 +186,7 @@
      is_toggle="true"
      layout="topleft"
      left_pad="5"
-     name="mute_audio"
+     name="mute_audio_music"
      tab_stop="false"
      width="16" />
     <check_box
@@ -199,7 +199,8 @@
         top_delta="2"
         width="350">
         <check_box.commit_callback
-            function="Vol.updateMediaAutoPlayCheckbox"/>
+            function="Vol.updateCheckbox"
+            parameter="MediaAutoPlay"/>
     </check_box>
     <slider
         control_name="AudioLevelMedia"
@@ -231,7 +232,7 @@
         is_toggle="true"
         layout="topleft"
         left_pad="5"
-        name="mute_audio"
+        name="mute_audio_media"
         tab_stop="false"
         width="16" />
     <check_box
@@ -246,7 +247,8 @@
         name="enable_media"
         width="110">
         <check_box.commit_callback
-            function="Vol.updateMediaAutoPlayCheckbox"/>
+            function="Vol.updateCheckbox"
+            parameter="MediaAutoPlay"/>
     </check_box>
     <slider
         control_name="AudioLevelVoice"
@@ -278,7 +280,7 @@
         is_toggle="true"
         layout="topleft"
         left_pad="5"
-        name="mute_audio"
+        name="mute_audio_voice"
         tab_stop="false"
         width="16" />
     <check_box
@@ -292,5 +294,6 @@
         top_delta="2"
         left_pad="5"
         name="enable_voice_check"
-        width="110"/>
+        width="110"
+        />
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_world_map.xml b/indra/newview/skins/default/xui/en/panel_world_map.xml
index 16860a6117378d2e16945c57071c7397a2e7210e..c436f69c598d0bec7a646f6bffefd62bb110b0d4 100644
--- a/indra/newview/skins/default/xui/en/panel_world_map.xml
+++ b/indra/newview/skins/default/xui/en/panel_world_map.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
  follows="left|top|right|bottom"
  height="300"
diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml
index bda08f34219e220f7cd2c3f5d5316e82cc051cd8..af371dea267c4243f2df7a4bf42f4bb287532a6a 100644
--- a/indra/newview/skins/default/xui/en/role_actions.xml
+++ b/indra/newview/skins/default/xui/en/role_actions.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <role_actions>
 	<action_set
 	     description="These Abilities include powers to add and remove group Members, and allow new Members to join without an invitation."
diff --git a/indra/newview/skins/default/xui/en/script_editor.xml b/indra/newview/skins/default/xui/en/script_editor.xml
index f1c6161711ca30e79a1b124d773ae22e43d8a218..68aa725606bdac86b6b8f1c98c59631952bd43dd 100644
--- a/indra/newview/skins/default/xui/en/script_editor.xml
+++ b/indra/newview/skins/default/xui/en/script_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <script_editor
  name="script_editor"
  parse_urls="false"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 1777a0db0523cf55f38c0d1d5d137987fdb21691..c898b0989edd57ae9cd0618f7d3306187edd1a3c 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 background_visible="true"
 default_tab_group="1"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 76d0ffcb8e04c86797e150ff0551f9f53256b9cc..de47e052912afdbcbc4238dfe53fc13fb2720b1f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 	  follows="all"
 	  height="570"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index ad521cb1af1bb5a1c0e7381edee47566b7f013c9..bdb4b545c159aba02541ea69d57cbe3a344353e1 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   follows="all"
   height="570"
@@ -288,7 +288,7 @@ TestString PleaseIgnore
         height="15"
         follows="left|top"
         layout="topleft"
-        name="perm_modify"
+        name="you_perm_modify"
         width="200">
         You can:
       </text>
@@ -401,7 +401,7 @@ TestString PleaseIgnore
         layout="topleft"
         left="5"
         right="-5"
-        name="cost_text_border"
+        name="cost_text_border1"
         top_pad="9"/>
         
       <check_box
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index faff6185ab48161c97cd1330dbdc6fb1a494eb11..1276f3bad3f82483dbde41281e5ba91feac5436f 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
 	 height="570"
 	 layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 3fbb5bc7e85dcd8b2cf9c28ed4e87c4f16ba0cdc..b1feb7368f07499d55204df29027cfb905fff1a0 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- This file contains strings that used to be hardcoded in the source.
      It is only for those strings which do not belong in a floater.
      For example, the strings used in avatar chat bubbles, and strings
@@ -53,7 +53,6 @@ Draw distance: [DRAW_DISTANCE]m
 Bandwidth: [NET_BANDWITH]kbit/s
 LOD factor: [LOD_FACTOR]
 Render quality: [RENDER_QUALITY]
-Advanced Lighting Model: [GPU_SHADERS]
 Texture memory: [TEXTURE_MEMORY]MB
 Disk cache: [DISK_CACHE_INFO]
 	</string>
@@ -3020,8 +3019,19 @@ Running in window.
 
 If you continue to receive this message, contact the [SUPPORT_SITE].
 	</string>
+    <string name="MBOutOfMemoryTitle">Out Of Memory</string>
+    <string name="MBOutOfMemoryErr">
+        [APP_NAME]'s request for memory failed. Application can't proceed and will be closed.
 
-	<!-- Avatar Shape Information -->
+If your computer's RAM is low, quit any heavy applications before runing Second Life, allocate a page file or reduce graphical settings like draw distance.
+    </string>
+    <string name="MBMissingFile">
+        [APP_NAME] couldn't access or find some of the files it needs and will be closed.
+
+Please reinstall viewer from  https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall.
+    </string>
+
+    <!-- Avatar Shape Information -->
 <string name="5 O'Clock Shadow">5 O'Clock Shadow</string>
 
 <string name="All White">All White</string>
@@ -3940,6 +3950,8 @@ Abuse Report</string>
 
   <string name="DefaultMimeType">none/none</string>
   <string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string>
+  <string name="texture_load_format_error">Incorrect image format.</string>
+  <string name="texture_load_empty_file">File is empty.</string>
   <string name="outfit_photo_load_dimensions_error">Max outfit photo size is [WIDTH]*[HEIGHT]. Please resize or use another image</string>
   <string name="outfit_photo_select_dimensions_error">Max outfit photo size is [WIDTH]*[HEIGHT]. Please select another texture</string>
   <string name="outfit_photo_verify_dimensions_error">Cannot verify photo dimensions. Please wait until photo size is displayed in picker</string>
diff --git a/indra/newview/skins/default/xui/en/teleport_strings.xml b/indra/newview/skins/default/xui/en/teleport_strings.xml
index 1456114b25a42ce1ea1239205ce3c738ee27f075..1b45cdb1914cc1c014dc25720e5e7f8f953cda3c 100644
--- a/indra/newview/skins/default/xui/en/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/en/teleport_strings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <teleport_messages>
 	<message_set name="errors">
 		<message name="invalid_tport">
diff --git a/indra/newview/skins/default/xui/en/widgets/accordion.xml b/indra/newview/skins/default/xui/en/widgets/accordion.xml
index 55dde492ca770cc627fab072b04c6b4e0b44140c..8c5f6ebfc2f8a1254cadcd94f476ee6048659b29 100644
--- a/indra/newview/skins/default/xui/en/widgets/accordion.xml
+++ b/indra/newview/skins/default/xui/en/widgets/accordion.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <accordion
  height="100"
  name="accordion"
diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
index 6f68c99021992b5c9f04dd47a0f7e23c115b460a..53d1e18a846443453144326e2aa64a00e6b229f1 100644
--- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <accordion_tab
     header_bg_color="DkGray2"
     header_collapse_img="Accordion_ArrowClosed_Off"
diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
index 7f8fac04d0e6c5d85201f47e1bd0e21fa0ad137c..260dc78008ba47d437a9a918c556e86d9045079e 100644
--- a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 
 <avatar_icon name="avatar_icon"
 						 default_icon_name="Generic_Person_Large"
diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
index 8a4ccb19f9deb576d45be15af72c4c6fc6fdd2b5..7dde1e6d1ce71a462714c748c37f639f57292ac3 100644
--- a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <avatar_list_item
  name_right_pad="5"
  height="0"
diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml
index 738d150f642b2ae46a3c2293047e63d4ae4d1c91..b1d92b1609c7b0ccb791ddf3199c4e388a36c6ed 100644
--- a/indra/newview/skins/default/xui/en/widgets/badge.xml
+++ b/indra/newview/skins/default/xui/en/widgets/badge.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Additional attributes:
    -->
 <badge name="badge"
diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
index 0016a8cf53cee8f8a66e056b02576de9345e829d..b99b097096a5c42a04c6737f5f336f2d6f36a190 100644
--- a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <bodyparts_list_item
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index 2b2c3faf917e8ad4acc59aa0c6dbfedbbe6892c8..090447a6a2f8b779e017b811b04cb68288235a85 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Additional attributes:
   image_pressed
 	image_pressed_selected
diff --git a/indra/newview/skins/default/xui/en/widgets/chat_editor.xml b/indra/newview/skins/default/xui/en/widgets/chat_editor.xml
index c550f634e54d2cf9a5071758fbebd31725a35c52..94cc18e4434018439a1c07e1789cb779e1ce43e7 100644
--- a/indra/newview/skins/default/xui/en/widgets/chat_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chat_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <chat_editor
   name="chat_editor"
   show_context_menu="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
index c4300c93502216bdb90a3dcc9f35a2319cf16200..97a83148eb23d01f4365f0b4c88f668ca4c4c549 100644
--- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <chat_history
   message_header="panel_chat_header.xml"
   message_separator="panel_chat_separator.xml"
@@ -22,4 +22,4 @@
     parse_urls="false"
     word_wrap="true"
     />
-</chat_history>
\ No newline at end of file
+</chat_history>
diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml
index 8947024e458e05959268cf36937df1729ac3e9bc..eef935dafc470a8be8940590a329ef03133548b7 100644
--- a/indra/newview/skins/default/xui/en/widgets/check_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <check_box font="SansSerifSmall"
            follows="left|top">
   <check_box.label_text name="checkbox label"
diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml
index 4bc295f747a8bf8a145802822249b98c5a19ae28..2700eed3f07cfabbdde6e0b745b1fc11ff70ff36 100644
--- a/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chiclet_offer.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <chiclet_offer
  height="23"
  name="offer_chiclet"
@@ -27,4 +27,4 @@
   name="new_message_icon"
   visible="false"
   width="14" />
-</chiclet_offer>
\ No newline at end of file
+</chiclet_offer>
diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml
index 5f51f4afd9da99b132145935b3aed183e6930cf9..e097ad3dcd125494a2cb452cde615da5bd5d18bf 100644
--- a/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <chiclet_panel
  name="chiclet_panel"
  chiclet_padding="3"
@@ -6,4 +6,4 @@
  scroll_button_hpad="0"
  scroll_ratio="10"
  min_width="180"
- />
\ No newline at end of file
+ />
diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml
index db6a9434dfa24b45b6f2bbb2858c6cf03971523a..09d6aa6162f38089ed85062f338c0a5637c10646 100644
--- a/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chiclet_script.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <chiclet_script
  height="23"
  name="script_chiclet"
@@ -27,4 +27,4 @@
   name="new_message_icon"
   visible="false"
   width="14" />
-</chiclet_script>
\ No newline at end of file
+</chiclet_script>
diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
index d83f44737ecca46add346afbc78fb7e80f94c3bb..bd449f655692a7f7d76e65c070fe3ac34568b3c7 100644
--- a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <clothing_list_item
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
index ab3de1eaab0441e16912499be6f56f89e4ce160b..7ae9158e655c39ff7f149087370bc2ddeb5d5286 100644
--- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
+++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <color_swatch alpha_background_image="color_swatch_alpha.tga"
               border_color="ColorSwatchBorderColor"
               name="colorswatch">
diff --git a/indra/newview/skins/default/xui/en/widgets/combo_box.xml b/indra/newview/skins/default/xui/en/widgets/combo_box.xml
index 65f9a143e9ea4acfd37285cecf973c7eb90ed082..daec17c2f964bbd1896530e570b9c9f3c87f507c 100644
--- a/indra/newview/skins/default/xui/en/widgets/combo_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/combo_box.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <combo_box font="SansSerifSmall"
            list_position="below"
            max_chars="20"
diff --git a/indra/newview/skins/default/xui/en/widgets/context_menu.xml b/indra/newview/skins/default/xui/en/widgets/context_menu.xml
index 459706c689c940d100852fe1c81fcada91b628a1..a712b41a2a9bc84334a888f165ba07a48a149df8 100644
--- a/indra/newview/skins/default/xui/en/widgets/context_menu.xml
+++ b/indra/newview/skins/default/xui/en/widgets/context_menu.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <context_menu visible="false"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
index b83d9122f72cfdfe253ec44ad7bec94d30c6b744..cf995e5833782616d32e89ee6a67d1c26e0f621c 100644
--- a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <conversation_view_participant
   folder_arrow_image="Folder_Arrow"
   item_height="24" 
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
index b8c39eec1db7f6826b21972f1e69982b651a632d..b876dd835169fd9cd396e971d63fd8403f194f06 100644
--- a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <conversation_view_session
   folder_arrow_image="Folder_Arrow"
   folder_indentation="8"
diff --git a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml
index 0534485ddd5386c3e8db56c0ae1b3588aaecdcd2..18839a94aef8e7a125851c50853b7e223f929e10 100644
--- a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <deletable_wearable_list_item
   follows="top|right|left"
   height="23"
diff --git a/indra/newview/skins/default/xui/en/widgets/density_ctrl.xml b/indra/newview/skins/default/xui/en/widgets/density_ctrl.xml
index eb665fd3cbf7301f2ec9dfd6528f61104ea5d013..6fd0c291cdd6452039c5c36ae94130182305cc39 100644
--- a/indra/newview/skins/default/xui/en/widgets/density_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/widgets/density_ctrl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <densityctrl
  border="true"
  follows="all"
diff --git a/indra/newview/skins/default/xui/en/widgets/drop_down.xml b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
index 602250ace698c790ac08c480464c827ccb9fc43e..75ed4856458a3d9424272e8f969b6a7908146406 100644
--- a/indra/newview/skins/default/xui/en/widgets/drop_down.xml
+++ b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <drop_down text_enabled_color="LabelTextColor"
            text_disabled_color="LabelDisabledColor"
            font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
index 8c805da04822b40dbb29ce4b91c8a7f424064734..71119d7c9e219a296d04407c2994b652da749bb5 100644
--- a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <dummy_clothing_list_item
  follows="top|right|left"
  height="23"
diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
index c6331ec87b234164e225df0b6f9d3ade5549cd1f..15c7a4064747e9b503535341b446a6993b52a8eb 100644
--- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
+++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <expandable_text
  max_height="300" >
  <textbox
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 9c80deeafc242e20ed8c496e27f2299406917505..604f62b099e7fc211c44c9d865390444e1a1cf2e 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <filter_editor
   name="filter_editor"
   clear_button_visible="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml
index e05ddf98158780b5ba47dcfb5cb9ee2a63f0dd69..c376e455a1675adce10c61f2129ad2c06fe517f8 100644
--- a/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml
+++ b/indra/newview/skins/default/xui/en/widgets/flat_list_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <flat_list_view
  allow_select="true"
  color="PanelFocusBackgroundColor"
@@ -13,4 +13,4 @@
      h_pad="10"
      value="No matches found"
      wrap="true" />
-</flat_list_view>
\ No newline at end of file
+</flat_list_view>
diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml
index 807b67d1125f8469fc031be0913e16a83dbf6755..11758556d6be406dd4fa89b5e5aa5eae07cef6d7 100644
--- a/indra/newview/skins/default/xui/en/widgets/floater.xml
+++ b/indra/newview/skins/default/xui/en/widgets/floater.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- See also settings.xml UIFloater* settings for configuration -->
 <floater
  name="floater"
diff --git a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
index 83df10e4179dc53511509e2fcc8ed88c51db91d9..e42bef4a45b0ab086864c35baa1d01327629b286 100644
--- a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <flyout_button list_position="below" height="23">
   <action_button scale_image="true"
                 image_selected="SegmentedBtn_Left_Selected"
@@ -9,4 +9,4 @@
                 image_disabled="ComboButton_Disabled"
                 pad_right="6"
                 tab_stop="false"/>
-</flyout_button>
\ No newline at end of file
+</flyout_button>
diff --git a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
index bbd53ccb121374170c7002144725d566a4bc8d90..b598bbccd8be46dd601660ed91141d5afbd0c258 100644
--- a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <folder_view_item
   folder_arrow_image="Folder_Arrow"
   folder_indentation="8"
diff --git a/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml b/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml
index 808683864d967ba282ed1305a43255275d9e2d1f..14cd3e159c289718bff4a8ec2398ade59983d698 100644
--- a/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml
+++ b/indra/newview/skins/default/xui/en/widgets/gesture_combo_list.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <gesture_combo_list
     follows="right|top">
     <gesture_combo_list.combo_button
diff --git a/indra/newview/skins/default/xui/en/widgets/group_icon.xml b/indra/newview/skins/default/xui/en/widgets/group_icon.xml
index 36ee6dd7ebcef7a463b3cee5466c6aa3dd2fbddb..73a0acd80d3433b0191929e70ced16a5fca5d1d8 100644
--- a/indra/newview/skins/default/xui/en/widgets/group_icon.xml
+++ b/indra/newview/skins/default/xui/en/widgets/group_icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <group_icon
  default_icon_name="Generic_Group"
  image_name="Generic_Group"
diff --git a/indra/newview/skins/default/xui/en/widgets/hint_popup.xml b/indra/newview/skins/default/xui/en/widgets/hint_popup.xml
index 92080df1548c933572029bbc52214f62e5cf44bb..2e548476b6f91849db78b73f52d1761275c5b867 100644
--- a/indra/newview/skins/default/xui/en/widgets/hint_popup.xml
+++ b/indra/newview/skins/default/xui/en/widgets/hint_popup.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <hint_popup
  name="hint"
  background_opaque="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/icon.xml b/indra/newview/skins/default/xui/en/widgets/icon.xml
index cf8edfcedb65d884c5f14b07f33d1eba27a7d9b2..a4ea15f88ab1cad309fcde1126e08e7bbe34b450 100644
--- a/indra/newview/skins/default/xui/en/widgets/icon.xml
+++ b/indra/newview/skins/default/xui/en/widgets/icon.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <icon color="1.0 1.0 1.0 1.0"
       tab_stop="false"
       mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
index 590a4730a9bc7a10141d09cff1a67f13c206af66..27ec6ded8102eafedd0ca408b9cb78d2c4dff66a 100644
--- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inbox_folder_view_folder
   folder_arrow_image="Folder_Arrow"
   folder_indentation="8"
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
index 7a7a6e9a091fe99861e8d8cd32a3873ccd65c482..09cbb1d3abc7fa9ece72796e82b3ee1459b51470 100644
--- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inbox_folder_view_item
   item_height="20" 
   item_top_pad="4"
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml
index 92f815d4bfe61ba1f3745562d8b8fad217aecddf..fadca90972e6d17587126323e78644cbd5b73274 100644
--- a/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_inventory_panel.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inbox_inventory_panel start_folder.type="inbox"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/inspector.xml b/indra/newview/skins/default/xui/en/widgets/inspector.xml
index 8c171c387f7badb381fcd8baa8aa49693fd9818f..3c8e7c79409219295da11ae85ad0ae394ad7a784 100644
--- a/indra/newview/skins/default/xui/en/widgets/inspector.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inspector.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inspector name="inspector"
            max_width="300"
            bg_opaque_color="DkGray_66"
diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml
index da9059c819f55aff71c098909fe73469c1e30312..ce36a39a214cadbe7b72e7c502811f25d386b5dc 100644
--- a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_list_item
   follows="top|right|left"
   height="20"
diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
index d5efd723c4c75ba4033d13fa43a88aabd843ef6e..15e28746db0cc434be6f27f5a1218457a377a4f6 100644
--- a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
   bg_opaque_color="InventoryBackgroundColor"
   background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/joystick_quat.xml b/indra/newview/skins/default/xui/en/widgets/joystick_quat.xml
index a190da3909959deb8f77587a2a3654637c85724e..bfde1dc752efa9b581f1110e985a3583c319a0b6 100644
--- a/indra/newview/skins/default/xui/en/widgets/joystick_quat.xml
+++ b/indra/newview/skins/default/xui/en/widgets/joystick_quat.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <joystick_rotate
    image_selected="Cam_Rotate_In"
    image_unselected="Cam_Rotate_Out"
diff --git a/indra/newview/skins/default/xui/en/widgets/joystick_rotate.xml b/indra/newview/skins/default/xui/en/widgets/joystick_rotate.xml
index cbf721b346c2b9625c10e3bffd7ca9e15b7d8054..55159d8ba7cb5257d5925bb24668ddf94136fdd8 100644
--- a/indra/newview/skins/default/xui/en/widgets/joystick_rotate.xml
+++ b/indra/newview/skins/default/xui/en/widgets/joystick_rotate.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <joystick_quat
    image_selected="Cam_Rotate_In"
    image_unselected="Cam_Rotate_Out"
diff --git a/indra/newview/skins/default/xui/en/widgets/layout_stack.xml b/indra/newview/skins/default/xui/en/widgets/layout_stack.xml
index 48bcb465331d4896031389c61279411737029ed8..375fab9403358d7fe75ebbe952f66ab4460ca026 100644
--- a/indra/newview/skins/default/xui/en/widgets/layout_stack.xml
+++ b/indra/newview/skins/default/xui/en/widgets/layout_stack.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Global settings for all widgets ("UI Controls") -->
 <!-- The params in this file aren't currently getting loaded in OSX -->
 <layout_stack name="stack"/> 
diff --git a/indra/newview/skins/default/xui/en/widgets/line_editor.xml b/indra/newview/skins/default/xui/en/widgets/line_editor.xml
index f39e0861968c217a33ae6044ae83d19af14daa2f..d37bee27ba4cdcdf86b4dcecce2b127c15105845 100644
--- a/indra/newview/skins/default/xui/en/widgets/line_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/line_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <line_editor background_image="TextField_Off"
              background_image_disabled="TextField_Disabled"
              background_image_focused="TextField_Active"
diff --git a/indra/newview/skins/default/xui/en/widgets/list_view.xml b/indra/newview/skins/default/xui/en/widgets/list_view.xml
index 2e976bc7556dafcbbbbf62aacaf4724fce393a60..5fb134535b4c5eb247fa7e926ec0961aac8efa26 100644
--- a/indra/newview/skins/default/xui/en/widgets/list_view.xml
+++ b/indra/newview/skins/default/xui/en/widgets/list_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <list_view
   fg_selected_color="ListViewSelectedFgColor"
   bg_selected_color="ListViewSelectedBgColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml
index ea1d89c975c4eaed5802c8b93e46c75285193fb0..af4b9aa1ee9584dfd54fa03497d22623ab0cd014 100644
--- a/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml
+++ b/indra/newview/skins/default/xui/en/widgets/loading_indicator.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <loading_indicator
     follows="left|top"
     mouse_opaque="false"
@@ -19,4 +19,4 @@
     <image name="Progress_11"/>
     <image name="Progress_12"/>
   </images>
-</loading_indicator>
\ No newline at end of file
+</loading_indicator>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 674be597535c98e5c46382b214d9374a8d679e10..d12f1434a82208264c6a018c6b494f74031b78fd 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
 *TODO: Replace hardcoded buttons width/height with getting this info from the button images.
        Currently that doesn't work because LLUIImage::getWidth/getHeight() return 1 for the images.
diff --git a/indra/newview/skins/default/xui/en/widgets/menu.xml b/indra/newview/skins/default/xui/en/widgets/menu.xml
index 13ac84beb2787d81f16c95016ad0407edd3c7f44..285c0207fb84147c372a256a95ab991c585cc951 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu.xml
@@ -1,8 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu name="menu" 
       bg_color="MenuDefaultBgColor"
       bg_visible="true"
       drop_shadow="true"
       tear_off="false"
+      font="SansSerifSmall" 
       shortcut_pad="15">
 </menu>
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_bar.xml b/indra/newview/skins/default/xui/en/widgets/menu_bar.xml
index 27efa72563568485adac534a39081df088274368..8867e97b6c712badb35ee74de7b962b94a7af80e 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_bar
 			tear_off = "false"
 			keep_fixed_size = "true"
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item.xml b/indra/newview/skins/default/xui/en/widgets/menu_item.xml
index 563f3dc5c2bd360f643c01e08825e610c7a181b5..fb890985cec196ab11582a4672187ee1574b9d72 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_item.xml
@@ -1,3 +1,3 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Use this for the top-level menu styling -->
 <menu_item font="SansSerifSmall" />
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item_call.xml b/indra/newview/skins/default/xui/en/widgets/menu_item_call.xml
index 24bda97f44c210f2d47fe50b21ec899d598cb7db..db46e6ddfc8817af9a1106307c73636f37502e24 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_item_call.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_item_call.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_item_call enabled_color="MenuItemEnabledColor"
 	disabled_color="MenuItemDisabledColor"
 	highlight_bg_color="MenuItemHighlightBgColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item_check.xml b/indra/newview/skins/default/xui/en/widgets/menu_item_check.xml
index f6b06cb50b8e3774c9c19a157a634eb4692a3f17..92478be7da9db2806a43a093593979cc0c70a96c 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_item_check.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_item_check.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_item_check enabled_color="MenuItemEnabledColor"
 	disabled_color="MenuItemDisabledColor"
 	highlight_bg_color="MenuItemHighlightBgColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item_separator.xml b/indra/newview/skins/default/xui/en/widgets/menu_item_separator.xml
index 7452d685eba5d7bcd20e20214ae0fb0a6a54fa1c..366d9284aae32c117668901519867f836fb4a311 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_item_separator.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_item_separator.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <menu_item_separator enabled_color="MenuItemEnabledColor"
                      name="separator"
                      disabled_color="MenuItemDisabledColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/menu_item_tear_off.xml b/indra/newview/skins/default/xui/en/widgets/menu_item_tear_off.xml
index 72af3924c184a397df0ea02e1211ad93d280de12..82310e4f1af8eff806d770a4900a13833b7b13a8 100644
--- a/indra/newview/skins/default/xui/en/widgets/menu_item_tear_off.xml
+++ b/indra/newview/skins/default/xui/en/widgets/menu_item_tear_off.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Use "disabled color" to make it look like menu separators -->
 <menu_item_tear_off enabled_color="MenuItemDisabledColor"
                     name="tear_off"
diff --git a/indra/newview/skins/default/xui/en/widgets/multi_slider.xml b/indra/newview/skins/default/xui/en/widgets/multi_slider.xml
index 90b06259828c126a9af7bb4f28abf24a5a81b6d4..30fda073a6854a3865f5550de73f931bb094f700 100644
--- a/indra/newview/skins/default/xui/en/widgets/multi_slider.xml
+++ b/indra/newview/skins/default/xui/en/widgets/multi_slider.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <multi_slider text_color="LabelTextColor"
               mouse_opaque="true"
               text_disabled_color="LabelDisabledColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/multi_slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/multi_slider_bar.xml
index bbcb008df4d86506f721acb2ed4943206670c18e..a56c819b4de6c14e574fc86d8119e0b3277ca7b1 100644
--- a/indra/newview/skins/default/xui/en/widgets/multi_slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/multi_slider_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <multi_slider_bar name="multi_slider_bar"
                   track_color="MultiSliderTrackColor"
                   thumb_disabled_color="MultiSliderDisabledThumbColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/name_editor.xml b/indra/newview/skins/default/xui/en/widgets/name_editor.xml
index 21ba5c77f828a480f90f03c4b1e9f2afdf5dca12..1d7d23eb8f0c94cbd38304023b15446c7451744c 100644
--- a/indra/newview/skins/default/xui/en/widgets/name_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/name_editor.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<name_editor default_text="(retrieving)"/>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<name_editor default_text="(retrieving)"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/name_list.xml b/indra/newview/skins/default/xui/en/widgets/name_list.xml
index 3ae0f6822792a7c2719d1501031bf433f38666fe..4ad2512ccde7582054e0e27ea1167ad7bc8884cc 100644
--- a/indra/newview/skins/default/xui/en/widgets/name_list.xml
+++ b/indra/newview/skins/default/xui/en/widgets/name_list.xml
@@ -1,3 +1,3 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <name_list name="name_list"
            />
diff --git a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml
index 150225af27ed2e373f0c40444c1295cbe9c52047..4f87c58420e2185f4418745e67dab0afcadbd537 100644
--- a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml
+++ b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <notification_list_view
  allow_select="false"
  color="PanelFocusBackgroundColor"
@@ -15,4 +15,4 @@
     top="20"
     height="0"
     width="318"/>
-</notification_list_view>
\ No newline at end of file
+</notification_list_view>
diff --git a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
index 9d71ceca2f4c332cfdea76bb6f8abd0a40fcfa83..788c733ca8c5dd879595ea8a4b0499bb0b5a0625 100644
--- a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <output_monitor
   draw_border="true"
   follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/widgets/panel.xml b/indra/newview/skins/default/xui/en/widgets/panel.xml
index b36f723831d9eeae9f1ee13e04f8e26e8f360697..77f3ef5675233dbf3495c12fd74db096bc41d09b 100644
--- a/indra/newview/skins/default/xui/en/widgets/panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/panel.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Optional parameters:
   border - show border around panel
   bg_opaque_image - image name for "in-front" panel look
@@ -12,4 +12,4 @@
        background_visible="false"
        background_opaque="false"
        chrome="false"
-       accepts_badge="true"/>
\ No newline at end of file
+       accepts_badge="true"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml
index 564f695cd05c2804a5d7cdbe35bb05fea9b1168e..ea49b750d14b53419d95f9554994e876d579176d 100644
--- a/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/panel_camera_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel_camera_item
  background_visible="false"
  height="30"
diff --git a/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml b/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml
index af5aec2c34d0c5a9389dffa8fa21d3e1760369c5..ad63a80a05cb76371dfea209da1006d20517b414 100644
--- a/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml
+++ b/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <person_tab_view
   folder_arrow_image="Folder_Arrow"
   folder_indentation="5"
diff --git a/indra/newview/skins/default/xui/en/widgets/person_view.xml b/indra/newview/skins/default/xui/en/widgets/person_view.xml
index bfe6941a8a8b96fbe25c961b25e9b8d384800bef..82dbdf0dab6cdc850485f3af3367ac7796941d36 100644
--- a/indra/newview/skins/default/xui/en/widgets/person_view.xml
+++ b/indra/newview/skins/default/xui/en/widgets/person_view.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <person_view
   folder_arrow_image="Folder_Arrow"
   folder_indentation="5"
diff --git a/indra/newview/skins/default/xui/en/widgets/progress_bar.xml b/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
index 339e53fbb8287ffe526dea8374cfcd157425d34c..a9c90f0094477069cc52192a451d12e935818d1c 100644
--- a/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <progress_bar image_bar="ProgressTrack"
               image_fill="ProgressBar"
               color_bar.red="0.5764"
diff --git a/indra/newview/skins/default/xui/en/widgets/radio_group.xml b/indra/newview/skins/default/xui/en/widgets/radio_group.xml
index ab3184d34b3f636ebab75ef9c7e692dd9c59b13e..a307e919901427050fbe659b68763be10e57f5fa 100644
--- a/indra/newview/skins/default/xui/en/widgets/radio_group.xml
+++ b/indra/newview/skins/default/xui/en/widgets/radio_group.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <radio_group name="radio_group"
              mouse_opaque="false"
              follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/widgets/radio_item.xml b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
index 3ddf18b2cbce368ba2b8da52ad76b63751dac909..b95e1add475f99457362af0e090148f01ac25ca6 100644
--- a/indra/newview/skins/default/xui/en/widgets/radio_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <radio_item follows="left|top" font="SansSerif">
   <radio_item.label_text name="Radio Item label"/>
   <radio_item.check_button name="Radio control button"
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
index 682dcf40d8b62c29f9832a2bd9568ac2f0fe9065..83a66da89e6a19ec7d6f4b52a6811b2878eb91d0 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <scroll_bar thumb_image_vertical ="ScrollThumb_Vert"
 			thumb_image_horizontal ="ScrollThumb_Horiz"
             track_image_vertical ="ScrollTrack_Vert"
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml b/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml
index 8a48fcb32d4e73157795957479c1b5588a597314..2575d33d96d63fb98abd46d4b7d452c4aea77890 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <scroll_column_header name="column_header"
                       image_unselected="SegmentedBtn_Middle_Selected"
                       image_selected="SegmentedBtn_Middle_Selected"
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_container.xml b/indra/newview/skins/default/xui/en/widgets/scroll_container.xml
index a6d096a964b2f1b5bad6d38de895c17023131442..a361d4fac88ca45b57fc54644518c2bca8e3ceb0 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_container.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <scroll_container name="scroll_container"
                   color="black"
                   opaque="false"
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
index e43989c6c7d2b1c8d72aba97350e60a6f5df4da1..9819e7a22680397aa96adb7ff117bdbda37e1039 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <scroll_list name="scroll_list" 
              fg_unselected_color="ScrollUnselectedColor"
              fg_selected_color="ScrollSelectedFGColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/scrolling_panel_list.xml b/indra/newview/skins/default/xui/en/widgets/scrolling_panel_list.xml
index 40cbf5977a863ac84dc488920a62f46885dcbf9f..019c4b7fc0c65aa847b147d8b7e40cc96007e31b 100644
--- a/indra/newview/skins/default/xui/en/widgets/scrolling_panel_list.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scrolling_panel_list.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<scrolling_panel_list name="scrolling_panel_list"/>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<scrolling_panel_list name="scrolling_panel_list"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
index ce84cfedc0a5d7a1a299634f66e6b0dbb452018e..61341188edcd2fbf04ed6a2d987df9f9262f0b5a 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <search_combo_box
  allow_text_entry="true"
  list_position="below"
@@ -28,4 +28,4 @@
   height="13" 
   image_unselected="Search"
   image_selected="Search" />
-</search_combo_box>
\ No newline at end of file
+</search_combo_box>
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index 18d99f1ed15151abd29a72cef687838926c2955a..51144c92b6ceeed085969a94994b7daec07bafa3 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <search_editor
   name="search_editor"
   clear_button_visible="false"
diff --git a/indra/newview/skins/default/xui/en/widgets/side_tray.xml b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
index 022564c12fcee20dc04b7d23d71fcfa01a46dec9..3835c777b59d63474a431cb14691e353b3cb8d6e 100644
--- a/indra/newview/skins/default/xui/en/widgets/side_tray.xml
+++ b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <side_tray tab_btn_image="TaskPanel_Tab_Off"
            tab_btn_image_selected="TaskPanel_Tab_Selected"
            tab_btn_width="32"
diff --git a/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml
index aa8461d367be46395ae227cf044757850bf5a3d4..5d94cd7b2eb1c073077dfed1410d37535ec34a3a 100644
--- a/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml
+++ b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <sidetray_tab 
   focus_root="true"
   />
diff --git a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
index a120b1aec80013ebc3135da66b1b05096c0e4760..b99010e17a4e933d987794ccbf658e66b8c2d562 100644
--- a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <simple_text_editor
   parse_urls="false" 
   mouse_opaque="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/slider.xml b/indra/newview/skins/default/xui/en/widgets/slider.xml
index 6cceafc9aeb43cdf55d8654812ea95d167c2b1c1..cb2c4e6b2c1ba4e5d109b5f1a1e8cdc59a2d21e1 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <slider name="slider" 
         can_edit_text="false" 
         font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
index 0335213ed66f5995f5324fddfcaf5579a335367b..1cfe3d68f99000650b6b086b2500695d4b431575 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--All horizontal sliders are configured to have no highlighted track. See EXT-5939. -->
 <slider_bar follows="left|top"
             track_color="SliderTrackColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/spinner.xml b/indra/newview/skins/default/xui/en/widgets/spinner.xml
index d7af6077e51388246ca6562b224ffc5fb9ca0caa..12f03ab0477cf28cdfce179167afd833e8dac497 100644
--- a/indra/newview/skins/default/xui/en/widgets/spinner.xml
+++ b/indra/newview/skins/default/xui/en/widgets/spinner.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <spinner text_enabled_color="LabelTextColor"
          text_disabled_color="LabelDisabledColor"
          font="SansSerifSmall" 
@@ -14,4 +14,4 @@
                        image_selected="Stepper_Down_Press"
                        tab_stop="false"
                        follows="left|bottom" />
-</spinner>
\ No newline at end of file
+</spinner>
diff --git a/indra/newview/skins/default/xui/en/widgets/split_button.xml b/indra/newview/skins/default/xui/en/widgets/split_button.xml
index 2ff9ada90a7ed7e61f8b10940610858c4dc9f045..f85638166be9ef61cfe88b748781e14d701ecff3 100644
--- a/indra/newview/skins/default/xui/en/widgets/split_button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/split_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <split_button
  font="SansSerifSmall"
  arrow_position="left"
diff --git a/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml b/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml
index 9fa77855c0db714a353ad1bd61d86c78ed3f4d6f..cdeff6ab05937f6d3cc95a754cebc96eba244d76 100644
--- a/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml
+++ b/indra/newview/skins/default/xui/en/widgets/sun_moon_trackball.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <sun_moon_trackball
     name="virtualtrackball"
     width="150"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 0586119681a5cf16953c5bd056eec0a9e2b8298f..22955fe73d5b71a7880b6d9db3551054fe2fca01 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!--
 label_pad_bottom - vertical padding under tab button labels
 label_pad_left - padding to the left of tab button labels
diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
index d792e9f29c46bc3be7e19c80936f99397bec1970..6468a023e363e11ae9a35246a6e1a0bc112645e8 100644
--- a/indra/newview/skins/default/xui/en/widgets/talk_button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Derives from LLUICtrl -->
 <talk_button>
   <!-- To make speak button look green when selected set:
diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml
index 4f574d75d559976f8c11e788cb7f9d7b96202342..1b4ac4dba7d7735661765133cb40d97894d0176e 100644
--- a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Menu items for the back button drop-down menu of locations.
   Based on menu_item_call.xml -->
 <teleport_history_menu_item
diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml
index 210207467435b44ab7231f00ef05c95906f79649..505d98368e5de8aa4a115b479c95741ccbc59a83 100644
--- a/indra/newview/skins/default/xui/en/widgets/text.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <text parse_urls="true"
       mouse_opaque="false" 
       name="text_box" 
diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
index 100571cc01d8cf1bf6de2bd6ef1c61d39209885b..c359e52a921ae2c00308d3a01e41f0fc80e9f261 100644
--- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Core parameters are in simple_text_editor.xml -->
 <text_editor
   name="text_editor"
diff --git a/indra/newview/skins/default/xui/en/widgets/textbase.xml b/indra/newview/skins/default/xui/en/widgets/textbase.xml
index b2da2147c1682442298cd3ae8f57500b1321fbe1..ada907ca8f5a9ad4034cce3be82d80ba253fc760 100644
--- a/indra/newview/skins/default/xui/en/widgets/textbase.xml
+++ b/indra/newview/skins/default/xui/en/widgets/textbase.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <textbase clip_partial="false"
           halign="left" 
           valign="top" 
diff --git a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
index 1511116ba690a819c0dbc307bee4616e97acf1ad..eb5344d3119a68d0c6a1f51b07af8983ba90f7f5 100644
--- a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
+++ b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <texture_picker border_color="DefaultHighlightLight"
                 name="texture picker"
                 mouse_opaque="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/time.xml b/indra/newview/skins/default/xui/en/widgets/time.xml
index b5bdd564a61073963b4c4971a11c996e9fe720c5..3162d49be49dd1cacee618c46c3dc317317c5543 100644
--- a/indra/newview/skins/default/xui/en/widgets/time.xml
+++ b/indra/newview/skins/default/xui/en/widgets/time.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <time text_enabled_color="LabelTextColor"
          text_disabled_color="LabelDisabledColor"
          font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml b/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml
index 48950a98ad547f59d7d83a2396438e0f414d8894..a9d17d098907667c800209dab616c6b5103d74ae 100644
--- a/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toggleable_menu visible="false"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/tool_tip.xml b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
index 9ca15ae50d39a63ed1715620436b7811161ddba1..d0a9adece372006588e4832daf8237e35764d9b5 100644
--- a/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tool_tip.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <tool_tip name="tooltip"
           max_width="200"
           padding="4"
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 0ace37a5dc10685e052652f87dc6a56a4741a63b..8345911525198923fea532771887630b888d39e6 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <toolbar pad_left="1"
          pad_right="1"
          pad_top="1"
diff --git a/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml b/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml
index f4dbb8f40489da3ccd72251ecde31435a64b0d3c..8a5dbc72abac2ff3b0366e2b5060cbb0fcf8a779 100644
--- a/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <!-- Global settings for all widgets ("UI Controls") -->
 <!-- The params in this file aren't currently getting loaded in OSX -->
 <ui_ctrl
diff --git a/indra/newview/skins/default/xui/en/widgets/view_border.xml b/indra/newview/skins/default/xui/en/widgets/view_border.xml
index bf40e3086bbaec00380ec9d54d5d693b491cf830..db77f5a07e82a353a765b4404d6286b78a432c93 100644
--- a/indra/newview/skins/default/xui/en/widgets/view_border.xml
+++ b/indra/newview/skins/default/xui/en/widgets/view_border.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <view_border name="view_border" 
              highlight_light_color="DefaultHighlightLight"
              highlight_dark_color="DefaultHighlightDark"
@@ -8,4 +8,4 @@
              border_style="line"
              bevel_style="out"
              mouse_opaque="false"
-             follows="all"/>
\ No newline at end of file
+             follows="all"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
index 866276f9975dc7ab2a1ea8e644c1a4eb28bde97f..aa235e103bc234334dc19e05c04511fa65984d70 100644
--- a/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/wearable_outfit_list_item.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <inventory_list_item
   follows="top|right|left"
   height="20"
diff --git a/indra/newview/skins/default/xui/en/widgets/web_browser.xml b/indra/newview/skins/default/xui/en/widgets/web_browser.xml
index 676fafd828f88926bd2217f481322de19ffdb069..8af330c84a213a454c46f5adb8dae473362b9b46 100644
--- a/indra/newview/skins/default/xui/en/widgets/web_browser.xml
+++ b/indra/newview/skins/default/xui/en/widgets/web_browser.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <web_browser border_visible="true"
              tab_stop="false"
              />
diff --git a/indra/newview/skins/default/xui/en/widgets/window_shade.xml b/indra/newview/skins/default/xui/en/widgets/window_shade.xml
index 23eb2f13fb821531e12de71b63f3668379beab57..a0e26bc81c97600851ffc209d99d46f7d9ca40bb 100644
--- a/indra/newview/skins/default/xui/en/widgets/window_shade.xml
+++ b/indra/newview/skins/default/xui/en/widgets/window_shade.xml
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <window_shade shade_color="0 0 0 0.5"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/xy_vector.xml b/indra/newview/skins/default/xui/en/widgets/xy_vector.xml
index 93ae26a6ad69b022c435cea1f065e6cda7936939..23cde55f305eb286d1430bbe893114617e2e2aa8 100644
--- a/indra/newview/skins/default/xui/en/widgets/xy_vector.xml
+++ b/indra/newview/skins/default/xui/en/widgets/xy_vector.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <xy_vector
     name="xyvector"
     width="120"
diff --git a/indra/newview/skins/default/xui/en/xui_version.xml b/indra/newview/skins/default/xui/en/xui_version.xml
index 0e777751d3f13b0b47e740254ea5f6ba40b074a1..2a8fd9c6c40b9b60ab4918cbe42e036b381a25e2 100644
--- a/indra/newview/skins/default/xui/en/xui_version.xml
+++ b/indra/newview/skins/default/xui/en/xui_version.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <xui_version>
 	1.0
 </xui_version>
diff --git a/indra/newview/tests/llremoteparcelrequest_test.cpp b/indra/newview/tests/llremoteparcelrequest_test.cpp
index 4f7f87b6b01ef39afd15e9453904ffdcf6f08080..4eddfb46e1c2577898d05ee8882b788fb40602a9 100644
--- a/indra/newview/tests/llremoteparcelrequest_test.cpp
+++ b/indra/newview/tests/llremoteparcelrequest_test.cpp
@@ -49,7 +49,7 @@ void LLCurl::Responder::failureResult(S32 status, const std::string& reason, con
 void LLCurl::Responder::successResult(const LLSD& content) { }
 void LLCurl::Responder::completeResult(S32 status, const std::string& reason, const LLSD& content) { }
 std::string LLCurl::Responder::dumpResponse() const { return "(failure)"; }
-void LLCurl::Responder::completedRaw(LLChannelDescriptors const &,boost::shared_ptr<LLBufferArray> const &) { }
+void LLCurl::Responder::completedRaw(LLChannelDescriptors const &,std::shared_ptr<LLBufferArray> const &) { }
 void LLMessageSystem::getF32(char const *,char const *,F32 &,S32) { }
 void LLMessageSystem::getU8(char const *,char const *,U8 &,S32) { }
 void LLMessageSystem::getS32(char const *,char const *,S32 &,S32) { }
@@ -110,7 +110,7 @@ namespace tut
 	{
 		set_test_name("observer pointer");
 
-		boost::scoped_ptr<TestObserver> observer(new TestObserver());
+		std::unique_ptr<TestObserver> observer(new TestObserver());
 
 		LLRemoteParcelInfoProcessor & processor = LLRemoteParcelInfoProcessor::instance();
 		processor.addObserver(LLUUID(TEST_PARCEL_ID), observer.get());
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index eabf9228755f11f8ed37362f0af17a250723ee28..8d21b6ed696b067620f77e6d893c2e84ee73223c 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -187,6 +187,12 @@ namespace tut
 		ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(),
 					  "http://maps.secondlife.com/secondlife/myregion/1/2/3");
 
+		slurl = LLSLURL("secondlife://");
+		ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY);
+
+		slurl = LLSLURL("secondlife:///");
+		ensure_equals("secondlife: slurl, root - type", slurl.getType(), LLSLURL::EMPTY);
+
 		slurl = LLSLURL("secondlife://myregion");
 		ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
 		ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(),
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index bcae75425dc54971d1148dd178b7070ed0bf2aa2..c6f5335ac3598d963f8731ba84c8481763bed425 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -525,7 +525,7 @@ def construct(self):
                                              'secondlife-bin.*',
                                              '*_Setup.exe',
                                              '*.bat',
-                                             '*.tar.bz2')))
+                                             '*.tar.xz')))
 
             with self.prefix(src=os.path.join(pkgdir, "VMP")):
                 # include the compiled launcher scripts so that it gets included in the file_list
@@ -1203,9 +1203,9 @@ def package_finish(self):
             # causes problems, especially with frameworks: a framework's top
             # level must contain symlinks into its Versions/Current, which
             # must itself be a symlink to some specific Versions subdir.
-            tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2")
+            tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.xz")
             print(f'Creating {tarpath} from {self.get_dst_prefix()}')
-            with tarfile.open(tarpath, mode="w:bz2") as tarball:
+            with tarfile.open(tarpath, mode="w:xz") as tarball:
                 # Store in the tarball as just 'Second Life Mumble.app'
                 # instead of 'Users/someone/.../newview/Release/Second...'
                 # It's at this point that we rename 'Second Life Release.app'
@@ -1292,7 +1292,7 @@ def package_finish(self):
             self.run_command(['find', self.get_dst_prefix(),
                               '-type', 'f', '-perm', old,
                               '-exec', 'chmod', new, '{}', ';'])
-        self.package_file = installer_name + '.tar.bz2'
+        self.package_file = installer_name + '.tar.xz'
 
         # temporarily move directory tree so that it has the right
         # name in the tarfile
@@ -1305,10 +1305,10 @@ def package_finish(self):
                 # --numeric-owner hides the username of the builder for
                 # security etc.
                 self.run_command(['tar', '-C', self.get_build_prefix(),
-                                  '--numeric-owner', '-cjf',
-                                 tempname + '.tar.bz2', installer_name])
+                                  '--numeric-owner', '-cJf',
+                                 tempname + '.tar.xz', installer_name])
             else:
-                print("Skipping %s.tar.bz2 for non-Release build (%s)" % \
+                print("Skipping %s.tar.xz for non-Release build (%s)" % \
                       (installer_name, self.args['buildtype']))
         finally:
             self.run_command(["mv", tempname, realname])
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index 40243a8ad6ef6505f9f2988db9b2c8dea9d3c6bc..99b49c8b29b352b0e4f5b0b1b8f29265fef7ddca 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -946,7 +946,7 @@ namespace tut
 		typedef LLCloneIOFactory<LLPipeStringInjector> emitter_t;
 		emitter_t* emitter = new emitter_t(
 			new LLPipeStringInjector("suckers never play me"));
-		boost::shared_ptr<LLChainIOFactory> factory(emitter);
+		std::shared_ptr<LLChainIOFactory> factory(emitter);
 		LLIOServerSocket* server = new LLIOServerSocket(
 			mPool,
 			mSocket,
@@ -993,7 +993,7 @@ namespace tut
 		LLPumpIO::chain_t chain;
 		typedef LLCloneIOFactory<LLIOFuzz> emitter_t;
 		emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000));
-		boost::shared_ptr<LLChainIOFactory> factory(emitter);
+		std::shared_ptr<LLChainIOFactory> factory(emitter);
 		LLIOServerSocket* server = new LLIOServerSocket(
 			mPool,
 			mSocket,
@@ -1036,7 +1036,7 @@ namespace tut
 		LLPumpIO::chain_t chain;
 		typedef LLCloneIOFactory<LLIOFuzz> emitter_t;
 		emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000));
-		boost::shared_ptr<LLChainIOFactory> factory(emitter);
+		std::shared_ptr<LLChainIOFactory> factory(emitter);
 		LLIOServerSocket* server = new LLIOServerSocket(
 			mPool,
 			mSocket,
@@ -1079,7 +1079,7 @@ namespace tut
 		LLPumpIO::chain_t chain;
 		typedef LLCloneIOFactory<LLIOFuzz> emitter_t;
 		emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000));
-		boost::shared_ptr<LLChainIOFactory> factory(emitter);
+		std::shared_ptr<LLChainIOFactory> factory(emitter);
 		LLIOServerSocket* server = new LLIOServerSocket(
 			mPool,
 			mSocket,
@@ -1120,7 +1120,7 @@ namespace tut
 		LLPumpIO::chain_t chain;
 		typedef LLCloneIOFactory<LLIOSleeper> sleeper_t;
 		sleeper_t* sleeper = new sleeper_t(new LLIOSleeper);
-		boost::shared_ptr<LLChainIOFactory> factory(sleeper);
+		std::shared_ptr<LLChainIOFactory> factory(sleeper);
 		LLIOServerSocket* server = new LLIOServerSocket(
 			mPool,
 			mSocket,
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index 17f64a49531850c38e438119f37af7ecc9860191..a38de71e4884ae704fde602e3b0792a451ef7311 100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
@@ -368,10 +368,10 @@ void events_object::test<7>()
 	LLEventStream bob("bob"); 		// should work, previous one unregistered
 	LLEventStream bob1("bob", true);// allowed to tweak name
 	ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1");
-	std::vector<boost::shared_ptr<LLEventStream> > streams;
+	std::vector<std::shared_ptr<LLEventStream> > streams;
 	for (int i = 2; i <= 10; ++i)
 	{
-		streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true)));
+		streams.push_back(std::shared_ptr<LLEventStream>(new LLEventStream("bob", true)));
 	}
 	ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10");
 }
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index 94478a5263c912dee0608f26ea0ebf2e4f38414c..f1c5991330c2a6c11eb46dfcfa2de1c49add65c6 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -166,12 +166,12 @@ class LLReplayLogReal: public LLReplayLog, public boost::noncopyable
 
 	virtual void reset()
 	{
-		boost::dynamic_pointer_cast<RecordToTempFile>(mRecorder)->reset();
+		std::dynamic_pointer_cast<RecordToTempFile>(mRecorder)->reset();
 	}
 
 	virtual void replay(std::ostream& out)
 	{
-		boost::dynamic_pointer_cast<RecordToTempFile>(mRecorder)->replay(out);
+		std::dynamic_pointer_cast<RecordToTempFile>(mRecorder)->replay(out);
 	}
 
 private:
@@ -185,7 +185,7 @@ class LLTestCallback : public chained_callback
 
 public:
 	LLTestCallback(bool verbose_mode, std::ostream *stream,
-				   boost::shared_ptr<LLReplayLog> replayer) :
+				   std::shared_ptr<LLReplayLog> replayer) :
 		mVerboseMode(verbose_mode),
 		mTotalTests(0),
 		mPassedTests(0),
@@ -193,7 +193,7 @@ class LLTestCallback : public chained_callback
 		mSkippedTests(0),
 		// By default, capture a shared_ptr to std::cout, with a no-op "deleter"
 		// so that destroying the shared_ptr makes no attempt to delete std::cout.
-		mStream(boost::shared_ptr<std::ostream>(&std::cout, [](std::ostream*){})),
+		mStream(std::shared_ptr<std::ostream>(&std::cout, [](std::ostream*){})),
 		mReplayer(replayer)
 	{
 		if (stream)
@@ -207,7 +207,7 @@ class LLTestCallback : public chained_callback
 			// Allocate and assign in two separate steps, per Herb Sutter.
 			// (Until we turn on C++11 support, have to wrap *stream with
 			// boost::ref() due to lack of perfect forwarding.)
-			boost::shared_ptr<std::ostream> pstream(new TeeStream(std::cout, boost::ref(*stream)));
+			std::shared_ptr<std::ostream> pstream(new TeeStream(std::cout, boost::ref(*stream)));
 			mStream = pstream;
 		}
 	}
@@ -331,8 +331,8 @@ class LLTestCallback : public chained_callback
 	int mPassedTests;
 	int mFailedTests;
 	int mSkippedTests;
-	boost::shared_ptr<std::ostream> mStream;
-	boost::shared_ptr<LLReplayLog> mReplayer;
+	std::shared_ptr<std::ostream> mStream;
+	std::shared_ptr<LLReplayLog> mReplayer;
 };
 
 // TeamCity specific class which emits service messages
@@ -342,7 +342,7 @@ class LLTCTestCallback : public LLTestCallback
 {
 public:
 	LLTCTestCallback(bool verbose_mode, std::ostream *stream,
-					 boost::shared_ptr<LLReplayLog> replayer) :
+					 std::shared_ptr<LLReplayLog> replayer) :
 		LLTestCallback(verbose_mode, stream, replayer)
 	{
 	}
@@ -555,7 +555,7 @@ int main(int argc, char **argv)
 	apr_status_t apr_err;
 	const char* opt_arg = NULL;
 	int opt_id = 0;
-	boost::scoped_ptr<llofstream> output;
+	std::unique_ptr<llofstream> output;
 	const char *touch = NULL;
 
 	while(true)
@@ -614,7 +614,7 @@ int main(int argc, char **argv)
 
 	// set up logging
 	const char* LOGFAIL = getenv("LOGFAIL");
-	boost::shared_ptr<LLReplayLog> replayer{boost::make_shared<LLReplayLog>()};
+	std::shared_ptr<LLReplayLog> replayer{std::make_shared<LLReplayLog>()};
 
 	// Testing environment variables for both 'set' and 'not empty' allows a
 	// user to suppress a pre-existing environment variable by forcing empty.
diff --git a/indra/viewer_components/login/lllogin.h b/indra/viewer_components/login/lllogin.h
index 051641ff59697d186fe395354de3a9cce523c95c..de58ca0c294c8f13bc56c0373a65f478deebd6ca 100644
--- a/indra/viewer_components/login/lllogin.h
+++ b/indra/viewer_components/login/lllogin.h
@@ -121,7 +121,7 @@ class LLLogin
 
 private:
 	class Impl;
-	boost::scoped_ptr<Impl> mImpl;
+	std::unique_ptr<Impl> mImpl;
 };
 
 #endif // LL_LLLOGIN_H
diff --git a/scripts/code_tools/modified_strings.py b/scripts/code_tools/modified_strings.py
index e7a9d239dc7c5da4f93143598f6cbcf76ffc8932..20ed1b05552cc90f5f365897224ac368e4cae856 100644
--- a/scripts/code_tools/modified_strings.py
+++ b/scripts/code_tools/modified_strings.py
@@ -162,6 +162,8 @@ def make_translation_table(mod_tree, base_tree, lang, args):
         filename = mod_blob.path
         if mod_blob.type == "tree": # directory, skip
             continue
+        if args.files and os.path.basename(filename) not in args.files:
+            continue # process only the specified files
 
         if args.verbose:
             print(filename)
@@ -325,9 +327,11 @@ def save_translation_file(per_lang_data, aux_data, outfile):
     parser.add_argument("--deleted", action="store_true", default = False, help="show all translated entities which don't exist in english")
     parser.add_argument("--skip_spreadsheet", action="store_true", default = False, help="skip creating the translation spreadsheet")
     parser.add_argument("--rev", help="revision with modified strings, default HEAD", default="HEAD")
-    parser.add_argument("--rev_base", help="previous revision to compare against, default master", default="master")
+    parser.add_argument("--rev_base", help="previous revision to compare against, default main", default="main")
     parser.add_argument("--base_lang", help="base language, default en (normally leave unchanged - other values are only useful for testing)", default="en")
     parser.add_argument("--lang", help="target languages, or 'all_valid' or 'supported'; default is 'supported'", nargs="+", default = ["supported"])
+    parser.add_argument("--files", help='list of files to process', metavar='F', type=str, nargs='*')
+    parser.add_argument("--outfile", help='name of the output file', type=str, nargs='?', default="SL_Translations.xlsx")
     args = parser.parse_args()
 
     cwd = os.getcwd()
@@ -370,7 +374,7 @@ def save_translation_file(per_lang_data, aux_data, outfile):
     print("Target language(s) are", ",".join(sorted(langs)))
     sys.stdout.flush()
 
-    outfile = "SL_Translations.xlsx"
+    outfile = args.outfile
     try:
         f = open(outfile,"a+")
         f.close()