Changeset 58615 in webkit


Ignore:
Timestamp:
Apr 30, 2010 3:26:31 PM (14 years ago)
Author:
jamesr@google.com
Message:

2010-04-29 James Robinson <jamesr@chromium.org>

Reviewed by Simon Fraser.

Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=38286

When a ScrollView's scroll position is changed, we have to call
FrameView::scrollPositionChanged to generate repaint invalidation for
fixed position elements. This ends up getting called indirectly when
the ScrollView has a platformWidget through the port layer
(see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac
port does it) but not when there is no platformWidget.

This is tested by the fast/repaint/fixed-* tests when run in pixel
mode.

Test: fast/repaint/fixed-move-after-keyboard-scroll.html

  • page/FrameView.h:
  • platform/ScrollView.cpp: (WebCore::ScrollView::valueChanged):
  • platform/ScrollView.h: (WebCore::ScrollView::scrollPositionChanged):
Location:
trunk
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r58579 r58615  
    27532753BUGJAMESR WIN LINUX : fast/repaint/fixed-move-after-scroll.html = IMAGE+TEXT
    27542754
     2755// Need rebaselines
     2756BUGJAMESR : fast/repaint/fixed-move-after-keyboard-scroll.html = IMAGE+TEXT
     2757
    27552758// Started failing at r57969
    27562759BUG8729 MAC : http/tests/multipart/invalid-image-data.html = IMAGE
  • trunk/WebCore/ChangeLog

    r58613 r58615  
     12010-04-29  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled
     6        https://bugs.webkit.org/show_bug.cgi?id=38286
     7
     8        When a ScrollView's  scroll position is changed, we have to call
     9        FrameView::scrollPositionChanged to generate repaint invalidation for
     10        fixed position elements.  This ends up getting called indirectly when
     11        the ScrollView has a platformWidget through the port layer
     12        (see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac
     13        port does it) but not when there is no platformWidget.
     14
     15        This is tested by the fast/repaint/fixed-* tests when run in pixel
     16        mode.
     17
     18        Test: fast/repaint/fixed-move-after-keyboard-scroll.html
     19
     20        * page/FrameView.h:
     21        * platform/ScrollView.cpp:
     22        (WebCore::ScrollView::valueChanged):
     23        * platform/ScrollView.h:
     24        (WebCore::ScrollView::scrollPositionChanged):
     25
    1262010-04-30  Anders Carlsson  <andersca@apple.com>
    227
  • trunk/WebCore/page/FrameView.h

    r58445 r58615  
    139139
    140140    void setScrollPosition(const IntPoint&);
    141     void scrollPositionChanged();
     141    virtual void scrollPositionChanged();
    142142
    143143    String mediaType() const;
  • trunk/WebCore/platform/ScrollView.cpp

    r58611 r58615  
    293293        return;
    294294
     295    scrollPositionChanged();
    295296    scrollContents(scrollDelta);
    296297}
  • trunk/WebCore/platform/ScrollView.h

    r58611 r58615  
    153153    void setScrollPosition(const IntPoint&);
    154154    void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); }
    155    
     155
    156156    // This function scrolls by lines, pages or pixels.
    157157    bool scroll(ScrollDirection, ScrollGranularity);
     
    297297    // Called to update the scrollbars to accurately reflect the state of the view.
    298298    void updateScrollbars(const IntSize& desiredOffset);
     299
     300    // Called when the scroll position within this view changes.  FrameView overrides this to generate repaint invalidations.
     301    virtual void scrollPositionChanged() {}
    299302
    300303    void platformInit();
Note: See TracChangeset for help on using the changeset viewer.