Setting scroll-snap-desination to (100% 100%) locks up WebKit
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2015 01:29:00 +0000 (01:29 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2015 01:29:00 +0000 (01:29 +0000)
commite62c6de1bee4517a4c9d8d025ff1ed9b44a33dc0
treed18c45899aab422affd9785705f937c4c2e33edb
parent8e6772ee6d85e39a34d756dd79c90d4354c0166c
Setting scroll-snap-desination to (100% 100%) locks up WebKit
https://bugs.webkit.org/show_bug.cgi?id=142414
<rdar://problem/20077275>

Reviewed by Dean Jackson.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.

Correct an infinite loop that is triggered when you combine a repeating (100%)
scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): Make sure we break out of the loop properly when
the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.

LayoutTests:

* css3/scroll-snap/scroll-snap-desination-lock-up.html: Added.
* css3/scroll-snap/scroll-snap-desination-lock-up-expected.txt: Added.

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