Commit graph

5 commits

Author SHA1 Message Date
Callum Law
385b2ee753 LibWeb: Add method to get computation context based on canvas font
This is used for absolutizing the other canvas values (e.g.
letterSpacing, fillStyle, strokeStyle, etc)
2026-05-31 14:09:51 +02:00
Callum Law
3e1f0f3b00 LibWeb: Align AbstractCanvasMixin method names with implementers
This avoids us having to define extra wrappers.

The exceptions to this are `mutable_path` and `my_realm` which are
defined in classes which don't inherit from `AbstractCanvasMixin` and
thus still require a wrapper.
2026-05-31 14:09:51 +02:00
Callum Law
50fa920161 LibWeb: Simplify canvas mixins state access
Previously we would static cast to the `IncludingClass` and access the
underlying state through methods exposed there, now we have an abstract
base class for the mixins. This removes some boilerplate and template
shennanigans.
2026-05-31 14:09:51 +02:00
Callum Law
342f48166f LibWeb: Move canvas DrawingState to standalone file
This is required to avoid a circular dependency in a following commit
2026-05-31 14:09:51 +02:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/HTML/Canvas/CanvasState.cpp (Browse further)