Commit Graph

6 Commits

Author SHA1 Message Date
Andreas Kling
12af95cfa2 LibWeb: Floor coordinates for untrusted MouseEvent and PointerEvent
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.
2026-03-08 18:09:10 +01:00
Tim Ledbetter
22117785de LibWeb: Add virtual MouseEvent::clone() for copying event properties 2026-02-12 10:06:39 +00:00
Tim Ledbetter
83b1ead1e7 LibWeb: Ensure UIEventInit.view is set for mouse and pointer events 2025-08-20 09:13:32 +02:00
Aliaksandr Kalenik
8614e0f856 LibWeb: Dispatch pointer events in EventHandler
Now, along with the mouse events we also dispatch pointerup, pointerdown
and pointermove.

With this change shape painting works on https://excalidraw.com/
2024-11-22 00:32:58 +01:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00