Commit graph

5898 commits

Author SHA1 Message Date
Andreas Kling
cebd4cc10d LibWeb: Add ImageProvider virtual to access the DecodedImageData
...and also the current frame index, in case of animations.
2025-11-05 09:11:49 +01:00
Undefine
5b88b76b84 LibWeb: Deduplicate WebGL1 implementations from WebGL2
This makes the WebGL2 implementation file inherit from the WebGL1
implementation file. This is actually closer to what the IDL files
describe and allows us to not have to maintain two copies of the same
functions.
2025-11-05 02:19:32 +01:00
Undefine
7a1668fe22 LibWeb: Switch include in WebGLRenderingContextImpl to OpenGL ES 3
The reasoning behind this is that in the next commit some of the WebGL2
specific parameters will be moved here. This header is needed to give
us access to those defines. Note that when in WebGL1 nothing from ES3
will be used as it's locked behind WebGL2 checks (it wouldn't work
anyways as we request ES2 from ANGLE).
2025-11-05 02:19:32 +01:00
Undefine
395bc3ee27 LibWeb: Add a webgl_version getter to OpenGLContext 2025-11-05 02:19:32 +01:00
Undefine
df1aeda955 LibWeb: Deduplicate the WebGL null_terminated_string helper 2025-11-05 02:19:32 +01:00
Undefine
6c115171da LibWeb: Split off WebGL2RenderingContextImpl to Impl and Overloads
This mostly analogous to the previous commit that does the same with
the WebGL1 Impl file.
2025-11-05 02:19:32 +01:00
Undefine
c70886ab1f LibWeb: Split off WebGLRenderingContextImpl to Impl and Overloads
This is more like what the IDL files specify with two different mixins,
but the inheritance structure here is slightly different for easier
maintenance. This will also allow the WebGL2 Impl to inherit from the
WebGL1 Impl as WebGL versions don't share the functions defined in the
Overloads interfaces.
2025-11-05 02:19:32 +01:00
Undefine
7f0f1c3266 LibWeb: Add missing WebGL includes 2025-11-05 02:19:32 +01:00
Aliaksandr Kalenik
ed921b66f5 LibGfx+LibWeb: Delete unused Line class and Rect methods 2025-11-04 23:16:02 +01:00
norbiros
d8e80718d7 LibWeb/CSS: Absolutize values while computing font variation settings
Makes the `compute_font_variation_settings` function match other
`compute_font_*` by absolutizing values passed into them. It resolves a
crash related to using `siblings-count` inside `font-variation-settings`

Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-11-04 21:44:32 +01:00
norbiros
3829a85fde LibWeb: Add basic variable font support
Integrates the new `FontVariationSettings` from LibGfx into LibWeb to
enable initial variable font functionality. Currently, only the `wght`
(weight) axis is fully supported and tested. This update also introduces
support for the CSS `font-variation-settings` property.
2025-11-04 21:44:32 +01:00
Luke Wilde
8adde0980a LibWeb/WebGL: Respect UNPACK_PREMULTIPLY_ALPHA
Fixes splats on https://superspl.at having dark splotches, as they
expect textures with unpremultiplied alpha.
2025-11-04 17:06:24 +01:00
Sam Atkins
e026c98d64 LibWeb/CSS: Insert required comments when serializing lists of tokens
Certain pairs of tokens are required to have `/**/` inserted between
them to prevent eg two `<ident>`s getting merged together when
round-tripping.
2025-11-04 14:05:31 +01:00
Tim Ledbetter
74940726d0 LibWeb: Add an Internals method to dump the GC graph 2025-11-04 10:34:43 +01:00
Zaggy1024
f3a2207bc8 LibWeb: Correct the early exit condition in AudioPaintable::paint()
We're not painting controls for audio elements that are supposed to
have them!
2025-11-03 13:25:02 -06:00
Sam Atkins
7d96fbaf7a LibWeb/CSS: Parse list values as lists in CSSStyleValue parsing 2025-11-03 10:21:51 -08:00
Sam Atkins
07d77e89dd LibWeb/CSS: Implement "subdivide into iterations" for basic StyleValues
This algorithm is used by Typed-OM for producing a list of internal
style values from a single one, for properties that take a list. We
will probably need to implement this for more StyleValues later.
2025-11-03 10:21:51 -08:00
Sam Atkins
d739c8c22a LibWeb/CSS: Mark transform as not a list-valued property
The different transform functions together form a single transform, so
this isn't a list.
2025-11-03 10:21:51 -08:00
Sam Atkins
61a0898f5f LibWeb/CSS: Stop inserting whitespace when serializing component values
Now that we don't remove whitespace when parsing, we don't need to
artificially insert it back in again when serializing. We do now need
to trim leading and trailing whitespace from UnresolvedStyleValues, as
this previously was done as part of the whitespace insertion.

