Commit Graph

853 Commits

Author SHA1 Message Date
Tim Ledbetter
f05bc7c0cd LibWeb: Implement dominant-baseline for SVG text
This property determines the default baseline used to align content
within the given box.
2026-02-26 09:23:23 +01:00
Shannon Booth
9e7aa878bc LibWeb: Properly determine if running in SecureContext for Workers
Fixes the included imported test. Note that this required a minor
edit of the WPT import to work with our test harness setup to
try and create a non secure context setup as both file:// and
localhost are considered secure contexts.
2026-02-26 07:22:50 +01:00
Tim Ledbetter
84043cd82d LibWeb: Track deleted state on IndexedDb Index and ObjectStore
An `InvalidStateError` is now thrown when an attempt is made to
interact with an index or object store that has been deleted.
2026-02-24 17:37:04 +01:00
Sam Atkins
000f902522 Tests: Import WPT test for document.fonts.ready 2026-02-24 15:44:32 +00:00
Luke Wilde
8017f8a7ed Tests/LibWeb: Import Fullscreen WPT tests 2026-02-23 18:44:26 +00:00
devgianlu
3d7b02333f LibWeb: Import some CredentialsContainer WPT tests 2026-02-22 14:55:30 -05:00
Andreas Kling
90cfa2597d Tests: Import WPT tests for clientLeft and clientTop
Import several WPT tests covering client* properties:
- client-props-input.html (border offsets on input/textarea)
- client-props-root.html (root element client properties)
- client-props-zoom.html (client properties with zoom)
- client-props-inline-list-item.html (inline list-item display)
- client-props-root-display-none-crash.html (crash test)
- table-client-props.html (table element client properties)
2026-02-22 13:24:05 +01:00
Tim Ledbetter
a4aaed5e83 LibWeb: Propagate error from Notification contructor 2026-02-22 11:37:33 +01:00
Shannon Booth
1be69479a6 LibURL+Elsewhere: Consider file:// origins opaque by default
This aligns our behaviour closer to other browsers, which
_mostly_ consider file scheme URLs as opaque. For test
purposes, allow overriding this behaviour with a commandline
flag.
2026-02-21 23:00:57 +01:00
Luke Wilde
fc13f15193 LibWeb/CSP: Apply strict-dynamic to inline scripts
This implements https://github.com/w3c/webappsec-csp/pull/787 that
fixed the linked spec issue.
2026-02-19 14:58:09 +01:00
Luke Wilde
84db5d8c1c Meta+test-web: Support per-test .headers files
If a test requires custom response headers, we now serve it via the
http-test-server, which will read the headers file and add them to the
response.
2026-02-19 14:58:09 +01:00
Callum Law
6705bd187c LibWeb: Account for generic font families in FontFaceSet::load()
Fixes a regression in d998a0a which was crashing the imported test
2026-02-19 12:00:52 +01:00
Callum Law
f36d0407ec Tests: Import some @font-feature-values tests 2026-02-17 12:25:27 +00:00
Aliaksandr Kalenik
3c73457b26 LibWeb: Implement CSS Grid dense packing and fix span placement
Implement the `dense` keyword for `grid-auto-flow` so auto-placed items
backfill earlier gaps in the grid. The sparse/dense cursor logic is now
centralized in `place_grid_items()` step 4: dense resets the cursor to
the grid start before each search, while sparse keeps advancing forward.

