2008-08-26 Maxime Britto <britto@apple.com>
Reviewed by Adele.
<rdar://6159244> Pan-scrolling does not work on particular sites (starmagazine.com, nytimes.com)
This patch fixes the issues and modify the behavior of the panscroll by allowing it to jump to a parent layer when it reaches the end of its scrollable area.
This is matching the behavior of the mouse wheel when trying to scroll in a smaller layer of the page (div, textarea, ...) and when we reach the edge and keep scrolling then the whole page scrolls.
* page/EventHandler.cpp:
(WebCore::EventHandler::updateAutoscrollRenderer): if we switch to the parent layer to do the scroll we want to change the renderer for the panning
* page/EventHandler.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::panScrollFromPoint): now calls the scrollByRecursively method when it has computed the xDelta and yDelta
(WebCore::RenderLayer::scrollByRecursively): try to scroll the current layer by the xDelta and yDelta provided, if it can't it ask its parent layer to do so.
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::canBeProgramaticallyScrolled): a RenderObject must have a RenderLayer to be programatically scrolled
(WebCore::RenderObject::autoscroll): No need to check for the layer anymore since we verify it's present in the upmentionned method
(WebCore::RenderObject::panScroll): No need to check for the layer anymore too.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3bd0bbd..3007aea 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2008-08-26 Maxime Britto <britto@apple.com>
+
+ Reviewed by Adele.
+
+ <rdar://6159244> Pan-scrolling does not work on particular sites (starmagazine.com, nytimes.com)
+ This patch fixes the issues and modify the behavior of the panscroll by allowing it to jump to a parent layer when it reaches the end of its scrollable area.
+ This is matching the behavior of the mouse wheel when trying to scroll in a smaller layer of the page (div, textarea, ...) and when we reach the edge and keep scrolling then the whole page scrolls.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateAutoscrollRenderer): if we switch to the parent layer to do the scroll we want to change the renderer for the panning
+ * page/EventHandler.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::panScrollFromPoint): now calls the scrollByRecursively method when it has computed the xDelta and yDelta
+ (WebCore::RenderLayer::scrollByRecursively): try to scroll the current layer by the xDelta and yDelta provided, if it can't it ask its parent layer to do so.
+ * rendering/RenderLayer.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::canBeProgramaticallyScrolled): a RenderObject must have a RenderLayer to be programatically scrolled
+ (WebCore::RenderObject::autoscroll): No need to check for the layer anymore since we verify it's present in the upmentionned method
+ (WebCore::RenderObject::panScroll): No need to check for the layer anymore too.
+
2008-08-25 Julien Chaffraix <jchaffraix@webkit.org>
Reviewed by Darin.