Scroll snap points are not supported on iframe content
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Mar 2015 05:34:27 +0000 (05:34 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Mar 2015 05:34:27 +0000 (05:34 +0000)
commita9dfd3e72586bc5e55da31a4e61fd1416cb1920e
tree0356f68199ba33cbf1358b014b2bab8b8b9a16f3
parenteb8f8828d5cedbcbbfca897a7a5da8a94dd65be9
Scroll snap points are not supported on iframe content
https://bugs.webkit.org/show_bug.cgi?id=142582
<rdar://problem/20121319>

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-iframe.html

Reviewed by Simon Fraser.

The scroll snap points were not being applied to the iframe contents because the code
that sets up the scroll snap point content is not called for iframes.

To correct this, we need to make sure the snap offsets are set during post-frame layout
for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
MainFrame. Also notify scroll animators they need to update their snap point settings.

LayoutTests:

Reviewed by Simon Fraser.

* css3/scroll-snap/resources: Added.
* css3/scroll-snap/resources/iframe-content.html: Added.
* css3/scroll-snap/scroll-snap-iframe-expected.txt: Added.
* css3/scroll-snap/scroll-snap-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/scroll-snap/resources/iframe-content.html [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-iframe-expected.txt [new file with mode: 0644]
LayoutTests/css3/scroll-snap/scroll-snap-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp