diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 76134144a0538f73ed8b384167dff0cc52532f21..25daf9db8bea398cf66ecb4f00c5675ce8e446ab 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -408,6 +408,16 @@ BOOL LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks)
 	return handled;
 }
 
+BOOL LLScrollbar::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+	BOOL handled = FALSE;
+	if (LLScrollbar::HORIZONTAL == mOrientation)
+	{
+		handled = changeLine(clicks * mStepSize, TRUE);
+	}
+	return handled;
+}
+
 BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 									EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg)
 {
diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h
index e2bf52c14bce6463fef574a699f73b324a2a81e2..5f2f490d811884d2b3d6fe14bd5151dd5312d0d9 100644
--- a/indra/llui/llscrollbar.h
+++ b/indra/llui/llscrollbar.h
@@ -88,6 +88,7 @@ class LLScrollbar
 	virtual BOOL	handleDoubleClick(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
+	virtual BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	virtual BOOL	handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, 
 		EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string &tooltip_msg);
 
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 6135cc56ad76197ed382d254134293613f25ac60..3db38bbfacf56e2bb6bee810757771fd7041427f 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -272,6 +272,25 @@ BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
 	return FALSE;
 }
 
+BOOL LLScrollContainer::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+	if (LLUICtrl::handleScrollHWheel(x,y,clicks))
+	{
+		return TRUE;
+	}
+
+	LLScrollbar* horizontal = mScrollbar[HORIZONTAL];
+	if (horizontal->getVisible()
+		&& horizontal->getEnabled()
+		&& horizontal->handleScrollHWheel( 0, 0, clicks ) )
+	{
+		updateScroll();
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
 												  BOOL drop,
 												  EDragAndDropType cargo_type,
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index e6c78913975c706a80e40e4fe22dec603c1ef354..c14099dbd5361f409905827eb5269396f72d37e2 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -107,6 +107,7 @@ class LLScrollContainer : public LLUICtrl
 	virtual BOOL	handleKeyHere(KEY key, MASK mask);
 	virtual BOOL	handleUnicodeCharHere(llwchar uni_char);
 	virtual BOOL	handleScrollWheel( S32 x, S32 y, S32 clicks );
+	virtual BOOL	handleScrollHWheel( S32 x, S32 y, S32 clicks );
 	virtual BOOL	handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 								   EDragAndDropType cargo_type,
 								   void* cargo_data,
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index f4028057e8565b66078f4b9abc706c30910923e4..6c8fde580f6ec0576052da91906b5b22c000ef04 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1601,6 +1601,20 @@ BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
 	return handled;
 }
 
+BOOL LLScrollListCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+	BOOL handled = FALSE;
+	// Pretend the mouse is over the scrollbar
+	handled = mScrollbar->handleScrollHWheel( 0, 0, clicks );
+
+	if (mMouseWheelOpaque)
+	{
+		return TRUE;
+	}
+
+	return handled;
+}
+
 // *NOTE: Requires a valid row_index and column_index
 LLRect LLScrollListCtrl::getCellRect(S32 row_index, S32 column_index)
 {
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index b35a8608e70d82e2b9ec8f9ab7fb0d764ad329b2..d7572d9fcf6290f9ce652dc194f184a925a32232 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -317,6 +317,7 @@ class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
 	/*virtual*/ BOOL	handleKeyHere(KEY key, MASK mask);
 	/*virtual*/ BOOL	handleUnicodeCharHere(llwchar uni_char);
 	/*virtual*/ BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
+	/*virtual*/ BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	/*virtual*/ BOOL	handleToolTip(S32 x, S32 y, MASK mask);
 	/*virtual*/ void	setEnabled(BOOL enabled);
 	/*virtual*/ void	setFocus( BOOL b );
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index a23741b6dd6d17f600579bce9f34285e98ea3c3c..00443a16b2ea322aa4aaa9b82f15f2197faa6b51 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -3113,6 +3113,7 @@ BOOL LLTextSegment::handleRightMouseUp(S32 x, S32 y, MASK mask) { return FALSE;
 BOOL LLTextSegment::handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; }
 BOOL LLTextSegment::handleHover(S32 x, S32 y, MASK mask) { return FALSE; }
 BOOL LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; }
+BOOL LLTextSegment::handleScrollHWheel(S32 x, S32 y, S32 clicks) { return FALSE; }
 BOOL LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; }
 const std::string&	LLTextSegment::getName() const 
 {
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 9831c35858f5253d81f8f8a2f5695a575d868cbf..4239cdf43c52109c4c68974052bd03eede43d891 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -103,6 +103,7 @@ class LLTextSegment
 	/*virtual*/ BOOL			handleDoubleClick(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL			handleHover(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL			handleScrollWheel(S32 x, S32 y, S32 clicks);
+	/*virtual*/ BOOL			handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	/*virtual*/ BOOL			handleToolTip(S32 x, S32 y, MASK mask);
 	/*virtual*/ const std::string&	getName() const;
 	/*virtual*/ void			onMouseCaptureLost();
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 0e812771859ef02b6caeaeed4200cf225e246694..b0e346f513a61b66a1cb7016d12fcb48f3ff0ff3 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1060,6 +1060,11 @@ BOOL LLView::handleScrollWheel(S32 x, S32 y, S32 clicks)
 	return childrenHandleScrollWheel( x, y, clicks ) != NULL;
 }
 
+BOOL LLView::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+	return childrenHandleScrollHWheel( x, y, clicks ) != NULL;
+}
+
 BOOL LLView::handleRightMouseDown(S32 x, S32 y, MASK mask)
 {
 	return childrenHandleRightMouseDown( x, y, mask ) != NULL;
@@ -1085,6 +1090,11 @@ LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
 	return childrenHandleMouseEvent(&LLView::handleScrollWheel, x, y, clicks, false);
 }
 
+LLView* LLView::childrenHandleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+	return childrenHandleMouseEvent(&LLView::handleScrollHWheel, x, y, clicks, false);
+}
+
 // Called during downward traversal
 LLView* LLView::childrenHandleKey(KEY key, MASK mask)
 {
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 8494bb338adfa4e9e2dbc19821177089280e11d0..b448cc8397ece9181d405bfdf5d23ebd0fb33664 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -426,6 +426,7 @@ class LLView
 	/*virtual*/ BOOL	handleMiddleMouseDown(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL	handleDoubleClick(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
+	/*virtual*/ BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	/*virtual*/ BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask);
 	/*virtual*/ BOOL	handleRightMouseUp(S32 x, S32 y, MASK mask);	
 	/*virtual*/ BOOL	handleToolTip(S32 x, S32 y, MASK mask);
@@ -556,6 +557,7 @@ class LLView
 	LLView* childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask);
 	LLView* childrenHandleDoubleClick(S32 x, S32 y, MASK mask);
 	LLView*	childrenHandleScrollWheel(S32 x, S32 y, S32 clicks);
+	LLView*	childrenHandleScrollHWheel(S32 x, S32 y, S32 clicks);
 	LLView* childrenHandleRightMouseDown(S32 x, S32 y, MASK mask);
 	LLView* childrenHandleRightMouseUp(S32 x, S32 y, MASK mask);
 	LLView* childrenHandleToolTip(S32 x, S32 y, MASK mask);
diff --git a/indra/llwindow/llmousehandler.h b/indra/llwindow/llmousehandler.h
index 8e6fbdb4e3d51248f67b80979d1e175096fbca3c..1dcd0348d8bcd65414916024d3d2305fc8aeda18 100644
--- a/indra/llwindow/llmousehandler.h
+++ b/indra/llwindow/llmousehandler.h
@@ -66,6 +66,7 @@ class LLMouseHandler
 
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask) = 0;
 	virtual BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
+	virtual BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks) = 0;
 	virtual BOOL	handleToolTip(S32 x, S32 y, MASK mask) = 0;
 	virtual const std::string& getName() const = 0;
 
diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp
index c01f57437582d3cc6653cb6d0d01486e2c9e96f2..be61e1e16c62fd4db5b04e67bb92a612fe170f3b 100644
--- a/indra/llwindow/llwindowcallbacks.cpp
+++ b/indra/llwindow/llwindowcallbacks.cpp
@@ -130,6 +130,10 @@ void LLWindowCallbacks::handleScrollWheel(LLWindow *window, S32 clicks)
 {
 }
 
+void LLWindowCallbacks::handleScrollHWheel(LLWindow *window, S32 clicks)
+{
+}
+
 void LLWindowCallbacks::handleResize(LLWindow *window, const S32 width, const S32 height)
 {
 }
diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h
index 9304446f8f1d1da1d2d7038c6ce2d4c7ae292f96..3b186481388cc8d290a5a5a2788665b77a7a5807 100644
--- a/indra/llwindow/llwindowcallbacks.h
+++ b/indra/llwindow/llwindowcallbacks.h
@@ -56,6 +56,7 @@ class LLWindowCallbacks
 	virtual void handleMouseMove(LLWindow *window,  LLCoordGL pos, MASK mask);
     virtual void handleMouseDragged(LLWindow *window,  LLCoordGL pos, MASK mask);
 	virtual void handleScrollWheel(LLWindow *window,  S32 clicks);
