diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index f26a380e5f7d015932227cb4a3c8ace6cb7cd085..6fc9ca86a3d6b651b1c1dfdba78963ab7bc0d504 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -139,7 +139,7 @@ class LLAccordionCtrl: public LLPanel
 	 */
 	const LLAccordionCtrlTab* getExpandedTab() const;
 
-	const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; }
+	LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; }
 
 	bool getFitParent() const {return mFitParent;}
 
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cde08c7b1931140a94acda89dc305fb012d58f08..3792f18c9755e14f86d9d9e256b96db7ae231b70 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2723,7 +2723,10 @@ LLOnHoverChangeableTextSegment::LLOnHoverChangeableTextSegment( LLStyleConstSP s
 F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
 {
 	F32 result = LLNormalTextSegment::draw(start, end, selection_start, selection_end, draw_rect);
-	mStyle = mNormalStyle;
+	if (end == mEnd - mStart)
+	{
+		mStyle = mNormalStyle;
+	}
 	return result;
 }
 
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 17d211fb36e6543818d9d7dc23bf94467f399a56..bf7b25910fe0f918eda5b60f793c02b132093c64 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -366,7 +366,7 @@ std::string LLUrlEntryAgent::getTooltip(const std::string &string) const
 bool LLUrlEntryAgent::underlineOnHoverOnly(const std::string &string) const
 {
 	std::string url = getUrl(string);
-	return LLStringUtil::endsWith(url, "/about");
+	return LLStringUtil::endsWith(url, "/about") || LLStringUtil::endsWith(url, "/inspect");
 }
 
 std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 7c33923f044b424816f1b5814928e792be0efe2e..7204e6c39ccdab117d8d2daad9dd8c9dd951dcaa 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -699,8 +699,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
 			{
 				LLStyle::Params link_params(style_params);
 				link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
-				// Convert the name to a hotlink and add to message.
-				mEditor->appendText(chat.mFromName + delimiter, false, link_params);
+				// Add link to avatar's inspector and delimiter to message.
+				mEditor->appendText(link_params.link_href, false, style_params);
+				mEditor->appendText(delimiter, false, style_params);
 			}
 			else
 			{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 7e710ce8e1d6571bf9433a78b5e450ddc4bfd05f..53622f718876afbb244137d893d87f673d6b30a8 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3989,6 +3989,11 @@ std::string LLObjectBridge::getLabelSuffix() const
 {
 	if (get_is_item_worn(mUUID))
 	{
+		if (!isAgentAvatarValid())
+		{
+			return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
+		}
+
 		std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID);
 
 		// e.g. "(worn on ...)" / "(attached to ...)"
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index f921bca623261d89cc72638036c6751e0e1df18e..8422b97b3a246b250c590c8f05369246d704a6c9 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -403,6 +403,12 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/)
 
 		mIsInitialized = true;
 	}
+
+	LLAccordionCtrlTab* selected_tab = mAccordion->getSelectedTab();
+	if (!selected_tab) return;
+
+	// Pass focus to the selected outfit tab.
+	selected_tab->showAndFocusHeader();
 }
 
 void LLOutfitsList::refreshList(const LLUUID& category_id)
diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp
index 8fab3bb361fce9f07ea944cb7941b76a9c0d8ae8..b3d7dddde88f9c2cc8d5cbef0a96f7e654172c62 100644
--- a/indra/newview/llstylemap.cpp
+++ b/indra/newview/llstylemap.cpp
@@ -46,20 +46,12 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source)
 	if (mMap.find(source) == mMap.end())
 	{
 		LLStyle::Params style_params;
-		if (source != LLUUID::null && source != gAgent.getID() )
+		if (source != LLUUID::null)
 		{
 			style_params.color.control = "HTMLLinkColor";
 			style_params.readonly_color.control = "HTMLLinkColor";
-			style_params.link_href = 
-					LLSLURL("agent", source, "inspect").getSLURLString();
+			style_params.link_href = LLSLURL("agent", source, "inspect").getSLURLString();
 		}
-		else
-		{
-			// Make the resident's own name white and don't make the name clickable.
-			style_params.color = LLColor4::white;
-			style_params.readonly_color = LLColor4::white;
-		}
-
 		mMap[source] = style_params;
 	}
 	return mMap[source];
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 92195f0a4da4bce2c653cb3e27579631291abf03..a289a0eb7a8670bf0e90f4888b00fc4c7ad14324 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5950,7 +5950,8 @@ void LLObjectAttachToAvatar::confirmReplaceAttachment(S32 option, LLViewerJointA
 			delta = delta * 0.5f;
 			walkToSpot -= delta;
 
-			CallbackData* user_data = new CallbackData(attachment_point, mReplace); // *TODO: leak if the callback isn't called?
+			// The callback will be called even if avatar fails to get close enough to the object, so we won't get a memory leak.
+			CallbackData* user_data = new CallbackData(attachment_point, mReplace);
 			gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, onNearAttachObject, user_data, stop_distance);
 			gAgentCamera.clearFocusObject();
 		}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 298ac28ca89ecc7500ff15d1b6b87ec89f483d7a..6392aad2488fde55a9320a9c80a458a5567ebc38 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5641,6 +5641,15 @@ BOOL LLVOAvatar::canAttachMoreObjects() const
 	return (getNumAttachments() < MAX_AGENT_ATTACHMENTS);
 }
 
