Summary: | Scrolling iframe inside scrollable div does not work with trackpad | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anders Johansson <anders> | ||||||
Component: | New Bugs | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, jonasw, martin, me, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.11 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 169129 | ||||||||
Attachments: |
|
Description
Anders Johansson
2015-10-15 06:52:36 PDT
Previous testpage apparently stopped working due to being created anonymously at JSBin. Here is a new one that hopefully will continue to work. https://output.jsbin.com/mudada It needs to be viewed on a full page since nesting inside other iframes won't show the problem. I can verify that this is also happening on Safari 9.0.1 (10601.2.7.2) on OS X 10.10.5 as well as one of the recent nightlies r191902. Created attachment 264957 [details]
Patch
Comment on attachment 264957 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264957&action=review r=me. I had a suggestion for improving the test (to avoid flakiness on the test bots). > LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow-expected.txt:2 > +The wrapper's scroll position is: 0 I would suggest these be PASS/FAIL results, to avoid flakiness due to different test machine resolutions and settings. > LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow.html:30 > + debug("The wrapper's scroll position is: " + wrapper.scrollTop); I would suggest something like: if (iframe.contentWindow.scrollY && !wrapper.scrollTop) { testPassed("The iframe scrolled but the wrapper did not."); } else { testFailed("The iframe's scroll position is: " + iframe.contentWindow.scrollY + ", and the wrapper's scroll position is: " + wrapper.scrollTop); } > LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow.html:50 > + eventSender.callAfterScrollingCompletes(checkForScroll); Someday we should make this into a test library function so we can remove all this duplicate code! :-) Comment on attachment 264957 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264957&action=review >> LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow-expected.txt:2 >> +The wrapper's scroll position is: 0 > > I would suggest these be PASS/FAIL results, to avoid flakiness due to different test machine resolutions and settings. Will do. >> LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow.html:30 >> + debug("The wrapper's scroll position is: " + wrapper.scrollTop); > > I would suggest something like: > if (iframe.contentWindow.scrollY && !wrapper.scrollTop) { > testPassed("The iframe scrolled but the wrapper did not."); > } else { > testFailed("The iframe's scroll position is: " + iframe.contentWindow.scrollY + ", and the wrapper's scroll position is: " + wrapper.scrollTop); > } Got it. Fixed! >> LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow.html:50 >> + eventSender.callAfterScrollingCompletes(checkForScroll); > > Someday we should make this into a test library function so we can remove all this duplicate code! :-) I agree -- maybe something like sendMomentumScroll(positionX, positionY, dragCount, momentumCount, dragDeltaX, dragDeltaY, momentumDeltaX, momentumDeltaY, handleScrollingComplete) that handles everything in scrollTest() here. Committed r192124: <http://trac.webkit.org/changeset/192124> Is it fixed yet? I've tried both Safari on the latest Mac OS Sierra and nightly build of webkit and scrolling down inside iframe doesn't work. Scrolling up works fine though. Yes, works for me now, Safari on Sierra. Updated my last test case with a working image. (In reply to comment #8) > Is it fixed yet? I've tried both Safari on the latest Mac OS Sierra and > nightly build of webkit and scrolling down inside iframe doesn't work. > Scrolling up works fine though. Hi Michael, Scrolling Anders' test case seems to be working for me as well. If you are still seeing an issue, could you file a followup bug and attach a video clip showing the problem you're seeing? Thanks! Wenson Hi Wenson, Anders, I've created followup bug report with minimal test case. Thanks. https://bugs.webkit.org/show_bug.cgi?id=169129 |