Commit Graph

813 Commits

Author SHA1 Message Date
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
Tim Ledbetter
09290ae05f LibWeb: Ensure filter values are absolutized before interpolation 2026-01-16 11:29:30 +00:00
Gingeh
37c33c8215 LibWeb: Don't crash when clicking on display: contents element 2026-01-16 10:11:07 +01:00
Tim Ledbetter
40d217bde2 LibWeb/CSS: Serialize shorthands with var() to original value 2026-01-15 11:50:45 +00:00
Tim Ledbetter
e16618bdd1 LibWeb: Apply textBaseline offset in Canvas measureText() 2026-01-15 10:31:23 +01:00
Tim Ledbetter
191e8218dc LibWeb: Use correct font metrics calculations in Canvas measureText() 2026-01-15 10:31:23 +01:00
Shannon Booth
1106496d1c LibWeb/HTML: Ensure data: URL workers are same-origin with themselves
See: https://github.com/whatwg/html/commit/baff3f5
2026-01-13 16:59:54 +01:00
Psychpsyo
fe2bc2bfe7 LibWeb: Improve scrollingElement handling
This change is currently entirely undetectable because of what the
added FIXME talks about. Currently, the HTML element's overflow is
always set to visible in both axes, so it getting set to "clip" in
the imported test ends up not mattering at all.
2026-01-13 11:47:13 +00:00
Shannon Booth
9eabaa6833 LibWeb/HTML: Set correct length for cross-origin wrapper functions 2026-01-13 10:11:31 +01:00
Shannon Booth
399c62933a LibWeb/HTML: Set correct name for cross-origin wrapper functions 2026-01-13 10:11:31 +01:00
Jelle Raaijmakers
34615917d7 Tests: Import WPT test insert-text-in-void-element.tentative.html 2026-01-13 10:07:56 +01:00
Tim Ledbetter
42292a9983 LibWeb: Import some css-transforms interpolation tests 2026-01-13 09:36:47 +01:00
mikiubo
535d2476a7 LibRegex: Implement proper lookbehind via new StepBack opcodes
This introduces a new mechanism for evaluating lookbehind assertions by
adding four new bytecode opcodes: SetStepBack, IncStepBack,
CheckStepBack, and CheckSavedPosition.

These opcodes replace the previous GoBack-based approach and enables
correct handling of variable-length lookbehind patterns,
where the match length cannot be known statically.

Track lookbehind greediness in the parser and propagate it to bytecode
generation. Allow controlled backtracking in lookbehind bodies while
avoiding incorrect captures during step-back execution.

Partially fix issue: #3459
2026-01-11 23:24:49 +01:00
Tim Ledbetter
79a427e1ef LibWeb: Implement HTMLImageElement x() and y() getters
These attributes get the image's top left border edge  relative to the
root element's origin.

These methods ignore any transforms.
2026-01-11 00:33:08 +01:00
sideshowbarker
1b41659efd LibXML+LibWeb: Use existing HTML entities table for XML parsing too
For XHTML documents, resolve named character entities (e.g.,  )
using the HTML entity table via a getEntity SAX callback. This avoids
parsing a large embedded DTD on every document and matches the approach
used by Blink and WebKit.

This also removes the now-unused DTD infrastructure:

