Commit graph

71639 commits

Author SHA1 Message Date
Sam Atkins
d461e96f40 LibWeb/CSS: Make :heading() pseudo-class take integers not AN+B
Corresponds to 8eb3787e34
2025-08-28 12:40:03 +02:00
Sam Atkins
9ffc15ba3f LibWeb/CSS: Serialize :heading(...) pseudo-class properly
We originally had special handling for `:host()` as that had been the
only pseudo-class that could be both an identifier or a function.
However, this meant duplicating the serialization logic, and also we
had to manually remember to add the same hack for any other
identifier-and-function cases. Which I forgot to do with `:heading()`!

So instead, for these cases, detect if they actually have arguments
specified and use that to determine which form to serialize as. We do
still have to write a check for each one of these pseudo-classes, but
the VERIFY should make it easier to remember.
2025-08-28 12:40:03 +02:00
Tim Ledbetter
277b81ca97 LibWeb/SVG: Respect paint-order when painting SVG paths 2025-08-28 10:31:09 +01:00
Tim Ledbetter
a87a9156d5 LibWeb/CSS: Parse the paint-order property 2025-08-28 10:31:09 +01:00
Callum Law
1052ee20b0 LibWeb: Move snap_a_length_as_a_border_width to StyleComputer.cpp
All users are in this file so it makes more sense to have it here
2025-08-28 09:29:46 +01:00
Callum Law
0ce6cc38b7 LibWeb: Store outline-width in computed form in ComputedProperties
We now also store `outline-width` in ComputedValues as a `CSSPixels`
since we know it's an absolute length at `apply_style` time - this saves
us some work in converting to CSSPixels during layout.

Gains us 46 new passes since we now interpolate keywords (thick, thin,
etc) correctly.

Also loses us 4 WPT tests as we longer clamp negative values produced by
interpolation from the point of view of getComputedStyle (although the
'used' value is still clamped).
2025-08-28 09:29:46 +01:00
Callum Law
6eae92511f LibWeb: Store border-*-width in computed form in ComputedProperties
Gains us 112 new passes since we now interpolate keywords (thick, thin,
etc) correctly.

Also loses us 4 WPT tests as we longer clamp negative values produced by
interpolation from the point of view of getComputedStyle (although the
'used' value is still clamped).
2025-08-28 09:29:46 +01:00
Callum Law
3b8c2a97c0 LibWeb: Don't resolve UnresolvedStyleValues in set_keyframes
If the custom property related to this UnresolvedStyleValue changed
we would not reflect the up to date value in the animation.
2025-08-28 09:29:46 +01:00
Callum Law
d4aa40a9fe LibWeb: Use computed not just absolutized value when computing keyframes
No functionality changes as we don't yet implement computing any
property values using this method.
2025-08-28 09:29:46 +01:00
Callum Law
f9e5332d16 LibWeb: Initial work to store ComputedProperties in computed form
`StyleValue`s stored within `ComputedProperties` should be in their
computed forms, this is for various reasons including:
 - Inheritance should be of computed values
 - Animations should work on computed values
 - Triggering transitions should work on computed values

Currently we store `StyleValue`s in an absolutized version of the
specified value - this is equivalent to the computed form in many cases
which is why this hasn't been causing significant issues but there are
some cases - such as `border-*-width` keywords where this is not the
case.

No functionality change as we are yet to implement any properties
2025-08-28 09:29:46 +01:00
Jelle Raaijmakers
2585f2da0d LibWeb: Apply nested inline margin box sizes to inline layout nodes
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
When committing the layout state, we now take nested inlines' margin,
border and padding sizes into account.

Fixes #3491.
2025-08-28 00:05:28 +02:00
Jelle Raaijmakers
22ccae7e68 LibWeb: Make node argument to UsedValues::set_node() const
No functional changes.
2025-08-28 00:05:28 +02:00
stelar7
fde5dc7491 LibWeb/IDB: Implement create_a_request_to_retrieve_multiple_items
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-08-27 16:13:25 +02:00
stelar7
2557e85407 LibWeb/IDB: Implement IDBIndex::get_all_records 2025-08-27 16:13:25 +02:00
stelar7
bd25be9ed3 LibWeb/IDB: Update IDBIndex::get_all_keys to spec 2025-08-27 16:13:25 +02:00
stelar7
9c2d4973c3 LibWeb/IDB: Update IDBIndex::get_all to spec 2025-08-27 16:13:25 +02:00
stelar7
bac1c84241 LibWeb/IDB: Implement retrieve_multiple_items_from_an_index 2025-08-27 16:13:25 +02:00
stelar7
559b9dbd83 LibWeb/IDB: Implement IDBObjectStore::get_all_records 2025-08-27 16:13:25 +02:00
stelar7
6f756f7f6c LibWeb/IDB: Update IDBObjectStore::get_all_keys to spec 2025-08-27 16:13:25 +02:00
stelar7
ca34ecad33 LibWeb/IDB: Update IDBObjectStore::get_all to spec 2025-08-27 16:13:25 +02:00
stelar7
839ffd45f3 LibWeb/IDB: Implement retrieve_multiple_items_from_an_object_store 2025-08-27 16:13:25 +02:00
stelar7
752210aec1 LibWeb/IDB: Implement IDBRecord 2025-08-27 16:13:25 +02:00
stelar7
fe5d5639ef LibWeb/IDB: Move Records and give more descriptive names 2025-08-27 16:13:25 +02:00
stelar7
87af53a613 LibWeb/IDB: Implement is_a_potentially_valid_key_range 2025-08-27 16:13:25 +02:00
Glenn Skrzypczak
89f94845cf LibWeb/HTML: Use from_milliseconds_since_epoch directly
Use `from_milliseconds_since_epoch` directly instead of converting to
seconds first and calling `from_seconds_since_epoch`.
2025-08-27 15:10:06 +02:00
Glenn Skrzypczak
bd34b11ca2 LibWeb/HTML: Implement date conversions for month and week inputs
This implements the conversion algorithms between strings and dates for
inputs of the types month and week.
2025-08-27 15:10:06 +02:00
Callum Law
ede80ccdfb LibWeb: Allow UseInitial in keyframes when updating animated style
This removes the AnimationRefresh argument from `collect_animation_into`
which was added in a9b8840 - it's only effect was disallowing
`UseInitial`s within keyframes when we were doing animated style
updates which I believe is unintentional.

Gains us 214 WPT tests.
2025-08-27 14:50:58 +02:00
Callum Law
d69e62425e LibWeb: Resolve CSS-wide keywords in keyframe properties
Also resolves the `revert` keyword against longhand properties rather
than potential shorthands as this could cause a crash.

Gains us 20 WPT tests.
2025-08-27 14:50:58 +02:00
joanvilarrasa
6f3b38de0f LibWeb: Emit XMLHttpRequest timeout event when the request times out
Some checks failed
Push notes / build (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
When an XMLHttpRequest times out, we now emit a timeout event
2025-08-27 14:15:48 +02:00
Timothy Flynn
086877a280 AK: Use simdutf to validate UTF-16 strings as ASCII 2025-08-27 13:25:03 +02:00
Timothy Flynn
6634100914 Meta: Update sqlite3 to version 3.50.4 2025-08-27 13:25:03 +02:00
Timothy Flynn
9f26495988 Meta: Update simdutf to version 7.4.0 2025-08-27 13:25:03 +02:00
Timothy Flynn
f2dbe267ee Meta: Update openssl to version 3.5.2 2025-08-27 13:25:03 +02:00
Timothy Flynn
57bd5baff4 Meta: Update libwebp to version 1.6.0 2025-08-27 13:25:03 +02:00
Timothy Flynn
ca4ac66543 Meta: Update libpng to version 1.6.50 2025-08-27 13:25:03 +02:00
Timothy Flynn
c7e11f1f19 Meta: Update libjpeg-turbo to version 3.1.1 2025-08-27 13:25:03 +02:00
Timothy Flynn
eaeecc8628 Meta: Update ffmpeg to version 7.1.1#4 2025-08-27 13:25:03 +02:00
Timothy Flynn
4d6f11445b Meta: Update vcpkg baseline 2025-08-27 13:25:03 +02:00
Jelle Raaijmakers
f4b04beccd LibWeb: Show inline positioning in layout tree dump
Inline nodes in our layout tree have a position, so let's show it. By
centralizing the logic for this, block nodes now lose their redundant
'content-size' dump info which is already part of the box model dump.
2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
5ad4edb322 LibWeb: Use as_if instead of is + static_cast in layout tree dump 2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
c738e4f97f LibWeb: Remove unused line_box_color_on from layout tree dump 2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
fc86cc3375 LibWeb: Use different builder name for layout tree identifier string
Stops shadowing the outer `builder`. No functional changes.
2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
b92764dcc0 LibWeb: Use StringBuilder::append_repeated() for layout tree indentation
No functional changes.
2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
e173b00db6 LibWeb: Always show box model info when dumping layout tree
This is useful information. Let's not hide it.
2025-08-27 11:53:45 +01:00
Jelle Raaijmakers
676f5837b3 LibWeb: Implement SVGLength's read-only property
An SVGLength can be read-only, e.g. all animVal values cannot be
modified. Implement this for all instantiations of SVGLength.

While we're here, add `fake_animated_length_fixme()` so we can easily
find all sites where we need to improve our animated length game.
2025-08-27 11:50:27 +02:00
stelar7
f9a13ecb13 LibWeb/EME: Implement navigator.requestMediaKeySystemAccess 2025-08-27 09:58:00 +02:00
stelar7
c9b3365286 LibWeb/EME: Implement is_supported_key_system 2025-08-27 09:58:00 +02:00
stelar7
7b9d5f9fdc LibWeb/EME: Implement get_supported_configuration 2025-08-27 09:58:00 +02:00
stelar7
ca66a4933e LibWeb/EME: Implement get_supported_configuration_and_consent 2025-08-27 09:58:00 +02:00
stelar7
8f2886733c LibWeb/EME: Implement get_supported_capabilities_for_audio_video_type 2025-08-27 09:58:00 +02:00