Commit graph

10936 commits

Author SHA1 Message Date
Tim van der Lippe
02aab33987
Add AbortSignal support for event listeners (#39406)
Also fixes several issues with code generation when a dom type is part
of a dictionary.

Part of #34866
Fixes #39398

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-21 18:57:10 +00:00
Tim van der Lippe
7abc813fc3
Abort fetch controller when signal is aborted (#39374)
Does not all tests pass because of a mismatch in microtask timing. The
promises are resolved/rejected in the wrong order.

Part of #34866

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-21 12:33:03 +00:00
Servo WPT Sync
016524bd3c
Sync WPT with upstream (21-09-2025) (#39414)
Automated downstream sync of changes from upstream as of 21-09-2025
[no-wpt-sync]

---------

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-09-21 05:47:33 +00:00
Simon Wülker
2c8533f38e
Parse qualified names with non-alpha characters in xpath (#39409)
The existing parsing rules are too strict and only allow alpha and
alphanumeric characters. Instead, we should follow the production
defined in https://www.w3.org/TR/REC-xml-names/#NT-NCName.

Testing: New tests start to pass
Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-21 03:45:04 +00:00
Simon Wülker
bbceb0faa4
Allow whitespace around path expressions in xpath (#39410)
Previously servo would allow whitespace in between components of an
xpath expression, but not around it.

Testing: New web platform tests start to pass 
Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-20 22:38:24 +00:00
Simon Wülker
bdf630563c
script: Don't try to evaluate xpath variable references (#39395)
Variables in xpath via the javascript bindings are a bit mysterious, as
there is no way that a variable can be specified. We currently panic
when encountering a variable, which is not good. Instead we now throw an
error.

We keep parsing the variables because the code is already there and it
seems realistic that their behaviour will be specified in the future.
I'm fine with removing them too if that is preferred.

Testing: This behaviour is unspecified and different browser produce
different results. There is no "correct" way to do this, but we should
not crash
Part of: https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-20 12:36:54 +00:00
Ashwin Naren
8c45428760
Enable credential management wpt tests (#39327)
Enabling them early to prevent intermittent failures.


Fixes: Partially #38788

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-09-20 07:24:32 +00:00
Ashwin Naren
8a59c2cf56
Implement indexeddb array conversion (#38288)
Implement conversion from js arrays into rust.

Testing: WPT
Fixes: None

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-09-20 06:33:16 +00:00
Oriol Brufau
0de0f741b6
layout: Ignore insets in Taffy for static and sticky positionings (#39401)
Taffy treats static and sticky positionings as relative. So the inset
properties shifted the element in the relpos way, which was no good.
It's better to just treat them as `auto` instead.

Testing: 3 existing tests pass, and adding a new one.
Fixes: #39399

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-19 20:17:56 +00:00
Oriol Brufau
994d767ae5
script: Return None for offsetParent on root <html> and all <body> elements (#39397)
We were returning null for all `<html>` elements, but now we will check
for the root element instead.

We were also returning null for "the body element", now we will return
null for all `<body>` elements even if they aren't "the body element".
This part diverges from the spec, but matches what all browsers do.
https://github.com/w3c/csswg-drafts/issues/12834

Testing: Adding new test
Fixes: #10521

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-09-19 19:38:12 +00:00
Andrei Volykhin
c017420ee7
html: Check the <source> MIME type on the source set updating (#39353)
Follow the HTML specification and check if the source element's MIME
type
('type' attribute) is supported while updating the source set of the
image element (step 5.8)
https://html.spec.whatwg.org/multipage/#update-the-source-set

Also add the missing descriptions for steps for the old and new methods:
- selecting an image source
- creating a source set from attributes
- updating the source set
- normalizing the source densities

Testing: Improvements in the following tests
-
html/semantics/embedded-content/the-img-element/update-the-source-set.html
- resource-timing/initiator-type/picture.html

Fixes: #36675

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-09-19 18:34:37 +00:00
Simon Wülker
84577c9fd4
script: Allow reusing results from xpath queries (#39392)
This behaviour is optional, but observable. Other browsers implement it,
so we should do it too.

Testing: There are no WPT tests for this, which is fair since the spec
explicitly states implementors may choose to not reuse the result.
Fixes: Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-19 17:19:04 +00:00
Oriol Brufau
2c3d580ef1
layout: Take sticky offsets into account for offset queries (#39385)
`offsetLeft` and `offsetTop` were ignoring that sticky positioned boxes
can be shifted out of their normal position.

Testing: Various test improvements.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-09-19 14:20:15 +00:00
Oriol Brufau
754c938722
layout: Make bottom table captions obey relative positioning offsets (#39388)
#33426 only added support for relative positioning on captions with
`caption-side: top`, but forgot about `caption-side: bottom`. This
unifies the logic for both kinds of captions to avoid divergences.

Testing: Modifying an existing test to also cover this case.
Fixes: #39386

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-19 12:44:17 +00:00
Tim van der Lippe
6cba44e0e3
script: Do not start Fetch operations if they have been aborted by the AbortController (#39295)
The first step for aborting fetch calls. It only
has the case where the signal was already aborted
prior to fetch starting.

Part of #34866

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-17 08:49:27 +00:00
Oriol Brufau
18b3e5fe21
layout: Make lines non-phantom if they have inline padding/border/margin (#39058)
According to https://drafts.csswg.org/css-inline/#invisible-line-boxes,
if a line box contains non-zero inline-axis margins, padding or borders,
then it can't be phantom.

Therefore, this patch makes adds a `has_inline_pbm` flag to the line.
Note that we can't use the `has_content` flag, because that would add a
soft wrap opportunity between the padding/border/margin and the first
content of the line.

The patch also renames `InlineFormattingContext::had_inflow_content` to
`has_line_boxes`, which is what we care about for collapsing margins
through.

Testing: Adding new tests
Fixes: #39057

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-16 22:18:46 +00:00
Oriol Brufau
4451ce0ef1
layout: Fix propagation of overflow to viewport (#39173)
This patch refactors the logic for propagating overflow to the viewport,
fixing various issues:
- Now we won't propagate from the root element if it has no box. Note
the fix isn't observable in Servo because we lack scrollbars.
- If the first `<body>` element has no box, we won't keep searching for
other `<body>` elements. This deviates from the spec, but aligns us with
other browsers.
- We won't propagate from the `<body>` if it has no box. We were already
handling `display: none` but not `display: contents`. This deviates from
the spec, but aligns us with other browsers.

Also, when we flag the root or `<body>` as having propagated `overflow`
to the viewport, we retrieve the `LayoutBoxBase`. Therefore, now we get
the computed style from the `LayoutBoxBase` in a single operation,
instead of first retrieving the style from the DOM element and then
getting the `LayoutBoxBase` from the box.

Testing: Adding more tests. We were only failing one of them, but it's
hard to test the fixes given that we don't show scrollbars. The tests
that were already passing are useful too, e.g. Firefox fails one of
them.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-16 20:53:46 +00:00
Tim van der Lippe
22fbb3458b
Add signal to request (#39290)
The signal taken from the requestinit is now passed into
the request object with the relevant steps. I added all
spec comments to this method, as I had trouble figuring
out which steps I had to add.

This required implementing the algorithm to create
dependent signals, which is used in the `any()` method.
So that's now implemented as well.

All of that required the machinery to have dependent and
source signals on an AbortSignal. It uses an IndexSet
as the spec requires it to be an ordered set.

Part of #34866

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-16 20:41:12 +00:00
Simon Wülker
1898a740a8
script: Use xpath ns resolver to resolve namespace prefixes (#39321)
The xpath resolver is a function provided by the user to resolve
namespace prefixes. Previously, we were ignoring the argument.

Testing: New web platform tests start to pass
Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-16 17:25:45 +00:00
Kingsley Yung
f3d5617349
script: Check whether the generated crypto key has empty usages (#39328)
The WebCryptoAPI spec requires that when we generate crypto keys by the
generateKey method of SubtleCrypto interface we have to check whether
the usages is empty. If the usages is empty, throw a SyntaxError.

FYI, Step 9 of
https://w3c.github.io/webcrypto/#SubtleCrypto-method-generateKey

We have not yet implemented this logic, and this patch implements it.

Testing: Pass WPT tests that were expected to fail.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-16 17:23:42 +00:00
Andrei Volykhin
8c3acaaec9
html: Validate descriptors tokens on 'srcset' attribute parsing (#39317)
Follow the specification and validate tokens of the "x/w/h" descriptors
before applying the rules for parsing float-pointing numbers or
non-negative integers.
https://html.spec.whatwg.org/multipage/#parsing-a-srcset-attribute (step
13)

Testing: Improvements in the following tests
-
html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-09-15 17:34:56 +00:00
araya
2947476bdd
Fix Response:bodyUsed behavior to return false if the body is null (#39287)
This PR fixes some test-cases in
https://wpt.fyi/results/fetch/api/response/response-consume-empty.any.html?product=servo

Fetch standard indicates `Response:bodyUsed` should return `false` if
the body content is null , even if the stream was disturbed.
https://fetch.spec.whatwg.org/#dom-body-bodyused

> The bodyUsed getter steps are to return true if
[this](https://webidl.spec.whatwg.org/#this)’s
[body](https://fetch.spec.whatwg.org/#concept-body-body) is non-null and
[this](https://webidl.spec.whatwg.org/#this)’s
[body](https://fetch.spec.whatwg.org/#concept-body-body)’s
[stream](https://fetch.spec.whatwg.org/#concept-body-stream) is
[disturbed](https://streams.spec.whatwg.org/#is-readable-stream-disturbed);
otherwise false.

---------

Signed-off-by: araya <araya@araya.dev>
2025-09-14 08:33:54 +00:00
Wu Yuwei
a0c3dcefe4
chore: update wgpu to v26 (#39016)
Vello has updated to wgpu v26 recently. It might be a good time for
servo to update as well. This PR should wait for #39015 and #38717

Testing: WebGPU CTS
Fixes: None

---------

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
2025-09-14 04:09:17 +00:00
Servo WPT Sync
b3b79e049b
Sync WPT with upstream (14-09-2025) (#39293)
Automated downstream sync of changes from upstream as of 14-09-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-09-14 01:44:16 +00:00
Tim van der Lippe
5beb16d671
Enable abort controller preference for fetch/api/abort (#39282)
This sets a baseline of tests for fetch-related implementation of
AbortController.

Part of #34866

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-13 09:14:13 +00:00
Oriol Brufau
c11670b067
layout: Take text-indent into account in min/max-content inline sizes (#39230)
The min-content and max-content inline sizes of an inline formatting
contentext need to take `text-indent` into account. Note it can be set
to a negative amount, so the `ContentSizesComputation` logic needs some
tweaks to handle it well.

Testing: Fixes various WPT tests

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-13 06:20:39 +00:00
Tim van der Lippe
d1c3e5f58f
Add trusted type checks for eval arguments (#39263)
Also bumps mozjs to the latest version that has support for
`GStackVector` which is what this callback uses.

Part of #36258

Fixes #38877

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-12 19:08:26 +00:00
Kingsley Yung
250c4cda00
indexeddb: Implement openCursor and openKeyCursor for object store (#39080)
Continue on implementing indexeddb's cursor.

This patch focuses on implementing the `openCursor` [1] and
`openKeyCursor` [2] methods of the `IDBObjectStore` interface, which
create and initialize cursors by running the iterate-a-cursor algorithm
[3].

It also adds struct `IndexedDBRecord` to
`components/shared/net/indexeddb_thread.rs`. This struct can later be
used to implement the new `IDBRecord` interface [4].

[1] https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-opencursor
[2] https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-openkeycursor
[3] https://www.w3.org/TR/IndexedDB-2/#iterate-a-cursor
[4] https://w3c.github.io/IndexedDB/#record-interface

Testing: Pass WPT tests that were expected to fail.
Fixes: Part of #38111

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-12 16:54:07 +00:00
Kingsley Yung
a4c6108cbe
script: Check if IndexedDB key path is ECMAScript identifier name (#39255)
From IndexedDB spec, when we check whether a key path is valid, we have
to check whether it is an ECMAScript identifier name. We have not yet
implemented this logic, and always return true.

This patch uses the function `js::rust::wrappers::JS_IsIdentifier` to
achieve this checking.

Testing: Pass WPT tests that were expected to fail.
Fixes: #25324

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-12 15:02:28 +00:00
Andrei Volykhin
965e87d006
html: Ignore a parse error on 'srcset' attribute parsing (#39260)
Parsing the 'srcset' attribute of an image element may result in a parse
error
indicating a non-fatal mismatch between the input and the requirements.
https://html.spec.whatwg.org/multipage/#concept-microsyntax-parse-error
https://html.spec.whatwg.org/multipage/#parse-a-srcset-attribute

This error should not be a reason to stop parsing and may be used by the
user agent to signal a syntax error.

Other browsers generally ignore this error, and we do the same.

Testing: Improvements in the following tests
-
html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute.html

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-09-12 06:45:01 +00:00
Kenzie Raditya Tirtarahardja
097a69169a
webdriver: Support "scroll into view" for commands (#38508)
Implement scroll into view steps for all WebDriver command that requires
it (element click, element send keys, element clear, and take element
screenshot).

Testing: `element_send_keys/scroll_into_view.py`,
`element_click/scroll_into_view.py`, `element_clear/clear.py`

---------

Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
2025-09-12 06:07:58 +00:00
Narfinger
19f70dccf6
Combine some access to the thread local variable for script thread. (#38752)
This combines some access to the thread local variable for script
thread.

- We introduce a new UserInteractingScriptGuard which on drop handles
  the resetting of was_interacting to the previous value. Sometimes
throughout the code `ScriptThread::is_user_interacting` was reset to the
previous value while sometimes just set to false. This should
remove this footgun.
- This also reduces the amount of thread local access for
MutationObservers and task queue.

Testing: WPT tests should cover this.
Fixes: This addresses part of
https://github.com/servo/servo/issues/37969 but there is probably still
stuff to be done.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-09-11 09:40:32 +00:00
Ashwin Naren
97690b1cba
script: Ensure autoincrement and keypath are passed in correctly from IDBTransaction (#38738)
Previously, the correct autoincremented and keypath parameters were only
being passed if the object store is being created. This PR queries this
info from the backend and passes it onto the constructor in
IDBTransaction. Furthermore it exposes keypath and index_names from
IDBObjectStore, mainly for WPT.

Testing: WPT
Fixes: None

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-09-11 09:13:15 +00:00
Simon Wülker
93ad2cf62a
script: Set validation anchor to target element in ElementInternals::SetValidity when anchor is not given (#39247)
Testing: Covered by existing web platform tests

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-09-11 01:26:09 +00:00
webbeef
bc496b08e7
Enable the zstd decoder (#36530)
Uses the `zstd` support from `async-compression` to support zstd
Content-Encoding.

Testing: Covered by wpt tests.

Signed-off-by: webbeef <me@webbeef.org>
2025-09-10 14:58:45 +00:00
Euclid Ye
726b456120
webdriver: Focus WebView asynchronously (#39241)
#38160 added a webdriver-specific API to support waiting on focus
operations to complete. Later, #38243 added a unique id to track each
focus operation.

Back then we wait on focusing webview in webdriver hoping to improve
stability, but it does not matter as it turns out later. #39086 also
focuses browsing context asynchronously.

This PR would make webdriver's focusing-webview behaviour same as human
interaction.

Testing: 
[Before 1](https://github.com/yezhizhen/servo/actions/runs/17598288280),
[Before 2](https://github.com/yezhizhen/servo/actions/runs/17598289360),
[Before 3](https://github.com/yezhizhen/servo/actions/runs/17598290532)
[After 1](https://github.com/yezhizhen/servo/actions/runs/17598282988),
[After 2](https://github.com/yezhizhen/servo/actions/runs/17598280603),
[After 3](https://github.com/yezhizhen/servo/actions/runs/17589228530)

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-09-10 07:36:53 +00:00
Oriol Brufau
433a6bf47b
layout: Set baseline even if line box has no fragment (#39235)
`InlineFormattingContextLayout::finish_current_line_and_reset()` has an
early return in case the line has no fragment. However, if the line only
has a forced line break, then we still need to set the baseline.

Testing: Adding new test.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-10 05:17:25 +00:00
Martin Robinson
ebfb5b1abb
libservo: Make Servo (and servoshell) more resilient against extreme sizes (#39204)
Make several changes which should address panics and inconsistent
behavior around attempts to set extreme sizes:

1. Limit the minimum size of the `RenderingContext` to 1 pixel by 1
   pixel. This should address problems where users of the API try to
   directly set the size to a zero or negative dimension. In addition,
   improve the documentation around `WebView::resize` to mention this.
2. Clamp values sent in the `WebViewDelegate::request_resize_to` method
   to be at least 1x1. This prevents Servo from sending nonsense values
   to embedders. Improve documentation in this method.
3. In servoshell:
    - More consistently clamp inner and outer window size values.
    - Clamp all resize values to the available screen size, so that
      large screen sizes aren't processed directly.

Testing: This change fixes an existing WPT and adds two new API tests.
Fixes: #36763.
Fixes: #36841.
Fixes: #39141.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-09-09 12:51:30 +00:00
Sam
1f0f079203
webgpu: Simplify presentation and handle cleared in script (#38717)
There are many important changes here:

- Generalize the presentation buffer into standalone staging buffers
that hold their own state. This allow them to be used by getImage.
- Move all clear handling to the ScriptThread and send the configuration
on each request present/getimage, thus avoiding any recreate/clearing
messages. This means that we prepare staging buffers lazily, on the
first request.

Try run for this change:
https://github.com/sagudev/servo/actions/runs/17341982368
Testing: This is covered by existing WebGPU CTS tests. There are some
bad expectations updates, but they are also on main (presumably from
last update the rendering work) although I think CTS is actually wrong
(see https://github.com/gpuweb/cts/issues/4440).
Fixes: #36820
Fixes: #37705
Fixes: #33368 (we now keep reference alive in hashmap)

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-09-09 03:35:12 +00:00
Jo Steven Novaryo
8d2723b2c9
layout: Fix Textual <input> Vertical Align Style (#39014)
Reincorporate the styles to help with the vertical alignment of textual
`<input>` element that was removed by #38775. Followed by adding Servo
specific WPTs to help with these kinds of problem.

Testing: New WPT

Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
2025-09-09 03:09:38 +00:00
Oriol Brufau
d469e5e564
Add test for resizeTo(-1, -1) (#39211)
This test crashes in Servo, and passes on Gecko, Blink and Webkit.
The crash should be addressed by #39204.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-08 23:16:57 +00:00
Martin Robinson
9f4f598f44
script: Use HTMLElement.scrollParent to implement Element.scrollIntoView (#39144)
To find scrolling ancestors, we need to walk up the flat tree and only
consider the elements that are in the chain of containing block
ancestors of an element. `scrollParent` now does this so we can use it
to properly implement `scrollIntoView`.

Testing: There are WPT tests for this change.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-09-07 21:44:11 +00:00
Tim van der Lippe
a672ffb850
Add resource header for mime sniffing (#39167)
The concept of a "resource header" is not well specced, since it is
unclear what a "resource" is. That said, it most closely matches a
"response" as part of the navigation params.

With this change, we now delay loading the document until either two
things happen:
1. We reached the end of the file
2. We processed 1445 bytes (as defined by spec)

We initially store bytes in the resource header and then after loading
parse the stored bytes. Any subsequent loading will process as before.

Part of #14024

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-07 12:31:57 +00:00
Tim van der Lippe
e3de39893f
Disable scripting when sandbox flag is set (#39163)
While I adding spec comments to the CSP crate, I discovered two issues:
1. We should only use the last sandbox value (WPT test added)
2. We weren't checking for the scripting sandbox flag in document

Also, the autoplay test should have allowed scripts to run, otherwise
the test doesn't run. Since we weren't checking the flag before, the
test ran fine for Servo. However, it wouldn't run for other browsers.

Also realized that an existing test was pointing to a non-existent file
(since it doesn't have `.sub`). Updated that and confirmed that in other
browsers it now properly works (it no longer shows a 404). However,
Servo now fails that test as we don't fire an load event.

Part of #913

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-09-07 12:31:40 +00:00
Servo WPT Sync
af8723c0b1
Sync WPT with upstream (07-09-2025) (#39188)
Automated downstream sync of changes from upstream as of 07-09-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-09-07 01:47:40 +00:00
Sam
643ac08cf0
canvas: Implement strokeText (#39183)
Mostly it's just reusing/copy&edit fillText stuff.

Testing: Existing WPT tests
Fixes: #29973

Try run: https://github.com/sagudev/servo/actions/runs/17511337550

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-09-06 18:01:21 +00:00
Ashwin Naren
b5d6555238
indexeddb: Implement getAll and getAllKeys (#38885)
Implement getAll and getAllKeys for IDBObjectStore.

Testing: WPT & Unit testing
Fixes: Part of #6963.

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-09-06 05:48:11 +00:00
Oriol Brufau
0f9f507b46
layout: Fix scrollParent to skip ancestors with display: contents (#39153)
When encountering such an ancestor, we were returning null instead of
skipping it.

Testing: Adding new subtest for this. And while I'm at it, another one
for the root element, unrelated to this fix.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-09-05 14:49:21 +00:00
shanehandley
cf1f64e73f
script: remove wpt test added in #39079 (#39164)
Removes a test related to autoplay and sandboxing which will always
fail.

In https://github.com/servo/servo/pull/39079 I introduced a wpt to test
autoplay functionality, but the test was flawed in its approach -
shortly after merge, myself and @TimvdLippe found that this test would
simulataneously require scripts to be enabled, as well as disabled for
the test to pass.

This slipped past me becuase we hadn't correctly implemented whether
scripting was enabled yet in Servo.

Testing: Removes a single WPT - this test has not been merged upstream.

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
2025-09-05 13:36:16 +00:00
Kingsley Yung
b29eab0ffe
script: Re-implement evaluate_key_path_on_value in IndexedDB (#38847)
The current implementation of evaluate_key_path_on_value was translated
from gecko, and it is incomplete. The unimplemented part occurs many
crashes in WPT tests.

This PR re-implements it according to the spec. It should eliminate many
crashed WPT tests, and increase the code readability.

Testing: Update WPT test expectation
Fixes: #38817 partially, and #25325

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-05 08:00:07 +00:00