+	virtual void handleScrollHWheel(LLWindow *window,  S32 clicks);
 	virtual void handleResize(LLWindow *window,  S32 width,  S32 height);
 	virtual void handleFocus(LLWindow *window);
 	virtual void handleFocusLost(LLWindow *window);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 8fefb119bce3d6edf7588fc418531744dd93c9ff..3c69aa98c43439b1435a0b539e63e89ec5981e5a 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2662,6 +2662,42 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
 			return 0;
 			}
 			*/
+		case WM_MOUSEHWHEEL:
+			{
+				window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_MOUSEHWHEEL");
+				static short h_delta = 0;
+
+				RECT	client_rect;
+
+				// eat scroll events that occur outside our window, since we use mouse position to direct scroll
+				// instead of keyboard focus
+				// NOTE: mouse_coord is in *window* coordinates for scroll events
+				POINT mouse_coord = {(S32)(S16)LOWORD(l_param), (S32)(S16)HIWORD(l_param)};
+
+				if (ScreenToClient(window_imp->mWindowHandle, &mouse_coord)
+					&& GetClientRect(window_imp->mWindowHandle, &client_rect))
+				{
+					// we have a valid mouse point and client rect
+					if (mouse_coord.x < client_rect.left || client_rect.right < mouse_coord.x
+						|| mouse_coord.y < client_rect.top || client_rect.bottom < mouse_coord.y)
+					{
+						// mouse is outside of client rect, so don't do anything
+						return 0;
+					}
+				}
+
+				S16 incoming_h_delta = HIWORD(w_param);
+				h_delta += incoming_h_delta;
+
+				// If the user rapidly spins the wheel, we can get messages with
+				// large deltas, like 480 or so.  Thus we need to scroll more quickly.
+				if (h_delta <= -WHEEL_DELTA || WHEEL_DELTA <= h_delta)
+				{
+					window_imp->mCallbacks->handleScrollHWheel(window_imp, h_delta / WHEEL_DELTA);
+					h_delta = 0;
+				}
+				return 0;
+			}
 			// Handle mouse movement within the window
 		case WM_MOUSEMOVE:
 			{
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 1d3a026049d0a5fb2d56e2103b4adf0974cf32ee..6cab9b9e99754e7ae19e6efb51dd7fb54625e988 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -210,6 +210,20 @@ BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
 	return TRUE;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+//
+BOOL LLMediaCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+    if (LLPanel::handleScrollHWheel(x, y, clicks)) return TRUE;
+    if (mMediaSource && mMediaSource->hasMedia())
+    {
+        convertInputCoords(x, y);
+        mMediaSource->scrollWheel(x, y, clicks, 0, gKeyboard->currentMask(TRUE));
+    }
+
+    return TRUE;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 //	virtual 
 BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 11400c82742cb624df901cf222ffe36f846ba2a8..958c76f2613fb855a94ab3a4a0b03ce24ccb3f92 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -92,6 +92,7 @@ class LLMediaCtrl :
 		virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
 		virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
 		virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
+		virtual BOOL handleScrollHWheel( S32 x, S32 y, S32 clicks );
 		virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
 
 		// navigation
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index b5d78f36548ebeb880dee7a62b8dc6bc249b7ef8..c5e31ff8e6bd3d1f6dc6b76cf9c225dd8c01c850 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -115,6 +115,12 @@ BOOL LLTool::handleScrollWheel(S32 x, S32 y, S32 clicks)
 	return FALSE;
 }
 
+BOOL LLTool::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+    // by default, didn't handle it
+    return FALSE;
+}
+
 BOOL LLTool::handleDoubleClick(S32 x,S32 y,MASK mask)
 {
 	// LL_INFOS() << "LLTool::handleDoubleClick" << LL_ENDL;
diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h
index c5bad9d53272635821f71587dfe9764290faeebb..308983afdabfd16d0f108248ddc8c6c23ee38a5c 100644
--- a/indra/newview/lltool.h
+++ b/indra/newview/lltool.h
@@ -57,6 +57,7 @@ class LLTool
 
 	virtual BOOL	handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks);
+	virtual BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	virtual BOOL	handleDoubleClick(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL	handleRightMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 47227f987dbd3eefd5eba402380356c7c1748661..6c1ae7159bca6dd12a8deb2dc6591570493455c9 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -208,6 +208,11 @@ BOOL LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)
 	return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);
 }
 
