Commit Graph

72565 Commits

Author SHA1 Message Date
Tim Ledbetter
f34361950c Tests: Rebaseline failing IndexedDB tests 2025-10-23 15:55:17 +02:00
Tim Ledbetter
49a46522d0 Meta: Use binary search instead of a Trie for public suffix list lookups 2025-10-23 15:01:13 +02:00
Tim Ledbetter
15518f119c Tests: Add some basic public suffix tests 2025-10-23 15:01:13 +02:00
Luke Wilde
85e8d2ba38 LibWeb/IndexedDB: Prevent copying and moving of RequestList
RequestList cannot be copied or moved, because m_pending_request_queue
contains lambdas that store pointers to the original RequestList and
completion steps that we don't have a reference to.

Fixes a bunch of WPT regressions and imports the ones that work.
2025-10-23 14:42:45 +02:00
Luke Wilde
4ede2cdf18 LibWebView+WebContent: Allow setting the default time zone
This is used by tests to set the default time zone to UTC.

This is because certain tests create JavaScript Date objects, which are
in the current timezone.
2025-10-23 14:42:45 +02:00
stelar7
d0bfb85c22 LibWeb/IDB: Mark request as errored if upgrade transaction is aborted 2025-10-23 14:26:54 +02:00
Jelle Raaijmakers
62ae4e878f LibWeb: Implement support for drawing with CanvasPattern
We already had the API, but drawing to the canvas was not affected by
any created CanvasPattern. This moves CanvasPatternPaintStyle to LibGfx
so we don't have to reach into LibWeb, and implements the plumbing to
let Skia use images as a fill pattern.
2025-10-23 13:20:03 +01:00
Jelle Raaijmakers
9753b8e62c Tests: Import WPT canvas repeating pattern test 2025-10-23 13:20:03 +01:00
Pavel Shliak
5ee1031b89 LibWeb: Implement SVGFEColorMatrixElement and feColorMatrix 2025-10-23 13:36:26 +02:00
ste
b50b89b4a8 Meta: Do not set -march=native on riscv64 2025-10-23 12:17:21 +02:00
ste
b28a97b399 Meta: Add build support for RISC-V (riscv64)
Co-authored-by: Bas M. <bas@opvolger.net>
2025-10-23 12:17:21 +02:00
mikiubo
5b2a71a712 LibWeb: Implement XMLFragmentParser
Implement XMLFragmentParser based on the specification:
https://html.spec.whatwg.org/multipage/xhtml.html

Fixes one WPT in:
domparsing/insert_adjacent_html-xhtml.xhtml
2025-10-23 11:06:39 +01:00
mikiubo
0b715b20a2 LibWeb: Make HTML fragment parsing return ExceptionOr
Update Element::parse_fragment and Node::unsafely_set_html to
propagate exceptions.

This refactor is needed as a prerequisite for implementing the XML
fragment parser, which requires consistent error handling in fragment
parsing.
2025-10-23 11:06:39 +01:00
Callum Law
8417d74328 LibWeb: Parse transition property as a coordinating list shorthand
We don't need all this specific logic for parsing the `transition`
property - we also now maintain `none` as such until use time which
gains us a couple extra tests
2025-10-23 10:09:11 +01:00
Callum Law
94c788f2e0 LibWeb: Make animation parsing logic reusable
This is useful for parsing of other coordinating list shorthands
2025-10-23 10:09:11 +01:00
Callum Law
bb7d5747e7 LibWeb: Serialize transition as a coordinating list shorthand 2025-10-23 10:09:11 +01:00
Callum Law
2e6988d681 LibWeb: Make logic for serializing coordinating list shorthand reusable
Previously this was just used for `animation` serialization but can be
used for other properties (e.g. transition, background) as well
2025-10-23 10:09:11 +01:00
Callum Law
fc5cdd69a0 LibWeb: Extract transition coordination logic to reusable method
This will be useful for other coordinating list property groups (e.g.
background and animation)
2025-10-23 10:09:11 +01:00
Callum Law
e78cb71eb3 LibWeb: Dont skip invalid properties when coordinating transition list
Unrecognized property names should still be kept in the list to preserve
matching of indices (e.g. that the Nth property should associate with
the Nth duration)
2025-10-23 10:09:11 +01:00
Callum Law
fd2f3b1f03 Tests: Import transition parsing tests 2025-10-23 10:09:11 +01:00
Callum Law
0b45a68423 LibWeb: Avoid early conversion to CSSPixels when simplifying calculation
Converting to CSSPixels caused us to lose precision and the sign of
signed zeroes.

The values we resolve against in Length::ResolutionContext are still
themselves rounded too early but this is in the right direction.
2025-10-23 09:34:12 +01:00
Callum Law
43b06cbbdd LibWeb: Propagate NaN through CSS sign() function 2025-10-23 09:34:12 +01:00
Callum Law
d32f99b16f LibWeb: Ensure all passed arguments are used when parsing math functions
This disallows things such as `log(1, foobar)` where we would previously
just skip over `foobar` and parse this as `log(1)`
2025-10-23 09:34:12 +01:00
Callum Law
1977a976da LibWeb: Handle inaccuracies resolving transformation matrix type
Doing trigonometric calculations with floating point numbers can
introduce small inaccuracies. This meant that we would sometimes
incorrectly generate a 3d rather than 2d matrix for the resolved value
of `transform`.

