Scrollbars and ScrollAnimators must always have a ScrollableArea
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Feb 2015 03:34:09 +0000 (03:34 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Feb 2015 03:34:09 +0000 (03:34 +0000)
commitbcb3885304f1068febbe0ed32778aabe310c1329
tree072ac28dac57da14fa58ce19e918a2656a9eb379
parent3cdec727d778d9f6bb8bf4a0fce646a0e6b71a77
Scrollbars and ScrollAnimators must always have a ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=141855

Reviewed by Simon Fraser.
Source/WebCore:

No change in functionality.

Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
a number of unnecessary nullptr checks.

* accessibility/AccessibilityScrollbar.cpp:
(WebCore::AccessibilityScrollbar::setValue):
* css/SelectorCheckerTestFunctions.h:
(WebCore::scrollbarMatchesCornerPresentPseudoClass):
* page/FrameView.cpp:
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::setFixedVisibleContentRect):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::handleWheelEventPhase):
* platform/PopupMenuClient.h:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::handleWheelEvent):
(WebCore::ScrollAnimator::notifyPositionChanged):
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
* platform/ScrollAnimatorNone.cpp:
* platform/ScrollAnimatorNone.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::createScrollbar):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollAnimator):
(WebCore::ScrollableArea::scroll):
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
(WebCore::ScrollableArea::notifyScrollPositionChanged):
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::handleWheelEvent):
(WebCore::ScrollableArea::handleTouchEvent):
(WebCore::ScrollableArea::mouseEnteredScrollbar):
(WebCore::ScrollableArea::mouseExitedScrollbar):
(WebCore::ScrollableArea::didAddScrollbar):
(WebCore::ScrollableArea::willRemoveScrollbar):
(WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
(WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
* platform/ScrollableArea.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::createNativeScrollbar):
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::scrollbarOverlayStyle):
(WebCore::Scrollbar::isScrollableAreaActive):
(WebCore::Scrollbar::offsetDidChange):
(WebCore::Scrollbar::autoscrollPressedPart):
(WebCore::Scrollbar::moveThumb):
(WebCore::Scrollbar::mouseMoved):
(WebCore::Scrollbar::mouseEntered):
(WebCore::Scrollbar::mouseExited):
(WebCore::Scrollbar::mouseUp):
(WebCore::Scrollbar::shouldParticipateInHitTesting):
(WebCore::Scrollbar::isWindowActive):
(WebCore::Scrollbar::invalidateRect):
(WebCore::Scrollbar::convertToContainingView):
(WebCore::Scrollbar::convertFromContainingView):
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
* platform/Scrollbar.h:
(WebCore::Scrollbar::scrollableArea):
(WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
* platform/ios/ScrollAnimatorIOS.mm:
(WebCore::ScrollAnimatorIOS::handleTouchEvent):
(WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(-[WebScrollbarPainterDelegate scrollAnimator]):
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
(WebCore::ScrollAnimator::create):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollAnimatorMac::immediateScrollTo):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::pinnedInDirection):
(WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
(WebCore::ScrollAnimatorMac::allowsVerticalStretching):
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
(WebCore::ScrollAnimatorMac::stretchAmount):
(WebCore::ScrollAnimatorMac::canScrollHorizontally):
(WebCore::ScrollAnimatorMac::canScrollVertically):
(WebCore::ScrollAnimatorMac::absoluteScrollPosition):
(WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::destroyScrollbar):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
(WebCore::RenderListBox::destroyScrollbar):
* rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* rendering/RenderMenuList.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::createCustomScrollbar):
(WebCore::RenderScrollbar::RenderScrollbar):
* rendering/RenderScrollbar.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSearchField.h:

Source/WebKit2:

Change users of the scrollAnimator() method to expect a reference instead of a pointer.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):
(WebKit::PDFPlugin::destroyScrollbar):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityScrollbar.cpp
Source/WebCore/css/SelectorCheckerTestFunctions.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/platform/PopupMenuClient.h
Source/WebCore/platform/ScrollAnimator.cpp
Source/WebCore/platform/ScrollAnimator.h
Source/WebCore/platform/ScrollAnimatorNone.cpp
Source/WebCore/platform/ScrollAnimatorNone.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/Scrollbar.cpp
Source/WebCore/platform/Scrollbar.h
Source/WebCore/platform/efl/ScrollbarEfl.cpp
Source/WebCore/platform/efl/ScrollbarEfl.h
Source/WebCore/platform/ios/ScrollAnimatorIOS.h
Source/WebCore/platform/ios/ScrollAnimatorIOS.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.h
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderScrollbar.h
Source/WebCore/rendering/RenderSearchField.cpp
Source/WebCore/rendering/RenderSearchField.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm