Changeset 103421 in webkit


Ignore:
Timestamp:
Dec 21, 2011 11:41:12 AM (12 years ago)
Author:
andersca@apple.com
Message:

Get rid of ScrollableAreaClient
https://bugs.webkit.org/show_bug.cgi?id=75021

Reviewed by Sam Weinig.

The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and
ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects
all the different responsibilities it currently has.

  • WebCore.exp.in:
  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):

  • page/ScrollingCoordinator.cpp:
  • page/ScrollingCoordinator.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::ScrollView):

  • platform/ScrollView.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::ScrollableArea):

  • platform/ScrollableArea.h:
  • platform/ScrollableAreaClient.h: Removed.
Location:
trunk/Source/WebCore
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r103419 r103421  
     12011-12-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Get rid of ScrollableAreaClient
     4        https://bugs.webkit.org/show_bug.cgi?id=75021
     5
     6        Reviewed by Sam Weinig.
     7
     8        The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and
     9        ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects
     10        all the different responsibilities it currently has.
     11
     12        * WebCore.exp.in:
     13        * page/FrameView.cpp:
     14        (WebCore::FrameView::FrameView):
     15        * page/ScrollingCoordinator.cpp:
     16        * page/ScrollingCoordinator.h:
     17        * platform/ScrollView.cpp:
     18        (WebCore::ScrollView::ScrollView):
     19        * platform/ScrollView.h:
     20        * platform/ScrollableArea.cpp:
     21        (WebCore::ScrollableArea::ScrollableArea):
     22        * platform/ScrollableArea.h:
     23        * platform/ScrollableAreaClient.h: Removed.
     24
    1252011-12-21  Anders Carlsson  <andersca@apple.com>
    226
  • trunk/Source/WebCore/WebCore.exp.in

    r103362 r103421  
    380380__ZN7WebCore14ScrollableArea29willRemoveHorizontalScrollbarEPNS_9ScrollbarE
    381381__ZN7WebCore14ScrollableArea6scrollENS_15ScrollDirectionENS_17ScrollGranularityEf
    382 __ZN7WebCore14ScrollableAreaC2EPNS_20ScrollableAreaClientE
     382__ZN7WebCore14ScrollableAreaC2Ev
    383383__ZN7WebCore14ScrollableAreaD2Ev
    384384__ZN7WebCore14ScrollbarTheme5themeEv
  • trunk/Source/WebCore/page/FrameView.cpp

    r103362 r103421  
    125125}
    126126
    127 static inline ScrollableAreaClient* scrollableAreaClient(Frame* frame)
    128 {
    129 #if ENABLE(THREADED_SCROLLING)
    130     if (Page* page = frame ? frame->page() : 0) {
    131         if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
    132             return scrollingCoordinator->scrollableAreaClientForFrame(frame);
    133     }
    134 #else
    135     UNUSED_PARAM(frame);
    136 #endif
    137 
    138     return 0;
    139 }
    140 
    141127FrameView::FrameView(Frame* frame)
    142     : ScrollView(scrollableAreaClient(frame))
    143     , m_frame(frame)
     128    : m_frame(frame)
    144129    , m_canHaveScrollbars(true)
    145130    , m_slowRepaintObjectCount(0)
  • trunk/Source/WebCore/page/ScrollingCoordinator.cpp

    r103342 r103421  
    5555{
    5656    ASSERT(!m_page);
    57 }
    58 
    59 ScrollableAreaClient* ScrollingCoordinator::scrollableAreaClientForFrame(Frame*)
    60 {
    61     // FIXME: Implement.
    62     return 0;
    6357}
    6458
  • trunk/Source/WebCore/page/ScrollingCoordinator.h

    r103342 r103421  
    4545class Page;
    4646class PlatformWheelEvent;
    47 class ScrollableAreaClient;
    4847
    4948#if ENABLE(GESTURE_EVENTS)
     
    5756
    5857    void pageDestroyed();
    59 
    60     // Return a scrollable area client for the given frame.
    61     ScrollableAreaClient* scrollableAreaClientForFrame(Frame*);
    6258
    6359    // Should be called whenever the scroll layer for the given frame changes.
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r103342 r103421  
    4242namespace WebCore {
    4343
    44 ScrollView::ScrollView(ScrollableAreaClient *client)
    45     : ScrollableArea(client)
    46     , m_horizontalScrollbarMode(ScrollbarAuto)
     44ScrollView::ScrollView()
     45    : m_horizontalScrollbarMode(ScrollbarAuto)
    4746    , m_verticalScrollbarMode(ScrollbarAuto)
    4847    , m_horizontalScrollbarLock(false)
  • trunk/Source/WebCore/platform/ScrollView.h

    r103362 r103421  
    294294
    295295protected:
    296     ScrollView(ScrollableAreaClient* = 0);
     296    ScrollView();
    297297
    298298    virtual void repaintContentRectangle(const IntRect&, bool now = false);
  • trunk/Source/WebCore/platform/ScrollableArea.cpp

    r103362 r103421  
    4343namespace WebCore {
    4444
    45 ScrollableArea::ScrollableArea(ScrollableAreaClient* client)
    46     : m_client(client)
    47     , m_constrainsScrollingToContentEdge(true)
     45ScrollableArea::ScrollableArea()
     46    : m_constrainsScrollingToContentEdge(true)
    4847    , m_inLiveResize(false)
    4948    , m_verticalScrollElasticity(ScrollElasticityNone)
     
    5251    , m_scrollOriginChanged(false)
    5352{
    54     // FIXME: If no client was supplied, create a default one.
    5553}
    5654
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r103362 r103421  
    3737class PlatformWheelEvent;
    3838class ScrollAnimator;
    39 class ScrollableAreaClient;
    4039#if USE(ACCELERATED_COMPOSITING)
    4140class GraphicsLayer;
     
    176175
    177176protected:
    178     explicit ScrollableArea(ScrollableAreaClient* = 0);
     177    ScrollableArea();
    179178    virtual ~ScrollableArea();
    180179
     
    200199
    201200private:
    202     ScrollableAreaClient* m_client;
    203 
    204201    // NOTE: Only called from the ScrollAnimator.
    205202    friend class ScrollAnimator;
Note: See TracChangeset for help on using the changeset viewer.