[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jamesr at google.com
jamesr at google.com
Wed Dec 22 14:21:11 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b3c368500d8984ee76039951f80127080a0c5f89
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 6 23:56:59 2010 +0000
2010-10-06 Peter Kasting <pkasting at google.com>
Reviewed by James Robinson
ScrollViews without scrollbars should not eat scroll events
https://bugs.webkit.org/show_bug.cgi?id=47036
* platform/ScrollView.cpp:
(WebCore::ScrollView::wheelEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index eb1d2eb..176644a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-06 Peter Kasting <pkasting at google.com>
+
+ Reviewed by James Robinson
+
+ ScrollViews without scrollbars should not eat scroll events
+ https://bugs.webkit.org/show_bug.cgi?id=47036
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+
2010-10-06 Daniel Bates <dbates at rim.com>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 50a1f5b..66dcb8a 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -688,27 +688,27 @@ void ScrollView::wheelEvent(PlatformWheelEvent& e)
return;
}
- // Determine how much we want to scroll. If we can move at all, we will accept the event.
+ // Accept the event if we have a scrollbar in that direction and can still
+ // scroll any further.
+ float deltaX = m_horizontalScrollbar ? e.deltaX() : 0;
+ float deltaY = m_verticalScrollbar ? e.deltaY() : 0;
IntSize maxScrollDelta = maximumScrollPosition() - scrollPosition();
- if ((e.deltaX() < 0 && maxScrollDelta.width() > 0) ||
- (e.deltaX() > 0 && scrollOffset().width() > 0) ||
- (e.deltaY() < 0 && maxScrollDelta.height() > 0) ||
- (e.deltaY() > 0 && scrollOffset().height() > 0)) {
+ if ((deltaX < 0 && maxScrollDelta.width() > 0)
+ || (deltaX > 0 && scrollOffset().width() > 0)
+ || (deltaY < 0 && maxScrollDelta.height() > 0)
+ || (deltaY > 0 && scrollOffset().height() > 0)) {
e.accept();
- float deltaX = e.deltaX();
- float deltaY = e.deltaY();
if (e.granularity() == ScrollByPageWheelEvent) {
- ASSERT(deltaX == 0);
+ ASSERT(!e.deltaX());
bool negative = deltaY < 0;
deltaY = max(max(static_cast<float>(visibleHeight()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(visibleHeight() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
if (negative)
deltaY = -deltaY;
}
- // Should we fall back on scrollBy() if there is no scrollbar for a non-zero delta?
- if (deltaY && m_verticalScrollbar)
+ if (deltaY)
m_verticalScrollbar->scroll(ScrollUp, ScrollByPixel, deltaY);
- if (deltaX && m_horizontalScrollbar)
+ if (deltaX)
m_horizontalScrollbar->scroll(ScrollLeft, ScrollByPixel, deltaX);
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list