Changeset 181522 in webkit


Ignore:
Timestamp:
Mar 15, 2015 10:34:27 PM (9 years ago)
Author:
Brent Fulgham
Message:

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.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181516 r181522  
     12015-03-15  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Scroll snap points are not supported on iframe content
     4        https://bugs.webkit.org/show_bug.cgi?id=142582
     5        <rdar://problem/20121319>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * css3/scroll-snap/resources: Added.
     10        * css3/scroll-snap/resources/iframe-content.html: Added.
     11        * css3/scroll-snap/scroll-snap-iframe-expected.txt: Added.
     12        * css3/scroll-snap/scroll-snap-iframe.html: Added.
     13
    1142015-03-15  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r181521 r181522  
     12015-03-15  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Scroll snap points are not supported on iframe content
     4        https://bugs.webkit.org/show_bug.cgi?id=142582
     5        <rdar://problem/20121319>
     6
     7        Tested by css3/scroll-snap/scroll-snap-iframe.html
     8
     9        Reviewed by Simon Fraser.
     10
     11        The scroll snap points were not being applied to the iframe contents because the code
     12        that sets up the scroll snap point content is not called for iframes.
     13
     14        To correct this, we need to make sure the snap offsets are set during post-frame layout
     15        for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
     16
     17        * page/FrameView.cpp:
     18        (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
     19        MainFrame. Also notify scroll animators they need to update their snap point settings.
     20
    1212015-03-15  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/Source/WebCore/page/FrameView.cpp

    r181111 r181522  
    29772977    sendResizeEventIfNeeded();
    29782978    viewportContentsChanged();
     2979
     2980#if ENABLE(CSS_SCROLL_SNAP)
     2981    if (!frame().isMainFrame()) {
     2982        updateSnapOffsets();
     2983        if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
     2984            return scrollAnimator->updateScrollAnimatorsAndTimers();
     2985    }
     2986#endif
    29792987}
    29802988
Note: See TracChangeset for help on using the changeset viewer.