[chromium] Notify compositor of wheel event registration via ScrollingCoordinator
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 00:29:53 +0000 (00:29 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 00:29:53 +0000 (00:29 +0000)
commitea4d1ff5ac8bc8c791102f31753e59d1035aa490
tree495a2e4b18b5997b9fa9f410810ad2b8f9371a64
parent9e25cec4036a1e59bbf2f726e558047db4dec6a6
[chromium] Notify compositor of wheel event registration via ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=79133

Reviewed by Dimitri Glazkov.

Source/WebCore:

This notifies the chromium compositor of changes to the number of wheel event handlers via ScrollingCoordinator
instead of through ChromeClient/WebViewImpl. This is the path we'll use for other properties in the future and
is more extensible for handling things other than the root layer.

Property behavior is covered by new unit tests in LayerChromiumTests and CCLayerTreeHostImplTest.

* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ScrollingCoordinator.h:
(WebCore):
(ScrollingCoordinator):
    Add a ScrollingCoordinatorPrivate so implementations can tack on additional data without having to #ifdef up
    ScrollingCoordinator.h/cpp
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore):
(WebCore::ScrollingCoordinator::~ScrollingCoordinator):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(ScrollingCoordinatorPrivate):
    ScrollingCoordinatorPrivate in the chromium implementation keeps a reference to the scroll layer.
(WebCore::ScrollingCoordinatorPrivate::ScrollingCoordinatorPrivate):
(WebCore::ScrollingCoordinatorPrivate::~ScrollingCoordinatorPrivate):
(WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
(WebCore::ScrollingCoordinatorPrivate::scrollLayer):
(WebCore):
(WebCore::ScrollingCoordinator::create):
(WebCore::ScrollingCoordinator::~ScrollingCoordinator):
(WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::setScrollLayer):
(WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::setScrollParameters):
(WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore):
(WebCore::ScrollingCoordinator::~ScrollingCoordinator):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setHaveWheelEventHandlers):
(WebCore):
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
* platform/graphics/chromium/cc/CCInputHandler.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::haveWheelEventHandlers):
(WebCore::CCLayerImpl::setHaveWheelEventHandlers):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::scrollBegin):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(CCLayerTreeHostImpl):

Source/WebKit/chromium:

Rips out old wheel event notification and adds unit tests for new LayerChromium property.

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::setViewport):
* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleInputEvent):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::numberOfWheelEventHandlersChanged):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* src/WebViewImpl.h:
* tests/CCLayerTreeHostImplTest.cpp:
(WebKit::TEST_F):
(WebKit):
* tests/LayerChromiumTest.cpp:
* tests/WebCompositorInputHandlerImplTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCInputHandler.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
Source/WebKit/chromium/tests/LayerChromiumTest.cpp
Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp