Scrolling iframe inside scrollable div does not work with trackpad
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Nov 2015 02:32:13 +0000 (02:32 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Nov 2015 02:32:13 +0000 (02:32 +0000)
commitf2ec9e5266110b2325006f98b3e1ea9f816e2c4e
treea98eeca264f9aaa7b059d98b88229a6df8047026
parent0878bb18b3f603fd439fb59fe346f710b080313d
Scrolling iframe inside scrollable div does not work with trackpad
https://bugs.webkit.org/show_bug.cgi?id=150168
<rdar://problem/23143931>

Reviewed by Brent Fulgham.

Source/WebCore:

When scrolling in an iframe nested under an overflow scrolling region, EventHandler::platformPrepareForWheelEvents
fails to compute the correct scrollableArea, using the overflow div's scrollable area instead of the iframe's view.
This causes the latching algorithm to bail out of handling the wheel event. To avoid this, we special-case the
decision to compute the scrollableArea from the scrollableContainer if we are attempting to scroll in an iframe.

Test: fast/scrolling/latching/scroll-iframe-in-overflow.html

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):

LayoutTests:

Tests that an iframe nested under an overflow scrolling div can be scrolled.

* fast/scrolling/latching/scroll-iframe-in-overflow-expected.txt: Added.
* fast/scrolling/latching/scroll-iframe-in-overflow.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/scrolling/latching/scroll-iframe-in-overflow.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/mac/EventHandlerMac.mm