Commit Graph

9 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
901cc28272 LibWeb: Reduce recompilation impact of DOM/Document.h
Remove 11 heavy includes from Document.h that were only needed for
pointer/reference types (already forward-declared in Forward.h), and
extract the nested ViewportClient interface to a standalone header.

This reduces Document.h's recompilation cascade from ~1228 files to
~717 files (42% reduction). Headers like BrowsingContext.h that were
previously transitively included see even larger improvements (from
~1228 down to ~73 dependents).
2026-02-11 20:02:28 +01:00
Andreas Kling
706eb0018c LibGC+LibWeb: Mark two GC::Cell functions as MUST_UPCALL
Let's make sure that subclasses always call their base class when
overriding these virtuals:

- void finalize()
- void visit_edges(Visitor&)
2026-02-06 13:50:54 +01:00
Sam Atkins
f2dd3d89d1 LibWeb/Gamepad: Ignore physical gamepads when running in test mode
This solves the issue where having a gamepad connected to a machine
running tests would cause different results for a few gamepad-related
tests.

Conveniently, all our fake testing gamepads are "virtual" in SDL, and
those are the only virtual ones.
2026-01-20 06:58:16 -05:00
Jelle Raaijmakers
097aaef648 LibWeb: Prevent race condition between ours and SDL's rumble duration
We fire a single shot timer to wait for the rumble to complete, so we
can call on_complete. SDL keeps an internal account of how long the
rumble should take and might, at that point, still be convinced the
gamepad should rumble. To prevent this race condition, explicitly cancel
the rumble ourselves.

Hopefully fixes the flakiness of
`Tests/LibWeb/Text/input/GamepadAPI/gamepad-rumble.html`.
2026-01-12 13:08:02 +00:00
Andreas Kling
2ac363dcba LibGC: Only call finalize() on types that override finalize()
This dramatically cuts down on time spent in the GC's finalizer pass,
since most types don't override finalize().
2026-01-07 20:51:17 +01:00
Tim Ledbetter
9c204f36ec LibWeb: Make eventInitDict GamepadEvent constructor parameter optional
This differs from the specification but matches the behavior of
existing implementations.
2025-09-23 16:04:56 +01:00
ayeteadoe
454e6a6f7f LibWeb/Gamepad: Forward declare SDL components to fix Windows build
We have to prevent from including any SDL headers in LibWeb headers.
Otherwise there will be transitive Windows.h includes that will
re-declare some of our existing forward decls/defines in
LibCore/SocketAddressWindows.h
2025-09-02 11:11:12 +01:00
Luke Wilde
74e0483ea5 LibWeb: Implement the Gamepad API with SDL3 2025-09-01 21:10:47 +02:00
Jelle Raaijmakers
526615bc10 LibWeb: Stub Navigator.getGamepads() 2025-07-22 11:55:29 -04:00