[webkit-changes] [WebKit/WebKit] c8a66b: Invalid coordinates on gesture (and resulting whee...

Abrar Rahman Protyasha noreply at github.com
Sat Dec 16 03:20:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c8a66bff2703a2099a9e61c75382cef21ee0c822
      https://github.com/WebKit/WebKit/commit/c8a66bff2703a2099a9e61c75382cef21ee0c822
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2023-12-16 (Sat, 16 Dec 2023)

  Changed paths:
    A LayoutTests/fast/events/gesture/resources/gesture-iframe.html
    A LayoutTests/fast/events/gesture/wheel-gesture-event-coordinates-in-iframe-expected.txt
    A LayoutTests/fast/events/gesture/wheel-gesture-event-coordinates-in-iframe.html

  Log Message:
  -----------
  Invalid coordinates on gesture (and resulting wheel) events inside iframe
https://bugs.webkit.org/show_bug.cgi?id=266523
rdar://105243167

Reviewed by Wenson Hsieh.

`gesture*` events (and resulting wheel events) originating from an iframe
have incorrect coordinates. Notably, these coordinates are not relative
to the child frame's origin. This happens because we pass events on to a
child frame's nodes without accounting for the coordinate space conversion
between the parent frame and the child frame.

This bug is addressed in WebKitAdditions by adopting the "pass event to
subframe's event handler" pattern in the the gesture event handling code -
as used for other event handling codepaths.

This open source commit adds a layout test in which gesture events are
originated in an embedded frame. The test asserts that the event
coordinates are relative to the child frame, thus providing some
correctness guarantees for the aforementioned fix.

* LayoutTests/fast/events/gesture/resources/gesture-iframe.html: Added.
* LayoutTests/fast/events/gesture/wheel-gesture-event-coordinates-in-iframe-expected.txt: Added.
* LayoutTests/fast/events/gesture/wheel-gesture-event-coordinates-in-iframe.html: Added.

Canonical link: https://commits.webkit.org/272176@main




More information about the webkit-changes mailing list