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
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
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
Gingeh
0e3386bb4c
LibWeb: Throw SyntaxError when FontFaceSet contains var
2025-07-01 11:50:05 +01:00
Tim Ledbetter
5b522c096e
LibWeb: Add border-*-radius
logical properties
2025-07-01 11:16:37 +02:00
Tim Ledbetter
844dcd3310
LibWeb: Ignore non-finite OffscreenCanvas
shadow offset values
2025-07-01 13:53:27 +12:00
Andreas Kling
b3d9e39bad
LibWeb: Avoid infinite loop in HTMLElement.scrollParent
...
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
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
Tim Ledbetter
ac25f47e8f
LibWeb/SVG: Disallow negative stroke-dasharray
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-06-27 23:00:13 +02:00
Tim Ledbetter
0c8a90166f
LibWeb/SVG: Disallow negative values for SVG radius properties
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
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, 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-27 22:16:42 +02:00
Tim Ledbetter
68035a2b8d
LibWeb/CSS: Add the text-rendering
property
2025-06-27 16:51:30 +01:00
Shannon Booth
20d369b96d
LibWeb/HTML: Implement the exception checks for Document.domain setter
2025-06-27 18:45:48 +12:00
Tim Ledbetter
bf37f3400e
LibWeb: Don't treat "--" as a valid custom property name
...
This is reserved for future use by CSS.
2025-06-25 17:09:29 +01:00
mikiubo
ff78746be1
LibWeb: Set readyState to complete for DOMParser documents
...
Documents created via DOMParser.parseFromString()
are parsed synchronously and do not participate in the
browsing context's loading pipeline.
This patch ensures that if the document has no browsing context
(i.e. was parsed via DOMParser),
its readiness is set to "complete" synchronously.
Fixes WPT:
domparsing/xmldomparser.html
2025-06-25 20:49:03 +12:00
Tim Ledbetter
b00e57139f
LibWeb/CSS: Treat block at-rules with no block as invalid
2025-06-25 09:02:45 +02:00
Tim Ledbetter
48f56cad08
LibWeb: Handle non-numeric font-weight
values in keyframes
...
Previously, using `font-weight` with a keyword or `calc()` value inside
a keyframe rule would cause a crash.
2025-06-25 09:01:56 +02:00
Callum Law
536f8c395c
LibWeb: Set numeric type of asin, acos, atan calculation results
...
Previously we were omitting the numeric type which meant these functions
weren't valid in some cases e.g. within rotate() functions.
2025-06-25 05:19:07 +01:00
Aliaksandr Kalenik
8d6f2390f6
LibWeb: Set grid-auto-* to initial values when parsing grid-template
...
...as `grid` property value.
2025-06-24 19:14:08 +02:00
Tim Ledbetter
1c2b6ae03e
LibWeb: Don't attempt to set the frozen base url on a null base element
2025-06-25 01:33:45 +12:00
Sam Atkins
8b6c32e3ab
Tests: Import tests for scrollParent() and offsetParent()
2025-06-24 15:26:35 +02:00
Callum Law
6584ae0080
LibWeb: Treat CSS selectors containing undeclared namespaces as invalid
...
Selectors containing undeclared namespaces should be considered invalid,
not just not matching any elements.
Gains us 3 new WPT passes.
2025-06-24 12:51:12 +01:00
Tim Ledbetter
b46378085d
LibWeb: Absolutize keyframe values before interpolating
2025-06-24 12:36:47 +01:00
Shannon Booth
0bdcaf02d3
LibWeb/HTML: Only update the image data on fully loaded document
...
Documents created by DOMParser and fragment documents do not
have an origin set on the document by the spec. These documents
also happen to never become fully active.
By properly implementing the steps for the <img> element to only
update the image data for documents which are fully active, this
fixes a crash for img elements in these types of documents.
Unfortunately, this is not a full fix for the microtask queue case.
This is because it seems possible for node document for an <img>
element to be changed during the microtask queue for that document.
It is not clear to me how this can be fixed in a nice way.
2025-06-24 09:56:14 +02:00
Callum Law
b0cdc3f03b
LibWeb: Respect writing-mode and direction when mapping logical aliases
2025-06-23 15:19:07 +01:00
Callum Law
34a52baeed
LibWeb: Add generic functionality for logical alias computed values
2025-06-23 15:19:07 +01:00
Callum Law
cfc8d3031b
LibWeb: Map logical aliases at cascade time
...
Previously we would incorrectly map these in
`CSSStyleProperties::convert_declarations_to_specified_order`, aside
from being too early (as it meant we didn't maintain them as distinct
from their physical counterparts in CSSStyleProperties), this meant
that we didn't yet have the required context to map them correctly.
We now map them as part of the cascade process. To compute the mapping
context we do a cascade without mapping, and extract the relevant
properties (writing-direction and direction).
2025-06-23 15:19:07 +01:00
Tim Ledbetter
9b6da84fff
LibWeb/CSS: Implement the font-kerning
property
...
This sets whether the kerning information stored on the current font is
used.
2025-06-23 13:26:48 +01:00
Callum Law
80ea865b19
LibWeb: Use correct error for invalid rule in nested insertRule
...
When we try to insert a disallowed (non-nested) statement into a
CSSGroupingRule we should throw a `HierarchyRequestError` as it being
disallowed is a "constraint specified by CSS". Previously we would rely
on `Parser::is_valid_in_the_current_context` and throw a Syntax error.
There are more constraints to be implemented.
2025-06-23 12:52:40 +01:00
Glenn Skrzypczak
6b84cd8d11
LibWeb/HTML: Correctly set base elements frozen base url
...
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 / 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 commit implements the fallback to the documents fallback base url
if the href of the first base element is a data or javascript url.
Additionally the frozen base url is set, if a base element becomes the
first base element with an href content attribute because the previous
one got removed.
2025-06-23 18:56:42 +12:00
Aliaksandr Kalenik
4ed9f6fcc0
LibWeb: Collapse auto-fit tracks in middle of tracks definition [GFC]
...
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 / 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
`collapse_auto_fit_tracks_if_needed()` had a check that does collapsing
only if auto-fit is used like
`grid-template-columns: repeat(auto-fit, 1px);`, and it didn't work for
valid cases when `repeat(auto-fit)` is placed in the middle of
definition like `grid-template-columns: 1px repeat(auto-fit, 1px) 1px;`.
2025-06-23 02:29:45 +02:00
Tim Ledbetter
689dff3ee8
Tests: Synchronize imported tests with the WPT repository
2025-06-22 23:51:34 +02:00
Aliaksandr Kalenik
6ec6e755b2
LibWeb: Merge consecutive grid lines in GridTrackSizeList
...
Fixes a bug where consecutively defined grid lines were not merged
during serialization.
2025-06-22 21:15:40 +02:00
Aliaksandr Kalenik
e6dabdcebe
LibWeb: Serialize grid line names in GridFormattingContext
...
`getComputedStyle()` for grid tracks returns style value produced during
layout. This is needed to return resolved track sizes values which are
thrown away after layout is done. Now GFC produces more correct style
value by not ignoring grid line names.
2025-06-21 22:07:08 +02:00
Aliaksandr Kalenik
af602b2555
LibWeb: Align CSS Grid properties parsing with the specification
...
Reimplements `grid`, `grid-template`, `grid-template-rows`, and
`grid-template-columns` in a way that uses a separate function for each
grammar rule defined in the specification. This change results in many
additional passing tests from the already imported WPT suite. Most of
the remaining test failures are related to incorrect serialization of
grid properties.
2025-06-21 22:07:08 +02:00
Aliaksandr Kalenik
7b077595c3
Tests: Reimport css/css-grid/parsing/grid-template-columns-computed.html
...
Sync this test with upstream WPT where they added a new subtest in this
file.
2025-06-21 22:07:08 +02:00
Tim Ledbetter
dede92aa78
Tests: Update WPT testharness.js
to the most recent version
...
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 / 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 ensures that our test output looks the same as that shown in the
WPT runner.
2025-06-21 14:58:02 +02:00
Jelle Raaijmakers
22bda8e5e2
LibWeb: Stub Geolocation API
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 / 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-21 10:00:29 +02:00
Jelle Raaijmakers
f3c1dfb2f1
LibWeb: Import geolocation/idlharness.https.window.html WPT test
2025-06-21 10:00:29 +02:00
Tim Ledbetter
16dbb44de2
LibWeb: Update DOMImplementation.createDocumentType()
name validation
...
This now follows the latest specification steps.
2025-06-19 07:55:47 -04:00
Tim Ledbetter
ba641d4784
LibWeb: Update attribute name validation in Element.setAttribute()
...
This now follows the latest specification steps.
2025-06-19 11:00:53 +01:00
Tim Ledbetter
acf2d773d5
LibWeb: Update attribute name validation in Element.toggleAttribute
...
This now follows the latest specification steps.
2025-06-19 11:00:53 +01:00
Tim Ledbetter
4593c28769
LibWeb: Update validate_and_extract
and its users to the latest spec
2025-06-19 11:00:53 +01:00
Tim Ledbetter
c6cc7e1874
Tests: Update dom/nodes/attributes.html
WPT test
2025-06-19 11:00:53 +01:00
Tim Ledbetter
07b3b70a10
LibWeb: Return the correct computed value for opacity properties
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (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-19 10:27:35 +02:00
Tim Ledbetter
269d5bb40e
LibWeb: Resolve percentages for opacity properties at parse time
2025-06-19 10:27:35 +02:00
Gingeh
e96338dd63
LibWeb: Don't play initially-paused animations
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 / 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-18 17:17:29 +02:00