https://bugs.webkit.org/show_bug.cgi?id=98700
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 04:23:47 +0000 (04:23 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 04:23:47 +0000 (04:23 +0000)
commit87c5ffaec17757156ee64249996850b722129d6a
tree1267fbf3817b16e8e028c87bc4b78c3c517acbf5
parentfe9f22501c68fa5ca39bb1202cca082c04c017fe
https://bugs.webkit.org/show_bug.cgi?id=98700
ScrollingCoordinator is a hot mess of if-defs

Reviewed by Anders Carlsson.

This patch moves all of the threaded scrolling code in
ScrollingCoordinator into a new class called ScrollingCoordinatorMac
which inherits from ScrollingCoordinator.

It also adds ScrollingCoordinatorChromium to do Chromium-specific work.
ScrollingCoordinator itself does work that is cross-platform.

Finally, this patch also eliminates ScrollingCoordinatorNone.
ScrollingCoordinator is now sufficient for platforms that relied on
ScrollingCoordinatorNone to build.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
(WebCore):
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::~ScrollingCoordinator):
(WebCore::ScrollingCoordinator::pageDestroyed):
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
(WebCore::ScrollingCoordinator::scrollLayerForFrameView):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
* page/scrolling/ScrollingCoordinator.h:
(WebCore):
(ScrollingCoordinator):
(WebCore::ScrollingCoordinator::scrollingTree):
(WebCore::ScrollingCoordinator::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinator::supportsFixedPositionLayers):
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinator::handleWheelEvent):
(WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
(WebCore::ScrollingCoordinator::attachToStateTree):
(WebCore::ScrollingCoordinator::detachFromStateTree):
(WebCore::ScrollingCoordinator::clearStateTree):
(WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
(WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
(WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingCoordinatorNone.cpp: Removed.
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinatorChromium::ScrollingCoordinatorChromium):
(WebCore::ScrollingCoordinatorChromium::~ScrollingCoordinatorChromium):
(WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
(WebCore):
(WebCore::ScrollingCoordinatorChromium::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorChromium::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinatorChromium::frameViewVerticalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinatorChromium::setScrollLayer):
(WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinatorChromium::setWheelEventHandlerCount):
(WebCore::ScrollingCoordinatorChromium::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinatorChromium::setLayerIsContainerForFixedPositionLayers):
(WebCore::ScrollingCoordinatorChromium::setLayerIsFixedToContainerLayer):
(WebCore::ScrollingCoordinatorChromium::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinatorChromium::recomputeWheelEventHandlerCountForFrameView):
* page/scrolling/chromium/ScrollingCoordinatorChromium.h: Added.
(WebCore):
(ScrollingCoordinatorChromium):
(WebCore::ScrollingCoordinatorChromium::supportsFixedPositionLayers):
* page/scrolling/mac/ScrollingCoordinatorMac.h: Added.
(WebCore):
(ScrollingCoordinatorMac):
(ScrollParameters):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::~ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore):
(WebCore::ScrollingCoordinatorMac::scrollingTree):
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinatorMac::frameViewVerticalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
(WebCore::ScrollingCoordinatorMac::updateMainFrameScrollPositionAndScrollLayerPosition):
(WebCore::ScrollingCoordinatorMac::attachToStateTree):
(WebCore::ScrollingCoordinatorMac::detachFromStateTree):
(WebCore::ScrollingCoordinatorMac::clearStateTree):
(WebCore::ScrollingCoordinatorMac::stateNodeForID):
(WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView):
(WebCore::ScrollingCoordinatorMac::setScrollLayerForNode):
(WebCore::ScrollingCoordinatorMac::setNonFastScrollableRegionForNode):
(WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
(WebCore::ScrollingCoordinatorMac::setWheelEventHandlerCountForNode):
(WebCore::ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinatorMac::updateMainFrameScrollLayerPosition):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
(WebCore::ScrollingCoordinatorMac::commitTreeState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp [deleted file]
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.h [new file with mode: 0644]
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h [new file with mode: 0644]
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm