Skip to content
Permalink
Browse files
[Chromium] Some Layout Tests in platform/chromium/rubberbanding and p…
…latform/chromium/compositing/rubberbanding are failing

https://bugs.webkit.org/show_bug.cgi?id=79878

Reviewed by James Robinson.

Make sure that ScrollableArea::setScrollOffsetFromAnimation doesn't end up
setting the ScrollAnimator's current scroll position by making a new function, scrollPositionChanged,
that both notifyScrollPositionChanged and setScrollOffsetFromAnimation call and move the call to update
the position to notifyScrollPositionChanged.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):
(WebCore):
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
* platform/ScrollableArea.h:
(ScrollableArea):

Canonical link: https://commits.webkit.org/97019@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Feb 29, 2012
1 parent 56bae9d commit 6154c724a41437d394658750d321f74ba4dea74f
Showing with 29 additions and 2 deletions.
  1. +20 −0 Source/WebCore/ChangeLog
  2. +7 −2 Source/WebCore/platform/ScrollableArea.cpp
  3. +2 −0 Source/WebCore/platform/ScrollableArea.h
@@ -1,3 +1,23 @@
2012-02-29 Anders Carlsson <andersca@apple.com>

[Chromium] Some Layout Tests in platform/chromium/rubberbanding and platform/chromium/compositing/rubberbanding are failing
https://bugs.webkit.org/show_bug.cgi?id=79878

Reviewed by James Robinson.

Make sure that ScrollableArea::setScrollOffsetFromAnimation doesn't end up
setting the ScrollAnimator's current scroll position by making a new function, scrollPositionChanged,
that both notifyScrollPositionChanged and setScrollOffsetFromAnimation call and move the call to update
the position to notifyScrollPositionChanged.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):
(WebCore):
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
* platform/ScrollableArea.h:
(ScrollableArea):

2012-02-29 Dana Jansens <danakj@chromium.org>

[chromium] Don't let invalidation for next frame prevent tile upload
@@ -123,6 +123,12 @@ void ScrollableArea::scrollToOffsetWithoutAnimation(ScrollbarOrientation orienta
}

void ScrollableArea::notifyScrollPositionChanged(const IntPoint& position)
{
scrollPositionChanged(position);
scrollAnimator()->setCurrentPosition(position);
}

void ScrollableArea::scrollPositionChanged(const IntPoint& position)
{
// Tell the derived class to scroll its contents.
setScrollOffset(position);
@@ -150,7 +156,6 @@ void ScrollableArea::notifyScrollPositionChanged(const IntPoint& position)
verticalScrollbar->invalidate();
}

scrollAnimator()->setCurrentPosition(position);
scrollAnimator()->notifyContentAreaScrolled();
}

@@ -170,7 +175,7 @@ void ScrollableArea::setScrollOffsetFromAnimation(const IntPoint& offset)
if (requestScrollPositionUpdate(offset))
return;

notifyScrollPositionChanged(offset);
scrollPositionChanged(offset);
}

void ScrollableArea::willStartLiveResize()
@@ -179,6 +179,8 @@ class ScrollableArea {
bool hasLayerForScrollCorner() const;

private:
void scrollPositionChanged(const IntPoint&);

// NOTE: Only called from the ScrollAnimator.
friend class ScrollAnimator;
void setScrollOffsetFromAnimation(const IntPoint&);

0 comments on commit 6154c72

Please sign in to comment.