summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderLayer.cpp')
-rw-r--r--WebCore/rendering/RenderLayer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 347fa32..331750c 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2268,12 +2268,10 @@ bool RenderLayer::scroll(ScrollDirection direction, ScrollGranularity granularit
bool didVerticalScroll = false;
if (m_hBar) {
- if (granularity == ScrollByDocument) {
- // Special-case for the ScrollByDocument granularity. A document scroll can only be up
- // or down and in both cases the horizontal bar goes all the way to the left.
- didHorizontalScroll = m_hBar->scroll(ScrollLeft, ScrollByDocument, multiplier);
- } else
- didHorizontalScroll = m_hBar->scroll(direction, granularity, multiplier);
+ // Special-case for the ScrollByDocument granularity. A document scroll
+ // can only be up or down and in both cases the horizontal bar goes all
+ // the way to the left.
+ didHorizontalScroll = m_hBar->scroll((granularity == ScrollByDocument) ? ScrollLeft : direction, granularity, multiplier);
}
if (m_vBar)