[chromium] Add WebLayer API for scrolling
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 20:17:09 +0000 (20:17 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 20:17:09 +0000 (20:17 +0000)
commitad27a4c794935b3fb903233fcc56f8e1cf8d57a4
tree1ee86edd7104ef92bde1d13c055c30da652e3344
parent907be8c1c5dcd3f2c5a340a7e451dc67f341b281
[chromium] Add WebLayer API for scrolling
https://bugs.webkit.org/show_bug.cgi?id=89913

Reviewed by Adrienne Walker.

Source/Platform:

Adds WebScrollableLayer type to represent a layer that can be scrolled by the user. Currently WebContentLayers
are scrollable and no other layer types are, although this might change in the future.

* chromium/public/WebContentLayer.h:
(WebKit::WebContentLayer::WebContentLayer):
* chromium/public/WebLayer.h:
(WebLayer):
* chromium/public/WebScrollableLayer.h:
(WebKit):
(WebScrollableLayer):
(WebKit::WebScrollableLayer::WebScrollableLayer):
(WebKit::WebScrollableLayer::~WebScrollableLayer):
(WebKit::WebScrollableLayer::operator=):

Source/WebCore:

Use new WebScrollableLayer type in ScrollingCoordinatorChromium. This file peeks "under the hood" a fair amount
since we don't have WebLayer API for scrollbar layers yet.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
(WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
(WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
(WebCore::ScrollingCoordinatorPrivate::hasScrollLayer):
(WebCore::ScrollingCoordinatorPrivate::scrollLayer):
(ScrollingCoordinatorPrivate):
(WebCore::createScrollbarLayer):
(WebCore::ScrollingCoordinator::setScrollLayer):
(WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):

Source/WebKit/chromium:

Use WebScrollableLayer type in NonCompositedContentHost.

* WebKit.gyp:
* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::setScrollLayer):
(WebKit::reserveScrollbarLayers):
(WebKit::NonCompositedContentHost::setViewport):
(WebKit::NonCompositedContentHost::haveScrollLayer):
(WebKit):
(WebKit::NonCompositedContentHost::scrollLayer):
* src/NonCompositedContentHost.h:
(WebCore):
* src/WebContentLayer.cpp:
(WebKit::WebContentLayer::WebContentLayer):
* src/WebLayer.cpp:
(WebKit::WebLayer::numberOfChildren):
(WebKit):
(WebKit::WebLayer::childAt):
(WebKit::WebLayer::setAlwaysReserveTextures):
* src/WebScrollableLayer.cpp:
(WebKit):
(WebKit::WebScrollableLayer::setScrollPosition):
(WebKit::WebScrollableLayer::setScrollable):
(WebKit::WebScrollableLayer::setHaveWheelEventHandlers):
(WebKit::WebScrollableLayer::setShouldScrollOnMainThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/Platform/ChangeLog
Source/Platform/chromium/public/WebContentLayer.h
Source/Platform/chromium/public/WebLayer.h
Source/Platform/chromium/public/WebScrollableLayer.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/src/NonCompositedContentHost.cpp
Source/WebKit/chromium/src/NonCompositedContentHost.h
Source/WebKit/chromium/src/WebContentLayer.cpp
Source/WebKit/chromium/src/WebLayer.cpp
Source/WebKit/chromium/src/WebScrollableLayer.cpp [new file with mode: 0644]