Bug 192066 - Wheel event propagation doesn't match other events
Summary: Wheel event propagation doesn't match other events
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-27 19:19 PST by Simon Fraser (smfr)
Modified: 2020-03-27 17:40 PDT (History)
3 users (show)

See Also:


Attachments
Testcase (1.39 KB, text/html)
2018-11-27 19:21 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-11-27 19:19:08 PST
Wheel event handling is funky. EventHandler::platformPrepareForWheelEvents starts by finding a target node with findEnclosingScrollableContainer() which looks up the ancestor DOM chain.

After finding a target node, handleWheelEventInAppropriateEnclosingBox() walks up the render containing block hierarchy looking for a scrollable parent to handle the event (with no hit-testing, so we can scroll things when over their border, for example). 

This causes confusion when we set up latching state, but fail to hit the scroller in the containing block tree walk that we saw in the DOM ancestor tree walk.

https://codepen.io/smfr/pen/rQZqxo
Comment 1 Simon Fraser (smfr) 2018-11-27 19:21:26 PST
Created attachment 355840 [details]
Testcase