Also fix a pre-existing bug where `find_unoccupied_place()` and several
placement helpers only checked if a single cell was unoccupied, ignoring
multi-cell spans. Add `OccupationGrid::is_area_occupied()` and use it
throughout to correctly verify the entire rectangular area is available.
2026-02-16 20:00:17 +01:00
Shannon Booth
a0d4344d4e Tests/LibWeb: Import some more webstorage WPT tests
Which were helpful in determining property behaviour for the Storage
object.
2026-02-16 18:49:15 +01:00
Psychpsyo
6e1f2c10d6 LibWeb: Implement basics of the WebXR testing framework 2026-02-15 10:50:25 +01:00
Psychpsyo
a7267f711b LibWeb: Add overflow-clip-margin-* properties
The corner radius isn't quite right yet, but this gives us
another couple WPT passes for these.
2026-02-14 22:58:21 +01:00
Tim Ledbetter
5060a61081 LibWeb: Align Navigable::reload() with the specification 2026-02-14 20:21:53 +01:00
Tim Ledbetter
dc649a7e46 LibWeb: Use reject_the_finished_promise() in abort_a_navigate_event()
This aligns our implementation with the specification. Doing this
fixes a number of WPT tests because this sets
`m_ongoing_api_method_tracker` to null, avoiding an assertion that
previously caused a crash.
2026-02-14 20:21:53 +01:00
Jelle Raaijmakers
83913fef84 LibWeb: Queue animation phase events as part of updating animations
Move the dispatch_events_for_animation_if_necessary() calls into step 1
of update_animations_and_send_events(), where the spec note says
updating timelines involves "Queueing animation events for any such
animations." Previously, these calls ran after step 7 (event dispatch),
causing newly queued events to be deferred by an extra rendering update.

This meant that e.g. a CSS transition triggered during an earlier
rendering step would not have its transitionrun event fired until the
next frame, instead of the current one.
2026-02-13 22:44:17 +01:00
Niccolo Antonelli Dziri
bd76078f97 LibWeb: Add constructor for Notification and getter methods
The full constructor for NotificationsAPI::Notification is implemented
along with the getter methods.
It is now possible to call the elements of Notification in JS without
getting undefined but the default values (or the ones passed in
options).

The method `current_wall_time` is added in EnvironmentSettingsObject.

This passes a least a few more tests because of the getter methods
that are created.

https://wpt.live/notifications/constructor-basic.https.html

https://wpt.live/notifications/idlharness.https.any.html
2026-02-13 16:47:42 +00:00
Shannon Booth
0b839a9e2d Tests/LibWeb: Sync WPT test for WASM global attribute setter
The regression in 932a204 turned out to be the specified
behaviour changed as part of: whatwg/webidl#1498

And WPT has now been updated accordingly.
2026-02-13 12:12:23 +01:00
Callum Law
9de3ddf8f9 Tests: Import some counter style tests 2026-02-12 10:33:09 +00:00
Callum Law
046dfdd192 LibWeb: Parse CSS timeline-scope property 2026-02-11 11:27:16 +01:00
Callum Law
2f135e0e63 LibWeb: Import some animation-timeline related tests 2026-02-11 10:49:34 +01:00
Shannon Booth
39976bb4b8 LibWeb/Bindings: Use DefineDataPropertyOrThrow in Replaceable setter 2026-02-07 11:49:36 +01:00
Shannon Booth
42c3199815 Tests/LibWeb: Import [PutForwards] WPT test 2026-02-06 19:23:30 +01:00
Shannon Booth
02e5e419d9 Tests/LibWeb: Import WPT test for IDL handling of attribute setters 2026-02-06 19:23:30 +01:00
Tim Ledbetter
0b346d1952 LibWeb: Distribute colspan cell width equally when baseline is zero
This matches the behavior of other engines.
2026-02-06 11:37:14 +00:00
Tim Ledbetter
1e8ae879c5 Tests: Reimport updated WPT test helper file 2026-02-06 11:37:14 +00:00
Callum Law
7f8ca1e9ce Tests: Import a bunch of ScrollTimeline tests 2026-02-05 16:45:34 +01:00
Sam Atkins
615e0c36a4 Tests: Import computed color-mix() test
All of this fails right now, but will gain some passes over subsequent
commits, and importing now lets us track that.
2026-02-05 13:48:10 +00:00
Callum Law
6df4fe199e Tests: Import some @counter-style parsing tests 2026-02-03 09:58:47 +00:00
Tim Ledbetter
c44b30f0f1 LibWeb: Exclude UA internal shadow root elements in elementFromPoint()
When `elementFromPoint()` or `elementsFromPoint()` returns an element
that is inside a UA internal shadow root, we now return the shadow host
for that element.
2026-02-02 20:17:03 +00:00
Shannon Booth
57339a21a1 Tests/LibWeb: Import a WPT test for storage enumeration
Unfortunately the localStorage portion of this test is manually
disabled here as it is inherently racey with other localStorage
tests in the suite.
2026-02-01 08:35:36 -05:00
CountBleck
f44c75a8de LibWeb: Import WPT tests concerning workers spawning other workers
Note that the importScripts() calls to /resources/testharness.js had to
be manually adjusted to use relative paths.
2026-01-31 22:45:08 +01:00
CountBleck
7722af9772 LibWeb: Allow the WPT test harness to be used inside workers
This commit changes any references of `window` (which may not exist) to
use `globalThis` instead.
2026-01-31 22:45:08 +01:00
Shannon Booth
71a9106744 Tests/LibWeb: Import a javascript URL navigation testcase
It turns out that the failing tests actually regressed in:
3e0ea4f62e, which requires more
investigation.

