Changeset 58445 in webkit


Ignore:
Timestamp:
Apr 28, 2010 5:22:16 PM (14 years ago)
Author:
Darin Adler
Message:

2010-04-28 Darin Adler <Darin Adler>

Reviewed by Dan Bernstein.

Remove some obsolete scrolling code
https://bugs.webkit.org/show_bug.cgi?id=38293

  • page/Chrome.cpp: (WebCore::Chrome::scrollRectIntoView): Removed ScrollView* argument.
  • page/Chrome.h: Made scrollRectIntoView non-virtual, and removed ScrollView* argument.
  • page/FrameView.cpp: Removed scrollRectIntoViewRecursively.
  • page/FrameView.h: Removed scrollRectIntoViewRecursively and made setScrollPosition non-virtual, since there is no class derived from this class, and ScrollView's setScrollPosition is non-virtual.
  • platform/HostWindow.h: Removed scrollRectIntoView.
  • platform/ScrollView.cpp: (WebCore::ScrollView::scrollRectIntoViewRecursively): Updated comment since I was able to do most of the tasks listed here.
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): Removed 0 passed for ScrollView* argument to Chrome::scrollRectIntoView.
Location:
trunk/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r58442 r58445  
     12010-04-28  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Remove some obsolete scrolling code
     6        https://bugs.webkit.org/show_bug.cgi?id=38293
     7
     8        * page/Chrome.cpp:
     9        (WebCore::Chrome::scrollRectIntoView): Removed ScrollView* argument.
     10        * page/Chrome.h: Made scrollRectIntoView non-virtual, and removed ScrollView* argument.
     11
     12        * page/FrameView.cpp: Removed scrollRectIntoViewRecursively.
     13        * page/FrameView.h: Removed scrollRectIntoViewRecursively and made
     14        setScrollPosition non-virtual, since there is no class derived from
     15        this class, and ScrollView's setScrollPosition is non-virtual.
     16
     17        * platform/HostWindow.h: Removed scrollRectIntoView.
     18
     19        * platform/ScrollView.cpp:
     20        (WebCore::ScrollView::scrollRectIntoViewRecursively): Updated comment
     21        since I was able to do most of the tasks listed here.
     22
     23        * rendering/RenderLayer.cpp:
     24        (WebCore::RenderLayer::scrollRectToVisible): Removed 0 passed for
     25        ScrollView* argument to Chrome::scrollRectIntoView.
     26
    1272010-04-28  Mike Thole  <mthole@apple.com>
    228
  • trunk/WebCore/page/Chrome.cpp

    r57903 r58445  
    108108}
    109109
    110 void Chrome::scrollRectIntoView(const IntRect& rect, const ScrollView* scrollView) const
    111 {
    112     m_client->scrollRectIntoView(rect, scrollView);
     110void Chrome::scrollRectIntoView(const IntRect& rect) const
     111{
     112    m_client->scrollRectIntoView(rect, 0);
    113113}
    114114
  • trunk/WebCore/page/Chrome.h

    r57903 r58445  
    6969        virtual IntRect windowToScreen(const IntRect&) const;
    7070        virtual PlatformPageClient platformPageClient() const;
    71         virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const;
    7271        virtual void scrollbarsModeDidChange() const;
     72
     73        void scrollRectIntoView(const IntRect&) const;
    7374
    7475        void contentsSizeChanged(Frame*, const IntSize&) const;
  • trunk/WebCore/page/FrameView.cpp

    r58428 r58445  
    985985}
    986986
    987 void FrameView::scrollRectIntoViewRecursively(const IntRect& r)
    988 {
    989     bool wasInProgrammaticScroll = m_inProgrammaticScroll;
    990     m_inProgrammaticScroll = true;
    991     m_maintainScrollPositionAnchor = 0;
    992     ScrollView::scrollRectIntoViewRecursively(r);
    993     m_inProgrammaticScroll = wasInProgrammaticScroll;
    994 }
    995 
    996987void FrameView::setScrollPosition(const IntPoint& scrollPoint)
    997988{
  • trunk/WebCore/page/FrameView.h

    r57165 r58445  
    138138    virtual IntRect windowResizerRect() const;
    139139
    140     virtual void scrollRectIntoViewRecursively(const IntRect&);
    141     virtual void setScrollPosition(const IntPoint&);
     140    void setScrollPosition(const IntPoint&);
    142141    void scrollPositionChanged();
    143142
  • trunk/WebCore/platform/HostWindow.h

    r55864 r58445  
    5555    virtual PlatformPageClient platformPageClient() const = 0;
    5656   
    57     // For scrolling a rect into view recursively.  Useful in the cases where a WebView is embedded inside some containing
    58     // platform-specific ScrollView.
    59     virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const = 0;
    60 
    6157    // To notify WebKit of scrollbar mode changes.
    6258    virtual void scrollbarsModeDidChange() const = 0;
  • trunk/WebCore/platform/ScrollView.cpp

    r58428 r58445  
    300300    // FIXME: This function is unused. To clean up further the following can be done:
    301301    //
    302     //   1) This function and FrameView::scrollRectIntoViewRecursively
    303     //      can be deleted.
    304     //   2) The FrameView::setScrollPosition can be made non-virtual,
    305     //      since there is no class derived from FrameView. Or the
    306     //      ScrollView::setScrollPosition should be made virtual.
    307     //   3) The scrollRectIntoView function can be removed from the
    308     //      HostWindow class.
    309     //   4) The Chrome::scrollRectIntoView function can be made
    310     //      non-virtual.
    311     //   5) The unused ScrollView* argument can be removed from both
    312     //      Chrome::scrollRectIntoView and ChromeClient::scrollRectIntoView.
     302    //   1) This function can be deleted.
     303    //   2) The unused ScrollView* argument can be removed from ChromeClient::scrollRectIntoView.
    313304    //
    314305    ASSERT_NOT_REACHED();
  • trunk/WebCore/rendering/RenderLayer.cpp

    r58428 r58445  
    14001400                if (Frame* frame = frameView->frame()) {
    14011401                    if (Page* page = frame->page())
    1402                         page->chrome()->scrollRectIntoView(rect, 0);
     1402                        page->chrome()->scrollRectIntoView(rect);
    14031403                }
    14041404            }
Note: See TracChangeset for help on using the changeset viewer.