Gains us 3 WPT tests.
2025-10-23 09:34:12 +01:00
Callum Law
2d331b9176 LibWeb: Don't swap atan2 arguments in with_simplified_children 2025-10-23 09:34:12 +01:00
Zaggy1024
670cbccb4c Tests: Enable ThreadedPromise tests on Windows 2025-10-22 17:32:45 -05:00
Zaggy1024
3c9ddc9b7f Tests: Add a test for EventLoop::pump(PollForEvents) 2025-10-22 17:32:45 -05:00
Zaggy1024
e0a75d5084 LibCore: Implement polling for events on Windows 2025-10-22 17:32:45 -05:00
Tim Ledbetter
2fd424ccb6 LibWeb: Draw canvas arcs and ellipses correctly when radius is zero
In this case, we should just draw a line from the last point in the
path to the start point. Previously, a division by zero caused nothing
to be drawn.
2025-10-22 16:08:57 +02:00
Undefine
865699066e Documentation: Add libdrm to FreeBSD packages 2025-10-22 13:54:54 +02:00
Undefine
40bc1c0eb5 LibGfx: Enable Vulkan shared images and WebGL on FreeBSD 2025-10-22 13:54:54 +02:00
Undefine
bfa86f7961 LibGfx: Use PkgConfig to find libdrm
On FreeBSD the libdrm headers are not in a standard location so this
makes the include more portable.
2025-10-22 13:54:54 +02:00
Undefine
abe536652f Meta+LibCore: Disable --no-undefined on FreeBSD and remove LibCore hack
It turns out it's much cleaner to just allow undefined symbols like we
already do for sanitizer Clang and remove the weak symbol definition.
2025-10-22 13:54:54 +02:00
Undefine
bd8c6c1431 Meta: Add the dbus feature to qtbase
D-Bus is needed for Qt to build its accessibility support and since we
build D-Bus regardless it doesn't add any overhead.
2025-10-22 13:54:54 +02:00
Undefine
5fd0586125 Meta: Build dbus on FreeBSD 2025-10-22 13:54:54 +02:00
Tim Ledbetter
976912f3e9 LibWeb: Normalize negative drawImage() source/destination dimensions 2025-10-22 12:29:04 +02:00
caztanj
e93f44112d LibJS: Do not verify cycle root's status is linked in CyclicModule
This VERIFY is both incorrect and redundant. The VERIFY at step 2
verifies the status when evaluate is called on m_cycle_root.
2025-10-22 11:54:56 +02:00
Feng Yu
61c36e2865 LibJS: Sync additional Import Attributes spec changes
Some steps were not updated with tc39/ecma262#3057. This patch
syncs the remaining changes.
2025-10-22 10:58:19 +02:00
Jelle Raaijmakers
f8c4043460 LibWeb: Repeat shader for repeating linear gradient
We implemented repeating linear gradients by expanding a vector of color
stops until the entire range was covered. This is both a bit wasteful
and caused Skia to draw corrupted gradients to screen whenever the total
amount of color stops and positions exceeded 127.

Instead of doing that, use the original color stops for the shader and
repeat it instead of clamping it. We need to do a bit of math to project
positions correctly, but after that the shader repeats itself nicely.

While we're here, calculate the gradient's length and the center point
as floats instead of ints, yielding a slight but noticeable improvement
in gradient rendering (see the diff on the zig zag pattern in
css-gradients.html for an example of this).
2025-10-22 10:45:18 +02:00
Jelle Raaijmakers
8af6da64a6 Tests: Rework CSS gradients test layout
Put the CSS gradients in a grid instead of a single long column. This
makes it much easier to detect changes / view diffs.
2025-10-22 10:45:18 +02:00
Jelle Raaijmakers
e6ddc995a7 LibWeb: Remove unused include from GradientData.h 2025-10-22 10:45:18 +02:00
Jelle Raaijmakers
868c29545a LibWeb: Skip one single positive linear gradient color stop repeat
We prime `color_stop_list_with_expanded_repeat` with the input
`color_stop_list`, so we don't actually need to copy the stops for the
first iteration. This didn't result in graphical glitches, but these
entries were unnecessary irregardless.
2025-10-22 10:45:18 +02:00
Tim Ledbetter
c4e56cc845 LibWeb: Throw error when calling drawImage() with a broken image 2025-10-22 10:44:58 +02:00
Lorenz A
96b34ea744 LibWeb: Add MathML Element presentational hints 2025-10-22 01:46:41 +02:00
Tim Ledbetter
f1571c4217 LibWeb: Ensure drawImage() always uses the first image frame 2025-10-22 01:25:46 +02:00
Jelle Raaijmakers
2c78fd5b89 AK: Remove unused Checked<T> code
We could never hit the #else branches for some of these methods, because
we already relied on having __builtin_*_overflow() readily available in
earlier methods.

multiplication_would_overflow() with three arguments was only used in a
test, so let's get rid of that as well.
2025-10-22 00:26:23 +02:00
Callum Law
f49cf75d44 LibWeb: Don't pass unnecessary PropertyComputationDependencies struct
Since we now have access to the `AbstractElement` through the
`ComputationContext` we can just set the flag that this element relies
on tree counting functions directly, no need to pass this struct around.
2025-10-22 00:01:30 +02:00
Callum Law
5b9a36b172 LibWeb: Pass AbstractElement in ComputationContext
Passing the `AbstractElement` rather than the
`TreeCountingFunctionResolutionContext` allows us to only compute the
resolution context when necessary (i.e. when we actually need to resolve
a tree counting function)
2025-10-22 00:01:30 +02:00
Callum Law
a4184fda1f LibWeb: Avoid iterating in children_changed unless necessary
Previously when one child of an element changed we would iterate over
every child to check whether they needed to be invalidated because they
relied on tree counting functions.

We now skip this in most cases by only doing it when at least one child
relies on tree counting functions.
2025-10-22 00:01:30 +02:00
Lorenz A
6afd39b16a LibWeb: Keep the tokens in ListOfActiveFormattingElements 2025-10-21 23:36:07 +02:00