I don't think we would be better off with a revert (and all browsers
already have different behaviour here), so let's just add an in
tree test for now.
2026-01-31 20:41:37 +01:00
Tim Ledbetter
ea855d2baf LibWeb: Clear assigned slot for slottables that become unassigned 2026-01-31 11:44:20 +01:00
Shannon Booth
3e0ea4f62e LibWeb/HTML: Check ongoing navigation before javascript: URL navigation
See: https://github.com/whatwg/html/commit/976d272

This fixes a timeout in the included test. In order for the
test to run properly in our test harness it is modified slightly
(as we are loading the HTML from a file:// URL).
2026-01-26 18:46:54 +01:00
mikiubo
ba75d4c014 LibCrypto: Add ChaCha20-Poly1305 support
Implement ChaCha20-Poly1305 AEAD using OpenSSL and expose it through
the WebCrypto API, including key management and AEAD parameters.

Add WPT:
/encrypt_decrypt/chacha20_poly1305.tentative.https.any.worker.html
2026-01-26 10:03:09 +01:00
Tim Ledbetter
66246a0f3a LibWeb: Implement composition for grid track size lists 2026-01-26 03:20:08 +01:00
Jelle Raaijmakers
acd38ad795 Tests/LibWeb: Implement action_sequence in testdriver-vendor.js
This implements WebDriver Actions API support for key sequences with
modifier tracking in our testdriver-vendor.js. The action_sequence
function processes key sources, tracks Shift/Ctrl/Alt/Meta state across
events, and dispatches keys with the appropriate modifiers via
Internals.sendText().

This allows us to pass WPT tests that make use of that API in our own
test-web runner.
2026-01-23 14:21:35 +01:00
Jelle Raaijmakers
b3d834eea5 Tests/LibWeb: Import WPT `editing/plaintext-only/insertLineBreak.html' 2026-01-23 14:21:35 +01:00
mikiubo
cd8465a6b5 LibCrypto: Add SHAKE digest support
Introduce a new SHAKE hash wrapper in LibCrypto backed by OpenSSL.

Wire cSHAKE128 and cSHAKE256 into WebCrypto.

Note that cSHAKE with non-empty functionName or customization is
currently rejected due to OpenSSL EVP limitations.

This fixes WPT:
WebCryptoAPI/digest/cshake.tentative.https.any.html
2026-01-22 19:47:09 -05:00
Callum Law
04885a2d41 Tests: Import some more composition and interpolation tests 2026-01-22 11:29:41 +00:00
Shannon Booth
c6fab541b7 LibWeb: Fix storage set broadcast event never broadcasting old value
We had skipped some steps in the spec and were:
 * Always broadcasting an old value of null, instead of what it
   actually was previously.
 * Still broadcasting a storage event even if the value had
   not changed in storage compared to the last value.

Fix both issues by returning what the old value is in the setter and
implementing the missing logic.
2026-01-21 22:27:59 +01:00
Jelle Raaijmakers
f17ea50618 Tests/LibWeb: Import WPT Speech API IDL harness test 2026-01-20 06:51:04 -05:00
Tim Ledbetter
0035690977 LibWeb: Return body from activeElement() when nothing is focused
This matches the behavior of other browsers.
2026-01-19 13:08:30 +01:00
Tim Ledbetter
115a794291 LibWeb: Implement composition of filter function lists 2026-01-16 11:29:30 +00:00