+//-----------------------------------------------------------------------------
+// canAttachMoreObjects()
+// Returns true if we can attach <n> more objects.
+//-----------------------------------------------------------------------------
+BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const
+{
+	return (getNumAttachments() + n) <= MAX_AGENT_ATTACHMENTS;
+}
+
 //-----------------------------------------------------------------------------
 // lazyAttach()
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 5de08e8e27f02422e982e04038f91e00829b6717..3f603dda8b6a65a0bab7c8eb41449f468e1b3cb6 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -687,6 +687,7 @@ class LLVOAvatar :
 	void 				rebuildHUD();
 	void 				resetHUDAttachments();
 	BOOL				canAttachMoreObjects() const;
+	BOOL				canAttachMoreObjects(U32 n) const;
 protected:
 	U32					getNumAttachments() const; // O(N), not O(1)
 
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 194213f880e9cc711e4604ff717e7ae1709a44a1..e2a5489fcfcc973c3780cf51479e998a6405c422 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -869,7 +869,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
 	setMenuItemVisible(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0 && can_be_worn);
 	setMenuItemEnabled(menu, "wear_wear", 			n_already_worn == 0 && n_worn == 0);
 	setMenuItemVisible(menu, "wear_add",			wear_add_visible);
-	setMenuItemEnabled(menu, "wear_add",			n_items == 1 && canAddWearable(ids.front()));
+	setMenuItemEnabled(menu, "wear_add",			canAddWearables(ids));
 	setMenuItemVisible(menu, "wear_replace",		n_worn == 0 && n_already_worn != 0 && can_be_worn);
 	//visible only when one item selected and this item is worn
 	setMenuItemVisible(menu, "edit",				!standalone && mask & (MASK_CLOTHING|MASK_BODYPART) && n_worn == n_items && n_worn == 1);
@@ -978,31 +978,61 @@ void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id)
 	LLAgentWearables::createWearable(item->getWearableType(), true);
 }
 
-// Can we wear another wearable of the given item's wearable type?
+// Returns true if all the given objects and clothes can be added.
 // static
-bool LLWearableItemsList::ContextMenu::canAddWearable(const LLUUID& item_id)
+bool LLWearableItemsList::ContextMenu::canAddWearables(const uuid_vec_t& item_ids)
 {
 	// TODO: investigate wearables may not be loaded at this point EXT-8231
 
-	LLViewerInventoryItem* item = gInventory.getItem(item_id);
-	if (!item)
+	U32 n_objects = 0;
+	boost::unordered_map<LLWearableType::EType, U32> clothes_by_type;
+
+	// Count given clothes (by wearable type) and objects.
+	for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
 	{
-		return false;
+		LLViewerInventoryItem* item = gInventory.getItem(*it);
+		if (!item)
+		{
+			return false;
+		}
+
+		if (item->getType() == LLAssetType::AT_OBJECT)
+		{
+			++n_objects;
+		}
+		else if (item->getType() == LLAssetType::AT_CLOTHING)
+		{
+			++clothes_by_type[item->getWearableType()];
+		}
+		else
+		{
+			llwarns << "Unexpected wearable type" << llendl;
+			return false;
+		}
 	}
 
-	if (item->getType() == LLAssetType::AT_OBJECT)
+	// Check whether we can add all the objects.
+	if (!isAgentAvatarValid() || !gAgentAvatarp->canAttachMoreObjects(n_objects))
 	{
-		// *TODO: is this the right check?
-		return isAgentAvatarValid() && gAgentAvatarp->canAttachMoreObjects();
+		return false;
 	}
 
-	if (item->getType() != LLAssetType::AT_CLOTHING)
+	// Check whether we can add all the clothes.
+	boost::unordered_map<LLWearableType::EType, U32>::const_iterator m_it;
+	for (m_it = clothes_by_type.begin(); m_it != clothes_by_type.end(); ++m_it)
 	{
-		return false;
+		LLWearableType::EType w_type	= m_it->first;
+		U32 n_clothes					= m_it->second;
+
+		U32 wearable_count = gAgentWearables.getWearableCount(w_type);
+		if ((wearable_count + n_clothes) > LLAgentWearables::MAX_CLOTHING_PER_TYPE)
+		{
+			return false;
+		}
+
 	}
 
-	U32 wearable_count = gAgentWearables.getWearableCount(item->getWearableType());
-	return wearable_count < LLAgentWearables::MAX_CLOTHING_PER_TYPE;
+	return true;
 }
 
 // EOF
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 81f1cd1b4050d856ba2dfe9830d383259ec9cfd2..d7970e08389d5b0fc49c16dff44c64e2fc88f0d8 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -431,7 +431,7 @@ class LLWearableItemsList : public LLInventoryItemsList
 		static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val);
 		static void updateMask(U32& mask, LLAssetType::EType at);
 		static void createNewWearable(const LLUUID& item_id);
-		static bool canAddWearable(const LLUUID& item_id);
+		static bool canAddWearables(const uuid_vec_t& item_ids);
 
 		LLWearableItemsList*	mParent;
 	};
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 06bd1e9ff44d342a4e3dc0d1628b40646cceb31f..20ff492c0f319933146f8754e53a0122e7c265a4 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -9,6 +9,7 @@
  layout="topleft"
  name="Mockup Tab"
  selection_enabled="true"
+ tab_stop="false"
  title="Mockup Tab"
  translate="false"
  width="0">