WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
142582
Scroll snap points are not supported on iframe content
https://bugs.webkit.org/show_bug.cgi?id=142582
Summary
Scroll snap points are not supported on iframe content
Brent Fulgham
Reported
2015-03-11 09:22:35 PDT
See attached test case for an example. The <iframe> element should support the scroll snap point feature.
Attachments
Manual test case for iframe scroll snap point
(2.47 KB, text/html)
2015-03-11 09:23 PDT
,
Brent Fulgham
no flags
Details
Updated example
(2.42 KB, text/html)
2015-03-15 16:49 PDT
,
Brent Fulgham
no flags
Details
Patch
(1.95 KB, patch)
2015-03-15 18:34 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-mavericks-wk2
(820.57 KB, application/zip)
2015-03-15 19:32 PDT
,
Build Bot
no flags
Details
Patch
(25.15 KB, patch)
2015-03-15 20:56 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-mavericks-wk2
(728.16 KB, application/zip)
2015-03-15 21:38 PDT
,
Build Bot
no flags
Details
Patch (v3 correct some test failures)
(25.03 KB, patch)
2015-03-15 21:53 PDT
,
Brent Fulgham
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2015-03-11 09:23:19 PDT
Created
attachment 248423
[details]
Manual test case for iframe scroll snap point
Radar WebKit Bug Importer
Comment 2
2015-03-11 09:23:20 PDT
<
rdar://problem/20121319
>
Brent Fulgham
Comment 3
2015-03-15 16:49:21 PDT
Created
attachment 248691
[details]
Updated example
Brent Fulgham
Comment 4
2015-03-15 18:22:37 PDT
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.
Brent Fulgham
Comment 5
2015-03-15 18:34:55 PDT
Created
attachment 248696
[details]
Patch
Build Bot
Comment 6
2015-03-15 19:32:54 PDT
Comment on
attachment 248696
[details]
Patch
Attachment 248696
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/4684014753415168
New failing tests: http/tests/security/storage-blocking-loosened-plugin.html http/tests/security/cross-origin-plugin.html platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html http/tests/navigation/anchor-frames-gbk.html http/tests/security/cross-origin-plugin-allowed.html plugins/npruntime/object-from-destroyed-plugin-in-subframe.html http/tests/security/mixedContent/insecure-plugin-in-iframe.html http/tests/security/contentSecurityPolicy/object-src-none-blocked.html plugins/plugin-remove-subframe.html plugins/plugin-document-back-forward.html fast/frames/sandboxed-iframe-navigation-allowed.html http/tests/plugins/create-v8-script-objects.html plugins/resize-from-plugin.html http/tests/security/contentSecurityPolicy/object-src-none-allowed.html platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html fast/dynamic/paused-event-dispatch.html platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html http/tests/plugins/cross-frame-object-access.html http/tests/security/xssAuditor/object-src-inject.html fast/frames/sandboxed-iframe-about-blank.html http/tests/plugins/third-party-cookie-accept-policy.html fast/replaced/frame-removed-during-resize-smaller.html platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html http/tests/security/storage-blocking-strengthened-plugin.html fast/events/resize-subframe.html
Build Bot
Comment 7
2015-03-15 19:32:58 PDT
Created
attachment 248698
[details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Brent Fulgham
Comment 8
2015-03-15 20:56:42 PDT
Created
attachment 248701
[details]
Patch
Brent Fulgham
Comment 9
2015-03-15 21:08:03 PDT
I'm surprised by these test failures, given that the new code just sets scroll snap state in a few member variables.
Build Bot
Comment 10
2015-03-15 21:38:26 PDT
Comment on
attachment 248701
[details]
Patch
Attachment 248701
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/4747936214810624
New failing tests: http/tests/security/storage-blocking-loosened-plugin.html http/tests/security/cross-origin-plugin.html platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html http/tests/navigation/anchor-frames-gbk.html http/tests/security/cross-origin-plugin-allowed.html plugins/npruntime/object-from-destroyed-plugin-in-subframe.html http/tests/security/mixedContent/insecure-plugin-in-iframe.html http/tests/security/contentSecurityPolicy/object-src-none-blocked.html plugins/plugin-remove-subframe.html plugins/plugin-document-back-forward.html fast/frames/sandboxed-iframe-navigation-allowed.html http/tests/plugins/create-v8-script-objects.html plugins/resize-from-plugin.html http/tests/security/contentSecurityPolicy/object-src-none-allowed.html platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame.html fast/dynamic/paused-event-dispatch.html platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html http/tests/plugins/cross-frame-object-access.html http/tests/security/xssAuditor/object-src-inject.html fast/frames/sandboxed-iframe-about-blank.html http/tests/plugins/third-party-cookie-accept-policy.html fast/replaced/frame-removed-during-resize-smaller.html platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html http/tests/security/storage-blocking-strengthened-plugin.html fast/events/resize-subframe.html
Build Bot
Comment 11
2015-03-15 21:38:29 PDT
Created
attachment 248705
[details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Brent Fulgham
Comment 12
2015-03-15 21:53:24 PDT
Created
attachment 248707
[details]
Patch (v3 correct some test failures)
Simon Fraser (smfr)
Comment 13
2015-03-15 22:11:43 PDT
Comment on
attachment 248707
[details]
Patch (v3 correct some test failures) View in context:
https://bugs.webkit.org/attachment.cgi?id=248707&action=review
> Source/WebCore/page/FrameView.cpp:2986 > +#if PLATFORM(MAC) > + if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) > + return scrollAnimator->updateScrollAnimatorsAndTimers(); > +#endif
Why is this Mac-specific?
Brent Fulgham
Comment 14
2015-03-15 22:12:57 PDT
Comment on
attachment 248707
[details]
Patch (v3 correct some test failures) View in context:
https://bugs.webkit.org/attachment.cgi?id=248707&action=review
>> Source/WebCore/page/FrameView.cpp:2986 >> +#endif > > Why is this Mac-specific?
You are right; we should make sure it's up-to-date for iOS as well.
Simon Fraser (smfr)
Comment 15
2015-03-15 22:15:44 PDT
Comment on
attachment 248707
[details]
Patch (v3 correct some test failures) View in context:
https://bugs.webkit.org/attachment.cgi?id=248707&action=review
> LayoutTests/css3/scroll-snap/resources/iframe-content.html:236 > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)"); > + top.succeeded = top.succeeded && shouldMatch("noInitial.style['-webkit-scroll-snap-destination']", "100% 100%"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-destination')", "100% 100%"); > + top.succeeded = top.succeeded && shouldMatch("noInitial.style['-webkit-scroll-snap-coordinate']", "0% 0%"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate')", "0% 0%"); > + > + var initialType = document.getElementById('initialType'); > + top.succeeded = top.succeeded && shouldMatch("initialType.style['-webkit-scroll-snap-type']", "initial"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-type')", "none"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)"); > + top.succeeded = top.succeeded && shouldMatch("initialType.style['-webkit-scroll-snap-destination']", "0% 0%"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-destination')", "0% 0%"); > + top.succeeded = top.succeeded && shouldMatch("initialType.style['-webkit-scroll-snap-coordinate']", "100% 100%"); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialType).getPropertyValue('-webkit-scroll-snap-coordinate')", "100% 100%"); > + > + var initialXPoints = document.getElementById('initialXPoints'); > + top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(initialXPoints).getPropertyValue('-webkit-scroll-snap-type')", "mandatory"); > + top.succeeded = top.succeeded && shouldMatch("initialXPoints.style['-webkit-scroll-snap-points-x']", "initial");
Does this subframe really need all of this? Please reduce it to the minimum required to test the bug (probably one line).
Brent Fulgham
Comment 16
2015-03-15 22:34:58 PDT
Committed
r181522
: <
http://trac.webkit.org/changeset/181522
>
mitz
Comment 17
2015-03-15 23:29:38 PDT
(In reply to
comment #14
)
> Comment on
attachment 248707
[details]
> Patch (v3 correct some test failures) > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=248707&action=review
> > >> Source/WebCore/page/FrameView.cpp:2986 > >> +#endif > > > > Why is this Mac-specific? > > You are right; we should make sure it's up-to-date for iOS as well.
updateScrollAnimatorsAndTimers() is Mac-only. Removing the conditional in the version of the patch committed in
r181522
caused the iOS build to break. I restored it in <
http://trac.webkit.org/r181524
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug