Package up some data about scrollability into a struct for use in the scrolling tree
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2013 19:57:27 +0000 (19:57 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Dec 2013 19:57:27 +0000 (19:57 +0000)
commitbe42d03b752aea9df162d5a4d148014d2f53fd3f
tree378c12b9108eb8231624ec1debb1cfda290a9c27
parent14830c096f961bce814368aa431005ae05e5a839
Package up some data about scrollability into a struct for use in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=125792

Reviewed by Beth Dakin.

Both scrolling state nodes and scrolling nodes share a set of parameters
relating to scrollability and rubberbanding, so package them into a struct
for re-use. Send the struct wholesale to the scrolling thread.

* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct.
(WebCore::ScrollableAreaParameters::operator==):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering.
(WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved.
(WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once.
(WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
* page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollOrigin):
(WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
(WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
(WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
(WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
(WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode().
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this
function. Reordering.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm