Coordinates-based snap offsets don't update correctly when container is scrolled
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 04:24:12 +0000 (04:24 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 04:24:12 +0000 (04:24 +0000)
commit3119f68a773e8947f32950e2eb0e5f21987a6d68
tree91bc0bd5f1b414734926c6e43542cd1e3d52873c
parent7ed09c481b10916a02dc6a7e27dcfd23651ea1a0
Coordinates-based snap offsets don't update correctly when container is scrolled
https://bugs.webkit.org/show_bug.cgi?id=147215

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes the way we append the snap offsets of child elements with coordinates. We
now consider the scroll offset of the parent scroll snapping container, so snap
offset recomputations don't fail on scroll snapping containers.

Test: css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Fixed to consider the scroll offset of the
    parent container.

LayoutTests:

Tests that snap offsets update properly on scrolled containers.

* css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt: Added.
* css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp