mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
Per the PointerEvents spec and Chromium's behavior, untrusted (JS- constructed) MouseEvent coordinates should be floored to integers. PointerEvent overrides this behavior: for non-click types (pointerdown, pointermove, etc.), fractional coordinates are preserved. For click, auxclick, and contextmenu events, coordinates are floored via the MouseEvent base class. Trusted events (created by the user agent) always preserve fractional coordinate values.
19 lines
522 B
Plaintext
19 lines
522 B
Plaintext
MouseEvent screenX: 30
|
|
MouseEvent screenY: 40
|
|
MouseEvent clientX: 10
|
|
MouseEvent clientY: 20
|
|
MouseEvent pageX: 10
|
|
MouseEvent pageY: 20
|
|
MouseEvent offsetX: 10
|
|
MouseEvent offsetY: 20
|
|
PointerEvent pointerdown screenX: 0.111
|
|
PointerEvent pointerdown clientX: 5.25
|
|
PointerEvent pointerdown pageX: 5.25
|
|
PointerEvent pointerdown offsetX: 5.25
|
|
PointerEvent click screenX: 0
|
|
PointerEvent click clientX: 5
|
|
PointerEvent click pageX: 5
|
|
PointerEvent click offsetX: 5
|
|
PointerEvent auxclick clientX: 5
|
|
PointerEvent contextmenu clientX: 5
|