Add mechanism to inform the ScrollAnimator when Scrollbars are added
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 21:29:12 +0000 (21:29 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 21:29:12 +0000 (21:29 +0000)
commit87539d0c9d05f9d4a42d4e4e9d9703e9173d32ff
tree42ad699502dfa5b1aac137c1ae27351dba33de9f
parent2d54b1b7ffe8fce2a21c74913e2aa13260bdf280
Add mechanism to inform the ScrollAnimator when Scrollbars are added
and removed.

Reviewed by Beth Dakin.

* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::didAddVerticalScrollbar):
(WebCore::ScrollAnimator::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimator::didAddHorizontalScrollbar):
(WebCore::ScrollAnimator::willRemoveHorizontalScrollbar):
Make virtual to allow platform specific overrides.

* platform/ScrollView.cpp:
(WebCore::ScrollView::setHasHorizontalScrollbar):
(WebCore::ScrollView::setHasVerticalScrollbar):
Call new ScrollableArea functions.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::didAddVerticalScrollbar):
(WebCore::ScrollableArea::willRemoveVerticalScrollbar):
(WebCore::ScrollableArea::didAddHorizontalScrollbar):
(WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
* platform/ScrollableArea.h:
Pipe to ScrollAnimator.

* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::unregisterScrollbar):
(WebCore::ScrollbarThemeMac::painterForScrollbar):
Move painter delegate registration to the new didAdd/willRemove functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollAnimator.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/mac/ScrollAnimatorMac.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.h
Source/WebCore/platform/mac/ScrollbarThemeMac.mm