+BOOL LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+{
+    return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);
+}
+
 // True if you selected an object.
 BOOL LLToolPie::handleLeftClickPick()
 {
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 95d155a474a4ea1005df415b3784524794bfb906..fe0acfe47305e6c1cdb7eba830fb8316cc1f547b 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -50,6 +50,7 @@ class LLToolPie : public LLTool, public LLSingleton<LLToolPie>
 	virtual BOOL		handleHover(S32 x, S32 y, MASK mask);
 	virtual BOOL		handleDoubleClick(S32 x, S32 y, MASK mask);
 	virtual BOOL		handleScrollWheel(S32 x, S32 y, S32 clicks);
+	virtual BOOL		handleScrollHWheel(S32 x, S32 y, S32 clicks);
 	virtual BOOL		handleToolTip(S32 x, S32 y, MASK mask);
 
 	virtual void		render();
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 03d97a3a72f288061df60fc8b612f1c208a78720..9896399774b81eedbbe47cdbfaa8b012a8cd81f9 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -314,6 +314,7 @@ class LLViewerMediaImpl
 	/*virtual*/ BOOL	handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
 	/*virtual*/ BOOL	handleHover(S32 x, S32 y, MASK mask) { return FALSE; };
 	/*virtual*/ BOOL	handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; };
+	/*virtual*/ BOOL	handleScrollHWheel(S32 x, S32 y, S32 clicks) { return FALSE; };
 	/*virtual*/ BOOL	handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; };
 	/*virtual*/ BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
 	/*virtual*/ BOOL	handleRightMouseUp(S32 x, S32 y, MASK mask) { return FALSE; };
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ea846805c285dbf859798d86c5ade84bdf35d27d..72df31cb5f6196d0aafc87a7c09f526d407a3f81 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1587,6 +1587,11 @@ void LLViewerWindow::handleScrollWheel(LLWindow *window,  S32 clicks)
 	handleScrollWheel( clicks );
 }
 
+void LLViewerWindow::handleScrollHWheel(LLWindow *window,  S32 clicks)
+{
+	handleScrollHWheel(clicks);
+}
+
 void LLViewerWindow::handleWindowBlock(LLWindow *window)
 {
 	send_agent_pause();
@@ -3004,6 +3009,49 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
 	return;
 }
 
+void LLViewerWindow::handleScrollHWheel(S32 clicks)
+{
+    LLUI::resetMouseIdleTimer();
+
+    LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
+    if (mouse_captor)
+    {
+        S32 local_x;
+        S32 local_y;
+        mouse_captor->screenPointToLocal(mCurrentMousePoint.mX, mCurrentMousePoint.mY, &local_x, &local_y);
+        mouse_captor->handleScrollHWheel(local_x, local_y, clicks);
+        if (LLView::sDebugMouseHandling)
+        {
+            LL_INFOS() << "Scroll Horizontal Wheel handled by captor " << mouse_captor->getName() << LL_ENDL;
+        }
+        return;
+    }
+
+    LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
+    if (top_ctrl)
+    {
+        S32 local_x;
+        S32 local_y;
+        top_ctrl->screenPointToLocal(mCurrentMousePoint.mX, mCurrentMousePoint.mY, &local_x, &local_y);
+        if (top_ctrl->handleScrollHWheel(local_x, local_y, clicks)) return;
+    }
+
+    if (mRootView->handleScrollHWheel(mCurrentMousePoint.mX, mCurrentMousePoint.mY, clicks))
+    {
+        if (LLView::sDebugMouseHandling)
+        {
+            LL_INFOS() << "Scroll Horizontal Wheel" << LLView::sMouseHandlerMessage << LL_ENDL;
+        }
+        return;
+    }
+    else if (LLView::sDebugMouseHandling)
+    {
+        LL_INFOS() << "Scroll Horizontal Wheel not handled by view" << LL_ENDL;
+    }
+
+    return;
+}
+
 void LLViewerWindow::addPopup(LLView* popup)
 {
 	if (mPopupView)
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index d084642fdcd673ce312f9cb9f7e683a9ddcec713..385bbd57e542d9950f417a569663ebd0abbd1081 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -208,6 +208,7 @@ class LLViewerWindow : public LLWindowCallbacks
 	/*virtual*/ void handleMenuSelect(LLWindow *window,  S32 menu_item);
 	/*virtual*/ BOOL handlePaint(LLWindow *window,  S32 x,  S32 y,  S32 width,  S32 height);
 	/*virtual*/ void handleScrollWheel(LLWindow *window,  S32 clicks);
+	/*virtual*/ void handleScrollHWheel(LLWindow *window,  S32 clicks);
 	/*virtual*/ BOOL handleDoubleClick(LLWindow *window,  LLCoordGL pos, MASK mask);
 	/*virtual*/ void handleWindowBlock(LLWindow *window);
 	/*virtual*/ void handleWindowUnblock(LLWindow *window);
@@ -326,6 +327,7 @@ class LLViewerWindow : public LLWindowCallbacks
 	BOOL			handleKey(KEY key, MASK mask);
 	BOOL			handleKeyUp(KEY key, MASK mask);
 	void			handleScrollWheel	(S32 clicks);
+	void			handleScrollHWheel	(S32 clicks);
 
 	// add and remove views from "popup" layer
 	void			addPopup(LLView* popup);