- Remove resolve_external_resource callback from Parser::Options
- Remove resolve_xml_resource() function and its ~60KB embedded DTD
- Remove all call sites passing the unused callback
2026-01-09 19:13:41 +00:00
Sam Atkins
4a4c439ffe Tests: Re-import disabled WPT crash tests in Text/ directory
We've had proper support for crash tests, so these can go where they
belong.
2026-01-09 08:11:11 +01:00
Shannon Booth
b557e77cf1 Tests/LibWeb: Import some legacy unforgable related WPT tests 2026-01-08 12:57:17 +01:00
CountBleck
2ca45fba6a LibWeb: Update structured-clone-battery-of-tests to include Error#cause
This just re-imports the file via WPT.sh to match what is currently
present in WPT. This file is used by...
https://wpt.live/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.html
...as well as other WPT tests.
2026-01-08 00:55:52 +01:00
Sam Atkins
cef2591007 Tests: Reimport scrollParent test 2026-01-06 15:54:57 +00:00
Tim Ledbetter
2ff77589df LibWeb: Add FontFaceSetLoadEvent 2026-01-06 12:24:42 +01:00
Shannon Booth
82ae2a183c Tests/LibWeb: Import a message event constructor WPT test 2026-01-06 11:49:06 +01:00
Callum Law
a2b2baca7e Tests: Import some more inset() tests 2026-01-06 10:50:06 +01:00
Tete17
5b215c01f8 LibWeb: Import WPT regarding ML-KEM import and key generation 2026-01-06 01:06:06 +01:00
Tim Ledbetter
3fd4eb56ee LibWeb: Implement FontFaceSet.clear() 2026-01-05 16:15:58 +00:00
Tete17
0fe7f3e74a LibWeb: Add Argon2 WPT tests
A modest 4 new passes :)
2026-01-04 15:56:54 +01:00
Aliaksandr Kalenik
c9a1548c00 Tests: Import layout-algorithm/grid-flex-track-intrinsic-sizes-* 2026-01-03 16:41:31 +01:00
Aliaksandr Kalenik
5efa268255 LibWeb: Fix fit-content() with zero limit and auto min-width in grid
This commit includes two interdependent changes that must be applied
together:
- Treat `fit-content()` tracks as having an intrinsic min sizing
  function when the limit resolves to zero.
- When clamping growth limit to fit-content limit, use `max(base_size,
  fit_content_limit)` instead of just `fit_content_limit` to preserve
  intrinsic sizing contributions.

These changes are coupled because the first change causes
`fit-content(0)` tracks to participate in intrinsic sizing, while the
second ensures the base size from that sizing is not discarded during
clamping.
2026-01-03 16:41:31 +01:00
Aliaksandr Kalenik
c9b6c121d7 Tests: Import layout-algorithm/grid-flex-track-intrinsic-sizes-002.html 2026-01-03 16:41:31 +01:00
Callum Law
9c93fdbd9a Tests: Import some WPT background position parsing tests 2026-01-02 11:43:10 +01:00
Gingeh
789ab3cc57 LibWeb: Declare namespace prefixes in parse_xml_fragment 2026-01-02 11:09:19 +01:00
Tete17
460244c5a8 LibWeb: Add encap & decap WPT tests
For now only the most basic test pass but it is a beginning.
2025-12-30 14:16:35 +01:00
Shannon Booth
f9a996650b LibWeb/HTML: Implement the Origin interface
See: https://github.com/whatwg/html/commit/68909b2
2025-12-30 12:40:27 +01:00
Shannon Booth
2a8b83a568 LibWeb/WebIDL: Upgrade QuotaExceededError to its own interface
See https://github.com/whatwg/webidl/commit/48eba6d
2025-12-29 17:15:11 +01:00
Callum Law
f235625670 LibWeb: Don't disassociate animations from timeline when target orphaned
An animation with an orphaned owning element should continue to be
ticked by the timeline.

Reverts c8b574e and instead avoids leaking animations by not visiting
`Animation`s from `AnimationTimeline`s.

Fixes a timeout in the imported test
2025-12-23 14:54:22 +01:00
Callum Law
d1e8788d43 LibWeb: Account for pending playback rate changes when playing animation
The spec calls for us to use the effective playback rate (i.e. including
any pending updates) when playing an animation.

Fixes a timeout in the newly imported test.
2025-12-23 14:54:22 +01:00
Callum Law
16d1498bb0 Tests: Import some more animation tests 2025-12-23 14:54:22 +01:00
Sam Atkins
cae526286a Tests: Import CSSOM-View IDL harness test 2025-12-23 14:24:28 +01:00
Tete17
8ddf97053a LibWeb: Import Blob-slice WPT test 2025-12-18 23:26:20 +01:00
Sam Atkins
c906dbeaf7 Tests: Import :autofill pseudo-class test 2025-12-18 14:50:27 +01:00
Sam Atkins
cbca527879 Tests: Correct CSS bug in WPT test harness
Corresponds to:
ef6fcf9d74
2025-12-18 12:50:44 +01:00
Sam Atkins
c9f7e0d88c Tests: Reimport attr-all-types WPT test
This has changed quite a bit since we imported it.
2025-12-17 11:53:08 +00:00