summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/WebScrollbarImpl.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebKit/chromium/src/WebScrollbarImpl.cpp
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebKit/chromium/src/WebScrollbarImpl.cpp')
-rw-r--r--WebKit/chromium/src/WebScrollbarImpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebKit/chromium/src/WebScrollbarImpl.cpp b/WebKit/chromium/src/WebScrollbarImpl.cpp
index 8bf5340..c0131cb 100644
--- a/WebKit/chromium/src/WebScrollbarImpl.cpp
+++ b/WebKit/chromium/src/WebScrollbarImpl.cpp
@@ -81,7 +81,7 @@ void WebScrollbarImpl::setLocation(const WebRect& rect)
m_scrollbar->invalidate();
int length = m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar->width() : m_scrollbar->height();
- int pageStep = max(max<int>(length * Scrollbar::minFractionToStepWhenPaging(), length - Scrollbar::maxOverlapBetweenPages()), 1);
+ int pageStep = max(max(static_cast<int>(static_cast<float>(length) * Scrollbar::minFractionToStepWhenPaging()), length - Scrollbar::maxOverlapBetweenPages()), 1);
m_scrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_scrollbar->setEnabled(m_scrollbar->totalSize() > length);
m_scrollbar->setProportion(length, m_scrollbar->totalSize());
@@ -214,7 +214,7 @@ bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event)
if (mousewheel.scrollByPage) {
ASSERT(m_scrollbar->orientation() == VerticalScrollbar);
bool negative = delta < 0;
- delta = max(max<int>(m_scrollbar->visibleSize() * Scrollbar::minFractionToStepWhenPaging(), m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages()), 1);
+ delta = max(max(static_cast<float>(m_scrollbar->visibleSize()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
if (negative)
delta *= -1;
}