Timothy Flynn
5720d626ce
AK: Extract some StringBase helpers for use in an outside class
2025-07-03 09:51:56 -04:00
Timothy Flynn
66006d3812
AK+LibJS: Extract some UTF-16 helpers for use in an outside class
...
An upcoming Utf16String will need access to these helpers. Let's make
them publicly available.
2025-07-03 09:51:56 -04:00
Timothy Flynn
b6dc5050d2
AK: Define a formatter for char16_t
2025-07-03 09:51:56 -04:00
Aliaksandr Kalenik
2618956b6f
LibWeb: Delete unused Range::inverted()
2025-07-03 15:00:49 +02:00
Aliaksandr Kalenik
481ab338b4
LibWeb: Delete unused Range::normalized()
2025-07-03 15:00:49 +02:00
Aliaksandr Kalenik
bc8870d019
LibWeb: Make recompute_selection_states()
go faster
...
...by avoiding `is_before()` call on every loop iteration in step 5.
This change makes switching channels on Discord go a lot faster.
2025-07-03 13:48:18 +02:00
Shannon Booth
c63e77142a
Tests/LibWeb: Import webstorage symbol-props WPT test
...
I noticed a subtest in this test failing along with every
other browser. After investigation, the failure was due
to testing the previous specification before:
3fb6ab4
So this imports the now adjusted WPT test as of:
bb3f032
2025-07-03 12:45:31 +01:00
Sam Atkins
994bbcaa75
LibWeb/Painting: Don't paint invisible paintables
...
This check technically isn't necessary in
`SVGForeignObjectPaintable::paint()` because
`PaintableWithLines::paint(context, phase);` does the check already, but
I've added it there anyway to save some debugging time if someone does
add more code there. :^)
2025-07-03 12:39:05 +02:00
Tim Ledbetter
6ee91c4189
LibWeb: Use correct previous word location when moving selection offset
...
Previously, this incorrect offset could cause a crash when moving the
selection to the previous word.
2025-07-03 10:28:38 +01:00
Jelle Raaijmakers
1eb581815a
Tests: Unskip selection-over-multiple-code-units.html
test
...
The flake was reproducible by running the entire LibWeb test suite over
and over again with sanitizers enabled. By making the test async and run
at window `load` time instead of document `DOMContentLoaded` time, I've
not been able to reproduce the issue locally.
Ideally I was able to find the underlying cause for this bug, but for
now I'd rather run this regression test.
2025-07-03 10:27:39 +01:00
Tim Ledbetter
923deb0c01
LibWeb: Parse border-image
shorthand property
2025-07-03 10:19:44 +01:00
Tim Ledbetter
c0390f759c
LibWeb: Parse the border-image-repeat
property
2025-07-03 10:19:44 +01:00
Tim Ledbetter
98e63e3dd5
LibWeb: Parse the border-image-outset
property
2025-07-03 10:19:44 +01:00
Tim Ledbetter
245905b833
LibWeb: Parse the border-image-slice
property
2025-07-03 10:19:44 +01:00
Tim Ledbetter
70c2621634
LibWeb: Parse the border-image-source
property
2025-07-03 10:19:44 +01:00
Chase Knowlden
ac22e71184
LibWeb: Make offset for HTML style and script elements one after
2025-07-03 10:11:11 +01:00
Sam Atkins
ffd5503dcb
LibWeb/DOM: Serialize pseudo-elements in the correct order
...
Make Element responsible for serializing all its children, so it can put
them in order.
2025-07-03 09:56:56 +01:00
Sam Atkins
4df472988c
LibWeb/DOM: Only list pseudo-elements that actually exist
...
This stops `::before` and `::after` nodes showing up for every single
element in the inspector tree. Unfortunately there's no way for us to
detect that one of these doesn't exist in layout but has *some* style
specified for it, but that seems like a rare use case.
2025-07-03 09:56:56 +01:00
Sam Atkins
140a099fe6
LibDevTools: Remove use-after-move in actor_for_node()
2025-07-03 09:56:56 +01:00
Tim Ledbetter
af60e36122
LibWeb/CSS: Don't remove whitespace early when parsing descriptor values
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-03 08:22:30 +01:00
Tim Ledbetter
9d1373de86
Tests/LibWeb: Import unicode range parsing test from WPT
2025-07-03 08:22:30 +01:00
Timothy Flynn
c12728632d
LibDevTools: Handle pseudo elements during DOM node serialization
...
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
We need to tell DevTools whether elements are pseudo elements, and we
need to set the element's type and visibility to that of its parent.
2025-07-02 15:27:54 -04:00
Timothy Flynn
d0b4673640
LibDevTools: Handle null DOM node properties for inspected nodes
...
In particular, if a node does not have a computed style, we must still
include the "computed" object in the response. Otherwise, DevTools will
continue to display the properties from the previously selected node.
2025-07-02 15:27:54 -04:00
Timothy Flynn
b55d2909f6
LibWebView+UI: Launch the DevTools server if --devtools is specified
...
This replaces the --devtools-port flag with a --devtools flag, which
optionally accepts a port. If the --devtools flag is set, we will now
automatically launch the DevTools server.
2025-07-02 15:27:54 -04:00
Luke Wilde
e85b809f8d
LibWeb+Meta: Move WebGL rendering context implementations in tree
...
This copies the latest generated code in tree and then removes code
generation for the WebGL rendering contexts. This is because it didn't
add much value, and we can maintain the generated output instead of
both that and the generator itself.
2025-07-02 19:00:49 +02:00
Tim Ledbetter
8fce09f521
Tests: Replace background-near-zero-svg
test with WPT import
2025-07-02 18:44:21 +02:00
Tim Ledbetter
a959d4dca2
test-web: Match WPT runner reftest-wait
behavior
...
When a test has a `reftest-wait` class, we now wait for fonts to load
and then for 2 `requestAnimationFrame` callbacks. This matches the
behavior of the WPT runner and allows more imported WPT tests to work
correctly.
2025-07-02 18:44:21 +02:00
Timothy Flynn
504be366a2
Meta: Pin harfbuzz to 10.2.0 for now
...
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
Several of us (including our WPT runner) are getting linker errors with
11.2.0, as Qt is pulling in the system harfbuzz.
2025-07-02 17:02:06 +02:00
Sam Atkins
b2dea4577a
LibWeb/Painting: Only calculate light/dark border color that's used
...
We previously calculated both before deciding which one we wanted.
2025-07-02 15:11:04 +02:00
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
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
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
...
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