This makes our serialization of UnresolvedStyleValues more correct and
gets us a few WPT passes for each property in the Typed OM tests.
2025-11-03 11:23:21 +00:00
Sam Atkins
427d7fabd7 LibWeb/CSS: Stop copying the input in parse_css_value()
Now that we don't strip out whitespace, this method was copying the
input TokenStream into a Vector, and then creating new TokenStreams
from that. So, stop doing that and use the input TokenStream instead.
2025-11-03 11:23:21 +00:00
Sam Atkins
2bbf578737 LibWeb/CSS: Commit transaction when parsing valid anchor()
I'm honestly not sure how this worked before.
2025-11-03 11:23:21 +00:00
Sam Atkins
1b1bb3b897 LibWeb/CSS: Remove "strip-whitespace" flag from Properties.json
Now that it's not on any properties, remove support for it entirely.
2025-11-03 11:23:21 +00:00
Sam Atkins
01417d1e53 LibWeb/CSS: Stop stripping whitespace from remaining properties 2025-11-03 11:23:21 +00:00
Sam Atkins
4286a2c154 LibWeb/CSS: Handle whitespace properly in quotes property 2025-11-03 11:23:21 +00:00
Sam Atkins
b12851427b LibWeb/CSS: Handle whitespace properly in transformation properties
We can no longer rely on the remaining token count, so these required
significant rearranging.
2025-11-03 11:23:21 +00:00
Sam Atkins
3341a526a3 LibWeb/CSS: Stop stripping whitespace from display property 2025-11-03 11:23:21 +00:00
Sam Atkins
fd40df12e8 LibWeb/CSS: Stop stripping whitespace from cursor property 2025-11-03 11:23:21 +00:00
Sam Atkins
ed55d968e8 LibWeb/CSS: Stop stripping whitespace from opacity properties 2025-11-03 11:23:21 +00:00
Sam Atkins
12588b6f9d LibWeb/CSS: Handle whitespace properly in content property 2025-11-03 11:23:21 +00:00
Sam Atkins
676a343525 LibWeb/CSS: Stop stripping whitespace from clip properties 2025-11-03 11:23:21 +00:00
Sam Atkins
3bde5b4e68 LibWeb/CSS: Stop stripping whitespace from transition properties 2025-11-03 11:23:21 +00:00
Sam Atkins
b2ef053be9 LibWeb/CSS: Stop stripping whitespace from text properties 2025-11-03 11:23:21 +00:00
Sam Atkins
b3e53b0bd2 LibWeb/CSS: Stop stripping whitespace from stroke properties 2025-11-03 11:23:21 +00:00
Sam Atkins
fccddca498 LibWeb/CSS: Stop stripping whitespace from shape properties 2025-11-03 11:23:21 +00:00
Sam Atkins
971c0d0126 LibWeb/CSS: Handle whitespace properly for scrollbar properties
Imported a WPT test that regressed without these changes.
2025-11-03 11:23:21 +00:00
Sam Atkins
60a46b86e4 LibWeb/CSS: Stop stripping whitespace from position-* properties 2025-11-03 11:23:21 +00:00
Sam Atkins
28422e80f2 LibWeb/CSS: Stop stripping whitespace from place-* properties 2025-11-03 11:23:21 +00:00
Sam Atkins
4f5126e52f LibWeb/CSS: Handle whitespace properly in list-style properties 2025-11-03 11:23:21 +00:00
Sam Atkins
8c8168c65c LibWeb/CSS: Handle whitespace properly in grid properties 2025-11-03 11:23:21 +00:00
Sam Atkins
049cc09ae4 LibWeb/CSS: Stop stripping whitespace from flex properties 2025-11-03 11:23:21 +00:00
Sam Atkins
123a3dbbc5 LibWeb/CSS: Handle whitespace properly in mask properties 2025-11-03 11:23:21 +00:00
Sam Atkins
fd682386b8 LibWeb/CSS: Stop stripping whitespace from margin properties 2025-11-03 11:23:21 +00:00
Sam Atkins
d5a0838521 LibWeb/CSS: Stop stripping whitespace from padding properties 2025-11-03 11:23:21 +00:00
Sam Atkins
826eb067c0 LibWeb/CSS: Stop stripping whitespace from overflow properties 2025-11-03 11:23:21 +00:00
Sam Atkins
c4b76d7a49 LibWeb/CSS: Stop stripping whitespace for outline properties 2025-11-03 11:23:21 +00:00
Sam Atkins
85b87378bd LibWeb/CSS: Stop stripping whitespace for size properties 2025-11-03 11:23:21 +00:00
Sam Atkins
eda72541b8 LibWeb/CSS: Stop stripping whitespace for inset properties 2025-11-03 11:23:21 +00:00
Sam Atkins
34e3df1769 LibWeb/CSS: Stop stripping whitespace for SVG geometry properties 2025-11-03 11:23:21 +00:00
Sam Atkins
941ad24abd LibWeb/CSS: Handle whitespace properly in column properties 2025-11-03 11:23:21 +00:00
Sam Atkins
ee13de8426 LibWeb/CSS: Stop stripping whitespace for filter properties 2025-11-03 11:23:21 +00:00