Changeset 95227 in webkit


Ignore:
Timestamp:
Sep 15, 2011 2:10:27 PM (13 years ago)
Author:
andersca@apple.com
Message:

Remove ScrollView::platformContentsSize
https://bugs.webkit.org/show_bug.cgi?id=68188

Reviewed by Darin Adler.

Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never
have to ask the underlying platform scroll view for contents size since it should always just
be equal to m_contentsSize.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::contentsSize):
(WebCore::ScrollView::wheelEvent):

  • platform/ScrollView.h:
  • platform/mac/ScrollViewMac.mm:
  • platform/wx/ScrollViewWx.cpp:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95226 r95227  
     12011-09-15  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove ScrollView::platformContentsSize
     4        https://bugs.webkit.org/show_bug.cgi?id=68188
     5
     6        Reviewed by Darin Adler.
     7
     8        Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never
     9        have to ask the underlying platform scroll view for contents size since it should always just
     10        be equal to m_contentsSize.
     11
     12        * platform/ScrollView.cpp:
     13        (WebCore::ScrollView::contentsSize):
     14        (WebCore::ScrollView::wheelEvent):
     15        * platform/ScrollView.h:
     16        * platform/mac/ScrollViewMac.mm:
     17        * platform/wx/ScrollViewWx.cpp:
     18
    1192011-09-15  Jon Lee  <jonlee@apple.com>
    220
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r95158 r95227  
    281281IntSize ScrollView::contentsSize() const
    282282{
    283     if (platformWidget())
    284         return platformContentsSize();
    285283    return m_contentsSize;
    286284}
     
    13271325}
    13281326
    1329 IntSize ScrollView::platformContentsSize() const
    1330 {
    1331     return IntSize();
    1332 }
    1333 
    13341327void ScrollView::platformSetContentsSize()
    13351328{
  • trunk/Source/WebCore/platform/ScrollView.h

    r95158 r95227  
    385385    bool platformCanBlitOnScroll() const;
    386386    IntRect platformVisibleContentRect(bool includeScrollbars) const;
    387     IntSize platformContentsSize() const;
    388387    void platformSetContentsSize();
    389388    IntRect platformContentsToScreen(const IntRect&) const;
  • trunk/Source/WebCore/platform/mac/ScrollViewMac.mm

    r93445 r95227  
    118118}
    119119
    120 IntSize ScrollView::platformContentsSize() const
    121 {
    122     BEGIN_BLOCK_OBJC_EXCEPTIONS;
    123     if (NSView* documentView = this->documentView())
    124         return enclosingIntRect([documentView bounds]).size();
    125     END_BLOCK_OBJC_EXCEPTIONS;
    126     return IntSize();
    127 }
    128 
    129120void ScrollView::platformSetContentsSize()
    130121{
  • trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp

    r54345 r95227  
    166166}
    167167
    168 IntSize ScrollView::platformContentsSize() const
    169 {
    170     int width = 0;
    171     int height = 0;
    172     if (platformWidget()) {
    173         platformWidget()->GetVirtualSize(&width, &height);
    174         ASSERT(width >= 0 && height >= 0);
    175     }
    176     return IntSize(width, height);
    177 }
    178 
    179168void ScrollView::platformSetScrollPosition(const IntPoint& scrollPoint)
    180169{
Note: See TracChangeset for help on using the changeset viewer.