REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested...
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 01:26:16 +0000 (01:26 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 01:26:16 +0000 (01:26 +0000)
commitc12a4deafb11eb1a68c68c83cc296314d4a1e856
tree5f8339f3a319c19670d07620636c24cf59af456c
parent96113b5b1dd10a1fb2d9f4ecefd4ea9db40b8608
REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested inside scrollable div.
https://bugs.webkit.org/show_bug.cgi?id=147668
<rdar://problem/21870332>

Reviewed by Simon Fraser.

Source/WebCore:

Test: platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html

When we are wrapping up processing of the wheel event for a given frame, if the current latching context
does NOT apply to the current frame (e.g., because it's latched to an enclosing frame) we should not pass
wheel events directly to the latched elements scrollable container. Instead, we should just give the current
frame an opportunity to perform any custom wheel event handling and return, so that the enclosing (latched)
frame can do the rest of its event handling.

If we don't do this, we incorrectly ask the enclosing frame to process the event, then return claiming that
we handled the event, preventing the enclosing frame from doing its part of the processing.

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

LayoutTests:

* platform/mac/fast/scrolling/resources/background.html: Added.
* platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe-expected.txt: Added.
* platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/fast/scrolling/resources/background.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/mac/EventHandlerMac.mm