Commit graph

70037 commits

Author SHA1 Message Date
Sam Atkins
c7166527ce LibWeb/Painting: Keep alpha for inset/outset border colors
Also return the original color when needed, instead of reconstructing it
from HSV.
2025-07-02 15:11:04 +02:00
Ali Mohammad Pur
408694ab4f Meta: Update vcpkg baseline
This bump includes a new version of meson that unbreaks the build on
macOS 26 with xcode 26.
2025-07-02 13:27:02 +02:00
Tim Ledbetter
53adf3be1e Meta: Ensure local WPT repository is up to date before importing
The current import process assumes that the local WPT repository is up
to date. Let's make sure that's true before importing a new test.
2025-07-02 12:02:09 +01:00
Jelle Raaijmakers
180bb0fc5d Everywhere: Remove LibRIFF 2025-07-02 12:01:12 +01:00
Gingeh
fa410a67d9 LibWeb: Don't crash with near-zero background sizes 2025-07-02 11:45:34 +01:00
Tim Ledbetter
78b6032940 LibWeb: Validate operator count when parsing a calculation
Previously, we would allow calc values such as `calc(min(1 2))`, which
would be simplified to `calc(3)` because we assumed that numbers not
separated by an operator represented a sum. We now validate that the
number of operators we see is as we would expect before collecting
these values into a sum node.
2025-07-02 10:12:58 +01:00
ayeteadoe
43778e9493 Meta: Fix vcpkg angle port on Windows
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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-07-01 14:17:17 -06:00
Gingeh
b8f78e3bc1 LibWeb: Don't crash with invalid transform-origin values
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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-07-01 14:19:10 +01:00
Gingeh
0e3386bb4c LibWeb: Throw SyntaxError when FontFaceSet contains var 2025-07-01 11:50:05 +01:00
Gingeh
863092afdc LibWeb: Don't crash with non-<col> table-column 2025-07-01 11:18:14 +02:00
Tim Ledbetter
5b522c096e LibWeb: Add border-*-radius logical properties 2025-07-01 11:16:37 +02:00
Jelle Raaijmakers
e77561d3a9 LibWeb/WebGL: Use robust versions of API calls provided by ANGLE
In 454bf0b7cd, we've incorrectly
attributed the finding.

Credit goes to https://github.com/intrigus-lgtm instead for finding the
issue and reporting it to us.
2025-07-01 09:53:03 +02:00
Shannon Booth
02e6618554 Tests: Disable flaky selection-over-multiple-code-units test
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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
This is flaky in CI.
2025-07-01 03:42:28 +01:00
Tim Ledbetter
844dcd3310 LibWeb: Ignore non-finite OffscreenCanvas shadow offset values 2025-07-01 13:53:27 +12:00
Tim Ledbetter
7507906c68 Meta: Normalize relative URLs before fetching them in the WPT importer
Previously, fetching URLs with `..` components would fail.
2025-07-01 11:43:59 +12:00
Tim Ledbetter
7724a96efa LibWeb: Don't expose XMLHttpRequest.responseXML in workers 2025-07-01 01:03:58 +02:00
Luke Wilde
07231e74c7 LibWeb: Set Fetch destination of <link rel="stylesheet"> requests 2025-07-01 10:24:24 +12:00
Luke Wilde
1edf7a8aa2 LibWeb/CSP: Implement URL matching algorithms
These are used by all the *-src attributes, to check if a given URL,
origin and redirect count matches a source list entry specified in
the *-src attribute's values, if it's allowed to.
2025-07-01 10:24:24 +12:00
Luke Wilde
38f80913a4 LibWeb: Implement Content Security Policy directive expression parser
This follows the implementation method that was used for the
implementation of ISO8601 parsing for Temporal in LibJS. Doing it this
way allows us to have state transactions, and thus pick out individual
parse nodes that the specification steps want to use.
2025-07-01 10:24:24 +12:00
Luke Wilde
050f984625 LibWeb/CSP: Add Keyword Sources FlyStrings 2025-07-01 10:24:24 +12:00
Luke Wilde
31a8004ddb AK: Add the ability to consume specifically by a predicate
This will be used by Content Security Policy to consume the next
character, if it matches a whole range of characters, such as
is_ascii_alpha.
2025-07-01 10:24:24 +12:00
Andreas Kling
b3d9e39bad LibWeb: Avoid infinite loop in HTMLElement.scrollParent
Some checks failed
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
Push notes / build (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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
We were failing to actually climb up the containing block chain,
causing this API to infinite loop for anything but the most
trivial cases.

By fixing the loop structure, we also make a bunch of the already
imported WPT tests pass. :^)
2025-06-30 20:38:21 +01:00
ayeteadoe
8d1c860fcd LibWeb: Add OffscreenCanvas to ImageBitmap invalid-types-no-crash test 2025-06-30 12:35:54 -06:00
ayeteadoe
3bce1934b1 Meta: Fix CMake configure warning in unix angle vcpkg port
Fixes Unexpected UNKNOWN_READ_ACCESS on WIN32 variable
2025-06-30 12:24:36 -06:00
Luke Wilde
454bf0b7cd LibWeb/WebGL: Use robust versions of API calls provided by ANGLE
The primary purpose of these is to add bounds checking to older OpenGL
API calls that take arbitrarily sized buffers, but don't know the size
of the buffer and thus rely on the application being certain the buffer
is large enough.

Since these API calls are exposed to arbitrary JS which can make
arbitrarily sized buffers, it is not safe to use the non-robust
variants, as we cannot know the size of the buffer ahead of time, nor
the amount of data required by the API call.

The robust variants provided by ANGLE adds a buffer size parameter,
where it'll calculate the amount of data it needs for that API call
for us and return an error if it's bigger than the given buffer size.

Credit to https://github.com/s41nt0l3xus for finding this during a CTF
and providing a write up that exploits this.
See: 92efbaed6c/gpnctf-2025/WebGL-bird
2025-06-30 11:54:23 -06:00
Luke Wilde
286fa7b3ca Meta: Update ANGLE to chromium/7258 2025-06-30 11:54:23 -06:00
Andrew Kaster
20ad31b6c8 AK: Copy escape char when forking SourceGenerator
Nobody that calls fork() actually passes a non-default escape char,
but in the case that we start doing that, let's avoid nasty surprises
2025-06-30 11:39:16 -06:00
Bastiaan van der Plaat
1a7932601a IDLGenerators: Fix Exposed extended attribute codegen 2025-06-30 11:39:16 -06:00
Bastiaan van der Plaat
6812aa00ca AK: Add SourceGenerator mapping clone method
This is useful when you want to build an independent string using
the same names and replacements as an existing generator.
2025-06-30 11:39:16 -06:00
Bastiaan van der Plaat
41a6ebfba2 LibIDL: Save parsed stringifier_extended_attributes 2025-06-30 11:39:16 -06:00
Bastiaan van der Plaat
da620d6ccf LibIDL+LibWeb: Move parse_exposure_set from code generator to LibIDL 2025-06-30 11:39:16 -06:00
ayeteadoe
dbba6c0df9 LibWeb: Enable in Windows CI 2025-06-30 10:50:36 -06:00
ayeteadoe
c14173f651 LibJS: Enable EXPLICIT_SYMBOL_EXPORT 2025-06-30 10:50:36 -06:00
ayeteadoe
83846b3861 LibGC: Enable EXPLICIT_SYMBOL_EXPORT 2025-06-30 10:50:36 -06:00
Andrew Kaster
1d62bf7049 LibWeb: Stub out createImageBitmap with an OffscreenCanvas image
This fixes build breakage caused by an interaction b/w PRs #4801
and #3788
2025-06-30 10:32:53 -06:00
ayeteadoe
81ccb655b4 LibWeb: Implement HTML::ImageBitmap creation from HTML::ImageData 2025-06-30 10:07:28 -06:00
Totto16
8404df55d8 LibWeb: Add OffscreenCanvas tests
The tests cover working in Worker and some basic functionality
2025-06-30 09:46:21 -06:00
Totto16
f1a096d6e4 LibWeb: Add OffscreenCanvas to IDL types
Add OffscreenCanvas to TexImageSource and CanvasImageSource.
Implement all the necessary features to make it work in all cases where
these types are used.
2025-06-30 09:46:21 -06:00
Totto16
2ad3ce5d37 LibWeb: Implement basics for OffscreenCanvas
This implements the basic interface, classes and functions for
OffscreenCanvas. Many are still stubbed out and have many FIXMEs in
them, but it is a basic skeleton.
2025-06-30 09:46:21 -06:00
Totto16
193ab3757b LibWeb: Factor out canvas rendering options algorihtms
Factor out canvas parsing algorihtm for CanvasRenderingContext2DSettings
from JS::Value. This was only used in one place but needs to be usable
from other places too in the future.
2025-06-30 09:46:21 -06:00
Totto16
49500ac386 LibWeb: Factor out canvas serialization algorihtm
Factor out canvas serialization algorihtm from HTMLCanvasElement to
seperate file. This makes it usable by other things too.
2025-06-30 09:46:21 -06:00
ayeteadoe
8ef7df2a95 Meta: Patch angle vcpkg to build on Windows
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Build Dev Container Image / 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
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-06-30 08:00:38 -06:00
Andrew Kaster
435aee2b1e Meta: Patch angle vcpkg to build on Linux
This involves removing x11 dependencies, and not setting angle_use_x11.
2025-06-30 08:00:38 -06:00
Callum Law
8e9753eadb LibWeb: Correctly compute consistent type when simplifying hypot
Previously we would never get a valid `consistent_type` as we were
trying to make the node types consistent with the initial empty type
which isn't possible.

Gains us 7 WPT tests.
2025-06-30 14:53:04 +02:00
Tim Ledbetter
04a3a227c3 LibWeb: Add the border-inline-* shorthand properties 2025-06-30 14:52:18 +02:00
Tim Ledbetter
90da2f5418 LibWeb: Add the border-block-* shorthand properties 2025-06-30 14:52:18 +02:00
Callum Law
2eb44229b4 LibWeb: Implement Selection.modify 2025-06-30 10:44:32 +01:00
Shannon Booth
bd67a5afaa LibURL: Differentiate cross site opaque origins
Previously if we had two opaque origins both URLs were
being treated as same site.
2025-06-30 08:06:37 +01:00
ayeteadoe
1a3a9eee7a Meta: Add help to generate_python_encoding_indexes.py
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, 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-06-30 14:03:55 +12:00
ayeteadoe
2682f370dd Meta: Rewrite GeneratePublicSuffixData in python 2025-06-30 14:03:55 +12:00