Compare commits

...

454 Commits

Author SHA1 Message Date
Alice
8ced3d1b8e layout: Expose some non-interactive accessibility roles based on DOM node type. (#44255)
Sets the accessibility role of nodes based on their DOM node type
(ignoring ARIA roles and computed styles for now), for a small subset of
roles.

This change also re-works some details of accessibility tree building:
- Set the `root` property for the accesskit tree to the node ID for the
root DOM node, rather than creating a placeholder root node which
contains the root DOM node.
- Since we now map the `<body>` node to the `RootWebArea` role, this
required a small change to the accessibility test logic to do a tree
walk to find the `RootWebArea` node, which used to be the first child
since we artificially set the placeholder root node to be the
`RootWebArea` node.
- Have `update_node_and_children()` return a bool indicating whether any
node was updated.
- Split the code updating the node itself into its own function,
`update_node()`, which takes a DOM node and returns a tuple containing
the accessibility node ID and a bool indicating whether the node
required updating
- Add an `assert_node_by_id()` method to retrieve an accessibility node
based on its ID.

Testing: See new tests added in this PR.

---------

Signed-off-by: Alice Boxhall <alice@igalia.com>
Co-authored-by: delan azabani <dazabani@igalia.com>
2026-04-25 06:25:20 +00:00
Gae24
1464ffd68a script: pass &mut JSContext to WritableStreamDefaultController::setup (#44490)
Also port `TextDecoderStream`, `TextEncoderStream`, `CompressionStream`
and `DecompressionStream` to `reflect_dom_object_with_proto_and_cx`.

Testing: It compiles
Part of #40600

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-25 03:52:36 +00:00
dependabot[bot]
6e4a9e85a2 build: bump grid from 1.0.0 to 1.0.1 (#44487)
Bumps [grid](https://github.com/becheran/grid) from 1.0.0 to 1.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/becheran/grid/releases">grid's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Add non-allocating delete_row and delete_col methods by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
href="https://redirect.github.com/becheran/grid/pull/70">becheran/grid#70</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/becheran/grid/pull/70">becheran/grid#70</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/becheran/grid/compare/v1.0.0...v1.0.1">https://github.com/becheran/grid/compare/v1.0.0...v1.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8caa81908f"><code>8caa819</code></a>
chore: Release grid version 1.0.1</li>
<li><a
href="e879d4100b"><code>e879d41</code></a>
Add safety checks for empty input in insert_row and insert_col
methods</li>
<li><a
href="be213bd352"><code>be213bd</code></a>
Add safety checks for grid dimension overflow in expand and prepend
methods</li>
<li><a
href="e77e0c0241"><code>e77e0c0</code></a>
style: format test assertions for better readability</li>
<li><a
href="781d36c5d8"><code>781d36c</code></a>
Add comprehensive tests for delete methods including equivalence
tests</li>
<li><a
href="9bf8d0b96f"><code>9bf8d0b</code></a>
Add delete_row and delete_col methods to avoid allocation</li>
<li><a
href="da542e1ca6"><code>da542e1</code></a>
chore: fix pipeline formatting</li>
<li><a
href="875f418b55"><code>875f418</code></a>
chore: auto generate release notes</li>
<li>See full diff in <a
href="https://github.com/becheran/grid/compare/v1.0.0...v1.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=grid&package-manager=cargo&previous-version=1.0.0&new-version=1.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-24 17:44:35 +00:00
rovertrack
71a5dfabdd Devtools: Enable Stylesheets Resource and Add Basic Fields to StyleSheetsActor (#44462)
Added basic fields required by firefox remote debugging protocol for
stylesheets- `StyleSheetData`
Enabled stylesheets in devtools watcher, made stylesheet request return
an empty array for now.

Testing: No change in behaviour and tests 

Fixes: part of #44315

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-24 15:14:48 +00:00
Kingsley Yung
430105468f script: Add or remove elements in sanitizer (#44481)
Implement the `allowElement`, `removeElement` and
`replaceElementWithChildren` methods of the `Sanitizer` interface, which
add or remove elements in a sanitizer.

Specification:
- https://wicg.github.io/sanitizer-api/#dom-sanitizer-allowelement
- https://wicg.github.io/sanitizer-api/#dom-sanitizer-removeelement
-
https://wicg.github.io/sanitizer-api/#dom-sanitizer-replaceelementwithchildren

Testing: Covered by WPT tests in `sanitizer-api/` subdirectory.
Additionally, some tests in `sanitizer-basic-filtering.tentative.html`
are changed from ERROR to FAIL because of this implementation.
Fixes: Part of #43948

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-24 15:07:01 +00:00
elomscansio
93ae710c07 script: propagate &mut JSContext in DebuggerGlobalScope::fire_eval (#44477)
Propagate `&mut JSContext` in `DebuggerGlobalScope::fire_eval`

Testing: Successful build is enough
Fixes: Part of #42638 

Opened to reduces the complexity of #44254

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
Signed-off-by: elomscansio <163124154+elomscansio@users.noreply.github.com>
Co-authored-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-24 14:53:28 +00:00
elomscansio
8590dd74c9 script: propagate &mut JSContext in DebuggerGlobalScope::fire_add_debugee (#44476)
Propagate `&mut JSContext` in `DebuggerGlobalScope::fire_add_debugee`

Testing: Successful build is enough
Fixes: Part of #42638 

Opened to reduces the complexity of #44254

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-24 14:53:08 +00:00
rovertrack
8470478270 pass &mut JSContext to remove_script_and_layout_blocker (#44484)
This PR makes the `remove_script_and_layout_blocker` in
ee72fca571/components/script/dom/document/document.rs (L3727)
take `&mut JSContext` as argument, removing the dependency of the
previous `temp_cx` being created!

Testing:  No behaviour changes , all tests passes.
Fixes: #44479

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-24 14:27:55 +00:00
Jonathan Schwender
ee72fca571 devtools: Respect SOURCE_DATE_EPOCH for build_id (#44459)
We are probably not anywhere close to reproducible builds, but we should
try to follow best practices where trivially possible.
See also: https://reproducible-builds.org/docs/source-date-epoch/

Firefox devtools expects the build_id to be provided in a datetime
specific format.
This PR also switches the time to UTC instead of `Local`, since there
seems to be no clear reason to use Local, and SOURCE_DATE_EPOCH is UTC.

Testing: No functional changes, the devtools build_id is not covered by
any tests.
Fixes: #44458

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-24 12:09:44 +00:00
elomscansio
551100c8bb script: propagate &mut JSContext in DebuggerGlobalScope::fire_get_possible_breakpoints (#44478)
Propagate `&mut JSContext` in
`DebuggerGlobalScope::fire_get_possible_breakpoints` and related call
sites.

Testing: Successful build is enough
Fixes: Part of #42638 

Opened to reduces the complexity of #44254

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-24 11:34:00 +00:00
Furkan Erdem
22da16139d script: Use frozen array in gamepad axes for spec complience (#44411)
To comply with the Gamepad spec, this commit changes the type of Gamepad
axes from Float64Array to CachedFrozenArray as per [Gamepad
Interface](https://w3c.github.io/gamepad/#gamepad-interface).

Fixes: #44336
Testing: automated tests are not possible because the axes values can
only be accessed with a real gamepad attached.

Signed-off-by: log101 <ffrknerdm@gmail.com>
2026-04-24 11:11:44 +00:00
elomscansio
b3d2bc5624 script: propagate &mut JSContext in XMLHttpRequest::change_ready_state (#44475)
Propagate `&mut JSContext` in `XMLHttpRequest::change_ready_state`

Testing: Successful build is enough
Fixes: Part of #42638 

Opened to reduces the complexity of #44254

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-24 10:09:19 +00:00
Alice
61203e68b9 script: Don't panic when trying to de-activate accessibility (#44473)
When reloading, the pipeline is closed before we get the chance to set
accessibility inactive, which we do for pipelines which stick around in
the bfcache. We don't need to panic if we're trying to de-activate
accessibility and the pipeline is already closed.

Trying to activate accessibility on a closed pipeline is an error we
should investigate, but probably also not a panic-worthy condition.

Testing: Not sure how to test this beyond manual testing. Manual
testing: run servoshell with `--pref accessibility_enabled` and reload
any page.

Signed-off-by: Alice Boxhall <alice@igalia.com>
2026-04-24 08:19:00 +00:00
rovertrack
d812d2f1a7 Gamepad: Implement gamepad buttons to be array, removing GamepadList (#44357)
Replaced `GamepadButtonList` interface with a frozen array of gamepad
buttons to match the gamepad webidl specification.

Testing: No idlharness tests possible since the values can't be accessed
without a real gamepad.
Fixes: #44333

---------

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-24 08:15:53 +00:00
dependabot[bot]
174b9237a8 build: bump bitflags from 2.11.0 to 2.11.1 (#44466)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.11.0 to
2.11.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/bitflags/bitflags/releases">bitflags's
releases</a>.</em></p>
<blockquote>
<h2>2.11.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Bless compile-fail tests for current beta by <a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
in <a
href="https://redirect.github.com/bitflags/bitflags/pull/478">bitflags/bitflags#478</a></li>
<li>example_generated.rs: add missing third slash for doc comment by <a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
in <a
href="https://redirect.github.com/bitflags/bitflags/pull/477">bitflags/bitflags#477</a></li>
<li>Clarify self and other in method docs by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/bitflags/bitflags/pull/481">bitflags/bitflags#481</a></li>
<li>Prepare for 2.11.1 release by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/bitflags/bitflags/pull/482">bitflags/bitflags#482</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
made their first contribution in <a
href="https://redirect.github.com/bitflags/bitflags/pull/478">bitflags/bitflags#478</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1">https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md">bitflags's
changelog</a>.</em></p>
<blockquote>
<h1>2.11.1</h1>
<h2>What's Changed</h2>
<ul>
<li>Bless compile-fail tests for current beta by <a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
in <a
href="https://redirect.github.com/bitflags/bitflags/pull/478">bitflags/bitflags#478</a></li>
<li>example_generated.rs: add missing third slash for doc comment by <a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
in <a
href="https://redirect.github.com/bitflags/bitflags/pull/477">bitflags/bitflags#477</a></li>
<li>Clarify self and other in method docs by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/bitflags/bitflags/pull/481">bitflags/bitflags#481</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/DanielEScherzer"><code>@​DanielEScherzer</code></a>
made their first contribution in <a
href="https://redirect.github.com/bitflags/bitflags/pull/478">bitflags/bitflags#478</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1">https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4ed9ffa949"><code>4ed9ffa</code></a>
Merge pull request <a
href="https://redirect.github.com/bitflags/bitflags/issues/482">#482</a>
from KodrAus/cargo/2.11.1</li>
<li><a
href="c53cd57ace"><code>c53cd57</code></a>
prepare for 2.11.1 release</li>
<li><a
href="a44410aa84"><code>a44410a</code></a>
Merge pull request <a
href="https://redirect.github.com/bitflags/bitflags/issues/481">#481</a>
from KodrAus/docs/clarifications</li>
<li><a
href="3d671b9b0e"><code>3d671b9</code></a>
update more compile error messages</li>
<li><a
href="5f3adade43"><code>5f3adad</code></a>
fix up compile error messages</li>
<li><a
href="780765d17c"><code>780765d</code></a>
fix up contains and intersection docs</li>
<li><a
href="97b7607c22"><code>97b7607</code></a>
clarify self and other in method docs</li>
<li><a
href="88a7a18a2e"><code>88a7a18</code></a>
Merge pull request <a
href="https://redirect.github.com/bitflags/bitflags/issues/477">#477</a>
from DanielEScherzer/patch-1</li>
<li><a
href="f0e46461a8"><code>f0e4646</code></a>
example_generated.rs: add missing third slash for doc comment</li>
<li><a
href="a31c96f5cb"><code>a31c96f</code></a>
Merge pull request <a
href="https://redirect.github.com/bitflags/bitflags/issues/478">#478</a>
from DanielEScherzer/beta-bless</li>
<li>Additional commits viewable in <a
href="https://github.com/bitflags/bitflags/compare/2.11.0...2.11.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bitflags&package-manager=cargo&previous-version=2.11.0&new-version=2.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-24 06:29:34 +00:00
dependabot[bot]
c1e5ea362d build: bump jiff from 0.2.23 to 0.2.24 (#44467)
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.23 to 0.2.24.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md">jiff's
changelog</a>.</em></p>
<blockquote>
<h1>0.2.24 (2026-04-23)</h1>
<p>This release primarily adds a new <code>memory_usage</code> routine
for reporting
heap allocation sizes for the <code>TimeZone</code> and
<code>Zoned</code> types. This
release also acknowledges and updates the timeline expectations for a
Jiff 1.0 release in <code>README.md</code>.</p>
<p>Enhancements:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/520">#520</a>:
Add <code>memory_usage</code> to the <code>TimeZone</code> and
<code>Zoned</code> types.</li>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/pull/535">#535</a>:
Improve comment in <code>Span::checked_add</code> example.</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/pull/541">#541</a>:
Update Jiff 1.0 timeline.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2cc55b285d"><code>2cc55b2</code></a>
0.2.24</li>
<li><a
href="c6542f109e"><code>c6542f1</code></a>
changelog: 0.2.24</li>
<li><a
href="ec3c2ec962"><code>ec3c2ec</code></a>
api: add <code>TimeZone::memory_usage</code> and
<code>Zoned::memory_usage</code></li>
<li><a
href="bc752b63ed"><code>bc752b6</code></a>
docs: improve comment in <code>Span::checked_add</code> example</li>
<li><a
href="f6c8a55ef4"><code>f6c8a55</code></a>
readme: update 1.0 timeline</li>
<li><a
href="97314c11d4"><code>97314c1</code></a>
docs: fix typo</li>
<li><a
href="bad71d8d5d"><code>bad71d8</code></a>
docs: typo</li>
<li>See full diff in <a
href="https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.23...jiff-static-0.2.24">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jiff&package-manager=cargo&previous-version=0.2.23&new-version=0.2.24)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-24 06:29:32 +00:00
dependabot[bot]
ffa2a72a55 build: bump libc from 0.2.185 to 0.2.186 (#44468)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.185 to 0.2.186.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/releases">libc's
releases</a>.</em></p>
<blockquote>
<h2>0.2.186</h2>
<h3>Added</h3>
<ul>
<li>Apple: Add <code>KEVENT_FLAG_*</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5070">#5070</a>)</li>
<li>Linux: Add <code>PR_SET_MEMORY_MERGE</code> and
<code>PR_GET_MEMORY_MERGE</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5060">#5060</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>CI: Migrate FreeBSD CI from Cirrus CI to GitHub Actions (<a
href="https://redirect.github.com/rust-lang/libc/pull/5058">#5058</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/blob/0.2.186/CHANGELOG.md">libc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/libc/compare/0.2.185...0.2.186">0.2.186</a>
- 2026-04-24</h2>
<h3>Added</h3>
<ul>
<li>Apple: Add <code>KEVENT_FLAG_*</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5070">#5070</a>)</li>
<li>Linux: Add <code>PR_SET_MEMORY_MERGE</code> and
<code>PR_GET_MEMORY_MERGE</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5060">#5060</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>CI: Migrate FreeBSD CI from Cirrus CI to GitHub Actions (<a
href="https://redirect.github.com/rust-lang/libc/pull/5058">#5058</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="42620ffc41"><code>42620ff</code></a>
[0.2] libc: Release 0.2.186</li>
<li><a
href="9db2eaaaae"><code>9db2eaa</code></a>
apple: add KEVENT_FLAG_* constants</li>
<li><a
href="38409392ff"><code>3840939</code></a>
Add PR_SET_MEMORY_MERGE and PR_GET_MEMORY_MERGE for linux</li>
<li><a
href="f697deb944"><code>f697deb</code></a>
chore: migrate from Cirrus CI to GHA</li>
<li>See full diff in <a
href="https://github.com/rust-lang/libc/compare/0.2.185...0.2.186">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libc&package-manager=cargo&previous-version=0.2.185&new-version=0.2.186)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-24 06:28:47 +00:00
Alice
6a84134a34 layout: Store AccessibilityTree's nodes in ArcRefCells. (#44438)
This will allow us not to need to repeatedly borrow `self` when
reading/updating individual `AccessibilityNode`s.

Testing: No behaviour change, covered by existing `accessibility` test.

---------

Signed-off-by: Alice Boxhall <alice@igalia.com>
Co-authored-by: delan azabani <dazabani@igalia.com>
2026-04-24 05:42:17 +00:00
Martin Robinson
25ef3121a7 layout: Split hard line breaks into their own TextRunItem (#44436)
This change makes it so that hard line breaks are not shaped during
inline formatting context creation. Instead they are a separate variant
of a new `TextRunItem` enum. This will make it easier to start
linebreaking later in the flow of inline layout.

Testing: This fixes three WPT tests, likely because we are now properly
using the BiDi level of BiDi control characters. One test starts
failing, but
it depends on tab rendering, which we do not currently support properly.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-23 19:29:20 +00:00
Euclid Ye
464ae8204f layout: Use an accurately-sized clipping rectangle for box-shadow display list item properties instead of MaxRect (#44457)
Mobile phone runs OpenGL Embedded System. The precision is limited
comparing to Desktop which runs full OpenGL. This caused a bug where
box-shadow is not displayed on Android/OHOS. Instead of using an
infinite clip rect, we compute a bounded one. This should save some GPU
work as well.

Reference: [How to gracefully handle highp/mediump switch for mobile
Android
browsers?](https://discourse.threejs.org/t/how-to-gracefully-handle-highp-mediump-switch-for-mobile-android-browsers/77335)


Testing: Desktop WPT
[unchanged](https://github.com/servo/servo/actions/runs/24825758325).
Manually tested on Android/Ohos. Now look same as Firefox/Chrome.

| Before | After |
| -------- | -------- |
|
![Screenshot_20260423_154114.jpg](https://github.com/user-attachments/assets/b1c970c8-a30c-4fb8-acbc-c97fa9cc03f9)
|
![screenshot_20260423_154059_1776930134.jpg](https://github.com/user-attachments/assets/432a29c4-0c5c-4ff2-83eb-81db55e76f64)
|


Fixes: #44431
Closes: https://github.com/servo/webrender/pull/4879

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-23 18:03:51 +00:00
Tim van der Lippe
9189fe06a5 script: Add initial implementation of italic command (#44432)
While working on this, I realised that the `current_state`
computation was wrong. Instead, the spec actually clearly
defines what to do, but I hadn't found it yet. The code
now correctly implements state computation and voila, it
also fixes the previous underline issue that I didn't
understand why it would fail.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-23 15:54:57 +00:00
elomscansio
aa7eca43b7 script: propagate VirtualMethods::unbind_from_tree with &mut JSContext (#44422)
Propagate `&mut JSContext` in `VirtualMethods::unbind_from_tree`

Testing: Successful build is enough
Fixes: #42837

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-23 14:09:11 +00:00
Alice
ff0e9655a8 layout: Allow repeatedly adding the same node to AccessibilityUpdate (#44437)
This means keeping nodes in a temporary map until the accesskit
TreeUpdate is accessed via `finalize()`. After `finalize()` is called,
any further attempts to use the object will panic.

Testing: Added a unit test.

---------

Signed-off-by: Alice Boxhall <alice@igalia.com>
Signed-off-by: delan azabani <dazabani@igalia.com>
Co-authored-by: delan azabani <dazabani@igalia.com>
2026-04-23 13:54:46 +00:00
dependabot[bot]
b0d512c435 build: bump hyper-rustls from 0.27.8 to 0.27.9 (#44449)
Bumps [hyper-rustls](https://github.com/rustls/hyper-rustls) from 0.27.8
to 0.27.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/hyper-rustls/releases">hyper-rustls's
releases</a>.</em></p>
<blockquote>
<h2>0.27.9</h2>
<p>This release fixes the accidental omission of the ISC license in the
published crate.</p>
<h2>What's Changed</h2>
<ul>
<li>Bump rustls from 0.23.37 to 0.23.38 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/339">rustls/hyper-rustls#339</a></li>
<li>Fix ISC license include, prepare 0.27.9 by <a
href="https://github.com/cpu"><code>@​cpu</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/340">rustls/hyper-rustls#340</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/hyper-rustls/compare/v/0.27.8...v/0.27.9">https://github.com/rustls/hyper-rustls/compare/v/0.27.8...v/0.27.9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9741534153"><code>9741534</code></a>
Cargo: version 0.27.8 -&gt; 0.27.9</li>
<li><a
href="d391ce2611"><code>d391ce2</code></a>
Cargo: update semver compat deps</li>
<li><a
href="a163901fbf"><code>a163901</code></a>
Cargo: fix include license typo for ISC license</li>
<li><a
href="b3eb41ec15"><code>b3eb41e</code></a>
Bump rustls from 0.23.37 to 0.23.38</li>
<li>See full diff in <a
href="https://github.com/rustls/hyper-rustls/compare/v/0.27.8...v/0.27.9">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 13:36:23 +00:00
Gae24
e2f17e0d28 deps: Bump jni-rs to 0.22 (#44322)
Update jni-rs to 0.22, the main changes involve the introduction of
`with_env` within native methods, and updating uses of
`attach_current_thread`, which now requires a closure passed to it.
Callback object is now stored inside a `OnceLock`, since it would crash
when it was deleted, probably once a `WakeupCallback` was dropped:
```
JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid global reference: 0x2fc6 (deleted reference at index 382)
```
Also update android-activity and rustls-platform-verifier.

Testing: We don't have android tests in CI, manual testing is required
Fixes: Part of #40979

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-23 11:55:29 +00:00
Jonathan Schwender
0ea42bc774 profile: Add instrumentation to startup related functions (#44456)
Follow-up to #44443.
This helps investigating the cold-start timeline, and could be used
by tooling to A/B compare branches affecting the cold-start time.

Additionally also change the `handle_request::select` span, so that we
can see the blocked time (which was probably what was intended), since
the actual time spent on recv after select is insignificant.

Testing: Tracing output is not covered by automatic tests.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-23 11:47:27 +00:00
Jonathan Schwender
ab5deb4030 profile: Add initial trace event (#44443)
Adds a profiling event at the startup of servoshell, right after
initializing the tracing subsystem. To support this, add macro
abstractions for tracing events.
The existing span (macros) have a start and an end, but for one-off
events, we don't need a span and hence it make sense to also add the
event macros.

The new event at startup is useful when measuring / optimizing general
startup time. Adding a timestamp as field, allows us to ground the
measurement and compare it against time measured outside of servo,
regardless of how the profiling backend (tracing-perfetto,
tracing-hitrace, future backends) save timestamps.

Testing: Build-testing: the HarmonyOS build enables the tracing feature.
On other platforms this is not the case in CI.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-23 09:18:28 +00:00
Kingsley Yung
daed36d4bf script: Implement Sanitizer.get() method (#44452)
Implement the `Sanitizer.get()` method.

Same as the previous patches on Sanitizer API, the steps related to
processing instructions are marked as TODO. Support for process
instructions was recently added to the specification, and we will
implement it later when tests are ready.

Testing: Covered by WPT tests in
`sanitizer-api/sanitizer-get.tentative.html`
Fixes: Part of #43948

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-23 06:01:36 +00:00
Gae24
20e94989eb script: pass &mut JSContext inside worklet code (#44441)
Testing: It compiles 
Part of #40600

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-23 05:58:09 +00:00
Taym Haddadi
353e5248f1 SharedWorker : script unblock shared worker common plumbing for SharedWorker (#44440)
part of https://github.com/servo/servo/issues/7458

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-23 05:54:21 +00:00
Jonathan Schwender
d0b2337118 mozjs: Fix make 4.4 broken parallel compilation (#44346)
Companion PR to https://github.com/servo/mozjs/pull/735.
This bumps mozjs to the latest version 0.15.9. The changes were reviewed
in the linked PR.


Testing: This changes behavior when using `make` 4.4 and compiling mozjs
from source in CI. This path is not exercised in CI, since Ubuntu 24.04
still ships make 4.3.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-23 05:26:59 +00:00
dependabot[bot]
e611a186be build: bump typenum from 1.19.0 to 1.20.0 (#44451)
Bumps [typenum](https://github.com/paholg/typenum) from 1.19.0 to
1.20.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/paholg/typenum/releases">typenum's
releases</a>.</em></p>
<blockquote>
<h2>v1.20.0</h2>
<h2>Commits</h2>
<ul>
<li>77b877d: remove deprecated features, replace build script with
pre-generated tests (<a
href="https://redirect.github.com/paholg/typenum/issues/237">#237</a>)
(Cathal) <a
href="https://redirect.github.com/paholg/typenum/pull/237">#237</a></li>
<li>4d5f26b: Add tuple operations (<a
href="https://redirect.github.com/paholg/typenum/issues/242">#242</a>)
(grenewode) <a
href="https://redirect.github.com/paholg/typenum/pull/242">#242</a></li>
<li>c755e2f: Version 1.20.0 (Paho Lurie-Gregg)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/paholg/typenum/blob/main/CHANGELOG.md">typenum's
changelog</a>.</em></p>
<blockquote>
<h3>1.20.0 (2026-04-18)</h3>
<ul>
<li>[removed] Removed <code>no_std</code> feature flag (deprecated since
1.3.0)</li>
<li>[removed] Removed <code>force_unix_path_separator</code> feature
flag (deprecated since 1.17.0)</li>
<li>[changed] Replaced <code>build.rs</code> script with pre-generated
test files</li>
<li>[added] Indexing into tuples</li>
<li>[changed] MSRV now 1.41.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c755e2fd5d"><code>c755e2f</code></a>
Version 1.20.0</li>
<li><a
href="4d5f26b629"><code>4d5f26b</code></a>
Add tuple operations (<a
href="https://redirect.github.com/paholg/typenum/issues/242">#242</a>)</li>
<li><a
href="77b877d567"><code>77b877d</code></a>
remove deprecated features, replace build script with pre-generated
tests (<a
href="https://redirect.github.com/paholg/typenum/issues/237">#237</a>)</li>
<li>See full diff in <a
href="https://github.com/paholg/typenum/compare/v1.19.0...v1.20.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typenum&package-manager=cargo&previous-version=1.19.0&new-version=1.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 00:58:55 +00:00
dependabot[bot]
82370a7cab build: bump clap from 4.6.0 to 4.6.1 (#44450)
Bumps [clap](https://github.com/clap-rs/clap) from 4.6.0 to 4.6.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.6.1</h2>
<h2>[4.6.1] - 2026-04-15</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Ensure rebuilds happen when an read env variable
is changed</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.6.1] - 2026-04-15</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Ensure rebuilds happen when an read env variable
is changed</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="14202755e5"><code>1420275</code></a>
chore: Release</li>
<li><a
href="d2c817d151"><code>d2c817d</code></a>
docs: Update changelog</li>
<li><a
href="f88c94e53d"><code>f88c94e</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6341">#6341</a>
from epage/sep</li>
<li><a
href="acbb822505"><code>acbb822</code></a>
fix(complete): Reduce risk of conflict with actual subcommands</li>
<li><a
href="a49fadbf4a"><code>a49fadb</code></a>
refactor(complete): Pull out subcommand separator</li>
<li><a
href="ddc008bbbc"><code>ddc008b</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6332">#6332</a>
from epage/update</li>
<li><a
href="497dc50aeb"><code>497dc50</code></a>
chore: Update compatible dependencies</li>
<li><a
href="dca2326243"><code>dca2326</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/6331">#6331</a>
from clap-rs/renovate/j178-prek-action-2.x</li>
<li><a
href="54bdaa340e"><code>54bdaa3</code></a>
chore(deps): Update j178/prek-action action to v2</li>
<li><a
href="f0d30d961d"><code>f0d30d9</code></a>
chore: Release</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.6.0...clap_complete-v4.6.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.6.0&new-version=4.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 00:54:28 +00:00
dependabot[bot]
1c4b0b57b8 build: bump rustls from 0.23.38 to 0.23.39 (#44448)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.38 to
0.23.39.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="05416057db"><code>0541605</code></a>
Cargo: version 0.23.38 -&gt; 0.23.39</li>
<li><a
href="860798e729"><code>860798e</code></a>
Cargo: update semver compat deps</li>
<li><a
href="7b374684a2"><code>7b37468</code></a>
Take semver-compatible dependency updates</li>
<li><a
href="6134204146"><code>6134204</code></a>
Adapt to updated nightly features</li>
<li><a
href="d4b3ec5af3"><code>d4b3ec5</code></a>
Apply suggestions from clippy 1.95</li>
<li>See full diff in <a
href="https://github.com/rustls/rustls/compare/v/0.23.38...v/0.23.39">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustls&package-manager=cargo&previous-version=0.23.38&new-version=0.23.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 00:44:38 +00:00
dependabot[bot]
609f50d680 build: bump pastey from 0.2.1 to 0.2.2 (#44447)
Bumps [pastey](https://github.com/as1100k/pastey) from 0.2.1 to 0.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/as1100k/pastey/releases">pastey's
releases</a>.</em></p>
<blockquote>
<h2>v0.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix Rust 1.56 compatibility: Handle None-delimited groups in replace
modifier in <a
href="https://redirect.github.com/AS1100K/pastey/pull/25">AS1100K/pastey#25</a></li>
<li>increase the code coverage by <a
href="https://github.com/bharatGoswami8"><code>@​bharatGoswami8</code></a>
in <a
href="https://redirect.github.com/AS1100K/pastey/pull/28">AS1100K/pastey#28</a></li>
<li>add coverage on CI by <a
href="https://github.com/bharatGoswami8"><code>@​bharatGoswami8</code></a>
in <a
href="https://redirect.github.com/AS1100K/pastey/pull/30">AS1100K/pastey#30</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/bharatGoswami8"><code>@​bharatGoswami8</code></a>
made their first contribution in <a
href="https://redirect.github.com/AS1100K/pastey/pull/28">AS1100K/pastey#28</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/AS1100K/pastey/blob/master/CHANGELOG.md#022---2026-04-23"><code>CHANGELOG.md</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/AS1100K/pastey/blob/master/CHANGELOG.md">pastey's
changelog</a>.</em></p>
<blockquote>
<h2>[0.2.2] - 2026-04-23</h2>
<h3>Improved</h3>
<ul>
<li>Improved Code Coverage <a
href="https://redirect.github.com/AS1100K/pastey/pull/28">#28</a>, <a
href="https://redirect.github.com/AS1100K/pastey/pull/30">#30</a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Rust 1.56 compatibility: Handling None-delimited groups in replace
modifier <a
href="https://redirect.github.com/AS1100K/pastey/pull/25">#25</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f91b0f4b31"><code>f91b0f4</code></a>
RELEASE v0.2.2</li>
<li><a
href="93387eb677"><code>93387eb</code></a>
add coverage on CI (<a
href="https://redirect.github.com/as1100k/pastey/issues/30">#30</a>)</li>
<li><a
href="113fbc1811"><code>113fbc1</code></a>
increase the code coverage (<a
href="https://redirect.github.com/as1100k/pastey/issues/28">#28</a>)</li>
<li><a
href="436923754b"><code>4369237</code></a>
Fix CI Rust 1.56 failure: pin dissimilar to 1.0.10</li>
<li><a
href="6e3ef4a67c"><code>6e3ef4a</code></a>
Fix Rust 1.56 compatibility: Handle None-delimited groups in replace
modifier...</li>
<li>See full diff in <a
href="https://github.com/as1100k/pastey/compare/v0.2.1...v0.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pastey&package-manager=cargo&previous-version=0.2.1&new-version=0.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 00:38:10 +00:00
dependabot[bot]
412f98b9bb build: bump dbus from 0.9.10 to 0.9.11 (#44446)
Bumps [dbus](https://github.com/diwic/dbus-rs) from 0.9.10 to 0.9.11.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eb330f7e41"><code>eb330f7</code></a>
dbus: Release 0.9.11</li>
<li><a
href="610ada219e"><code>610ada2</code></a>
dbus-native: Fix compiler warning</li>
<li><a
href="00a70d0c40"><code>00a70d0</code></a>
Dbus: Fix compiler warnings</li>
<li><a
href="f24617ab50"><code>f24617a</code></a>
Merge pull request <a
href="https://redirect.github.com/diwic/dbus-rs/issues/515">#515</a>
from abyssdigger/patch-1</li>
<li><a
href="0d4ac9aa0a"><code>0d4ac9a</code></a>
Fix compiler warnings</li>
<li><a
href="686b50df7a"><code>686b50d</code></a>
dbus: Add documentation to Variant and match_signal</li>
<li><a
href="993045f6ef"><code>993045f</code></a>
Release dbus 0.9.10, libdbus-sys 0.2.7</li>
<li><a
href="debcde3363"><code>debcde3</code></a>
dbus/blocking.rs: add new connection by address</li>
<li><a
href="eee6bf5b2d"><code>eee6bf5</code></a>
Merge pull request <a
href="https://redirect.github.com/diwic/dbus-rs/issues/512">#512</a>
from mrdomino/bump-windows-sys</li>
<li><a
href="5061c6018e"><code>5061c60</code></a>
Bump windows-sys from 0.59.0 to 0.61.0</li>
<li>See full diff in <a
href="https://github.com/diwic/dbus-rs/compare/dbus-v0.9.10...dbus-v0.9.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dbus&package-manager=cargo&previous-version=0.9.10&new-version=0.9.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 00:30:30 +00:00
Simon Sapin
4535a7d7b5 script: Rewrite NodeList::ChildrenList with a cached Vec of nodes (#44435)
In DOM APIs, `Node.childNodes` is a `NodeList` that has an
`.item(index)` method that allows random access, but DOM nodes only
store pointers to their first/last child and next/previous sibling. The
previous implementation involved keeping a "last accessed" pointer, and
a significant amount of logic to find the requested index by walking
next/previous sibling pointers from whichever of last accessed, first
child, or last child is nearest. This logic sometimes incorrectly
assumed the (nullable) last accessed pointer to be present, causing a
panic in `Option::unwrap`.
    
Rather than try to fix that logic, this replaces entirely with the
approach suggested in #25206 and used [by
Firefox](https://searchfox.org/firefox-main/source/dom/base/nsChildContentList.h):
keep a cached `Vec` of pointers to all child nodes, created lazily when
needed, and invalidated whenever any part of it changes.
    
Testing: the first commit adds a failing WPT crashtest, the second
commit fixes it
Fixes: https://github.com/servo/servo/issues/25206
Fixes: https://github.com/servo/servo/issues/36764

---------

Signed-off-by: Simon Sapin <simon@igalia.com>
2026-04-22 16:12:16 +00:00
Martin Robinson
1528f31269 script: Add an initial implementation of the "focus update steps" (#44360)
This moves Servo closer to the focus parts of the HTML specification.
The behavior should be the same as before, but now the code in `script`
matches the structure of the specification.

The main goal is to set us up for:
 - Firing focus events in the right order on nested documents
 - A proper implementation of the unfocusing steps.

Testing: This should not change behavior so is covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-22 15:55:36 +00:00
Narfinger
c2b88ff7f5 media: Switch to workspace dependencies and minor cleanup (#44428)
This PR makes minor cleanup in the media crates:
- Switch dependencies to workspace dependencies if they are already
included in the main Cargo.toml
- Switch from crate serde_derive to serde with feature flag derive.
- Switch from the separate crate for OnceCell to the std provided
LazyLock.
- Update num_complex

Testing: The only functional changes are either slight version bumps,
the replacement to LazyLock which is conservative and the num_complex
update which also shouldn't have any behavior changes.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-22 14:56:59 +00:00
Kingsley Yung
6934a65e5c script: Validate sanitizer configuration (#44421)
Implement sanitizer configuration validation algorithm, and complete the
"set a configuration" algorithm.

The steps related to processing instructions are marked as TODO. Support
for process instructions was recently added to the specification, and we
will implement it later when tests are ready.

Specification:
- https://wicg.github.io/sanitizer-api/#sanitizerconfig-valid
- https://wicg.github.io/sanitizer-api/#sanitizer-set-a-configuration

Testing: Covered by WPT tests in
`sanitizer-api/sanitizer-config.tentative.html`
Fixes: Part of #43948

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-22 12:28:57 +00:00
Euclid Ye
d46b0a9826 dependabot: Add rustls-webpki related group (#44429)
This should make #44415, #44418, #44419 
work in one PR without conflict in the future.

Testing: Will be tested in CI in future rounds of update.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-22 11:15:02 +00:00
Tim van der Lippe
6de7311014 script: Add initial implementation of strikethrough command (#44410)
Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-22 09:23:05 +00:00
dependabot[bot]
7007dc4346 build: bump rustls-webpki from 0.103.12 to 0.103.13 (#44419)
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.12 to
0.103.13.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/webpki/releases">rustls-webpki's
releases</a>.</em></p>
<blockquote>
<h2>0.103.13</h2>
<ul>
<li><strong>Fix reachable panic in parsing a CRL</strong>. This was
reported to us as <a
href="https://github.com/rustls/webpki/security/advisories/GHSA-82j2-j2ch-gfr8">GHSA-82j2-j2ch-gfr8</a>.
Users who don't use CRLs are not affected.</li>
<li>For name constraints on URI names, we incorrectly processed excluded
subtrees in a way which inverted the desired meaning. See <a
href="https://redirect.github.com/rustls/webpki/pull/471">rustls/webpki#471</a>.
This was a case missing in the fix for <a
href="https://github.com/advisories/GHSA-965h-392x-2mh5">https://github.com/advisories/GHSA-965h-392x-2mh5</a>.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Actually fail closed for URI matching against excluded subtrees by
<a href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki/pull/473">rustls/webpki#473</a></li>
<li>Prepare 0.103.13 by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki/pull/474">rustls/webpki#474</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki/compare/v/0.103.12...v/0.103.13">https://github.com/rustls/webpki/compare/v/0.103.12...v/0.103.13</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2879b2ce7a"><code>2879b2c</code></a>
Prepare 0.103.13</li>
<li><a
href="2c49773d82"><code>2c49773</code></a>
Improve tests for padding of <code>BitStringFlags</code></li>
<li><a
href="4e3c0b393a"><code>4e3c0b3</code></a>
Correct validation of BIT STRING constraints</li>
<li><a
href="39c91d2525"><code>39c91d2</code></a>
Actually fail closed for URI matching against excluded subtrees</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki/compare/v/0.103.12...v/0.103.13">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 09:01:47 +00:00
Euclid Ye
6592e8512b layout: Replace SVG base fragment rect conditionally to support viewBox (#44420)
As titled.

Testing: Manually tested with multiple real websites with viewbox in
svg.
It looked terrible before, but now looking good!
New passing in WPT.

Partially addresses: #38985

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-22 07:53:59 +00:00
Jonathan Schwender
97c08a6f95 net: Optimize initial TLS connection (#44242)
By touching the crypto provider, we can force it to gather entropy.
On my linux VM, that moved ~60ms off the critical path (using aws-lc-rs,
but probably any other crypto provider would show similar behavior).
On my Linux workstation it was around ~30ms.

On Linux caching the rustls platform verifier cache optimizes another
50ms. On other platforms this will be cheaper, since
only on some systems all certificates are read. It might make sense to
explore
caching the whole tlsconfig (for websockets), since it looks like we are
just cloning
the same components and then constructing a new tlsconfig, which would
lead to
the same effective component. But that needs more investigation.


Testing: Doesn't change any visible behavior, covered by existing tests.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-22 07:39:59 +00:00
Martin Robinson
09ef444d63 layout: Add placeholders for text carets after finishing a line (#44370)
Instead of readily adding a strut for text carets when processing a line
break, wait until a line is finished. This allows placing a strut on the
final line. In addition to fixing #41338 this will also make it possible
to handle line breaks as a separate kind of text run item so that we can
preserve shaping results between layouts.

In addition, some changes are made in script to ensure that these
placeholders
are never placed for non-textual input elements.

Testing: This change adds a Servo-specific WPT test. Caret rendering
isn't specified.
Fixes: #41338

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-22 06:51:54 +00:00
Taym Haddadi
bdbbe641eb SharedWorker: Add SharedWorker and SharedWorkerGlobalScope WebIDL interfaces (#44375)
Testing: covered by WPT test.
part of https://github.com/servo/servo/issues/7458

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-22 03:28:21 +00:00
dependabot[bot]
d995e90976 build: bump webpki-roots from 1.0.6 to 1.0.7 (#44418)
Bumps [webpki-roots](https://github.com/rustls/webpki-roots) from 1.0.6
to 1.0.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/webpki-roots/releases">webpki-roots's
releases</a>.</em></p>
<blockquote>
<h2>1.0.7</h2>
<p>For their April 2026 root store changes, Mozilla has made more
changes than usual:</p>
<blockquote>
<p>These changes are part of Mozilla’s ongoing root store maintenance
under the Mozilla Root Store Policy (MRSP), including <a
href="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/#74-root-ca-lifecycles">§7.4</a>
(Root CA Lifecycles) and <a
href="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/#753-transition-plan-for-existing-roots">§7.5.3</a>
(Transition Plans). They reflect a combination of lifecycle-based
transitions, CA operator requests, and alignment with intended
certificate usage, including retiring older or less suitable root
certificates, enforcing clear separation of trust purposes (e.g., TLS
vs. S/MIME), and reducing unnecessary trust surface in the Web PKI
ecosystem. Collectively, these actions help to ensure that root
certificates are relied upon only for their intended and actively
maintained use cases, or are retired in accordance with established
distrust timelines.</p>
</blockquote>
<p>This removes:</p>
<ul>
<li>CN=Certigna O=Dhimyotis</li>
<li>CN=COMODO Certification Authority O=COMODO CA Limited</li>
<li>CN=DigiCert Assured ID Root CA O=DigiCert Inc
OU=www.digicert.com</li>
<li>CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com</li>
<li>CN=DigiCert High Assurance EV Root CA O=DigiCert Inc
OU=www.digicert.com</li>
<li>CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA</li>
<li>CN=GTS Root R2 O=Google Trust Services LLC</li>
<li>CN=QuoVadis Root CA 2 O=QuoVadis Limited</li>
<li>CN=QuoVadis Root CA 3 O=QuoVadis Limited</li>
<li>CN=Secure Global CA O=SecureTrust Corporation</li>
<li>CN=SecureTrust CA O=SecureTrust Corporation</li>
<li>CN=SwissSign Gold CA - G2 O=SwissSign AG</li>
<li>CN=TeliaSonera Root CA v1 O=TeliaSonera</li>
<li>CN=Trustwave Global Certification Authority O=Trustwave Holdings,
Inc.</li>
<li>CN=Trustwave Global ECC P256 Certification Authority O=Trustwave
Holdings, Inc.</li>
<li>CN=Trustwave Global ECC P384 Certification Authority O=Trustwave
Holdings, Inc.</li>
<li>O=certSIGN OU=certSIGN ROOT CA</li>
</ul>
<p>See <a
href="https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/o1VliD70ctg/m/pY0JBzTlAQAJ?pli=1">their
announcement</a> for more details.</p>
<h2>What's Changed</h2>
<ul>
<li>Take semver-compatible dependency updates by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/116">rustls/webpki-roots#116</a></li>
<li>Take semver-compatible dependency updates by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/117">rustls/webpki-roots#117</a></li>
<li>Take semver-compatible updates by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/118">rustls/webpki-roots#118</a></li>
<li>Prepare 1.0.7 by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/120">rustls/webpki-roots#120</a></li>
<li>Update dependencies by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/119">rustls/webpki-roots#119</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7">https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="be948464fd"><code>be94846</code></a>
Update dependencies (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/119">#119</a>)</li>
<li><a
href="76476f91c9"><code>76476f9</code></a>
Prepare 1.0.7 (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/120">#120</a>)</li>
<li><a
href="ed392f437c"><code>ed392f4</code></a>
Take semver-compatible updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/118">#118</a>)</li>
<li><a
href="ec8b744a63"><code>ec8b744</code></a>
Take semver-compatible dependency updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/117">#117</a>)</li>
<li><a
href="84a0c23ef2"><code>84a0c23</code></a>
Take semver-compatible dependency updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/116">#116</a>)</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpki-roots&package-manager=cargo&previous-version=1.0.6&new-version=1.0.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 01:06:43 +00:00
dependabot[bot]
4d56440d4e build: bump bpaf from 0.9.24 to 0.9.25 (#44416)
Bumps [bpaf](https://github.com/pacak/bpaf) from 0.9.24 to 0.9.25.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pacak/bpaf/blob/master/Changelog.md">bpaf's
changelog</a>.</em></p>
<blockquote>
<h2>bpaf [0.9.25] - 2026-04-15</h2>
<ul>
<li>Change rendering of an adjacent block in Markdown - this is no
longer a <code>###</code>
but a regular line item instead. Header messes up with generated
navigation on
some pages</li>
<li><code>app_name</code> - parser that extracts the executable
name</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/pacak/bpaf/commits/v0.9.25">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bpaf&package-manager=cargo&previous-version=0.9.24&new-version=0.9.25)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 01:01:38 +00:00
dependabot[bot]
c75eea95c3 build: bump webpki-root-certs from 1.0.6 to 1.0.7 (#44415)
Bumps [webpki-root-certs](https://github.com/rustls/webpki-roots) from
1.0.6 to 1.0.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/webpki-roots/releases">webpki-root-certs's
releases</a>.</em></p>
<blockquote>
<h2>1.0.7</h2>
<p>For their April 2026 root store changes, Mozilla has made more
changes than usual:</p>
<blockquote>
<p>These changes are part of Mozilla’s ongoing root store maintenance
under the Mozilla Root Store Policy (MRSP), including <a
href="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/#74-root-ca-lifecycles">§7.4</a>
(Root CA Lifecycles) and <a
href="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/policy/#753-transition-plan-for-existing-roots">§7.5.3</a>
(Transition Plans). They reflect a combination of lifecycle-based
transitions, CA operator requests, and alignment with intended
certificate usage, including retiring older or less suitable root
certificates, enforcing clear separation of trust purposes (e.g., TLS
vs. S/MIME), and reducing unnecessary trust surface in the Web PKI
ecosystem. Collectively, these actions help to ensure that root
certificates are relied upon only for their intended and actively
maintained use cases, or are retired in accordance with established
distrust timelines.</p>
</blockquote>
<p>This removes:</p>
<ul>
<li>CN=Certigna O=Dhimyotis</li>
<li>CN=COMODO Certification Authority O=COMODO CA Limited</li>
<li>CN=DigiCert Assured ID Root CA O=DigiCert Inc
OU=www.digicert.com</li>
<li>CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com</li>
<li>CN=DigiCert High Assurance EV Root CA O=DigiCert Inc
OU=www.digicert.com</li>
<li>CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA</li>
<li>CN=GTS Root R2 O=Google Trust Services LLC</li>
<li>CN=QuoVadis Root CA 2 O=QuoVadis Limited</li>
<li>CN=QuoVadis Root CA 3 O=QuoVadis Limited</li>
<li>CN=Secure Global CA O=SecureTrust Corporation</li>
<li>CN=SecureTrust CA O=SecureTrust Corporation</li>
<li>CN=SwissSign Gold CA - G2 O=SwissSign AG</li>
<li>CN=TeliaSonera Root CA v1 O=TeliaSonera</li>
<li>CN=Trustwave Global Certification Authority O=Trustwave Holdings,
Inc.</li>
<li>CN=Trustwave Global ECC P256 Certification Authority O=Trustwave
Holdings, Inc.</li>
<li>CN=Trustwave Global ECC P384 Certification Authority O=Trustwave
Holdings, Inc.</li>
<li>O=certSIGN OU=certSIGN ROOT CA</li>
</ul>
<p>See <a
href="https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/o1VliD70ctg/m/pY0JBzTlAQAJ?pli=1">their
announcement</a> for more details.</p>
<h2>What's Changed</h2>
<ul>
<li>Take semver-compatible dependency updates by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/116">rustls/webpki-roots#116</a></li>
<li>Take semver-compatible dependency updates by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/117">rustls/webpki-roots#117</a></li>
<li>Take semver-compatible updates by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/118">rustls/webpki-roots#118</a></li>
<li>Prepare 1.0.7 by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/120">rustls/webpki-roots#120</a></li>
<li>Update dependencies by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/119">rustls/webpki-roots#119</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7">https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="be948464fd"><code>be94846</code></a>
Update dependencies (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/119">#119</a>)</li>
<li><a
href="76476f91c9"><code>76476f9</code></a>
Prepare 1.0.7 (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/120">#120</a>)</li>
<li><a
href="ed392f437c"><code>ed392f4</code></a>
Take semver-compatible updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/118">#118</a>)</li>
<li><a
href="ec8b744a63"><code>ec8b744</code></a>
Take semver-compatible dependency updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/117">#117</a>)</li>
<li><a
href="84a0c23ef2"><code>84a0c23</code></a>
Take semver-compatible dependency updates (<a
href="https://redirect.github.com/rustls/webpki-roots/issues/116">#116</a>)</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki-roots/compare/v/1.0.6...v/1.0.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpki-root-certs&package-manager=cargo&previous-version=1.0.6&new-version=1.0.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 00:52:56 +00:00
dependabot[bot]
4322792c84 build: bump h2 from 0.4.12 to 0.4.13 (#44414)
Bumps [h2](https://github.com/hyperium/h2) from 0.4.12 to 0.4.13.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/h2/releases">h2's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.13</h2>
<h2>What's Changed</h2>
<ul>
<li>Implement HTTP/2 informational responses (1xx) support by <a
href="https://github.com/apu031"><code>@​apu031</code></a> in <a
href="https://redirect.github.com/hyperium/h2/pull/865">hyperium/h2#865</a></li>
<li>fix: Unparent connection span by <a
href="https://github.com/Jesse-Bakker"><code>@​Jesse-Bakker</code></a>
in <a
href="https://redirect.github.com/hyperium/h2/pull/868">hyperium/h2#868</a></li>
<li>fix: auto-release padding from DATA frames by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/h2/pull/869">hyperium/h2#869</a></li>
<li>fix: do not assign capacity for pending streams by <a
href="https://github.com/benjaminp"><code>@​benjaminp</code></a> in <a
href="https://redirect.github.com/hyperium/h2/pull/860">hyperium/h2#860</a></li>
<li>perf: reduce huffman decode table size by <a
href="https://github.com/ariaandika"><code>@​ariaandika</code></a> in <a
href="https://redirect.github.com/hyperium/h2/pull/871">hyperium/h2#871</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/Jesse-Bakker"><code>@​Jesse-Bakker</code></a>
made their first contribution in <a
href="https://redirect.github.com/hyperium/h2/pull/868">hyperium/h2#868</a></li>
<li><a
href="https://github.com/ariaandika"><code>@​ariaandika</code></a> made
their first contribution in <a
href="https://redirect.github.com/hyperium/h2/pull/871">hyperium/h2#871</a></li>
<li><a href="https://github.com/apu031"><code>@​apu031</code></a> made
their first contribution in <a
href="https://redirect.github.com/hyperium/h2/pull/865">hyperium/h2#865</a></li>
<li><a href="https://github.com/benjaminp"><code>@​benjaminp</code></a>
made their first contribution in <a
href="https://redirect.github.com/hyperium/h2/pull/860">hyperium/h2#860</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hyperium/h2/compare/v0.4.12...v0.4.13">https://github.com/hyperium/h2/compare/v0.4.12...v0.4.13</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/h2/blob/master/CHANGELOG.md">h2's
changelog</a>.</em></p>
<blockquote>
<h1>0.4.13 (January 5, 2026)</h1>
<ul>
<li>Add support for 1xx informational responses on client and server
side.</li>
<li>Fix auto-releasing of padding bytes of DATA frames for flow control
windows.</li>
<li>Fix to stop assigning capacity to pending streams which can't use it
yet.</li>
<li>Fix tracing to not grab the parent for the connection span.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2aeb81fdb5"><code>2aeb81f</code></a>
v0.4.13</li>
<li><a
href="5f40d38f5b"><code>5f40d38</code></a>
fix: do not assign capacity for pending streams (<a
href="https://redirect.github.com/hyperium/h2/issues/860">#860</a>)</li>
<li><a
href="803d8cd1c6"><code>803d8cd</code></a>
ci: adjust pinned dependencies in msrv job (<a
href="https://redirect.github.com/hyperium/h2/issues/873">#873</a>)</li>
<li><a
href="e38678b1e2"><code>e38678b</code></a>
feat: implement HTTP/2 informational responses support (<a
href="https://redirect.github.com/hyperium/h2/issues/865">#865</a>)</li>
<li><a
href="0fe6457f7e"><code>0fe6457</code></a>
perf: Reduce huffman decode table size (<a
href="https://redirect.github.com/hyperium/h2/issues/871">#871</a>)</li>
<li><a
href="e793b24b15"><code>e793b24</code></a>
fix: auto-release padding from DATA frames (<a
href="https://redirect.github.com/hyperium/h2/issues/869">#869</a>)</li>
<li><a
href="7c9a87487d"><code>7c9a874</code></a>
fix: Unparent connection span (<a
href="https://redirect.github.com/hyperium/h2/issues/868">#868</a>)</li>
<li><a
href="c342e3f18f"><code>c342e3f</code></a>
ci: pin indexmap and tracing for msrv job (<a
href="https://redirect.github.com/hyperium/h2/issues/866">#866</a>)</li>
<li><a
href="b9d5397bd7"><code>b9d5397</code></a>
test: window update stream errors count towards local max (<a
href="https://redirect.github.com/hyperium/h2/issues/859">#859</a>)</li>
<li>See full diff in <a
href="https://github.com/hyperium/h2/compare/v0.4.12...v0.4.13">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=h2&package-manager=cargo&previous-version=0.4.12&new-version=0.4.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 00:47:19 +00:00
dependabot[bot]
a65769ae98 build: bump glslopt from 0.1.12 to 0.1.13 (#44413)
Bumps [glslopt](https://github.com/jamienicol/glslopt-rs) from 0.1.12 to
0.1.13.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/jamienicol/glslopt-rs/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=glslopt&package-manager=cargo&previous-version=0.1.12&new-version=0.1.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-22 00:32:50 +00:00
Martin Robinson
bec5a6ce37 layout: Simplify the way characters are iterated when segmeting text (#44400)
This is a minor adjustment from #44276 that makes the way characters are
iterated easier to read.

Testing: This should not change behavior so should be covered by
existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-21 21:11:48 +00:00
Tim van der Lippe
138e7be47e script: Achieve failure parity with other browsers for underline command (#44390)
With these changes, we now fail the minimum set of tests. That is to
say: we don't fail any test that no other browser fails. All test
failures therefore match at least 1 other browser.

The one exception is the updated test expectation. That's because all
browsers fail this test in the exact same way, hence updating the
expectation. We fail it, since I don't know how browsers reach to that
point. I think it's related to traversal of the contained children and
the order that they are traversed in. Unfortunately my attempts at
fixing that have not been fruitful, so leaving that one for now.

Part of #25005

Testing: WPT

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Martin Robinson <martin@abandonedwig.info>
2026-04-21 17:00:40 +00:00
Narfinger
617c9c0162 script: JSContextify dom/css partially (#44406)
This JSContextifies parts of dom/css directory.

Testing: Compilation is the test.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-21 16:46:06 +00:00
Narfinger
99899612cb net: Split ResourceTimings into separate file and create batch attribute setting (#44395)
ResourceFetchTimings are set throughout the methods in http_loader.rs.
These methods are already very complicated, so having multiple times
`context.timings.lock().set_attribute()` can be quite distracting to
understanding.

This introduces ResourceFetchTimingsContainer structure which has the
lock inside and allows setting multiple attributes to clean up the code
in http_loader.

Testing: This is a refactor and does not change functionality.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-21 16:28:00 +00:00
atbrakhi
f8c97cd609 devtools: Always pass ownPropertiesLength to devtools (#44369)
Always pass `ownPropertiesLength` to devtools

Testing: All tests are passing
Fixes: part of #39858

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-21 16:26:20 +00:00
Manuel Rego
2cdbada97b Template for roadmap issues (#44398)
As discussed on
[Zulip](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Roadmap/with/580266351),
this is a new template for tracking roadmap issues.

Testing: No needed, just a GitHub issue template.

Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2026-04-21 14:41:34 +00:00
Taym Haddadi
5ac8bf4db3 Implement StorageManager API (#43976)
Add the Storage Standard WebIDL for NavigatorStorage and StorageManager,
wire navigator.storage on Window and Worker, and implement persisted(),
persist(), and estimate().


Testing: covered by WP test.
part of #39100

fixes #39101

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-21 13:41:58 +00:00
Shubham Gupta
d1e3e8080c script: Correctly apply resource timing buffer limit (#44228)
Strictly follow the
[specs](https://w3c.github.io/resource-timing/#performance-can-add-resource-timing-entry)

Also fires the performance resource timing earlier to
match WPT expectations.

Testing: More WPT tests Passed.

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-21 11:17:11 +00:00
Kingsley Yung
4a5fe14788 script: Canonicalization of sanitizer configuration (#44335)
Implement the canonicalization of sanitizer configuration, along with
the canonicalization of element with attributes, element, attribute and
name. They are implemented for the `SanitizerConfig`,
`SanitizerElementWithAttributes`, `SanitizerElement` and
`SanitizerAttribute`, through the `SantiizerConfigAlgorithm`,
`Canonicalization` and `NameCanonicalization` trait.

Note that, in the canonicalization of sanitizer configuration, the steps
related to processing instructions are marked as TODO. The feature of
supporting process instructions has just been added to the specification
recently, and the WPT tests are not yet in place. We will add this
support once the tests are ready.

`SanitizerElementWithAttributes`, `SanitizerElement` and
`SanitizerAttribute` are unions of string and dictionary. This makes
accessing its member fields cumbersome. So, the `NameMember` and
`AttributeMember` trait are added to provide helper function for them to
reduce boilerplate code.

Specification:
-
https://wicg.github.io/sanitizer-api/#sanitizer-canonicalize-the-configuration
-
https://wicg.github.io/sanitizer-api/#canonicalize-a-sanitizer-element-with-attributes
- https://wicg.github.io/sanitizer-api/#canonicalize-a-sanitizer-element
-
https://wicg.github.io/sanitizer-api/#canonicalize-a-sanitizer-attribute
- https://wicg.github.io/sanitizer-api/#canonicalize-a-sanitizer-name

Testing: Covered by WPT tests in `sanitizer-api/` subdirectory.
Fixes: Part of #43948

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-21 10:45:39 +00:00
dependabot[bot]
9ba9916bad build: bump aws-lc-rs from 1.16.2 to 1.16.3 (#44379)
Bumps [aws-lc-rs](https://github.com/aws/aws-lc-rs) from 1.16.2 to
1.16.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws/aws-lc-rs/releases">aws-lc-rs's
releases</a>.</em></p>
<blockquote>
<h2>aws-lc-rs v1.16.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Key length validation in <code>UnboundCipherKey::new()</code> now
enforced at runtime by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1092">aws/aws-lc-rs#1092</a>
<ul>
<li>The documented error on key length mismatch was never actually
checked. Streaming cipher constructors also relied on
<code>debug_assert_eq!</code> which gets stripped in release builds —
these are now runtime checks.</li>
</ul>
</li>
<li>Support MSAN and TSAN sanitizer builds via
<code>AWS_LC_SYS_SANITIZER</code> environment variable by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1100">aws/aws-lc-rs#1100</a>
<ul>
<li>Accepts <code>asan</code>, <code>msan</code>, or <code>tsan</code>.
The existing <code>asan</code> feature flag continues to work.</li>
</ul>
</li>
</ul>
<h3>Build Improvements</h3>
<ul>
<li>Follow symlinks when classifying include directory entries by <a
href="https://github.com/cmtm"><code>@​cmtm</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1071">aws/aws-lc-rs#1071</a>
<ul>
<li>Fixes builds under Bazel (and other build systems) where source
files in <code>CARGO_MANIFEST_DIR</code> are symlinks into a
content-addressable store.</li>
</ul>
</li>
<li>Improve clang-cl discovery for Windows ARM64 builds by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1060">aws/aws-lc-rs#1060</a>
<ul>
<li>The build script now discovers <code>clang-cl</code> inside Visual
Studio installations rather than requiring it on <code>PATH</code>.</li>
</ul>
</li>
<li>Fix Windows ARM64 FIPS build: pass correct architecture to
<code>vcvarsall.bat</code> by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1075">aws/aws-lc-rs#1075</a></li>
<li>Strip LTO flags from CFLAGS for FIPS builds by <a
href="https://github.com/skmcgrail"><code>@​skmcgrail</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1087">aws/aws-lc-rs#1087</a>
<ul>
<li>Build environments like RPM mock chroots (e.g. AL2023) that export
<code>-flto=auto</code> in CFLAGS would break the FIPS delocator
pipeline.</li>
</ul>
</li>
<li>MSVC: Fix builtin swap intrinsic check to avoid link-time failures
by <a
href="https://github.com/walter-zeromatter"><code>@​walter-zeromatter</code></a>
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1086">aws/aws-lc-rs#1086</a></li>
<li>MSVC: Add jitterentropy <code>src</code> subdirectory to include
search path by <a
href="https://github.com/walter-zeromatter"><code>@​walter-zeromatter</code></a>
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1085">aws/aws-lc-rs#1085</a></li>
<li>MSVC: Use 8.3 short paths on Windows to avoid MAX_PATH limits by <a
href="https://github.com/walter-zeromatter"><code>@​walter-zeromatter</code></a>
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1081">aws/aws-lc-rs#1081</a></li>
</ul>
<h3>Issues Being Closed</h3>
<ul>
<li>Clarify that build needs to run from VS Developer shell for Windows
builds -- <a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1056">aws/aws-lc-rs#1056</a></li>
<li>Add MSAN (MemorySanitizer) support, matching existing ASAN support
-- <a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1077">aws/aws-lc-rs#1077</a></li>
<li>aws-lc-sys fails to compile on iOS arm64 with Clang 15.0.7:
undeclared ioctl in urandom.c -- <a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1068">aws/aws-lc-rs#1068</a></li>
</ul>
<h2>Other Merged PRs</h2>
<ul>
<li>Prepare aws-lc-sys v0.39.1 by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1080">aws/aws-lc-rs#1080</a></li>
<li>Bump aws-lc-fips-sys to v0.13.14 by <a
href="https://github.com/skmcgrail"><code>@​skmcgrail</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1088">aws/aws-lc-rs#1088</a></li>
<li>CI: Harden artifact workflows and update action versions by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1091">aws/aws-lc-rs#1091</a></li>
<li>Bump actions/checkout from 4 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1096">aws/aws-lc-rs#1096</a></li>
<li>Bump actions/setup-go from 4 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1095">aws/aws-lc-rs#1095</a></li>
<li>Bump codecov/codecov-action from 4 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1094">aws/aws-lc-rs#1094</a></li>
<li>Prepare aws-lc-rs v1.16.3 by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1098">aws/aws-lc-rs#1098</a></li>
<li>Prepare aws-lc-sys v0.40.0 by <a
href="https://github.com/justsmth"><code>@​justsmth</code></a> in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1099">aws/aws-lc-rs#1099</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/cmtm"><code>@​cmtm</code></a> made their
first contribution in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1071">aws/aws-lc-rs#1071</a></li>
<li><a
href="https://github.com/walter-zeromatter"><code>@​walter-zeromatter</code></a>
made their first contribution in <a
href="https://redirect.github.com/aws/aws-lc-rs/pull/1086">aws/aws-lc-rs#1086</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/aws/aws-lc-rs/compare/v1.16.2...v1.16.3">https://github.com/aws/aws-lc-rs/compare/v1.16.2...v1.16.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f75bae5248"><code>f75bae5</code></a>
Support MSAN and TSAN sanitizer builds via environment variable (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1100">#1100</a>)</li>
<li><a
href="64677e8fb3"><code>64677e8</code></a>
Improve clang-cl discovery for Windows ARM64 builds (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1060">#1060</a>)</li>
<li><a
href="e2e3e15bbd"><code>e2e3e15</code></a>
Prepare aws-lc-sys v0.40.0 (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1099">#1099</a>)</li>
<li><a
href="e0ec10024d"><code>e0ec100</code></a>
Prepare aws-lc-rs v1.16.3 (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1098">#1098</a>)</li>
<li><a
href="46ed951c9c"><code>46ed951</code></a>
MSVC Fix: use 8.3 short paths on Windows to avoid MAX_PATH limits in
building...</li>
<li><a
href="27c4cca361"><code>27c4cca</code></a>
Add jitterentropy src subdirectory to include search path (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1085">#1085</a>)</li>
<li><a
href="6b30158f0b"><code>6b30158</code></a>
MSVC Fix: Improve bad intrinsic check on msvc (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1086">#1086</a>)</li>
<li><a
href="5a3f9ca4ba"><code>5a3f9ca</code></a>
Bump codecov/codecov-action from 4 to 6 (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1094">#1094</a>)</li>
<li><a
href="6a7b379faa"><code>6a7b379</code></a>
Bump actions/setup-go from 4 to 6 (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1095">#1095</a>)</li>
<li><a
href="f7cb890331"><code>f7cb890</code></a>
Bump actions/checkout from 4 to 6 (<a
href="https://redirect.github.com/aws/aws-lc-rs/issues/1096">#1096</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aws/aws-lc-rs/compare/v1.16.2...v1.16.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aws-lc-rs&package-manager=cargo&previous-version=1.16.2&new-version=1.16.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 02:37:32 +00:00
dependabot[bot]
93e413093f build: bump tokio from 1.52.0 to 1.52.1 in the tokio-rs-related group (#44377)
Bumps the tokio-rs-related group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.52.0 to 1.52.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.52.1</h2>
<h1>1.52.1 (April 16th, 2026)</h1>
<h2>Fixed</h2>
<ul>
<li>runtime: revert <a
href="https://redirect.github.com/tokio-rs/tokio/issues/7757">#7757</a>
to fix [a regression]<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8056">#8056</a>
that causes <code>spawn_blocking</code> to hang (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8057">#8057</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7757">#7757</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7757">tokio-rs/tokio#7757</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8056">#8056</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8056">tokio-rs/tokio#8056</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8057">#8057</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8057">tokio-rs/tokio#8057</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="905c146aed"><code>905c146</code></a>
chore: prepare to release v1.52.1 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8059">#8059</a>)</li>
<li><a
href="56aaa43e91"><code>56aaa43</code></a>
rt: revert <a
href="https://redirect.github.com/tokio-rs/tokio/issues/7757">#7757</a>
to fix regression in <code>spawn_blocking</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8057">#8057</a>)</li>
<li><a
href="57ff47ab58"><code>57ff47a</code></a>
ci: update <code>trybuild</code> to expect output from rustc 1.95.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8058">#8058</a>)</li>
<li><a
href="812de3e134"><code>812de3e</code></a>
ci: bump taiki-e/cache-cargo-install-action from 1 to 3 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8053">#8053</a>)</li>
<li><a
href="ba82e73c7b"><code>ba82e73</code></a>
ci: use Dependabot to keep github actions up to date (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8052">#8052</a>)</li>
<li><a
href="2e85f9ddf8"><code>2e85f9d</code></a>
ci: replace cirrus-ci with freebsd-vm (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8041">#8041</a>)</li>
<li><a
href="a7e1cd8ff8"><code>a7e1cd8</code></a>
ci: update GitHub Actions workflows to use latest tool versions (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8047">#8047</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.52.0...tokio-1.52.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.52.0&new-version=1.52.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 02:23:35 +00:00
dependabot[bot]
c04dc7e77b build: bump uuid from 1.23.0 to 1.23.1 (#44380)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.23.0 to 1.23.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uuid-rs/uuid/releases">uuid's
releases</a>.</em></p>
<blockquote>
<h2>v1.23.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove deprecated <code>msrv</code> feature from wasm-bindgen
dependency by <a
href="https://github.com/guybedford"><code>@​guybedford</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/877">uuid-rs/uuid#877</a></li>
<li>fix: Timestamp::from_gregorian deprecation note by <a
href="https://github.com/aznashwan"><code>@​aznashwan</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/878">uuid-rs/uuid#878</a></li>
<li>Prepare for 1.23.1 release by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/879">uuid-rs/uuid#879</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/guybedford"><code>@​guybedford</code></a> made
their first contribution in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/877">uuid-rs/uuid#877</a></li>
<li><a href="https://github.com/aznashwan"><code>@​aznashwan</code></a>
made their first contribution in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/878">uuid-rs/uuid#878</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/uuid-rs/uuid/compare/v1.23.0...v1.23.1">https://github.com/uuid-rs/uuid/compare/v1.23.0...v1.23.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ca0c85fe21"><code>ca0c85f</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/879">#879</a> from
uuid-rs/cargo/v1.23.1</li>
<li><a
href="b4db015d34"><code>b4db015</code></a>
prepare for 1.23.1 release</li>
<li><a
href="771069da63"><code>771069d</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/878">#878</a> from
aznashwan/fix-from-gregorian-deprecation-note</li>
<li><a
href="80994a2015"><code>80994a2</code></a>
fix: Timestamp::from_gregorian deprecation note</li>
<li><a
href="90c5be8f17"><code>90c5be8</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/877">#877</a> from
guybedford/remove-wasm-bindgen-msrv</li>
<li><a
href="8b8c4f4f85"><code>8b8c4f4</code></a>
Remove deprecated feature from wasm-bindgen dependency</li>
<li>See full diff in <a
href="https://github.com/uuid-rs/uuid/compare/v1.23.0...v1.23.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=cargo&previous-version=1.23.0&new-version=1.23.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 01:54:12 +00:00
dependabot[bot]
e33b20e445 build: bump orbclient from 0.3.51 to 0.3.53 (#44382)
Bumps orbclient from 0.3.51 to 0.3.53.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=orbclient&package-manager=cargo&previous-version=0.3.51&new-version=0.3.53)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 01:38:18 +00:00
dependabot[bot]
f41e1513d9 build: bump atomic_refcell from 0.1.13 to 0.1.14 (#44381)
Bumps [atomic_refcell](https://github.com/mozilla/atomic_refcell) from
0.1.13 to 0.1.14.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mozilla/atomic_refcell/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=atomic_refcell&package-manager=cargo&previous-version=0.1.13&new-version=0.1.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-21 01:28:00 +00:00
Simon Martin
d4a63f87ed webgl: Validate dimensions in TexImage3D properly with level (#44367)
The tex-3d-size-limit.html test verifies that TexImage3D errors out with
gl.INVALID_VALUE if the width / height / depth parameters are greater
than gl.MAX_3D_TEXTURE_SIZE / 2 ** level, in accordance with the mipmap
levels definition.

This patch adds this checks, and fixes a s/depth/level/ typo, and should
stabilize tex-3d-size-limit.html: all its sub-tests will succeed until
the first call to (not implemented) TexSubImage3D, that will end the
test.

It's still possible for the test to fail on environments where
gl.MAX_3D_TEXTURE_SIZE is not 8192 (because the numbering of tests will
be different), and this will have to be until we make all sub-tests
pass, i.e. TexSubImage3D is implemented.

Testing: A bunch of expected failures are removed.
Fixes: https://github.com/servo/servo/issues/44280

Signed-off-by: Simon Martin <simon@nasilyan.com>
2026-04-20 14:19:41 +00:00
Gae24
85eda69130 script: Complete script_module &mut JSContext migration (#44368)
Switch the remaining `SafeJSContext` usages to `&mut JSContext` inside
script_module.rs

Testing: It compiles.
Part of #40600

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-20 09:12:28 +00:00
Tim van der Lippe
4184b11362 script: Iterate over correct collections when moving (#44347)
Several times, we first need to capture the relevant nodes, perform a
step and then iterate over the nodes. Previously, we would iterate over
it, but the iterator could have moved, hence we would jump over some
nodes.

Instead, capture these beforehand and then iterate over them.

Also fixes the issue where text-decoration wasn't properly checked,
since its a shorthand for 3 longhands. And a PropertyDeclarationBlock
only has longhands.

The two regressions are for tests that now generate the correct HTML,
but their ranges are incorrectly moved from the `a` to the `b`. I went
through the relevant algorithms and didn't spot the mistake. To keep on
making babysteps towards a full implementation, I will tackle these in a
follow-up. These algorithms are already difficult enough to reason
about.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-19 21:51:14 +00:00
Freya Arbjerg
c14b7d66d0 devtools: Replace dead links in debugger.js (#44358)
This replaces dead firefox-source-docs.mozilla.org links in debugger.js 

Testing: Not relevant for comments
Fixes: No issue

Signed-off-by: Freya Arbjerg <git@arbjerg.dev>
2026-04-19 19:25:32 +00:00
Nico Burns
2c91740059 Use our own http server for the webdriver server (#44338)
Helps with: https://github.com/servo/servo/issues/38776. Reduces total
Servo crate count by 7 (977 -> 970).

This PR simply:
- Disables the `server` feature in the `webdriver` crate
- Vendors the implementation of the server from the `webdriver` crate
- Updates dependencies + fixes code to work with new versions

Unfortunately `webdriver` depends on `http` even with the `server`
feature disabled, so we still end up with duplicate versions of `http`.
But at least the duplicate `hyper` is eliminated. Future work could
change the implementation to e.g. move away from `warp` or similar.

Testing: WPT tests use webdriver, so this should be exercised heavily by
those tests.

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-04-19 15:42:45 +00:00
Simon Wülker
18d3ad5252 script: Support shadowrootslotassignment on template elements (#44246)
This brings up to date with the specification for declarative shadow
roots: https://github.com/whatwg/html/pull/12267.

The `shadowrootslotassignment` attribute on `<template>` elements
specifies the slot assignment mode used by the declarative shadow root
created by the template.

Testing: New tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-19 14:22:06 +00:00
Euclid Ye
eea0c586c0 ci: Set LLVM_OBJDUMP env-var when compiling libservo with MSRV in linux (#44352)
[Sometimes](https://github.com/servo/servo/actions/runs/24611835766/job/71967504931#step:10:1076),
CI fails to link pre-built archive, and have to build from source.
Previously this always fail as llvm-objdump is not found.

Testing: Successful [try
run](https://github.com/yezhizhen/servo/actions/runs/24626909297) when
building from source.
Fixes: #44351

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-19 13:44:49 +00:00
Simon Martin
d5dab9e353 webgl: Update stable test expectations to close intermittent issue (#44344)
Since 5634eab8cc, tex-3d-size-limit.html is not crashing anymore, and
even though I updated the test expectations and the test is consistently
passing locally at that commit, it's now failing some tests that should
have failed since the beginning (since there's no associated check in
the code).

I'm not sure why things seem to work with the previous test expectations
update and will follow-up, but in the meanwhile let's update them.

With this, things seem to be pretty good:
```
$ ./mach test-wpt --dev tests/wpt/webgl/tests/conformance2/textures/misc/tex-3d-size-limit.html --repeat 1000 [...]
web-platform-test
~~~~~~~~~~~~~~~~~
Ran 92000 checks (91000 subtests, 1000 tests)
Expected results: 92000
Unexpected results: 0
OK
```

Testing: Test seems to pass consistently with the updated expectations.
Fixes: https://github.com/servo/servo/issues/44280

Signed-off-by: Simon Martin <simon@nasilyan.com>
2026-04-19 08:33:09 +00:00
Josh Matthews
4e267b2f09 net: Update expected Accept-Language header in tests to use current locale. (#44340)
Our choice is to either override the user's locale or updated the
expected result to depend on the locale. Updating the expectation seemed
easier.

Testing: Unit tests pass locally, but CI runs with the en-US locale so
there's no observable difference.
Fixes: #43069

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-19 08:08:01 +00:00
Servo WPT Sync
345fd4573f Sync WPT with upstream (19-04-2026) (#44339)
Automated downstream sync of changes from upstream as of 19-04-2026
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-19 06:08:06 +00:00
Josh Matthews
19354a5b37 net: Update test cookie expiration dates to one century in the future. (#44341)
These dates were chosen 10 years ago, which I'm sure felt like a
reasonably far-future date for a very young web engine. Surprise! We're
still here, so we can be more bold this time.

Testing: Unit tests stop failing.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-19 04:55:05 +00:00
Asish Kumar
678f9d7a47 net: Keep IP cookie buckets separate (#44152)
Use the full IP address as the cookie storage bucket key instead of
passing IP hosts through the public suffix registrable-domain helper.
This prevents unrelated IP hosts that share suffix-like address segments
from sharing a per-host eviction bucket.

Testing: Added `test_ip_cookie_bucket_collision_eviction`; ran `cargo
test -p servo-net --test main test_ip_cookie_bucket_collision_eviction
--locked`.
Fixes: #44097

---------

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-04-18 19:55:19 +00:00
Tim van der Lippe
39a3aa991f script: Generate more correct HTML for underline command (#44331)
This makes further steps to generate the correct HTML. Some tests now
have more appropriate HTML, but are not fully passing yet as they
require more fixes. I also missed the fact that there is actually an
algorithm to set the tag name, which I thought didn't exist. Therefore,
also correctly implement that.

Part of #25005

Testing: WPT

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-04-18 18:37:26 +00:00
rovertrack
8dfb6be75b layout: Produce an empty display list when the Document element is removed (#44133)
Previously, when the `Document` element was removed, no further display
list updates would be sent to paint. This change makes it so that when
the `Document` element is removed a single new empty display list is
sent.

Testing: This change adds a new WPT test .
Fixes: #44101

---------

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-18 16:48:29 +00:00
Gae24
2b21c528ea script: Clean up prepare the script element related code and remove ModuleOwner (#44179)
Drop the `ModuleOwner` logic in favour of closures passed down by the
script fetching initiator.
When processing inline module scripts a task in now queued on the
networking task source. Since `Rc<ModuleTree>` is not `Send`, a `result`
field is now introduced to `HTMLScriptElement`, which is initialized
before queueing the task.

This slightly improves `inline-async-inserted-execorder.html`, which now
fails at the fourth assertion instead of stopping at the second one (the
inline module script with no dependencies still resolves after the one
that has a parse error).

Testing: Covered by existing tests.

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-18 15:58:33 +00:00
Nico Burns
87819c5f00 layout: Fix x/y offset not being set for direct abspos grid children (#44324)
Previously absolutely positioned direct children of a CSS Grid had their
position (relative to their parent) hardcoded to (0, 0). This PR changes
that to correctly propagate the position computed by Taffy.

Testing: WPT tests.

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-04-18 14:31:09 +00:00
Euclid Ye
d3932a2118 Android: Fix black screen when exiting menu or resuming activity in lifecycle (#44327)
We should request repaint for the platform window when `resume_painting`
or entering
[Resumed](https://developer.android.com/guide/components/activities/activity-lifecycle#onresume)
state in Android activity lifecycle.

Fixes: #44300
Fixes: #40632
Fixes: #39737
Testing: Manually tested with following video proof


https://github.com/user-attachments/assets/046c045d-12d1-43fa-9387-fc504cc4bfe5

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-18 06:20:30 +00:00
webbeef
d16c9984f6 script: registration mechanism for selective broadcast from constellation (#43124)
This introduces a mechanism that let script threads register and
unregister themselves from receiving messages from the constellation.
This is useful when only globals with event listeners or callbacks will
process some message types.
The first migrated API is the webstorage 'storage' event. This patch
ensures that we only send IPC to same origin globals that have an event
handler set.
While we use it for an event here, this is also usable for DOM callbacks
such as the ones used in the Geolocation API.

Testing: optimization with no tests regression:
https://github.com/webbeef/servo/actions/runs/22880845745

---------

Signed-off-by: webbeef <me@webbeef.org>
2026-04-18 02:17:10 +00:00
Euclid Ye
5d91793d1c net: Fix link, reduce visibility, add TODO for Response::url (#44274)
I wanted to follow up to #43987, but don't know how to proceed
meaningfully :(

- Reduce visibility
- Add TODO for `Response::url`. This should be removed and determined by
`url_list` instead.
- Fix some spec link

Testing: Nothing should change as no code change.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-18 01:02:48 +00:00
Martin Robinson
b39d9833a4 script: Cancel animations for non-rendered nodes in script (#44299)
Instead of walking the entire fragment tree to find nodes for which
animations and image animations need to be cancelled, this change moves
that logic to `script`. Now, for each animating node the animation
managers will explicitly ask `layout` if the node is being rendered (or
delegating rendering in the case of CSS animations and transitions).

The main goal here is a performance improvement, elimating roughly 1% of
layout time from the profiler when running the
`flexbox-deeply-nested-column-flow.html` test case. This will almost
certainly be an even better improvement on more complex pages as we are
no longer doing things once per fragment tree entry, but once per
animating node.

There is also a subtle behavior improvement here. Before nodes with
`display: contents` had their animations canceled, but now they are not.
For instance, this test case now works properly:

```html
<!DOCTYPE html>
<style>
@keyframes anim {
  from { color: cyan }
  to { color: magenta }
}
div {
  display: contents;
  animation: anim 1s infinite alternate linear;
}
</style>
```

The new layout query will additionally be useful for other parts of
script that need to answer the same "being rendered" or "delegates
rendering to children" question.

Testing: This change adds a new test and gets one more subtest passing.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-17 21:59:20 +00:00
Narfinger
a908081352 chore: Remove some clippy complains for 1.95 (#44276)
This removes some complains that clippy will have in 1.95.
As this is mostly just match guards, it doesn't update MSRV.

Testing: This is equivalent exchanges, so current WPT would find
anything.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-17 19:55:17 +00:00
Josh Matthews
62f9971a87 script: Log failed script fetch URL. (#44319)
Testing: Can't test for debug logs.
Should assist with diagnosing #26272.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-17 17:35:05 +00:00
batu_hoang
2d445b649d Implement SiteDataManager::cookies_for_url_async (#43794)
Support applications to get cookies asynchronously from embedder.

Testing:
`servo/components/servo/tests/site_data_manager.rs::test_get_cookie_async`

---------

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2026-04-17 16:38:50 +00:00
Euclid Ye
211a24f181 Revert "storage: use client storage in indexeddb" (#44318)
Reverts servo/servo#43900
cc @gterzian 

There are way too many intermittents.

Fixes: #44317
Fixes: #44316
Fixes: #44310
Fixes: #44306

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-17 16:34:17 +00:00
Narfinger
68ca2808ee net: Refactor obtain_response and split devtools (#44271)
This PR refactors parts of the net crate with one minor functional
change.
Most of the main functions in the net crate are quite long and rather
unwieldly. This PR tries to help make them more understandable.

- Split parts of obtain_response to have the Router callback setup in
another function.
- Move functions related to devtools into another file.
- Add some servo_tracing.
- http_network_or_cache_fetch has another function for append_cache_data
to headers.
- One functional change: previously in obtain_response, we used the
encoded_url via copies and multiple replace calls. We now use the
percent_encode crate which is already included in
content_security_policy to do this a bit more efficiently. In practice
the compiler probably fixed the multiple copies but this is more
straightforward. The output should be identical.

Testing: As this is mostly a refactor compilation is the test. The
percent_encode change is tested in multiple unit tests.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-17 16:29:19 +00:00
Tim van der Lippe
9259a7ed69 script: Set shorthand text-decoration instead of longhand (#44312)
The generated HTML was setting `text-decoration-line` whereas it instead
should set `text-decoration`.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-17 15:38:20 +00:00
Euclid Ye
467fdb1dc0 git: Fix CI by removing wrongly commited FETCH_HEAD (#44309)
This is somehow introduced in #43617. This is causing CI failure.
For whatever reason, this thing should only be in `.git` folder. But
somehow it is at the root?

Also changed `.yml` to avoid ambiguity: we are using revision instead of
path.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-17 15:23:39 +00:00
Martin Robinson
789974975f layout: Remove dependency on xi-unicode (#44303)
This functionality already provided by `icu_properties` which is already
in our dependency graph, so this change allows us to remove one
dependency.

Testing: This should not change behavior, so is covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-17 13:09:44 +00:00
Shubham Gupta
53d7a0e08a script: Generate custom fields also, for interfaces inheriting from PerformanceEntry, from impl_performance_entry_struct! (#44289)
Add definition for generation of custom fields for interfaces inheriting
from PerformanceEntry.

Testing: More WPT Tests Passed

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-17 12:16:52 +00:00
Simon Wülker
fdf1e09a2a style: When animating a property, ignore keyframes that don't declare that property (#43461)
Companion PR for https://github.com/servo/stylo/pull/338 (Refer to that
PR for a proper description)

Testing: This change adds a test
Fixes: https://github.com/servo/servo/issues/41302

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-17 11:32:58 +00:00
Simon Sapin
56345cdab0 layout: Fix which axis to consider for baseline propagation of flex items (#44281)
* When a flex item line participates in baseline alignment, the relevant
baseline must be parallel to the **main axis** (affected by
`flex-direction`) of the flex container.
* When a flex item propagates a baseline to a parent layout (such as for
`display: inline-flex`) the relevant baseline must be parallel to the
**inline axis** (not affected by `flex-direction`) of the flex
container.

See:

* https://drafts.csswg.org/css-flexbox-1/#box-model
* https://drafts.csswg.org/css-flexbox-1/#flex-direction-property
* https://drafts.csswg.org/css-flexbox-1/#baseline-participation
* https://drafts.csswg.org/css-align-3/#baseline-export

Testing: covered by existing WPT tests
Fixes: https://github.com/servo/servo/issues/43687

Signed-off-by: Simon Sapin <simon@igalia.com>
2026-04-17 10:08:26 +00:00
Gregory Terzian
9f81a8f54d storage: use client storage in indexeddb (#43900)
Integrate client storage into indexeddb for the creation and deletion of
databases.

Testing: Existing WPT tests.
Fixes: None

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2026-04-17 09:53:28 +00:00
Tim van der Lippe
e7c29c3330 script: Check correct element if text-decoration is effective (#44293)
Rather than node, we should check `new_parent` for this. Unfortunately
some regressions, which have been flip-flopping in recent PRs. That's
because underline itself uses its own state to determine what to do.
However, this is a net positive PR that also adheres to the spec, so
it's another step in the right direction.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-17 08:32:08 +00:00
Euclid Ye
aefcd94ee5 build: Upgrade mako to 1.3.11 in uv.lock to fix security alert (#44291)
Fixes: https://github.com/servo/servo/security/dependabot/285

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-17 07:35:09 +00:00
Kingsley Yung
617c28f631 script: Default configuration of sanitizer (#44290)
This patch implements the built-in safe default configuration for
`Sanitizer` constructor.

Specification:
https://wicg.github.io/sanitizer-api/#sanitization-defaults

Testing: Covered by WPT test in
`sanitizer-api/sanitizer-default-config.tentative.html`.
Fixes: Part of #43948

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-17 07:34:38 +00:00
dependabot[bot]
5d5a38048d build: bump mako from 1.2.2 to 1.3.11 (#44286)
Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.2 to 1.3.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sqlalchemy/mako/releases">mako's
releases</a>.</em></p>
<blockquote>
<h1>1.3.11</h1>
<p>Released: Tue Apr 14 2026</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [template]</strong> Fixed issue in
<code>TemplateLookup</code> where a URI with a double-slash
prefix (e.g. <code>//../../</code>) could bypass the directory traversal
check in
<code>Template</code>, allowing reads of arbitrary files outside of the
template directory. The issue was caused by an inconsistency in how
leading
slashes were stripped between <code>TemplateLookup.get_template()</code>
and
<code>Template</code> initialization.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/434">#434</a></p>
</li>
</ul>
<h1>1.3.10</h1>
<p>Released: Thu Apr 10 2025</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [lexer]</strong> Fix undefined variable errors when
<code>strict_undefined=True</code> when using a
nested list comprehension. Pull request courtesy Sébastien Granjoux.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/418">#418</a></p>
</li>
</ul>
<h1>1.3.9</h1>
<p>Released: Tue Feb 4 2025</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [tests]</strong> Fixed test suite to not rely upon
ancient &quot;future division&quot; statement to
test the <code>Template.future_imports</code> feature.   The test is
replaced with one that tests only the rendering, not the ultimate
effect.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/408">#408</a></p>
</li>
</ul>
<h1>1.3.8</h1>
<p>Released: Sat Dec 7 2024</p>
<h2>bug</h2>
<ul>
<li><strong>[bug] [lexer]</strong> Reverted the fix for <a
href="https://redirect.github.com/sqlalchemy/mako/issues/140">#140</a>
released in Mako 1.3.7 as it produced
regressions in existing user code.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/sqlalchemy/mako/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mako&package-manager=uv&previous-version=1.2.2&new-version=1.3.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 22:02:02 +00:00
dependabot[bot]
4dc82fe2c0 build: bump mako from 1.2.2 to 1.3.11 in /python (#44287)
Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.2 to 1.3.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sqlalchemy/mako/releases">mako's
releases</a>.</em></p>
<blockquote>
<h1>1.3.11</h1>
<p>Released: Tue Apr 14 2026</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [template]</strong> Fixed issue in
<code>TemplateLookup</code> where a URI with a double-slash
prefix (e.g. <code>//../../</code>) could bypass the directory traversal
check in
<code>Template</code>, allowing reads of arbitrary files outside of the
template directory. The issue was caused by an inconsistency in how
leading
slashes were stripped between <code>TemplateLookup.get_template()</code>
and
<code>Template</code> initialization.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/434">#434</a></p>
</li>
</ul>
<h1>1.3.10</h1>
<p>Released: Thu Apr 10 2025</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [lexer]</strong> Fix undefined variable errors when
<code>strict_undefined=True</code> when using a
nested list comprehension. Pull request courtesy Sébastien Granjoux.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/418">#418</a></p>
</li>
</ul>
<h1>1.3.9</h1>
<p>Released: Tue Feb 4 2025</p>
<h2>bug</h2>
<ul>
<li>
<p><strong>[bug] [tests]</strong> Fixed test suite to not rely upon
ancient &quot;future division&quot; statement to
test the <code>Template.future_imports</code> feature.   The test is
replaced with one that tests only the rendering, not the ultimate
effect.</p>
<p>References: <a
href="https://redirect.github.com/sqlalchemy/mako/issues/408">#408</a></p>
</li>
</ul>
<h1>1.3.8</h1>
<p>Released: Sat Dec 7 2024</p>
<h2>bug</h2>
<ul>
<li><strong>[bug] [lexer]</strong> Reverted the fix for <a
href="https://redirect.github.com/sqlalchemy/mako/issues/140">#140</a>
released in Mako 1.3.7 as it produced
regressions in existing user code.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/sqlalchemy/mako/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mako&package-manager=pip&previous-version=1.2.2&new-version=1.3.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 21:59:55 +00:00
Tim van der Lippe
d096560b51 script: Correctly handle modifiable elements in contenteditable (#44250)
First of all, the effective command value was wrong, since there is no
relevant CSS property for the underline command. Instead, we should
directly use the text-decoration property. This then allows us to
implement reordering of modifiable elements.

We also need to "change the element to a span", which is quite annoying
to do. Instead, it mimics what would have happened by moving children
and copying attributes.

There are some regressions, but overall this is another big step towards
the right track. The regressions look related to tricky edge cases that
I am not even sure other browsers handle.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-16 20:50:06 +00:00
Martin Robinson
3ffecfb60c wpt: Correct the name of a __dir__.ini metadata file after #44232 (#44260)
This file was renamed incorrectly due to automated renaming of directory
contents.

Testing: This does not seem to change test results, but whether or not
the
option in this `__dir__.ini` file is another issue.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-16 20:36:52 +00:00
Nico Burns
df3f915465 layout: depend on web_atoms rather than html5ever (#44277)
`servo-layout` only depends on `html5ever` for it's atom types which are
now split out into the `web_atoms` crate. This switches the dependency
to `web_atoms` to remove the unncessary dependency

Testing: This just imports the same types from a different crate. So if
it builds, it should work.

Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-04-16 20:36:04 +00:00
Abbas Olanrewaju Sarafa
77e75aaf9e script: Make adjacent errors and console.log messages log in correct order (#44243)
Made adjacent errors and console.log messages log in correct order

Testing: ```./mach test-unit -p servo --
test_console_log_and_error_ordering``` passed.
Fixes: #44204

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-16 20:33:50 +00:00
Ashwin Naren
83eacc517a script: Add messages to all errors in components/script/dom/location.rs (#44282)
Mostly reuses the original error message from #39051, but on the rest of
the methods that require it. Also adds a new error message for
`document_if_same_origin`.

Testing: None
Fixes: Partially #40756

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2026-04-16 19:00:23 +00:00
Ashwin Naren
b4a569536c servoshell: Remove IndexedDB preference from servo:preferences (#44283)
Since indexeddb is now part of the experimental features list, we can
remove it from the "more experimental" features list.

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2026-04-16 18:59:28 +00:00
Jonathan Schwender
f77fe5eadd release: Build android in production mode (#44278)
Since https://github.com/servo/servo/pull/44182 production builds for
android are now possible in CI.
Let's unify this, since all other platforms already use production. The
production build is also ~45MB small, which is a huge reduction compared
to the ~159MB our nightly builds have. I didn't investigate further why
the difference is that large, but I installed the production version on
my phone and didn't spot any obvious issues (on servo.org).

[Mach try
android-production](https://github.com/jschwe/servo/actions/runs/24525178123)

Testing: We don't test CI workflows themselves.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-16 18:03:34 +00:00
Oriol Brufau
9ef8fe5e42 layout: Avoid unnecessary borrow in TextRun::segment_text_by_font() (#44279)
No need to borrow `self.inline_styles.style` when the result is already
available as a parameter of the function.

Also, avoid calling `parent_style.get_font()` multiple times.

Testing: Not needed, no behavior change

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-04-16 17:17:37 +00:00
Jonathan Schwender
2cb556a87a android: Support custom build profiles (#44182)
Pass the build directory to gradle via an environment variable, to
support custom profiles.
Building the custom profiles already works, but follow-up commands
expect the artifact at the location of the profile.
This allows switching the android release build to production (in a
follow-up PR).

Testing: We don't run any runtime tests for android in CI

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-16 16:22:41 +00:00
eri
7b6f2e5a39 devtools: Use serde structs for ObjectActorMsg (#44262)
Replace previous `serde_json::Value` manual encoding.

Testing: Existing tests pass.
Part of: #39858

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-16 14:01:46 +00:00
Simon Martin
5634eab8cc webgl: check TexImage3D's input data length (#44270)
tex-3d-size-limit.html currently crashes because we don't check that the
input data is large enough, and happily access memory that's not ours if
it's not.

The referenced ticket comes from the fact that we don't systematically
detect a crash (which makes sense if we're (un)lucky), and this patch
eradicates the crash altogether by checking the input buffer size. The
size computation is a (partial) port of WPT's computeImageSizes3D JS
function.

Fixes: https://github.com/servo/servo/issues/42881
Testing: Some expected failures in wpt/webgl can be removed, including a
crash.

Signed-off-by: Simon Martin <simon@nasilyan.com>
2026-04-16 13:47:55 +00:00
Martin Robinson
b3fdbf9821 script: Clear style data from detached subtrees when attaching a shadow DOM (#44259)
Instead of just clearing layout data, also clear style data from
descendants that are now no longer part of the flat tree when attaching
shadow DOM. This ensures that Stylo does not try to process them during
restyling. This matches what Gecko does.

Testing: This change adds a crash test and also causes a few subtests
to start passing.
Fixes: #40731.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-16 13:37:21 +00:00
eri
496c5c0e80 devtools: Separate actors into their own files (#44265)
Switch the actors to the register pattern.

Testing: Just a refactor, existing tests pass.
Part of: #43800

Signed-off-by: eri <eri@igalia.com>
2026-04-16 12:34:14 +00:00
Martin Robinson
8da073a80c layout: Cache SameFormattingContextBlock layout results (#42904)
Add a cache for `SameFormattingContextBlock`s: A new kind of cache
is added which allows reusing fragments for
`SameFormattingContextBlock` (the majority of block level elements).
This can reduce the amount of fragment tree construction during
incremental layout (although with a 40 byte overhead per
`SameFormattingContextBlock`).

Testing: This change adds a new Servo-specific WPT test that verifies
that
the minimal number of `Fragment`s are rebuilt after an incremental
layout.
Previously, when running `flexbox-deeply-nested-column-flow.html` from
`tests/blink_perf_tests/perf_tests/layout/`, performance would degrade
with successive test runs. This is due to how slow inline layout is.
This change
removes that progressive degradation, though we may be able to remove
this cache with improvements to inline layout.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2026-04-16 12:04:39 +00:00
张喜昌
562609f876 mach: Support Visual Studio 2026 and VC145 redistributables (#44264)
Testing: Visual Studio 2026 builds are not run in CI. 
Fixes: #44261.

Signed-off-by: 张喜昌 <zhang.xichang@outlook.com>
2026-04-16 11:19:02 +00:00
Kingsley Yung
b23ee51d00 script: Initialize Sanitizer API implementation (#44198)
Initialize Sanitizer API implementation with partially implemented
constructor and `get()` methods of the `Sanitizer` interface, which
allows the sub-sequential implementation to be tested by WPT.

The `Sanitizer` interface is hidden behind the feature flag
`dom_sanitizer_enabled`, which is disabled by default.

Specification: https://wicg.github.io/sanitizer-api/

Testing: Enable WPT tests for Sanitizer API.
Fixes: Part of #43948

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-16 10:31:53 +00:00
Steven Novaryo
02ba2eaa62 script: Partially implement IntersectionObserver compute the intersection algo (#42204)
Depends on #42251 for the overflow query.

Use containing block queries to implement the iteration of step [3.2.7.
Compute the Intersection of a Target Element and the
Root](https://w3c.github.io/IntersectionObserver/#compute-the-intersection)
within `IntersectionObserver` algorithm.

Contrary to the algorithm in the spec that maps the coordinate space of
the element for each iteration, we uses bounding client rect queries to
get the appropriate clip rect. And, to handle the mapping between
different coordinate spaces of iframes, we use a simple translation.

Due to the platform limitation, currently it would only handle the same
`ScriptThread` browsing context. Therefore innaccuracy any usage with
cross origin iframes is expected.

Testing: Existing and new WPTs.
Part of: https://github.com/servo/servo/issues/35767

Co-authored-by: Josh Matthews
[josh@joshmatthews.net](josh@joshmatthews.net)

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2026-04-16 09:04:53 +00:00
Kingsley Yung
6c14aed993 script: Encapsulate logic of underlying compression algorithms (#44195)
In CompressionStream API, the compression algorithms are provided by
`flate2::write::{DeflateEncoder, GzEncoder, ZlibEncoder}` and
`brotli::CompressorWriter`, and the decompression algorithms are
provided by `flate2::write::{DeflateDecoder, GzDecoder, ZlibDecoder}`
and `brotli::DecompressorWriter`.

Although all of them `std::io::Write`, they have subtle difference in
their workflow. For example, `DeflateEncoder`, `GzEncoder` and
`ZlibEncoder` are closed by `fn try_finish(&mut self)` or `fn
finish(self)`, while `brotli::CompressorWriter` must be closed by `fn
into_inner(self)`.

We currently directly call those methods from specification steps. This
patch move those method calls into new structs `CompressionContext` and
`DecompressorContext`, to provide an abstraction layer between
specification steps and underlying logics of compression algorithms from
external libraries. This helps to separate the subtle difference in
compression algorithms away from specification steps.

Testing: Refactoring. Covered by tests in `tests/wpt/tests/compression/`

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-16 03:40:03 +00:00
Euclid Ye
2dedd4087e ci: Install cargo nextest conditionally; Give the step consistent name for linux & mac (#44226)
There is no point to install it if we don't run UT. 
This step takes 1 min to install for self-hosted runner:
[try](https://github.com/servo/servo/actions/runs/24436253745/job/71391055444#step:15:11).
Given the rising energy price nowadays, let's save it.

Also take the chance to give the consistent name. Somehow only Windows
had the name "Install cargo nextest"

Testing: Previously, the step is called "Run taiki-e/install-action@v2"
in the linux/mac CI.
Now it has the proper name and skipped if UT will not be run:
[try](https://github.com/servo/servo/actions/runs/24440166415/job/71403276390).

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-16 01:47:46 +00:00
Florian König
4a3ee306db api: WebView::animating should only take a reference to self (#44253)
Fixed that `WebView::animating` takes `self` instead of `&self` as
argument.

Testing: Unsure how this could be tested for, beyond creating a unit
test for each individual function as a sanity check that all parameters
are correct. This seems excessive.
Fixes: #44251

Signed-off-by: Java <javaderg@pm.me>
2026-04-15 22:27:43 +00:00
Simon Wülker
7873d8a6c3 tests: Remove src from audio element in move-element-with-ua-shadow-tree-crash.html (#44252)
The original bug was triggered by the shadow tree for audio controls,
and that tree exists without the `src` element too.

Let's see if this fixes https://github.com/servo/servo/issues/39473

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-15 21:55:29 +00:00
rovertrack
2578b5b78a script: Use OffscreenRenderingContextId instead of DOMString in OffscreenCanvas (#44227)
replaced use of `DOMString` with `OffscreenRenderingContextId` made the
enum be initialized in bindings
([OffscreenCanvas.webidl](https://github.com/servo/servo/compare/main...rovertrack:servo:issue-44211?expand=1#diff-3a74afa4763f3f36099b9717328f9516edc3eecd5131d216a8cd024fa4fd96d9))
and use them in `getcontext()`
Testing: `./mach test-wpt tests/wpt/tests/html/canvas/offscreen` there
are no failing tests regarding the use of `OffscreenRenderingContextId`
but there were some regarding other things such as `TextMetrics`.
Fixes:  #44211

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-15 21:29:34 +00:00
Martin Robinson
57cc4931bd wpt: Make /_mozilla/css/offset-properties-inline.html wait for fonts to load (#44247)
This is a speculative fix for #40543. Although I could not get this test
to flake locally, it is obviously wrong to assumee that web fonts (Ahem
in this case) is loaded at the time of `window.onload`. This change
makes all the tests Promise tests and has them await
`document.fonts.ready` before running. This should fix the
intermittency.

Testing: This should fix itnermittency as seen on the CI.
Fixes: #40543.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-15 21:26:09 +00:00
Martin Robinson
730fa9d47d wpt: Make /_mozilla/mozilla/getBoundingClientRect.html wait for fonts to load (#44248)
This is a speculative fix for #39668. Although I could not get this test
to flake locally, it is obviously wrong to assumee that web fonts (Ahem
in this case) is loaded at the time of `window.onload`. This change
makes all the tests Promise tests and has them await
`document.fonts.ready` before running. This should fix the
intermittency.

Testing: This should fix intermittency as seen on the CI.
Fixes: #39668

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-15 19:25:28 +00:00
Ashwin Naren
c368a53fba storage: Enable indexeddb as an experimental feature (#44245)
Enables indexeddb as experimental; allows indexeddb to be tested on
wpt.fyi.

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2026-04-15 19:05:45 +00:00
Taym Haddadi
93a57147ce script: generalize worker common code for non-dedicated worker globals (#44244)
Testing: No new tests needed this is a refactor and no behavior changes
for any existing workers.
part of https://github.com/servo/servo/issues/7458

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-15 17:13:22 +00:00
Oriol Brufau
3cd71cf05a layout: Reuse abspos fragments when they didn't change (#44231)
When laying out an absolutely positioned box, if the layout results are
taken from the cache, and the resulting fragment would have the same
size and position, then use the fragment from the previous layout
instead.

Testing: Not needed, there shouldn't be any observable behavior change

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-04-15 16:40:15 +00:00
Martin Robinson
d22435c6f6 wpt: Rename Servo-specific WPT-style tests to match WPT conventions (#44232)
This is a very minor, but annoying bit of technical debt that we have
carried for over a decade. Many of the Servo-specific WPT-style tests
had names that didn't match the naming convention used in WPT. In some
cases tests and references were named `test_a.html` for the test and
`test_b.html` for the reference. To make things more confusing,
sometimes two tests in a series were named `test_a.html`, `test_b.html`
and `test_ref.html` for the reference.

This change makes it so that tests are named consistenty and with
hyphens which are more common in WPT:

 - `test-001.html`
 - `test-002.html`
 - `test-ref.html`

Testing: This shouldn't change results, as this just renames the test
files.
Fixes #2463.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-15 16:15:28 +00:00
eri
d37e6f1bb5 devtools: Implement function preview in console (#44233)
Testing: Added new tests for console array and function previews
Part of: https://github.com/servo/servo/issues/39858
Depends on: #44196

<img width="934" height="388" alt="image"
src="https://github.com/user-attachments/assets/8589ef9c-7a58-47dd-83dd-4f66607125fe"
/>

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-15 15:11:16 +00:00
Narfinger
4fafdd1c23 script: JSContextify parts of DocumentEventHandler (#44241)
This "JSContextify"s part of DocumentEventHandler, namely the actions
from `handle_pending_input_events`.
Additionally, we also switch the MouseEvent and KeyboardEvent. This does
not change yet PointerEvent and some other events used to keep the diff
reasonable.

Testing: This is part of the JSContextify work that is fundamental and
tested by WPT.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-15 13:59:07 +00:00
Martin Robinson
d4729c05b2 wpt: Remove the /_mozilla/mozilla/sslfail.html (#44238)
This tests a feature (`about:sslfail`) that was removed in #14360 and
has been flaky for years. At this point, the test has been flaking for a
decade longer after the original feature existed! We can just go ahead
and remove it I think.

Testing: This change just removes a test, so doesn't need new tests.
Fixes: #10760

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-15 13:57:51 +00:00
Tim van der Lippe
a8e8f2ae89 script: Fix command state for underline command (#44234)
For any generic command, the spec doesn't specify how to determine
whether its state is set. In the case of underline, it at least means
that it has an effective command value that is set (to underline in this
case).

Also implements "simple modifiable" elements, since the relevant tests
depend on that for correctness.

Lastly, also rewrite `JSContext` to use imports.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-15 13:56:50 +00:00
Martin Robinson
12bac57c3e wpt: Remove empty test ini for /_mozilla/mozilla/localeCompare.html (#44240)
Judging by the expected result in the test, the situation described in
the bug is no longer the case.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Testing: This updates test results.
Closes: #25802.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-15 13:37:40 +00:00
Martin Robinson
0353e0fd2e wpt: Convert several old Servo-specific crash tests into WPT crashtests (#44237)
This change converts a collection of old Servo-specific crash tests into
WPT style crash tests, which are supported directly by the WPT test
harness. The main change here is the addition of `-crash.html` to the
end
of the test name (this is how the harness detects crash tests) and the
removal of `testharness.js` from the tests. This is a preparation for
#44232.

Testing: This change just changes the tests, so should be tested by the
test run.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-15 12:42:29 +00:00
atbrakhi
77458b2312 devtools: implement ArrayPreview in console (#44196)
Show preview of `ArrayItems` in console

Testing: Current tests are passing
Fixes: Part of #39858 
<img width="941" height="795" alt="image"
src="https://github.com/user-attachments/assets/e121265c-3987-4e37-a97d-b7cef0e05f4b"
/>

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-15 10:06:10 +00:00
rovertrack
134beac3f0 Match on NonNull::new instead of using is_null() and expect() (#44221)
The code was doing repetitive work by checking if `compiled_script` is
null and then assigning and expecting the same, combined and replaced
with condition based working
Testing: The flow remains the same no new tests needed
Fixes: #44210

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-15 09:32:33 +00:00
Alice
31be152bfa layout: Send accessibility updates directly to embedder from layout. (#44208)
This introduces a `ScriptToEmbedderChan` property on `LayoutThread`,
which is used to send accessibility updates directly to the embedder.

Follow-up to https://github.com/servo/servo/pull/42338.

Testing: Covered by existing tests.

Signed-off-by: Alice Boxhall <alice@igalia.com>
2026-04-15 09:14:40 +00:00
Euclid Ye
0f935df0c8 embedding: Use non-advertised (standard) shortcut (#44223)
Right now we are using [advertised
shortcut](https://learn.microsoft.com/en-au/windows/win32/msi/advertisement).
This is drastically different from standard Windows shortcut. For
example, when you right click,
then click "open file position", nothing happens. 

Advertisement is mostly for "install-on-demand", but that is not the
case for our installer, as files already
installed in the path even if you do not launch. This change makes it so
that servoshell works as other apps.

Reference: [Advanced
installer](https://www.advancedinstaller.com/versus/wix-toolset/how-to-create-non-advertised-shortcuts-using-wix.html).
(Yes, they make great business by making it easier to build MSI
installer)


Testing: [Windows
Try](https://github.com/servo/servo/actions/runs/24436253745).

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-15 08:27:18 +00:00
Euclid Ye
1099aceb39 deps: Unblock CI by upgrading rustls-webpki to 0.103.12 (#44229)
[rustls-webpki](https://rustsec.org/packages/rustls-webpki.html) has
[vulnerability
report](https://rustsec.org/advisories/RUSTSEC-2026-0098.html). This is
fixed in newer 0.103.12.

Testing: Cargo deny will now pass causing the CI to pass.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-15 08:25:55 +00:00
Taym Haddadi
90c8bc3163 Indexeddb: fix upgrade transaction completion ordering (#44215)
Fixes: #44200

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-15 05:29:16 +00:00
Abbas Olanrewaju Sarafa
316e6215a4 API: document which Preferences are experimental or enabled by default (#44171)
Referred users to
```https://book.servo.org/design-documentation/experimental-features.html```
documentation for ```Preferences``` and ```EXPERIMENTAL_PREFS```

Testing: No testing required, build was successful.
Fixes: #43706

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: Abbas Olanrewaju Sarafa <109840351+sabbCodes@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2026-04-15 04:25:25 +00:00
niya
0260fe8869 webgl: replace WebGLCommandSender with WebGLChan (#44214)
Remove the `WebGLCommandSender` wrapper and return `Option<WebGLChan>`
directly from the `webgl_chan` method.

Testing: no tests required as runtime behavior is not affected 
Fixes: #44193

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-15 03:41:06 +00:00
Kelechi Ebiri
a2213091c4 script: Implement wake lock api (#43617)
Implement the WakeLock API

Fixes: #41493

---------

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-15 03:39:07 +00:00
dependabot[bot]
54f466fdcb build: bump indexmap from 2.11.4 to 2.14.0 (#44220)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.11.4 to
2.14.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md">indexmap's
changelog</a>.</em></p>
<blockquote>
<h2>2.14.0 (2026-04-09)</h2>
<ul>
<li><strong>MSRV</strong>: Rust 1.85.0 or later is now required.</li>
<li>Updated the <code>hashbrown</code> dependency to 0.17.</li>
<li>Made more <code>map::Slice</code> methods <code>const</code>:
<code>new_mut</code>, <code>first_mut</code>, <code>last_mut</code>,
<code>split_at_mut</code>, <code>split_at_mut_checked</code>,
<code>split_first_mut</code>, <code>split_last_mut</code></li>
</ul>
<h2>2.13.1 (2026-04-02)</h2>
<ul>
<li>Made some <code>Slice</code> methods <code>const</code>:
<ul>

<li><code>map::Slice::{first,last,split_at,split_at_checked,split_first,split_last}</code></li>

<li><code>set::Slice::{first,last,split_at,split_at_checked,split_first,split_last}</code></li>
</ul>
</li>
</ul>
<h2>2.13.0 (2026-01-07)</h2>
<ul>
<li>Implemented <code>Clone</code> for <code>IntoKeys</code> and
<code>IntoValues</code>.</li>
<li>Added <code>map::Slice::split_at_checked</code> and
<code>split_at_mut_checked</code>.</li>
<li>Added <code>set::Slice::split_at_checked</code>.</li>
</ul>
<h2>2.12.1 (2025-11-20)</h2>
<ul>
<li>Simplified a lot of internals using <code>hashbrown</code>'s new
bucket API.</li>
</ul>
<h2>2.12.0 (2025-10-17)</h2>
<ul>
<li><strong>MSRV</strong>: Rust 1.82.0 or later is now required.</li>
<li>Updated the <code>hashbrown</code> dependency to 0.16 alone.</li>
<li>Error types now implement <code>core::error::Error</code>.</li>
<li>Added <code>pop_if</code> methods to <code>IndexMap</code> and
<code>IndexSet</code>, similar to the
method for <code>Vec</code> added in Rust 1.86.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bcd165baeb"><code>bcd165b</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/439">#439</a>
from cuviper/release-2.14.0</li>
<li><a
href="4ef06a729e"><code>4ef06a7</code></a>
Release 2.14.0</li>
<li><a
href="d21826ca93"><code>d21826c</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/438">#438</a>
from cuviper/hashbrown-0.17</li>
<li><a
href="2566bec20d"><code>2566bec</code></a>
Upgrade to <code>hashbrown v0.17</code></li>
<li><a
href="4b62776c3f"><code>4b62776</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/437">#437</a>
from cuviper/disjoint-panic</li>
<li><a
href="478fba2eb0"><code>478fba2</code></a>
Normalize the panic doc of <code>get_disjoint_mut</code></li>
<li><a
href="fb6dafda4e"><code>fb6dafd</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/436">#436</a>
from cuviper/const-slice-mut</li>
<li><a
href="5c237a2ab7"><code>5c237a2</code></a>
Make <code>Slice::{first,last,split_*}_mut</code> methods
<code>const</code></li>
<li><a
href="48ff9ce2e3"><code>48ff9ce</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/435">#435</a>
from cuviper/edition-2024</li>
<li><a
href="648be98a31"><code>648be98</code></a>
<code>cargo fmt</code> with edition 2024</li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.11.4...2.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indexmap&package-manager=cargo&previous-version=2.11.4&new-version=2.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 00:56:19 +00:00
dependabot[bot]
da6aaf7eb9 build: bump thin-vec from 0.2.15 to 0.2.16 (#44219)
Bumps [thin-vec](https://github.com/mozilla/thin-vec) from 0.2.15 to
0.2.16.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/thin-vec/blob/main/RELEASES.md">thin-vec's
changelog</a>.</em></p>
<blockquote>
<h1>Version 0.2.16 (2026-04-14)</h1>
<ul>
<li>Fix reserve() on auto arrays in gecko-ffi mode.</li>
<li>Fix two double-drop issues with ThinVec::clear() and
ThinVec::into_iter()
when the Drop implementation of the item panics.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3c96f1e335"><code>3c96f1e</code></a>
chore: Bump version to v0.2.16</li>
<li><a
href="df64748355"><code>df64748</code></a>
Fix two panic=unwind issues.</li>
<li><a
href="4e3a217b7f"><code>4e3a217</code></a>
ci: Ignore msrv job for now since it just hangs trying to pull
deps.</li>
<li><a
href="63c2f5fcf2"><code>63c2f5f</code></a>
gecko-ffi: Fix auto-t-array push.</li>
<li><a
href="6797813209"><code>6797813</code></a>
tests: Appease clippy.</li>
<li><a
href="af81b17ad5"><code>af81b17</code></a>
ci: Don't use actions-rs/{cargo,clippy-check} as it's not allowed in
mozilla/...</li>
<li><a
href="360f9ef0c9"><code>360f9ef</code></a>
Update repository URL and various cleanups</li>
<li>See full diff in <a
href="https://github.com/mozilla/thin-vec/compare/v0.2.15...v0.2.16">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=thin-vec&package-manager=cargo&previous-version=0.2.15&new-version=0.2.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 00:30:35 +00:00
dependabot[bot]
0fc59f67ed build: bump rayon from 1.11.0 to 1.12.0 (#44218)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.11.0 to 1.12.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rayon-rs/rayon/blob/main/RELEASES.md">rayon's
changelog</a>.</em></p>
<blockquote>
<h1>Release rayon 1.12.0 (2026-04-13)</h1>
<ul>
<li>Fixed a bug in parallel <code>Range&lt;char&gt;</code> when the end
is 0xE000, just past the
surrogate boundary, which was unsafely producing invalid
<code>char</code> values.</li>
<li>The new method <code>ParallelSlice::par_array_windows</code> works
like <code>par_windows</code>
but with a constant length, producing <code>&amp;[T; N]</code>
items.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7449d7dfed"><code>7449d7d</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/1093">#1093</a></li>
<li><a
href="b3d9e3f473"><code>b3d9e3f</code></a>
Release rayon 1.8.0 and rayon-core 1.12.0</li>
<li><a
href="3fe51e5cbd"><code>3fe51e5</code></a>
Fix clippy::let_and_return</li>
<li><a
href="082f2152d2"><code>082f215</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/1087">#1087</a></li>
<li><a
href="ea0c06df26"><code>ea0c06d</code></a>
core: registry: Factor out &quot;wait till out of work&quot; part of the
main loop.</li>
<li><a
href="75524e2957"><code>75524e2</code></a>
Merge <a
href="https://redirect.github.com/rayon-rs/rayon/issues/1063">#1063</a></li>
<li><a
href="01d2800376"><code>01d2800</code></a>
Ignore the multi-threaded test on emscripten/wasm</li>
<li><a
href="40b59c0e44"><code>40b59c0</code></a>
core: Make use_current_thread error rather than panic when already in
the pool.</li>
<li><a
href="f4db4d711e"><code>f4db4d7</code></a>
core: tests: Add some basic tests for
ThreadPoolBuilder::use_current_thread.</li>
<li><a
href="87274ad093"><code>87274ad</code></a>
core: registry: Add some more documentation for
ThreadPoolBuilder::use_curren...</li>
<li>Additional commits viewable in <a
href="https://github.com/rayon-rs/rayon/compare/rayon-core-v1.11.0...rayon-core-v1.12.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rayon&package-manager=cargo&previous-version=1.11.0&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 00:28:27 +00:00
dependabot[bot]
a2fa5a8ab8 build: bump tokio from 1.51.1 to 1.52.0 in the tokio-rs-related group (#44217)
Bumps the tokio-rs-related group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.51.1 to 1.52.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.52.0</h2>
<h1>1.52.0 (April 14th, 2026)</h1>
<h2>Added</h2>
<ul>
<li>io: <code>AioSource::register_borrowed</code> for I/O safety support
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7992">#7992</a>)</li>
<li>net: add <code>try_io</code> function to <code>unix::pipe</code>
sender and receiver types (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8030">#8030</a>)</li>
</ul>
<h2>Added (unstable)</h2>
<ul>
<li>runtime: <code>Builder::enable_eager_driver_handoff</code> setting
enable eager hand off of the I/O and time drivers before polling tasks
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8010">#8010</a>)</li>
<li>taskdump: add <code>trace_with()</code> for customized task dumps
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8025">#8025</a>)</li>
<li>taskdump: allow <code>impl FnMut()</code> in <code>trace_with</code>
instead of just <code>fn()</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8040">#8040</a>)</li>
<li>fs: support <code>io_uring</code> in <code>AsyncRead</code> for
<code>File</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7907">#7907</a>)</li>
</ul>
<h2>Changed</h2>
<ul>
<li>runtime: improve <code>spawn_blocking</code> scalability with
sharded queue (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7757">#7757</a>)</li>
<li>runtime: use <code>compare_exchange_weak()</code> in worker queue
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8028">#8028</a>)</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>runtime: overflow second half of tasks when local queue is filled
instead of first half (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8029">#8029</a>)</li>
</ul>
<h2>Documented</h2>
<ul>
<li>docs: fix typo in <code>oneshot::Sender::send</code> docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8026">#8026</a>)</li>
<li>docs: hide #[tokio::main] attribute in the docs of
<code>sync::watch</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8035">#8035</a>)</li>
<li>net: add docs on <code>ConnectionRefused</code> errors with UDP
sockets (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7870">#7870</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7757">#7757</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7757">tokio-rs/tokio#7757</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7870">#7870</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7870">tokio-rs/tokio#7870</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7907">#7907</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7907">tokio-rs/tokio#7907</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7992">#7992</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7992">tokio-rs/tokio#7992</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8010">#8010</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8010">tokio-rs/tokio#8010</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8025">#8025</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8025">tokio-rs/tokio#8025</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8026">#8026</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8026">tokio-rs/tokio#8026</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8028">#8028</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8028">tokio-rs/tokio#8028</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8029">#8029</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8029">tokio-rs/tokio#8029</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8030">#8030</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8030">tokio-rs/tokio#8030</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8035">#8035</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8035">tokio-rs/tokio#8035</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8040">#8040</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8040">tokio-rs/tokio#8040</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5f7be0ac42"><code>5f7be0a</code></a>
chore: perpare 1.52.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8045">#8045</a>)</li>
<li><a
href="36d12d2686"><code>36d12d2</code></a>
taskdump: allow impl FnMut() in taskdumps instead of just fn() (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8040">#8040</a>)</li>
<li><a
href="f943312865"><code>f943312</code></a>
fs: support io-uring in <code>AsyncRead</code> for <code>File</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7907">#7907</a>)</li>
<li><a
href="5db10f538b"><code>5db10f5</code></a>
net: add 'try_io' function to 'unix::pipe' sender and receiver types (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8030">#8030</a>)</li>
<li><a
href="bbdba7101d"><code>bbdba71</code></a>
taskdump: add <code>trace_with</code> for customized task dumps (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8025">#8025</a>)</li>
<li><a
href="7cfce54386"><code>7cfce54</code></a>
ci: update FreeBSD image to 14.4 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8038">#8038</a>)</li>
<li><a
href="81370e6202"><code>81370e6</code></a>
net: add docs on <code>ConnectionRefused</code> errors with udp sockets
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7870">#7870</a>)</li>
<li><a
href="203af02126"><code>203af02</code></a>
runtime: overflow second half of tasks when local queue is filled
instead of ...</li>
<li><a
href="de230926dc"><code>de23092</code></a>
net: temporarily disable <code>tcp_stream</code>
<code>try_read_buf</code> test on WASI (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8036">#8036</a>)</li>
<li><a
href="432ec3f2b2"><code>432ec3f</code></a>
sync: hide <code>#[tokio::main]</code> attribute in the docs of
<code>sync::watch</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8035">#8035</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.51.1...tokio-1.52.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.51.1&new-version=1.52.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 00:21:52 +00:00
niya
8bdfb998b0 canvas: fix unrecognized offscreen webgl context (#44159)
fix unrecognized type error on `OffscreenCanvas`

Testing: existing WPT:
- `tests/wpt/webgl/tests/conformance/offscreencanvas`
- `tests/wpt/webgl/tests/conformance2/offscreencanvas`

Fixes: #43540

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-14 23:58:39 +00:00
Alice
d11fc3a1c6 layout: Add a basic accessibility tree implementation for web contents (#42338)
This change introduces the `accessibility_tree` module, containing code
to build an in-memory representation of a very basic accessibility tree
for web contents. Currently, the tree for a given document contains:
- a `RootWebArea` which has the document root node as its sole child,
- an `Unknown` node for the root DOM node,
- a `GenericContainer` node for each DOM element, and
- a `TextRun` node for each text node.

This allows us to make basic assertions about the tree contents in the
`accessibility` test by doing a tree walk to find text nodes and
checking their contents.

Right now, the tree is rebuilt from scratch when accessibility is
enabled and when a navigation occurs (via
`Constellation::set_frame_tree_for_webview()` sending
`ScriptThreadMessage::SetAccessibilityActive`); it's not responsive to
changes in the page.

This change also changes the way we handle updating the graft node
between the webview's accessibility tree and its top level pipeline's
accessibility tree.

Previously, `Constellation::set_frame_tree_for_webview()` would send a
`ConstellationToEmbedderMsg::DocumentAccessibilityTreeIdChange` method
informing the webview of the accesskit TreeId of the top-level pipeline.
However, this resulted in flaky timing as we couldn't depend on that
message being handled before the message containing the TreeUpdate from
the WebContents, which would lead to a panic as the new TreeId wasn't
grafted into the combined tree yet.

This change introduces an epoch value which flows from the
ConstellationWebview, where it's updated every time the
`active_top_level_pipeline_id` changes, to the layout accessibility
tree, and finally to the webview with each TreeUpdate. Whenever a
TreeUpdate arrives at the webview which has a newer epoch than the last
known epoch, the webview-to-contents graft node is updated before the
TreeUpdate is forwarded. If a TreeUpdate arrives at the webview with an
epoch _older_ than the last known epoch, it's dropped, as it must be for
a no-longer-active pipeline.

Fixes: Part of #4344

---------

Signed-off-by: delan azabani <dazabani@igalia.com>
Signed-off-by: Alice Boxhall <alice@igalia.com>
Co-authored-by: delan azabani <dazabani@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
2026-04-14 13:36:57 +00:00
Simon Wülker
2930beb4d1 script: Don't traverse O(the whole DOM tree) nodes when inserting elements into Vec in tree order (#44120)
Previously the code was computing a prefix sum over the number of
preceding elements in tree order to get the index that the node should
be inserted in.

That's not great if the DOM tree is big. Instead, we can compare two
nodes individually by looking at their ancestor chain and then find the
correct position with binary search.

On https://262.ecma-international.org/16.0/index.html, this reduces the
time it takes for content to appear from around 33s to 16s.

Part of https://github.com/servo/servo/issues/44113

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-14 13:16:55 +00:00
Mukilan Thiyagarajan
38e3397237 servoshell: Fix incorrect calculation of WebView dimension. (#44205)
The upgrade to egui 0.34.0 in #44053 replaced the usage of the
deprecated `Ui::available_rect` method with `Ui::content_rect` as
suggested in the deprecation notice in egui. However, `content_rect` is
not equivalent to `available_rect` and doesn't seem to account for the
area occupied by the egui panels.

Since `content_rect` returns the window's inner dimensions, we don't ask
the webview to resize itself to the correct dimension that excludes the
toolbar (tabs and url). We also pass the correct dimension to egui's
paint callback, which meant that the WebView appeared vertically
squashed.

Fix this by using `available_rect_before_wrap` method instead of
`content_rect`. This seems to return the correct area that we need for
the WebView's dimenstion. The code in egui also seems closer to what we
want as it relies on a cursor that is advanced after each widget is
added. However, I'm not sure in which scenario the wrapping matters as
there is no documentation for this method.

Testing: Tested manually as we don't have automated tests for the shell.
Fixes: #44136

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2026-04-14 12:49:48 +00:00
Nico Burns
b89cbf1201 deps: Upgrade Taffy to v0.10.1 (#44203)
Fixes CSS Grid auto-repeat track count resolution in CSS Grid. This
caused an integer underflow in some cases and in others simply computed
the incorrect number of tracks.

Hopefully fixes: #44201

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-04-14 11:49:32 +00:00
Martin Robinson
5d28862c7b script: Expose a LayoutNode::is_root_of_user_agent_widget method (#44197)
The main goal here is to have layout not depend on `ServoLayoutElement`
directly and instead use the layout DOM interface exposed by
`layout-api`. 

This change allows layout to determine if replaced content
is the root of a user agent widget without having to access
`ServoDangerousStyleShadowRoot` which isn't really safe to use in layout
code. `LayoutElement::shadow_root()` is now no longer exposed to layout.

Testing: This should not change behavior, so should be covered by
existing test.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-14 10:35:00 +00:00
Shubham Gupta
4ff29fecc8 script : Return PerformanceMark object from the Performance.mark() (#44199)
This returns the `PerformanceMark` object from Performance.mark()

Testing: More WPT tests passed

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-14 09:47:05 +00:00
Martin Robinson
e0fd559105 script: Simplify the way that layout flushes shadow root stylesheets (#44165)
This change is a minor cleanup of the way that layout flushes the
stylesheets of shadow roots. This avoids exposing so many public methods
in our and gradually to stop using Stylo's `TShadowRoot` in layout
entirely.

Testing: This should not change behavior, so should be covered by
existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-14 09:15:05 +00:00
Martin Garton
d0c2e0fa48 Expand fmt and tidy TOML_GLOBS range (#44180)
Add a check for formatting of the `Cargo.toml` files to CI, and run
`taplo format` to fix existing formatting issues.

---------

Signed-off-by: Martin Garton <garton@gmail.com>
2026-04-14 09:14:29 +00:00
Tim van der Lippe
143d7fe25e script: Add initial implementation of underline command (#44194)
This puts in most of the required machinery for underline. There are
still remaining test failures, but tackling these in separate PR's to
keep things manageable.

Part of #25005

Testing: WPT

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-04-14 08:03:18 +00:00
batu_hoang
4ecf8be867 net: Remove duplicate CoreResourceMsg::GetCookiesDataForUrl (#44167)
In https://github.com/servo/servo/pull/43600, we introduce the new
`CoreResourceMsg::GetCookiesForUrl`.
However after some updates, it is exactly the same with an existing one
`CoreResourceMsg::GetCookiesDataForUrl` which is used by `webdriver`.
This PR removes the duplication.

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2026-04-14 06:14:46 +00:00
dependabot[bot]
2a1290a591 build: bump rustls from 0.23.37 to 0.23.38 (#44187)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.37 to
0.23.38.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6b116bc5e8"><code>6b116bc</code></a>
Bump version of rustls</li>
<li><a
href="a1da268c89"><code>a1da268</code></a>
client: allow skipping selected ALPN validation</li>
<li><a
href="5b3ef11c60"><code>5b3ef11</code></a>
Fix ambiguous panic! warning</li>
<li><a
href="0f0fbf5a59"><code>0f0fbf5</code></a>
Fix <code>clippy::result_large_err</code></li>
<li><a
href="7e99b52071"><code>7e99b52</code></a>
Update semver-compatible dependencies</li>
<li>See full diff in <a
href="https://github.com/rustls/rustls/compare/v/0.23.37...v/0.23.38">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustls&package-manager=cargo&previous-version=0.23.37&new-version=0.23.38)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 03:29:19 +00:00
dependabot[bot]
460c14bbbe build: bump lru from 0.16.3 to 0.16.4 (#44191)
Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.16.3 to 0.16.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md">lru's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/jeromefroe/lru-rs/tree/0.16.4">v0.16.4</a> -
2026-04-13</h2>
<ul>
<li>Add <code>get_or_insert_with_key</code> and variants.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d8c7f5ca51"><code>d8c7f5c</code></a>
Merge pull request <a
href="https://redirect.github.com/jeromefroe/lru-rs/issues/230">#230</a>
from jeromefroe/jerome/prepare-0-16-4-release</li>
<li><a
href="bd5261b499"><code>bd5261b</code></a>
Prepare 0.16.4 release</li>
<li><a
href="16e161d5ed"><code>16e161d</code></a>
Merge pull request <a
href="https://redirect.github.com/jeromefroe/lru-rs/issues/229">#229</a>
from pikatos/get_or_insert_with_key</li>
<li><a
href="5135e8eb26"><code>5135e8e</code></a>
Apply suggestions from code review</li>
<li><a
href="81c2ef05fd"><code>81c2ef0</code></a>
Add get_or_insert_with_key variants</li>
<li>See full diff in <a
href="https://github.com/jeromefroe/lru-rs/compare/0.16.3...0.16.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lru&package-manager=cargo&previous-version=0.16.3&new-version=0.16.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 00:56:18 +00:00
dependabot[bot]
6c2bc8fd1e build: bump libc from 0.2.184 to 0.2.185 (#44189)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.184 to 0.2.185.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/releases">libc's
releases</a>.</em></p>
<blockquote>
<h2>0.2.185</h2>
<h3>Added</h3>
<ul>
<li>EspIDF: Add <code>espidf_picolibc</code> cfg for picolibc
<code>O_*</code> flag values (<a
href="https://redirect.github.com/rust-lang/libc/pull/5035">#5035</a>)</li>
<li>Hexagon: add missing constants and fix types for linux-musl (<a
href="https://redirect.github.com/rust-lang/libc/pull/5042">#5042</a>)</li>
<li>Redox: Add semaphore functions (<a
href="https://redirect.github.com/rust-lang/libc/pull/5051">#5051</a>)</li>
<li>Windows: Add <code>sprintf</code>, <code>snprintf</code>, and the
<code>scanf</code> family (<a
href="https://redirect.github.com/rust-lang/libc/pull/5024">#5024</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Hexagon: Decouple <code>time64</code> types from musl symbol
redirects (<a
href="https://redirect.github.com/rust-lang/libc/pull/5040">#5040</a>)</li>
<li>Horizon: Change <code>POLL</code> constants from
<code>c_short</code> to <code>c_int</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5045">#5045</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/blob/0.2.185/CHANGELOG.md">libc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/libc/compare/0.2.184...0.2.185">0.2.185</a>
- 2026-04-13</h2>
<h3>Added</h3>
<ul>
<li>EspIDF: Add <code>espidf_picolibc</code> cfg for picolibc
<code>O_*</code> flag values (<a
href="https://redirect.github.com/rust-lang/libc/pull/5035">#5035</a>)</li>
<li>Hexagon: add missing constants and fix types for linux-musl (<a
href="https://redirect.github.com/rust-lang/libc/pull/5042">#5042</a>)</li>
<li>Redox: Add semaphore functions (<a
href="https://redirect.github.com/rust-lang/libc/pull/5051">#5051</a>)</li>
<li>Windows: Add <code>sprintf</code>, <code>snprintf</code>, and the
<code>scanf</code> family (<a
href="https://redirect.github.com/rust-lang/libc/pull/5024">#5024</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Hexagon: Decouple <code>time64</code> types from musl symbol
redirects (<a
href="https://redirect.github.com/rust-lang/libc/pull/5040">#5040</a>)</li>
<li>Horizon: Change <code>POLL</code> constants from
<code>c_short</code> to <code>c_int</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5045">#5045</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="71d5bfcc1b"><code>71d5bfc</code></a>
libc: Release 0.2.185</li>
<li><a
href="1027d1c23b"><code>1027d1c</code></a>
Revert &quot;ci: Pin nightly to 2026-04-01&quot;</li>
<li><a
href="0e9c6e53cc"><code>0e9c6e5</code></a>
redox: Add semaphore functions</li>
<li><a
href="24ef457ddd"><code>24ef457</code></a>
feat: add back support for gnu windows x86 in ci</li>
<li><a
href="aa75caf30c"><code>aa75caf</code></a>
horizon: Change POLL constants from c_short to c_int</li>
<li><a
href="b7eda5a40c"><code>b7eda5a</code></a>
hexagon: add missing constants and fix types for linux-musl</li>
<li><a
href="d4613f96a5"><code>d4613f9</code></a>
newlib/espidf: Add espidf_picolibc cfg for picolibc O_* flag values</li>
<li><a
href="c89fd76cc7"><code>c89fd76</code></a>
Fix typo in Padding comments</li>
<li><a
href="b3264b292a"><code>b3264b2</code></a>
hexagon: decouple time64 types from musl symbol redirects</li>
<li><a
href="db1ebee456"><code>db1ebee</code></a>
ci: Pin nightly to 2026-04-01</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/libc/compare/0.2.184...0.2.185">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libc&package-manager=cargo&previous-version=0.2.184&new-version=0.2.185)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 00:54:18 +00:00
dependabot[bot]
b4a7caea01 build: bump cc from 1.2.59 to 1.2.60 (#44188)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.59 to 1.2.60.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.2.60</h2>
<h3>Fixed</h3>
<ul>
<li><em>(ar)</em> suppress warnings from <code>D</code> modifier probe
(<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1700">#1700</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.59...cc-v1.2.60">1.2.60</a>
- 2026-04-10</h2>
<h3>Fixed</h3>
<ul>
<li><em>(ar)</em> suppress warnings from <code>D</code> modifier probe
(<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1700">#1700</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7cad9f5b10"><code>7cad9f5</code></a>
chore(cc): release v1.2.60 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1701">#1701</a>)</li>
<li><a
href="c15c3eb9f1"><code>c15c3eb</code></a>
fix(ar): suppress warnings from <code>D</code> modifier probe (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1700">#1700</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.59...cc-v1.2.60">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cc&package-manager=cargo&previous-version=1.2.59&new-version=1.2.60)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 00:40:35 +00:00
dependabot[bot]
c041d57989 build: bump pillow from 12.1.1 to 12.2.0 in /etc/ci/scenario (#44186)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.1.1 to
12.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/python-pillow/Pillow/releases">pillow's
releases</a>.</em></p>
<blockquote>
<h2>12.2.0</h2>
<p><a
href="https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html">https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html</a></p>
<h2>Documentation</h2>
<ul>
<li>Update 12.2.0 release notes <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9522">#9522</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Add loader plugins: AMOS abk, Atari Degas, 40+ more obscure formats
via Netpbm <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9482">#9482</a>
[<a href="https://github.com/bitplane"><code>@​bitplane</code></a>]</li>
<li>Update Python versions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9515">#9515</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Jeffrey A. Clark -&gt; Jeffrey 'Alex' Clark <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9513">#9513</a>
[<a
href="https://github.com/aclark4life"><code>@​aclark4life</code></a>]</li>
<li>Add release notes for <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9394">#9394</a>,
<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9419">#9419</a>
and <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9456">#9456</a>
<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9467">#9467</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Add Amiga Workbench .info loader to 3rd party plugins list <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9459">#9459</a>
[<a href="https://github.com/bitplane"><code>@​bitplane</code></a>]</li>
<li>Merge PFM documentation into PPM <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9434">#9434</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update macOS tested Pillow versions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9431">#9431</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Fix CVE number <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9430">#9430</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
</ul>
<h2>Dependencies</h2>
<ul>
<li>Update xz to 5.8.3 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9523">#9523</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update libjpeg-turbo to 3.1.4.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9507">#9507</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update libpng to 1.6.56 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9499">#9499</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update freetype to 2.14.3 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9485">#9485</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated libavif to 1.4.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9479">#9479</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated harfbuzz to 13.2.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9461">#9461</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update Ghostscript to 10.7.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9469">#9469</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update harfbuzz to 13.0.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9453">#9453</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update libavif to 1.4.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9460">#9460</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update freetype to 2.14.2 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9449">#9449</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update actions/download-artifact action to v8 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9451">#9451</a>
[@<a href="https://github.com/apps/renovate">renovate[bot]</a>]</li>
<li>Updated libpng to 1.6.55 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9425">#9425</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
</ul>
<h2>Testing</h2>
<ul>
<li>Cleanup .spider extension in the same test where it is added <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9517">#9517</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Run tests in parallel via tox for 3.5x speedup <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9516">#9516</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Enable colour in CI logs <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9486">#9486</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Update Ghostscript to 10.7.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9469">#9469</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Simplify TGA test code <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9477">#9477</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update tests to check for ValueError when encoding an empty image <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9464">#9464</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Upgrade CI from <code>macos-15-intel</code> to
<code>macos-26-intel</code> <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9454">#9454</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Add check-case-conflict hook <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9446">#9446</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Specify platform when pulling docker image <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9440">#9440</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>GHA: Cache libavif and webp builds for Ubuntu <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9437">#9437</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Update macOS tested Pillow versions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9431">#9431</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
</ul>
<h2>Other changes</h2>
<ul>
<li>Check calloc return value <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9527">#9527</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Check all allocs in the Arrow tree <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9488">#9488</a>
[<a
href="https://github.com/wiredfool"><code>@​wiredfool</code></a>]</li>
<li>Reject non-numeric elements inside list coords <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9526">#9526</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Move variable declaration inside define <a
href="https://redirect.github.com/python-pillow/Pillow/issues/9525">#9525</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3c41c09506"><code>3c41c09</code></a>
12.2.0 version bump</li>
<li><a
href="cdaa29eb52"><code>cdaa29e</code></a>
Check calloc return value (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9527">#9527</a>)</li>
<li><a
href="585b2f5a78"><code>585b2f5</code></a>
Check calloc return value</li>
<li><a
href="ecf011ea15"><code>ecf011e</code></a>
Check all allocs in the Arrow tree (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9488">#9488</a>)</li>
<li><a
href="cf6de8ca9b"><code>cf6de8c</code></a>
Reject non-numeric elements inside list coords (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9526">#9526</a>)</li>
<li><a
href="ffdcede651"><code>ffdcede</code></a>
Update 12.2.0 release notes (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9522">#9522</a>)</li>
<li><a
href="7929d7760f"><code>7929d77</code></a>
Added security release notes (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/149">#149</a>)</li>
<li><a
href="c4f7aa5dfb"><code>c4f7aa5</code></a>
Added security release notes</li>
<li><a
href="22cdb5f2e4"><code>22cdb5f</code></a>
Move variable declaration inside define (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9525">#9525</a>)</li>
<li><a
href="fc15b3b018"><code>fc15b3b</code></a>
Resize tall images vertically first (<a
href="https://redirect.github.com/python-pillow/Pillow/issues/9524">#9524</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/python-pillow/Pillow/compare/12.1.1...12.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pillow&package-manager=uv&previous-version=12.1.1&new-version=12.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 23:48:56 +00:00
Taym Haddadi
5d3ef741b3 Indexeddb: fix IDBKeyRange lowerBound/upperBound open flags (#44183)
Testing: covered by idbkeyrange.any.html test
part of https://github.com/servo/servo/issues/40983

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-13 22:08:05 +00:00
elomscansio
97901de941 script: Pass down &mut JSContext/CurrentRealm to AudioContext methods (#44175)
Refactor AudioContext methods to use &mut JSContext 

Testing:  Just refactor.
Fixes: Part of #42638

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-13 19:50:18 +00:00
atbrakhi
7b2c95030c devtools: implement objectPreview in console (#44181)
Show `objectPreview` in console. This preview is limited to 10. And only
when we expand, we see all items.

Testing: manual testing
Fixes: Part of #39858 

<img width="1008" height="607" alt="image"
src="https://github.com/user-attachments/assets/79fd6c18-f3a7-4f5e-8c21-61634153c362"
/>

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-13 18:48:11 +00:00
Taym Haddadi
a7ef47a46e Indexeddb: Cache IDBCursor.key conversion to preserve object identity (#44161)
Testing: Covered by idbcursor-key.any.html test.
part of https://github.com/servo/servo/issues/40983

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-13 18:14:26 +00:00
atbrakhi
8918b6f53a devtools: Do not use MAX_ITEMS in object preview (#44173)
Do not use `OBJECT_PREVIEW_MAX_ITEMS` in object preview(same as array).
With this it matches the Firefox behavior and shows the complete object.

Testing: Current tests are passing.
Fixes: part of #36027 
<img width="1174" height="1056" alt="image"
src="https://github.com/user-attachments/assets/3b1a738d-4fbe-4aee-a918-88a699d6be14"
/>

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-04-13 17:36:24 +00:00
atbrakhi
fce9b10bf7 devtools: Implement showing ArrayItems in preview (#44172)
implement showing `ArrayItems` in preview

Testing: Current tests are passing.
Fixes: Part of #36027 

<img width="1146" height="913" alt="image"
src="https://github.com/user-attachments/assets/af5b009c-5983-4949-a30b-39ea32b24d20"
/>

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-04-13 16:05:05 +00:00
Jonathan Schwender
69dbc16014 devcontainer: Build multi-arch image (#44162)
Also build an arm64 version of the devcontainer and combine both into a
multi platform image.
This also fixes the upload step, which was broken on main by
b5d454eca0.
We also allow triggering the publish job on forks via manual workflow
trigger, which allows more convenient testing.
[Manually triggered
workflow](https://github.com/servo/servo/actions/runs/24336772082)

Testing: This is a CI change.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-13 13:00:39 +00:00
eri
38f77f4bfb devtools: Move debugger_value_to_json to lib.rs (#44160)
Testing: Existing tests pass
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-13 11:19:19 +00:00
eri
d58f2d4dd5 devtools: Create UUID for objects created by console logging (#44164)
Testing: Existing tests pass
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-13 10:07:10 +00:00
niya
6cd95eaa51 mach: respect --yes when installing GStreamer on Macos (#44091)
When `mach bootstrap` is run without `--yes` or `--force` on macos:
Add warning that `mach bootstrap` command is being run without elevated
permissions.
Stop execution and ask user to run the command with `--yes` or install
GStreamer manually.

Testing:  mach does not have testing
Fixes: #44021

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-13 09:03:21 +00:00
Abubakar Abdulazeez Usman
65c0ed97a8 script: Avoid forwarding body event handlers without a browsing context (#44046)
When mutating window-reflecting event handler attributes on <body>,
HTMLBodyElement::attribute_mutated forwarded handlers to owner_window()
even for documents without a browsing context.
    
This caused handlers such as onload to be attached to the wrong window
in cases involving createHTMLDocument() and node cloning.
    
Only forward these handlers when the owner document has a browsing
context. This matches the has_browsing_context() check used by
window_event_handlers!(ForwardToWindow) and the spec algorithm.
    
The Range WPT expectations added for this issue are removed, as those
tests now pass. The onerroreventhandler.html test is marked as TIMEOUT
as its failure is a separate issue tracked in #44157 .



Testing: 
- ./mach fmt
- ./mach test-tidy
- ./mach test-wpt -r dom/ranges
- ./mach test-wpt -r
html/webappapis/scripting/events/onerroreventhandler.html
- ./mach try linux-wpt ( Try run
[#24328414549](https://github.com/arabson99/servo/actions/runs/24328414549))

Reproduced locally with the parent.html/child.html testcase from #36561.
Before this change, Servo logged "foo is not defined".
After this change, the error no longer appears.

Fixes: #36561

Signed-off-by: arabson99 <arabiusman99@gmail.com>
2026-04-13 06:20:43 +00:00
Jonathan Schwender
b5d454eca0 devcontainer: Verify build on PRs. (#44111)
This allows us to verify that the devcontainer builds, when a PR changes
any of the affected files.


Testing: This is a CI change

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
2026-04-13 05:59:29 +00:00
Simon Martin
625b53adb6 webgl: fix incorrect specification links (#44156)
I noticed that those links' fragments are all "off-by-one". This is due
to https://github.com/KhronosGroup/WebGL/pull/3762, that added a section
at the top of the specification. This patch fixes those links.

Testing: This is a comment-only change, so not covered by any automated
test. I manually navigated to a random subset of those links and checked
they do take to the correct section.

Signed-off-by: Simon Martin <simon@nasilyan.com>
2026-04-13 05:41:51 +00:00
Daniel Adams
ae0a9d33a1 webxr: Account for mock device VR/AR blend modes (#44155)
Previously the headless/mock device was just defaulting to opaque for
its environmentBlendMode,, but this value is actually not allowed for
immersive-ar sessions. This adds an override for
environment_blend_mode() on the headless DeviceAPI to return alpha blend
for immersive-ar sessions and opaque otherwise.

Testing: Fixes WPT test
`webxr/ar-module/xrSession_environmentBlendMode.https.html.ini`

Signed-off-by: Daniel Adams <msub2official@gmail.com>
2026-04-13 05:13:26 +00:00
Babalola Taiwo J
b7dcfdcf1c script: Remove unused has_sent_idle_message field from Window (#44154)
\`has_sent_idle_message\` was declared and initialized in \`Window\` but
never read anywhere. Removed the field and its initialization.

Fixes #44151

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-13 04:09:49 +00:00
CynthiaOketch
2124599d6b servoshell (Linux): Add CJK fonts for egui (#44138)
Configured fonts for Linux referring to the same pattern used for
Windows in #44055.
CJK font files are loaded from standard system font paths, trying
Noto Sans CJK (Ubuntu/Debian and Fedora/Arch paths) with WenQuanYi
Micro Hei as a fallback. Fonts that are not present on the system
are silently skipped.
Testing: Loaded `cjk_test.html` with the following content in servoshell
on Linux:
  ```html                                 
<!DOCTYPE html>
  <html>                                  
  <head>
  <title>ご利用ガイド - 경애하는</title>
  </head>                               
<body>
  <p>Test</p>
</body>
  </html>                                 
  Before: Tab title showed boxes (□□□□ - □□□□)
After: Tab title renders correctly (ご利用ガイド - 경애하는)
  ```                                    

Fixes part of #44066

---------

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-04-13 01:49:26 +00:00
dependabot[bot]
3379bf634f build: bump hyper-rustls from 0.27.7 to 0.27.8 (#44144)
Bumps [hyper-rustls](https://github.com/rustls/hyper-rustls) from 0.27.7
to 0.27.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/hyper-rustls/releases">hyper-rustls's
releases</a>.</em></p>
<blockquote>
<h2>0.27.8</h2>
<h2>What's Changed</h2>
<ul>
<li>Added HttpsConnector::new function by <a
href="https://github.com/0xIO32"><code>@​0xIO32</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/301">rustls/hyper-rustls#301</a></li>
<li>Exclude development scripts from published package by <a
href="https://github.com/weiznich"><code>@​weiznich</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/320">rustls/hyper-rustls#320</a></li>
<li>Drop dependency on rustls-pemfile by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/323">rustls/hyper-rustls#323</a></li>
<li>Fix tests to run on a random port by <a
href="https://github.com/erickt"><code>@​erickt</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/330">rustls/hyper-rustls#330</a></li>
<li>Upgrade to rustls-platform-verifier 0.7 by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/hyper-rustls/pull/338">rustls/hyper-rustls#338</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6b94ec3ef1"><code>6b94ec3</code></a>
Bump version to 0.27.8</li>
<li><a
href="df300cfe7c"><code>df300cf</code></a>
Upgrade rustls-platform-verifier to 0.7</li>
<li><a
href="1c063f5e21"><code>1c063f5</code></a>
Take semver-compatible dependency updates</li>
<li><a
href="c66d2839df"><code>c66d283</code></a>
Bump MSRV to 1.85 (for rustls-platform-verifier -&gt; jni)</li>
<li><a
href="4b90026cb6"><code>4b90026</code></a>
Bump hyper from 1.8.1 to 1.9.0</li>
<li><a
href="4376d76423"><code>4376d76</code></a>
Take semver-compatible updates</li>
<li><a
href="8eaab3e6e6"><code>8eaab3e</code></a>
Take semver-compatible dependency updates</li>
<li><a
href="0deafa57c3"><code>0deafa5</code></a>
Bump rustls from 0.23.36 to 0.23.37</li>
<li><a
href="003b96e690"><code>003b96e</code></a>
Check for unexpected output if examples fail</li>
<li><a
href="81e75a4ba9"><code>81e75a4</code></a>
Fail <code>custom_ca_store</code> if <code>server</code> errors out</li>
<li>Additional commits viewable in <a
href="https://github.com/rustls/hyper-rustls/compare/v/0.27.7...v/0.27.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hyper-rustls&package-manager=cargo&previous-version=0.27.7&new-version=0.27.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-13 01:44:09 +00:00
dependabot[bot]
b6620593ae build: bump rustls-webpki from 0.103.10 to 0.103.11 (#44148)
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.10 to
0.103.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/webpki/releases">rustls-webpki's
releases</a>.</em></p>
<blockquote>
<h2>0.103.11</h2>
<p>In response to <a
href="https://redirect.github.com/rustls/webpki/issues/464">#464</a>,
we've slightly relaxed requirements for
<code>anchor_from_trust_cert()</code> to ignore unknown extensions even
if they're marked as critical. This only affects parsing a
<code>TrustAnchor</code> from DER, for which most extensions are ignored
anyway.</p>
<h2>What's Changed</h2>
<ul>
<li>Backport parsing trust anchors with unknown critical extensions to
0.103 by <a href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/rustls/webpki/pull/466">rustls/webpki#466</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="57bc62ce53"><code>57bc62c</code></a>
Bump version to 0.103.11</li>
<li><a
href="d0fa01ee0a"><code>d0fa01e</code></a>
Allow parsing trust anchors with unknown criticial extensions</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki/compare/v/0.103.10...v/0.103.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustls-webpki&package-manager=cargo&previous-version=0.103.10&new-version=0.103.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 01:01:31 +00:00
dependabot[bot]
c6987ebb82 build: bump pkg-config from 0.3.32 to 0.3.33 (#44146)
Bumps [pkg-config](https://github.com/rust-lang/pkg-config-rs) from
0.3.32 to 0.3.33.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md">pkg-config's
changelog</a>.</em></p>
<blockquote>
<h2>[0.3.33] - 2026-04-12</h2>
<h3>Changed</h3>
<ul>
<li>Error output from <code>pkg-config</code> is included in the message
again to
help with finding the cause (<a
href="https://redirect.github.com/rust-lang/pkg-config-rs/issues/187">#187</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rust-lang/pkg-config-rs/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pkg-config&package-manager=cargo&previous-version=0.3.32&new-version=0.3.33)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 00:40:14 +00:00
Simon Wülker
25d3f4b7a9 script: Don't re-parse link relations when binding element to tree (#44139)
The parsed relations of a element don't depend on its position in the
DOM tree at all, so this does nothing.

Testing: This should not change observable behaviour, WPT should catch
regressions

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-12 21:49:31 +00:00
Tim van der Lippe
7c5df4e45b script: Implement recording and restoring of values (#44137)
It fixes two new tests, but also regresses 4. That's because we don't
handle xx-small (we shouldn't, at least browsers are inconsistent on
what to do with that) and pre-existing issues where a `<font>` element
is already present as parent of the selected node. These are
pre-existing issues that are now correctly exposed.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-12 18:50:27 +00:00
Freya Arbjerg
b427fea6f8 devtools: Implement getBlackboxingActor (#44142)
Adds `BlackboxingActor` boilerplate and implements `getBlackboxingActor`

Testing: Added a geckordp test for `getBlackboxingActor`
Fixes: Part of https://github.com/servo/servo/issues/36027

Signed-off-by: Freya Arbjerg <git@arbjerg.dev>
2026-04-12 15:34:13 +00:00
Taym Haddadi
1908220198 Indexeddb: Follow the spec and make IDBRequest result/error getters throw while pending (#44128)
Testing: idbrequest WPT test.
part of https://github.com/servo/servo/issues/40983

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-12 15:23:05 +00:00
Martin Robinson
cdf13e7ca4 Make the pull request template more explicit (#44135)
There seem to be some common misconceptions about how to use the pull
request template such as:

 - The `Fixes` field going before the pull request description.
 - The `Testing` field being used to describe how the fix was tested
   locally.

This change attmepts to make the meaning of the fields of the template a
little bit more explicit to avoid confusion.

Testing: This is just updating the pull request template so no tests
necessary.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-12 08:31:59 +00:00
Martin Robinson
8eafa6e9ad script: Remove the duplicate implementation of selectors::Element (#44134)
Servo has had two implementations of `selectors::Element`, one used
during layout and one used for `Element#matches()` and
`Element#closest()`. The DOM APIs can trivially use the version that's
exposed to the layout interface, which allows removing the duplicated
implementation. This will eliminate code and prevent the two
implementations from drifting apart.

Testing: This should not change behavior in a testable way so should
be covered by existing tests.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-12 08:26:13 +00:00
Simon Martin
78305123bf script: Invalidate texture if there's a bound framebuffer in WebGLRenderingContext (#43608)
This should be done for CopyTexImage2D, like it is already done for
TexImage2D and CompressedTexImage2D.

Testing: Regular testsuite. I was unable to add a dedicated case because
all I could think of it check the bound buffer's status before and after
copyTexImage2D, but I could not find a way to change it from say
complete to something else.
Fixes: #23264

---------

Signed-off-by: Simon Martin <simon@nasilyan.com>
Signed-off-by: Martin Robinson <martin@abandonedwig.info>
Co-authored-by: Martin Robinson <martin@abandonedwig.info>
2026-04-12 07:21:38 +00:00
Abbas Olanrewaju Sarafa
040aa2a3a5 script: Move devtools_wants_updates from GlobalScope to Window (#44121)
Moved devtools_wants_updates from GlobalScope to Window

Testing: Compiles cleanly. ```./mach test-devtools``` gives different
results each time, ```./mach test-devtools
test_sources_list_with_data_inline_classic_script``` always pass though.
Fixes: #44106

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: Abbas Olanrewaju Sarafa <109840351+sabbCodes@users.noreply.github.com>
2026-04-12 05:36:59 +00:00
Martin Robinson
45972e07ab script: Rewrite the layout DOM wrappers (#44114)
This change reworks the layout DOM wrappers so that they are simpler and
easier to reason about. The main changes here:

**Combine layout wrappers into one interface:**

 - `LayoutNode`/`ThreadSafeLayoutNode` is combined into `LayoutNode`:
   The idea here is that `LayoutNode` is always thread-safe when used in
   layout as long as no `unsafe` calls are used. These interfaces
   only expose what is necessary for layout.
 - `LayoutElement`/`ThreadSafeLayoutElement` is combined into
   `LayoutElement`: See above.

**Expose two new interfaces to be used *only* with `stylo` and
`selectors`:**

`DangerousStyleNode` and `DangerousStyleElement`. `stylo`
and `selectors` have a different way of ensuring safety that is
incompatible with Servo's layout (access all of the DOM tree anywhere,
but ensure that writing only happens from a single-thread). These types
only implement things like `TElement`, `TNode` and are not intended to
be used by layout at all.

All traits and implementations are moved to files that are named after
the struct or trait inside them, in order to better understand what one
is looking at.

The main goals here are:

 - Make it easier to reason about the safe use of the DOM APIs.
 - Remove the interdependencies between the `stylo` and `selectors`
   interface implementations and the layout interface. This helps
   with the first point as well and makes it simpler to know where
   a method is implemented.
 - Reduce the amount of code.
 - Make it possible to eliminate `TrustedNodeAddress` in the future.
 - Document and bring the method naming up to modern Rust conventions.

This is a lot of code changes, but is very well tested by the WPT tests.
Unfortunately, it is difficult to make a change like this iteratively.
In addition, this new design comes with new documentation at
servo/book#225.

Testing: This should not change behavior so should be covered by
existing
WPT tests.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-12 04:22:06 +00:00
Jonathan Schwender
b3d359fabf devcontainer: Fix build error on macos (#44126)
When building the devcontainer from source on arm macOS, we get arm
Ubuntu, for which we don't have a prebuild mozjs version. That triggers
a compilation from source, which fails, due to issues finding String.h.
I can't confirm this, but it might be because the mounted workspace is
case-insensitive. We definitly don't want that, so just make sure that
the cargo target directory is in a named volume. That also has the
advantage that we don't clobber the hosts target dir and still persist.

Testing: Manually tested on macOS.
Fixes:  ./mach build in a devcontainer built from source on arm64 macOS.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-12 03:33:48 +00:00
Servo WPT Sync
d854cbacf4 Sync WPT with upstream (12-04-2026) (#44129)
Automated downstream sync of changes from upstream as of 12-04-2026
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2026-04-12 01:37:08 +00:00
Simon Wülker
64f4f080dd script: Unbind <script> elements properly from the tree (#44127)
Necessary for https://github.com/servo/servo/pull/44120

Testing: After https://github.com/servo/servo/pull/44120 we would crash
on WPT without this change. Given that this is a pretty obscure bug with
next to no chance of regressing, I think its okay to wait for that PR
for test coverage?

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-11 20:22:18 +00:00
rovertrack
5fb69ec3f8 Push GlobalScope::crypto down into Window and WorkerGlobalScope (#44122)
Fixes: #44105 
moved member and initialization of crypto in Globlalscope to window and
workerGlobalScope
Testing: required tests passed 
` 
web-platform-test
Ran 80 checks (78 subtests, 2 tests)
Expected results: 80
Unexpected results: 0
OK
`

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-11 19:29:40 +00:00
Kelechi Ebiri
29c5604055 libservo: Export CookieSource in public API (#44124)
Fixes: #44102

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-11 18:22:14 +00:00
Jonathan Schwender
a13e3852cd bootstrap: Stop installing cargo-about (#44123)
cargo-about is only used in the ./mach release command, which will only
be used by very few people (when preparing a release). Hence it doesn't
make sense to install it for everyone, and instead we can just tell the
user how to install if it is missing, and save resources for everyone
else.

Testing: Not tested, but trivial

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-11 16:55:42 +00:00
Jonathan Schwender
6bfaab4079 bootstrap/devcontainer: Install required packages for wpt. (#44109)
Based on our linux-wpt.yml workflow update our bootstrap and
devcontainer package list.
This should make the local environment closer to our CI environment when
running WPT. We only purge the droid font in the devcontainer, since we
shouldn't purge packages for the user.


mesa-vulkan-drivers was added in
71e0372ac1, so it's probably required for
WebGPU.
fonts-noto-cjk was added in 2b0d2ecc73.

In both cases no reason was given why it can't be in bootstrap, so
presumably its just an oversight.

Testing: bootstrap is ran in CI, and the packages were already being
installed by the wpt workflow.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-11 16:21:43 +00:00
Tim van der Lippe
ec513ff851 script: Split up contenteditable.rs into multiple files (#44110)
This file was getting way too big and too cluttered. Instead, split it
up into multiple files in a dedicated folder.

Part of #25005
Part of #43709

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-11 15:18:36 +00:00
Domenico Rizzo
93c9918cd5 script: Replace WebGLShader Drop implementation with a droppable substruct (#26488) (#44119)
Implementing Drop for DOM types is being forbidden. This change moves
the shader deletion logic into a separate DroppableWebGLShader struct,
allowing WebGLShader to comply with this restriction while still
ensuring GPU resources are released when the object is finalized.

Testing: Covered by existing WebGL tests.
Fixes: #26488

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
2026-04-11 13:30:48 +00:00
Simon Wülker
84ce5a6c14 script: Don't associate form elements with forms across shadow boundaries (#44117)
Step 4 of [`reset the form
owner`](https://html.spec.whatwg.org/multipage/#reset-the-form-owner)
says to search for matching `<form>` elements in the same tree. We were
searching in the owner document, which is not the same when the form
element is in a shadow tree.

Testing: A new test starts to pass
Part of https://github.com/servo/servo/issues/44113 (unblocks my patch
that would otherwise crash)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-11 13:05:22 +00:00
Abbas Olanrewaju Sarafa
00ef0f439f servo: Remove unnecessary RefCell from site_data_manager (#44116)
Removed unnecessary ```RefCell``` from ```site_data_manager```

Testing: ```./mach test-unit -p servo``` result; ```Summary [ 10.204s] 1
test run: 1 passed, 0 skipped```
Fixes: #44100

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-11 12:25:58 +00:00
Kelechi Ebiri
3cb97fc17b script: Move cookie_store from GlobalScope into Window (#44115)
Push GlobalScope::cookie_store down into Window

Testing: ./mach test-wpt tests/wpt/tests/cookiestore
Fixes: #44107

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-11 11:27:39 +00:00
Jonathan Schwender
d8cc8f3992 ci: Secure release workflow using environment (#44108)
The publish environment enforces additional restrictions, mainly that
the workflow can only be run from protected branches and additional
prevents access of the publish secrets from workflows which do not use
this environment.

Testing: Requires a manual workflow run on a protected branch. Given
that we already tested environments in previous PRs, I think this PR
might be safe to test after merging, instead of protecting the PR
branch.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-11 08:09:23 +00:00
Martin Robinson
12a655d42c script: Move StyleData to Element from Node (#44074)
Many things are nodes, such as `CharacterData` and attributes. They
don't need style data at all. This saves 16 bytes on every attribute and
text node.

Testing: This should not change testable behavior (only save some
memory),
so it should be covered by existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2026-04-11 07:46:28 +00:00
niya
9fff951a5e storage: fix incorrect data sharing by passing document origin to storage thread (#43988)
Changes all the uses of `ServoUrl` to `ImmutableOrigin` in
`WebStorageThreadMsg`

Testing: Adds a test case as described in the issue.

```html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title></title>
</head>

<body>
  <main>
    <h1>Tab and Program crashes!</h1>
    <iframe srcdoc="
          <body>
            <p>Hello Web users! <br/> I am an iframe, <br /> I set a key and then retreive it. </p> 
            <script>
              for (let i = 0; i < 1000; i++) {
                window.localStorage.setItem('truth', 'Servo is awesome! 🌐')
                const example = window.localStorage.getItem('truth')
                
                console.log(example === 'Servo is awesome! 🌐')
              }
            </script>
          </body> 
          "></iframe>
  </main>
</body>

</html>

```

Fixes: #44001

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-11 07:26:24 +00:00
Euclid Ye
99c53f8cdf layout/script: Remove unused layout optimization heuristics (#44103)
`dom_count` was used to determine whether it is worth it to run layout
parallel algorithm.
Now this is based on `layout_threads` pref.

Testing: Just removing dead code.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-11 05:58:01 +00:00
Jonathan Schwender
f59491d36f CI: Simplify release workflow (#44085)
Using the new yaml anchor feature, we can inline the upload_release
workflow file without duplicating code.
In combination with the matrix feature this allows us to remove quite a
bit of duplication. I'm not sure why we didn't use matrix to begin with.

This is also a preparation for a follow-up PR, that uses github
environments to improve secret protection, since reusable workflows
don't support environments.

Testing: [manually triggered nightly
release](https://github.com/servo/servo/actions/runs/24236862409)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-11 05:50:28 +00:00
webbeef
80e8441231 script: make all keyboard events composed (#44094)
Adjust event targeting for keyboard events when a shadow host is
involved. This is needed to not interfere with keyboard default action
like tabindex focusing.

Testing: Updated WPT tests expectations
Fixes: #43809

---------

Signed-off-by: webbeef <me@webbeef.org>
2026-04-11 01:16:05 +00:00
Martin Robinson
1444aa942b script: Make DocumentFocusHandler hold a FocusableArea (#44029)
Make Servo match the focus bits of the HTML specification a bit more by
storing a `FocusableArea` as the currently focused thing in a
`Document` instead of an optional `Element`. There is always a focused
area of a `Document`, defaulting to the viewport. This is important to
support the case of focused navigables and image maps parts in the
future.

Some focus chain debugging code has been removed as the focus chain
concept needs to be reworked to match the specification more closely.

Testing: This should not change behavior so existing tests should
suffice.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-10 21:37:42 +00:00
Messi II Innocent R.
74de42f4f7 canvas: Make ImageBitmapRenderingContext render to the canvas (#43984)
I noticed that the transferFromImageBitmap() was running without errors
but the canvas stayed blank and this was becacuse of two issues:

The mark_as_dirty was empty meaning the canvas never knew it needed to
repaint
The BitmapRenderer context had no rendering pipeline as such no ImageKey
was allocated and update_rendering always returned false, so the way I
fixed it is by

1. Implemented mark_as_dirty to call self.canvas.mark_as_dirty()
2. Allocated an ImageKey for BitmapRenderer contexts
3.Implemented set_image_key and update_rendering that sends the bitmap's
pixel data to WebRender via the paint API
4, Calling mark_as_dirty after set_bitmap in TransferFromImageBitmap

Now the reason we are setting an ImageKey on the
ImageBitmaRenderingContext is because it needs one to render to the
screen and without it the canvas was always blank

Also I noticed that for some reasons I don't understand yet, the
createImageBitmap hangs or is slow to render but after loading servo on
an open tab, if I then go ahead and open another tab and paste the file
link there, the previous tab which had the bitmap image now renders
properly

Fixes: #43565

<img width="383" height="238" alt="Screenshot from 2026-04-06 13-44-28"
src="https://github.com/user-attachments/assets/4c5096ba-ee84-4e7a-a3c6-673cc12276c4"
/>
<img width="389" height="292" alt="Screenshot from 2026-04-06 15-38-55"
src="https://github.com/user-attachments/assets/43b45e60-61d8-48de-b53e-6da5ab988768"
/>

Signed-off-by: Messi002 <rostandmessi2@gmail.com>
2026-04-10 19:20:30 +00:00
Josh Matthews
f70f94ad0e servoshell: Update egui to 0.34. (#44053)
Testing: We have no automated testing for the servoshell UI. Some quick
manual testing of servo.org seemed to work as expected.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-10 19:19:01 +00:00
Simon Wülker
0fef52f10c script: Remove layout helper traits (#44092)
Servo has lots of `LayoutXYZHelper` traits that are used to define
additional methods on `LayoutDom<XYZ>`. We can replace them with `impl
LayoutDom<XYZ>` blocks, reducing the number of LoC and making it easier
to add or modify methods.

Testing: These should be covered by existing tests

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-10 18:31:10 +00:00
Kelechi Ebiri
a670c7a52b script: implement missing steps for form submission (#43700)
Implement missing history handling steps for form submission 
Test: ./mach test-wpt
tests/wpt/tests/html/semantics/forms/form-submission-0
Fixes: #43670

---------

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-10 18:13:46 +00:00
Jonathan Schwender
34337273a3 deps: Fix sea-query pre-release versions (#44093)
This prevents issues for users that don't already have a lockfile, since
prerelease versions can have breaking changes.
This should also be backported to the release branch.

Testing: No changes, covered by existing tests.
Fixes: #44089

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-10 18:06:48 +00:00
Narfinger
a80744cc32 script: Move more iterators to unrooted iterators (#44018)
This is another part of moving more operations safely to unrooted
iterators.
- Some uses of inclusively_*_siblings
- Some uses of children()
- Some uses of child_elements()

Testing: Compilation is the test as we only use previously made iterator
functions.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-10 18:03:03 +00:00
niya
c3d4c014c7 localstorage: test storage is not shared across iframes with opaque origins (#44038)
Adds a WPT test to make sure we do not share the storage thread between
any document that has an opaque URL.
The test is required for #43988

Testing: Adds a WPT test.
Fixes: #44001

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-10 17:58:58 +00:00
Babalola Taiwo J
3bf38ef7ea script: Fix panic in compressedTexSubImage2D when no base image exists (#44050)
Calling `compressedTexSubImage2D` without a prior `compressedTexImage2D`
for the same texture target and level caused the panic at
`tex_image_2d.rs:633` because `image_info_for_target` returned `None`
and `.unwrap()` was called on it.

Per the WebGL spec, this should generate `GL_INVALID_OPERATION` instead
of panicking. So this PR replaces the unwrap with proper error handling.
And also includes a WPT crash test that reproduces the original panic.

Fixes #43527

---------

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-10 17:08:55 +00:00
Taym Haddadi
daf15e8e07 IndexedDB: Implement storage-key checks for IDBFactory entry points (#44088)
Testing: idbfactory-databases-opaque-origin.html test passed.
Fixes: part of https://github.com/servo/servo/issues/40983

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-10 17:00:11 +00:00
Jonathan Schwender
c3d2df22c0 release: Add job to publish to crates.io (#43972)
When triggering the release action on a non-protected branch in this
repo, the job is rejected (as intended):
<img width="1484" height="304" alt="image"
src="https://github.com/user-attachments/assets/236d3a41-2765-4652-8709-93110e03c77b"
/>

When triggering the action on a protected branch in this repository, the
publish-crates-io job will be pending, until explicitly approved by one
of the required approvers (thanks to the `environment` settings).
This allows us to publish all of our packages in one go.


Testing: Tested by manually
[triggering](https://github.com/servo/servo/actions/runs/24119955943/job/70371705395)
a release for `0.1.0-rc2`, which got successfully published to
crates.io. This was also a resume-after-cancellation test, since the
first ~30 crates of the release had already been published via `cargo
publish --workspace`, before running into the issue that `cargo publish
--workspace` can't resume after intermediate failures. The last commit
"Fix buffering issue in CI" is untested, and was added after observing
the stdout log messages only appearing at the end of the script. That
commit is trivial though, and probably does not justify using crates.io
resources for another test release.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2026-04-10 16:54:53 +00:00
Abbas Olanrewaju Sarafa
fbb37acf15 layout: Resolve word-spacing percentages against computed font-size (#44031)
Changes ```word-spacing``` to resolve percentages against the computed
```font-size```, instead of the size of a space.

Testing:
```tests/wpt/tests/css/css-text/word-spacing/word-spacing-percent-001.html```
is now passing

Fixes: #43997

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-10 16:17:22 +00:00
Tim van der Lippe
6118b0e5e4 script: Further implement fontsize command (#44075)
Several more TODO's are now implemented:

1. We correctly restore values for fontsize now
2. We implement relevant logic in wrap_node_list
3. We implement simple modifiable
4. We clear overrides whenever the selection changes
(which is triggered for both the selection itself and
any containing  ranges).

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-10 15:59:38 +00:00
Euclid Ye
b62dc72c73 config: Fix panic when converting convertible PrefValue::Int to u64 (#44079)
The macro `impl_from_pref!` would cause panic in this case.

Testing: Add more test cases to existing UT.
Fixes: #44078

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-10 15:51:07 +00:00
Simon Wülker
80c6846dfb script: Accept names of PerformanceTiming members as marks in Performance.measure (#43990)
This change allows users to pass a mark like `"navigationStart"` to
`Performance.measure` and that will resolve to the value of
`navigationStart` on the `PerformanceTiming` interface.

Testing: New tests start to pass
Part of https://github.com/servo/servo/issues/43821 - we no longer throw
an exception in the case above.

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-10 14:36:10 +00:00
Jonathan Schwender
03a7d42cf5 release: Only mark scheduled runs as latest nightly. (#44086)
If we make manual releases, e.g. for release candidate testing, then
they shouldn't appear on the nightly download page on servo.org, which
just displays the release that is marked as "latest".

Since the Github API documentation updated to a new API version, also
opt-in to the new version while we are at it.
There seem to be no changes affecting the usage in release.yml, but
probably the old API will be removed eventually, so why not switch to
the new version now.

See
https://docs.github.com/en/rest/releases/releases?apiVersion=2026-03-10#create-a-release

Testing: [Manual release workflow
run](https://github.com/servo/servo/actions/runs/24241705213). The
release should not be marked as latest after the run finishes.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-10 13:15:29 +00:00
Ashwin Naren
046a8346c8 indexeddb: Implement encoding module (#39009)
Indexeddb keys need to remain sorted in the database, so that key range
queries can be made via sql. This allows for key range querying without
having to load each key into memory. The solution is to serialize keys
with a custom encoding that sorts them according to the spec. The
implementation is taken from firefox.

Testing: WPT, and unit tests
Fixes: None

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2026-04-10 09:43:21 +00:00
eri
81fb8293d4 devtools: Clean up StyleRuleActor variable names (#44084)
Last naming changes for `StyleRuleActor`.

Testing: Existing tests pass
Part of: #43606

Signed-off-by: eri <eri@igalia.com>
2026-04-10 08:48:37 +00:00
Kelechi Ebiri
5606cf3f65 Stylo: Enable text align match parent servo (#44073)
Companion PR for servo/stylo#350
Testing: Various WPT improve
Fixes: #43575

---------

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-10 07:37:45 +00:00
Tim van der Lippe
c8029ea092 script: Rename CanGc::note() to CanGc::deprecated_note() (#44081)
Per the suggestion in

https://servo.zulipchat.com/#narrow/channel/263398-general/topic/PSA.3A.20avoid.20new.20usages.20of.20CanGc.20whenever.20possible/near/583995807
to mark this method as deprecated and make clear it shouldn't be used
anymore, as alternatives exist.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-10 06:07:52 +00:00
Luke Warlow
55e586737b script: Implement drop-down select multiple (#43189)
Implement drop-down select multiple: 
 - Updates the embedder API to support multi-selects.
- Updates the select element to correctly reset when multiple attribute
is removed.
- Select now renders "n selected" as button text when more than 1, or 0
options are selected.

Note that listbox selects are not yet supported, once they are these new
features will be for `<select multiple size=1>`.

Testing: WPTs and also manually using
https://demo.lukewarlow.dev/css-forms.html. The two test regressions are
due to the lack of listbox support rather than an issue with this PR.
Fixes: #38509

---------

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Signed-off-by: Martin Robinson <martin@abandonedwig.info>
Co-authored-by: Martin Robinson <martin@abandonedwig.info>
2026-04-10 05:47:21 +00:00
Tim van der Lippe
4b02f87cce script: Implement preserving ranges for moves during commands (#44041)
This ensures that the selection after the move is as expected.
It mostly fixes tests that had fully passing implementation, but
the after fontsize was incorrect, since the selection wasn't
properly updated.

Some new regressions were false positives.

Part of #25005

Testing: WPT

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-04-10 04:35:08 +00:00
dependabot[bot]
eb9784c9fb build: bump libredox from 0.1.15 to 0.1.16 (#44077)
Bumps libredox from 0.1.15 to 0.1.16.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libredox&package-manager=cargo&previous-version=0.1.15&new-version=0.1.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 00:40:36 +00:00
Euclid Ye
560498923e script: Skip clearing subtree layout boxes of detached element when attaching shadow to it (#44052)
There is no layout boxes to clear in this case. For the example in
#43998,
this skips the traversal many times.

Testing: Should not change visible behaviour.
[Try](https://github.com/servo/servo/actions/runs/24131782865).

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-10 00:12:07 +00:00
Euclid Ye
8b61ca94fc script: Make Node::clean_up_style_and_layout_data work as named (#44072)
Do not `cancel_animations_for_node` for this function.
We can then reuse it more often.

Testing: Just a refactor.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-10 00:11:19 +00:00
elomscansio
65b917bd4f devtools: Replace new with register for NodeActor (#44071)
Added a `register` method to `NodeActor` following the same pattern used
by other actors in the devtools codebase. Updated
`NodeInfoToProtocol::get_or_register_node_actor` to use it instead of
constructing `NodeActor` directly.
Testing: 
Ran `./mach try linux-unit-tests` and `./mach test-devtools`. No new
failures introduced.

Fixes:part of  #43800

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-10 00:06:39 +00:00
rtjkro
f56c108625 font: Refactor font list generation on OpenHarmony platform (#44061)
font: Use `read_fonts` module to generate font list on OpenHarmony
platform. Specifically:

- `Family name` is obtained from the font's `name` table.
- `width` & `weight`  is obtained from the font's `os2` table.
- `style` is obtained from the font's `postscript` table.

Additionally, I'd like to mention that I plan to add a caching mechanism
to store the font list in the near future (as mentioned in the related
issue)

Reference: [TrueType reference
manual](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html)
Testing: No behavior changes expected.
Fixes: Part of [#43596](https://github.com/servo/servo/issues/43596)

---------

Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com>
2026-04-09 16:18:28 +00:00
elomscansio
11cea2f023 devtools: Replace new with register for PageStyleActor (#44068)
Added a `register` method to `PageStyleActor` following the same pattern
used by other actors in the devtools codebase. Updated
`InspectorActor::register` to use it instead of constructing
`PageStyleActor` directly.
  Testing: 
Ran `./mach try linux-unit-tests` and `./mach test-devtools`. No new
failures introduced.

  Fixes:part of  #43800

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-09 16:07:20 +00:00
atbrakhi
9e5e5603df devtools: Use DebuggerValue in console (#44064)
Use same `DebuggerValue` in console actor as well. This helps us have
single source of truth!

Testing: Added a new test
Fixes: part of https://github.com/servo/servo/issues/39858

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-09 14:25:02 +00:00
Martin Robinson
f45223568e servoshell: Ignore requests to focus unknown WebViews via keyboard shortcuts (#44070)
Instead of panicking when pressing a keyboard shortcut for an uknown
WebView, just silently ignore the request. This code path is only
followed when using keyboard shortcuts, so this isn't going to hide any
unexpected behavior.

Testing: We do not have testing at this level of servoshell.
Fixes: #44056.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-09 14:09:07 +00:00
Messi II Innocent R.
4029f196e6 media: Clean up shadow root content when removing controls (#43983)
When media controls are removed (either by removing the controls
attribute or by removing the element from the DOM), the shadow root's
children are now cleared. This breaks the reference cycle between the js
mediacontrols instance and the media element, the event listeners and
this.media reference in the controls script would otherwise keep the
element alive and prevent garbage collection.

I tested the controls and it renders correctly and deleting a video with
controls doesn't crash.

Fixes: #43828

Signed-off-by: Messi002 <rostandmessi2@gmail.com>
2026-04-09 13:21:03 +00:00
CynthiaOketch
c52726eda0 devtools: Replace new with register for HighlighterActor (#44067)
Added a `register` method to `HighlighterActor` following the same
pattern used by other actors in the devtools codebase. Updated
`InspectorActor::register` to use it instead of onstructing
`HighlighterActor` directly.
  Testing: 
Ran `./mach try linux-unit-tests` and `./mach test-devtools`. No new
failures introduced.

  Fixes:part of  #43800

---------

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-04-09 12:40:40 +00:00
atbrakhi
f32cc3dc51 devtools: Make isAsync and isGenerator optional (#44023)
Make `isAsync` and `isGenerator` optional

Testing: Current tests as passing
Fixes:  part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-09 11:52:09 +00:00
Oriol Brufau
e9fbed1d74 fonts: Use ICU's Language instead of Stylo's XLang (#44057)
Testing: Not needed, no behavior change

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-04-09 10:53:44 +00:00
Euclid Ye
4c6d13d11e servoshell (Windows): Add CJK fonts for egui (#44055)
We configure fonts for Windows referring to [doc
example](https://docs.rs/egui/latest/egui/struct.FontDefinitions.html).
There is a [discussion](https://github.com/emilk/egui/discussions/1344)
on this about various ways.

Testing: Not possible to write automated test.
Before: 
<img width="232" height="109" alt="image"
src="https://github.com/user-attachments/assets/be9f3724-9ee5-4157-bd9d-313b519d1e57"
/>

After: 
<img width="243" height="67" alt="image"
src="https://github.com/user-attachments/assets/e748389f-48e3-48c1-bdaf-23c49837a1c6"
/>

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-09 10:43:41 +00:00
atbrakhi
3c4b8c61ea devtools: Handle different number values and their types (#44022)
Handle different number values and their types

Testing: Current tests are passing
Fixes:  part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-09 10:42:05 +00:00
Martin Robinson
718c8913af script/constellation: Rename and consolidate cross-Document focus messaging (#44020)
There are two times that Servo needs to ask other `Document`s to either
focus or blur.

- During processing of the "focusing steps". When a new element gains
  focus this may cause focus to be lost or gained in parent `<iframe>`s.
- When calling `focus()` on a DOM Window from another origin.

In both of these cases we need to request that a `Document` gain or lose
focus via the Constellation, but in the second case we may have a
`BrowsingContextId` of the `<iframe>` gaining focus and a
`FocusSequence`. This change splits those cases into two kinds of
messages.

Finally, run the entire focusing steps when calling `window.focus()`
instead of going to the constellation immediately. This will be
important in a followup changes where messaging order is made more
consistent.

Testing: This should not change behavior so is covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-09 08:59:47 +00:00
Taym Haddadi
553f125773 IndexedDB: Align IDBDatabase.transaction validation with the IndexedDB spec (#44059)
Testing: Existing WPT test pass.
part of https://github.com/servo/servo/issues/40983

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-09 08:59:05 +00:00
elomscansio
ae5abfbdea mach: remove shorthand support for direct test file paths in mach test-unit (#43951)
This PR removes support for passing direct test file paths (e.g.,
`./mach test-unit <test_file.rs>`) to `mach test-unit`.

Previously, this shorthand was supported in `test-unit` but was
subsequently broken in #39897. Supporting this behavior now requires
extracting test names from a generic parameter list, which is
error-prone due to the presence of arbitrary arguments and inconsistent
argument ordering.

With this change, `mach test-unit` aligns more closely with standard
Cargo test patterns. Users are expected to specify test modules or
patterns instead (e.g., `./mach test-unit <module>::` or using
Cargo-compatible arguments).

This simplifies the implementation and avoids maintaining fragile logic
for shorthand support that was not widely used.

---

### Testing

* Ran `./mach test-unit` with various valid patterns and module-based
inputs
* Verified that tests execute correctly across supported use cases
* Confirmed that removal of direct file path support does not affect
standard workflows

---

Fixes: #41065

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-09 07:41:31 +00:00
Gae24
a0d397bd1a script: Queue a networking task to proceed when a pending module fetch is terminated (#44042)
Our implementation of [fetch a single module
script](https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script)
was missing the task queueing steps:
```
5. If moduleMap[(url, moduleType)] is "fetching", wait in parallel until that entry's value changes,
   then queue a task on the networking task source to proceed with running the following steps.

6. If moduleMap[(url, moduleType)] exists, run onComplete given moduleMap[(url, moduleType)], and return.
```
Instead we appended a `PromiseNativeHandler`, which would run
`on_complete` when resolved, on the promise of the pending fetch.

Testing: This change shouldn't be observable since modules are evaluated
in sync, but it's required for #39417.

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-09 07:27:53 +00:00
dependabot[bot]
046ed0f236 build: bump tokio from 1.51.0 to 1.51.1 in the tokio-rs-related group (#44048)
Bumps the tokio-rs-related group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.51.0 to 1.51.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.51.1</h2>
<h1>1.51.1 (April 8th, 2026)</h1>
<h3>Fixed</h3>
<ul>
<li>sync: fix semaphore reopens after forget (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8021">#8021</a>)</li>
<li>net: surface errors from <code>SO_ERROR</code> on <code>recv</code>
for UDP sockets on Linux (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8001">#8001</a>)</li>
</ul>
<h3>Fixed (unstable)</h3>
<ul>
<li>metrics: fix <code>worker_local_schedule_count</code> test (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8008">#8008</a>)</li>
<li>rt: do not leak fd when cancelling io_uring open operation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7983">#7983</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7983">#7983</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7983">tokio-rs/tokio#7983</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8001">#8001</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8001">tokio-rs/tokio#8001</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8008">#8008</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8008">tokio-rs/tokio#8008</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8021">#8021</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/8021">tokio-rs/tokio#8021</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="98df02d7a4"><code>98df02d</code></a>
chore: prepare Tokio v1.51.1 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8023">#8023</a>)</li>
<li><a
href="3ea11e2a5f"><code>3ea11e2</code></a>
sync: fix semaphore reopens after forget (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8021">#8021</a>)</li>
<li><a
href="c79121391d"><code>c791213</code></a>
rt: do not leak fd when cancelling io_uring open operation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7983">#7983</a>)</li>
<li><a
href="ad8c59add6"><code>ad8c59a</code></a>
net: surface errors from <code>SO_ERROR</code> on <code>recv</code> for
UDP sockets on Linux (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8001">#8001</a>)</li>
<li><a
href="654d38b132"><code>654d38b</code></a>
metrics: fix <code>worker_local_schedule_count</code> test (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8008">#8008</a>)</li>
<li><a
href="857ba80933"><code>857ba80</code></a>
docs: improve contributing docs on how to specify crates dependency
versions ...</li>
<li><a
href="95b9342da7"><code>95b9342</code></a>
chore: remove path deps for tokio-macros 2.7.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8007">#8007</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.51.0...tokio-1.51.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.51.0&new-version=1.51.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 06:50:01 +00:00
Tim van der Lippe
1c849a362d script: Fix computation of "fontsize" command value (#44039)
The initial interpretation of "convert the font size to the value in
pixels" was completely off. I thought it meant the existing font
elements in the DOM, but instead it implied that you would have to
convert these into pixels according to the HTML size table.

Therefore, use the implementation in Stylo to convert the html size to a
keyword and then compute the value for the keyword.

To make that work, we need to compute the pixel size as fallback when
resolving the CSS value on the node. We check if it were pixels and then
go through the conversion. If they aren't pixels, we can skip all that
logic and directly convert, saving a few cycles.

Part of #25005

Testing: WPT

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2026-04-09 06:38:42 +00:00
dependabot[bot]
5eb2ffc623 build: bump thin-vec from 0.2.14 to 0.2.15 (#44051)
Bumps [thin-vec](https://github.com/gankra/thin-vec) from 0.2.14 to
0.2.15.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/thin-vec/blob/main/RELEASES.md">thin-vec's
changelog</a>.</em></p>
<blockquote>
<h1>Version 0.2.15 (2025-02-19)</h1>
<ul>
<li>Support AutoTArrays created from rust in Gecko FFI mode.</li>
<li>Add extract_if.</li>
<li>Add const new() support behind feature flag.</li>
<li>Fix <code>thin_vec</code> macro not being hygienic when
recursing</li>
<li>Improve extend() performance.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="70bcca0960"><code>70bcca0</code></a>
chore: Bump version to v0.2.15</li>
<li><a
href="322423b7a6"><code>322423b</code></a>
Fix miri error on extract_if().</li>
<li><a
href="eca5334c29"><code>eca5334</code></a>
Don't make push_unchecked public.</li>
<li><a
href="90e23c39cc"><code>90e23c3</code></a>
Minor nits, go back to call push_reserved push_unchecked.</li>
<li><a
href="ee9d6bb28f"><code>ee9d6bb</code></a>
Optimize extend() to avoid unnecessary capacity checks</li>
<li><a
href="7fd47080c0"><code>7fd4708</code></a>
feat: add const_new feature for const ThinVec::new()</li>
<li><a
href="beb652d66b"><code>beb652d</code></a>
Merge pull request <a
href="https://redirect.github.com/gankra/thin-vec/issues/75">#75</a>
from jtracey/patch-1</li>
<li><a
href="6f3da2525d"><code>6f3da25</code></a>
Merge pull request <a
href="https://redirect.github.com/gankra/thin-vec/issues/73">#73</a>
from emilio/auto-array-tweaks</li>
<li><a
href="d3d7475118"><code>d3d7475</code></a>
gecko: Keep the auto-bit across relocations.</li>
<li><a
href="faa01eb790"><code>faa01eb</code></a>
Merge pull request <a
href="https://redirect.github.com/gankra/thin-vec/issues/66">#66</a>
from GnomedDev/extract-if</li>
<li>Additional commits viewable in <a
href="https://github.com/gankra/thin-vec/compare/v0.2.14...v0.2.15">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=thin-vec&package-manager=cargo&previous-version=0.2.14&new-version=0.2.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 00:38:28 +00:00
dependabot[bot]
071c35e5a2 build: bump zerofrom-derive from 0.1.6 to 0.1.7 (#44049)
Bumps [zerofrom-derive](https://github.com/unicode-org/icu4x) from 0.1.6
to 0.1.7.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/unicode-org/icu4x/blob/main/CHANGELOG.md">zerofrom-derive's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>icu 2.2.x</h2>
<p>Several crates have had patch releases in the 2.2 stream:</p>
<ul>
<li>Components
<ul>
<li>(2.2.1) <code>icu_calendar</code>
<ul>
<li>Fix extended year calculations in Gregorian-like and Coptic-like
calendars (unicode-org#7849)</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>icu4x 2.2</h2>
<ul>
<li>Components
<ul>
<li>General
<ul>
<li>Use HTTPS links in docs (unicode-org#7212)</li>
<li>Update MSRV to 1.86 (unicode-org#7576)</li>
<li>Updated to CLDR 48.2 (unicode-org#7792)</li>
<li>Replace <code>experimental</code> features with
<code>unstable</code> features (unicode-org#7566)</li>
<li>Add categories and keywords to Cargo.toml for all components
(unicode-org#7737)</li>
</ul>
</li>
<li><code>icu_calendar</code>
<ul>
<li>Add <code>Date::try_new</code>, which replaces
<code>Date::try_new_from_codes</code>, and takes typed year/month
values. (unicode-org#7773, unicode-org#7764)</li>
<li>New methods: <code>Date::try_new</code> (and primarily-internal
<code>Calendar::new_date</code>)</li>
<li>New types: <code>InputYear</code>, <code>DateNewError</code></li>
<li>Handle possible <code>Overflow</code> values on individual calendars
(unicode-org#7795)</li>
<li>New <code>Date::try_from_fields</code> API for fully general date
construction from various choices of year and month values
(unicode-org#7798)</li>
<li>New methods: <code>Date::try_from_fields()</code></li>
<li>New types: <code>DateFields</code>,
<code>DateFromFieldsOptions</code>, <code>Overflow</code>,
<code>MissingFieldsStrategy</code>,
<code>DateFromFieldsError</code></li>
<li>New associated method: <code>Calendar::from_fields()</code></li>
<li>New Date arithmetic APIs for adding and subtracting dates
(unicode-org#7798, unicode-org#7355, unicode-org#7257)</li>
<li>New methods: <code>Date::try_add_with_options</code>,
<code>Date::try_added_with_options</code>,
<code>Date::try_until_with_options</code></li>
<li>New types: <code>DateDuration</code>, <code>DateAddOptions</code>,
<code>DateDifferenceOptions</code>, <code>DateDurationUnit</code>,
<code>DateDurationParseError</code>, <code>DateAddError</code>,
<code>MismatchedCalendarError</code></li>
<li>New associated items: <code>Calendar::add</code>,
<code>Calendar::until</code>,
<code>Calendar::DateCompatibilityError</code></li>
<li>Introduce a new <code>Month</code> type, preferred over using month
codes (unicode-org#7147, unicode-org#7756)
<ul>
<li>New type: <code>Month</code></li>
<li>New method: <code>MonthInfo::to_input()</code></li>
</ul>
</li>
<li>Introduce year/date ranges to all APIs, documented on the APIs
themselves. <code>Date</code> now has a fundamental range (ISO years
between ±999,999), and most constructors enforce a stricter range of
±9999 years for input years. (unicode-org#7676, unicode-org#7062,
unicode-org#7629, unicode-org#7753, unicode-org#7219,
unicode-org#7227)</li>
<li>Add constructors with <code>Month</code> for lunisolar calendars
(unicode-org#7485)</li>
<li>New methods: <code>Date::try_new_korean_traditional()</code>,
<code>Date::try_new_chinese_traditional()</code>,
<code>Date::try_new_hebrew_v2()</code></li>
<li>Expose <code>LeapStatus</code> on <code>MonthInfo</code>
(unicode-org#7667)</li>
<li>New method: <code>MonthInfo::leap_status()</code></li>
<li>New enum: <code>LeapStatus</code></li>
<li>(Unstable) Integrate with <code>chrono</code>, <code>jiff</code>,
and <code>time</code> (unicode-org#7617, unicode-org#7711)</li>
<li>New impls: <code>From&lt;chrono::NaiveDate&gt;</code>,
<code>From&lt;jiff::civil::Date&gt;</code>,
<code>From&lt;time::Date&gt;</code> for
<code>Date&lt;Gregorian&gt;</code></li>
<li>Replace <code>Date::day_of_week</code> by <code>Date::weekday</code>
(unicode-org#7288)
<ul>
<li>New method: <code>Date::weekday()</code></li>
</ul>
</li>
<li>Deprecate <code>Date::new_from_iso</code>/<code>Date::to_iso</code>
(unicode-org#7287)</li>
<li>Deprecate <code>Date::extended_year()</code> (use
<code>Date::year().extended_year()</code>) (unicode-org#7289)</li>
<li>Remove <code>YearInfo: PartialEq</code> bound
(unicode-org#7743)</li>
<li>Start producing Meiji era only after Meiji 6 (unicode-org#7503)</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/unicode-org/icu4x/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zerofrom-derive&package-manager=cargo&previous-version=0.1.6&new-version=0.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 00:37:01 +00:00
dependabot[bot]
ceb8cf07c1 build: bump cryptography from 46.0.6 to 46.0.7 (#44045)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.6
to 46.0.7.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst">cryptography's
changelog</a>.</em></p>
<blockquote>
<p>46.0.7 - 2026-04-07</p>
<pre><code>
* **SECURITY ISSUE**: Fixed an issue where non-contiguous buffers could
be
  passed to APIs that accept Python buffers, which could lead to buffer
  overflow. **CVE-2026-39892**
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL
3.5.6.
<p>.. _v46-0-6:<br />
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="622d672e42"><code>622d672</code></a>
46.0.7 release (<a
href="https://redirect.github.com/pyca/cryptography/issues/14602">#14602</a>)</li>
<li>See full diff in <a
href="https://github.com/pyca/cryptography/compare/46.0.6...46.0.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cryptography&package-manager=uv&previous-version=46.0.6&new-version=46.0.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 22:40:19 +00:00
Martin Robinson
b8ef264268 layout: Integrate more details into FontAndScriptInfo (#43974)
This will be needed for ensuring that shaped text is valid during
relayout. It duplicates some information, but the hope is that when all
of these change are done, there will be many fewer individual shaped
segments of text.

Testing: This should not really change observable behavior so is covered
by existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-08 21:37:44 +00:00
Tim van der Lippe
eca6eb2b4e script: Further implement fontsize command (#44030)
While debugging test failures, I discovered that I had reversed the
`is_allowed_child` arguments. That made a bunch more tests pass, but
then also started to fail tests as we weren't clearing the previous
value and computing loose equivalence.

Therefore, this PR fixes the reversal and implements the relevant parts
of some algorithms as to not regress too much. There are two new
failures related to how integers should be parsed, but tackling that
separately.

Part of #25005

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-08 18:51:48 +00:00
Jonathan Schwender
516dba791f allocator: Add libc Heap information on macos (#44037)
Despite using `jemalloc` by default on macos as the Rust global
allocator, the default system allocator will still be used by some C/C++
libraries.
Using `malloc_zone_statistics` on macos allows us to get information
about the system allocator heap usage.
Since the macos statistic also provides information about reserved, but
currently unused memory, we also expose that and attempt to calculate
the same metric on Linux, which should be
arena (Non-mmapped space allocated (bytes)) + hblkhd (Space allocated in
mmapped regions (bytes)) See
https://man7.org/linux/man-pages/man3/mallinfo.3.html

Loading `servo.org` in a debug build on macOS and then navigating to
about:memory, I see 31MB system-heap-allocated and 92 MB
system-heap-reserved.

Testing: Manually tested on macOS. Not tested on Linux.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-08 18:23:49 +00:00
CynthiaOketch
1174dfe3d2 script: Remove pointless import renames in components/script/dom/request.rs (#44025)
CacheMode, CredentialsMode, Destination, RedirectMode, and Referrer were
imported with NetTraitsRequest* aliases to avoid naming conflicts. These
conflicts no longer exist; their original names do not clash with any
other imports or types in this file, so the aliases are restored.

Testing: Pure refactor with no behavior change. Ran `./mach try
linux-unit-tests` to verify existing tests continue to pass.
Fixes: #42981

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-04-08 17:26:51 +00:00
Simon Wülker
695b8ee913 script: Claim blob before loading <video> poster frame (#44035)
Refer to https://github.com/servo/servo/pull/43746 for a description of
the problem. This change ensures that video posters can be loaded from
blob URLs, even if the URL is revoked right after.

Testing: This change adds a test

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-08 17:03:56 +00:00
atbrakhi
e50cfa7af6 devtools: Fix recursion in debugger (#44024)
Fix recursion causing panic in debugger

Testing: Current tests are passing, also manual testing 
Fixes: part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-08 15:29:20 +00:00
Taym Haddadi
78c9fe2a4c IndexedDB: Align IndexedDB binary key conversion with the spec (#44009)
IndexedDB: Align IndexedDB binary key conversion with the spec

Testing: covered by WPT test.

part of https://github.com/servo/servo/issues/40983

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-08 10:26:52 +00:00
Freya Arbjerg
adde320fb0 paint: Add minimum size checks for RenderingContext (#44011)
Returns an error on `RenderingContext` constructors when size is 0 in
either dimension. Also adds panics to resize functions in the same case.

Testing: Added a unit test for the new error on
`SoftwareRenderingContext::new()`.
Fixes: https://github.com/servo/servo/issues/36061

Signed-off-by: Freya Arbjerg <git@arbjerg.dev>
Co-authored-by: Martin Robinson <martin@abandonedwig.info>
2026-04-08 10:18:21 +00:00
TIN TUN AUNG
280d984d3b media: Implement Player for ohos backend (#43208)
Implement Player Trait in ohos backend using Harmony OS MediaKit's[
AVPlayer](https://developer.huawei.com/consumer/en/doc/harmonyos-references/capi-avplayer-h).

The modular design of `VideoSink`, `InnerPlayer`, and `MediaSource` is
taken from the GStreamer backend.
Only support HarmonyOS SDK API 21, because the
`OH_AVPlayer_SetDataSource` only started to be exposed on API 21.

Testing: N/A, as there are no platform specific task.
Fixes: N/A, now we can play video on HarmonyOS phone using `<video>`

---------

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2026-04-08 08:48:10 +00:00
Simon Wülker
1b336760ae mozjs: Rebuild from source if jitspew feature is enabled (#44010)
The `IONFLAGS` environment variable configure logging for the JIT, but
it must be enabled in spidermonkey at compile time. The prebuilt mozjs
binaries don't enable it, so we must build from source.

Companion PR for https://github.com/servo/mozjs/pull/728

Testing: We don't have tests for the build process

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-08 08:40:07 +00:00
Euclid Ye
712b4f9bc2 script: Reduce ShadowRoot::bind_to_tree complexity from O(2^N) to O(N) (#44016)
During traversal, exclude shadow roots.

Analysis:
Each shadow root is processed twice:
- via host: Element::bind_to_tree()
-  Via iterator

In total, this would be
```math
\sum_{i=0}^{N-1} 2^i = 2^N - 1
```

Testing: Added a test.
Fixes: https://github.com/servo/servo/issues/43998

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Co-authored-by: webbeef <me@webbeef.org>
2026-04-08 08:20:20 +00:00
Jonathan Schwender
0ea14d1b60 release: Fix result check for cancelled workflows (#44017)
If the entire workflow was cancelled we also need to check for
`cancelled()`. Simply checking needs.*.result is not sufficient - it was
observed that the success branch was still entered when only checking
needs.

Testing: Tested manually, by cancelling [this
workflow](https://github.com/servo/servo/actions/runs/24119740924/job/70371050119)
which resulted in a draft release publish (failure branch)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2026-04-08 05:58:58 +00:00
Bennet Bleßmann
cff186777c devtools: remove impl JsonPacketStream for TcpStream (#44006)
Removes the `impl JsonPacketStream for TcpStream` that was supposed to
be removed as part of servo/servo#43472

> Testing: [..] Removing the JsonPacketStream implementation for
TcpStream should discourage regressions due to improper use of raw
streams.

Confirmed in
https://github.com/servo/servo/pull/43472#issuecomment-4201684071

Testing: no new test needed as this only removes code

Signed-off-by: Bennet Bleßmann <bennet.blessmann+github@googlemail.com>
2026-04-08 01:09:46 +00:00
rovertrack
ba4f031f86 script: Pass &CStr to get_callable_property (#44008)
Fixes: #43968 
made get callable property accept ` &CStr ` instead of `&str`

Testing: no behaviour change expected, so existing WPT tests are
sufficient.

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-08 00:56:47 +00:00
dependabot[bot]
b561212988 build: bump async-signal from 0.2.13 to 0.2.14 (#44015)
Bumps [async-signal](https://github.com/smol-rs/async-signal) from
0.2.13 to 0.2.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/smol-rs/async-signal/releases">async-signal's
releases</a>.</em></p>
<blockquote>
<h2>v0.2.14</h2>
<ul>
<li>Fix build error on haiku. (<a
href="https://redirect.github.com/smol-rs/async-signal/issues/59">#59</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/smol-rs/async-signal/blob/master/CHANGELOG.md">async-signal's
changelog</a>.</em></p>
<blockquote>
<h1>Version 0.2.14</h1>
<ul>
<li>Fix build error on haiku. (<a
href="https://redirect.github.com/smol-rs/async-signal/issues/59">#59</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d750e57adc"><code>d750e57</code></a>
Release 0.2.14</li>
<li><a
href="eb72cfd64a"><code>eb72cfd</code></a>
Fix build error on haiku</li>
<li><a
href="1ffadd3db8"><code>1ffadd3</code></a>
Update signal-hook requirement from 0.3.14 to 0.4.1 (<a
href="https://redirect.github.com/smol-rs/async-signal/issues/57">#57</a>)</li>
<li><a
href="a43dca7fd1"><code>a43dca7</code></a>
Fix clippy::io_other_error warning</li>
<li><a
href="c00258a4a6"><code>c00258a</code></a>
Bump MSRV to 1.85</li>
<li><a
href="3fdfdee177"><code>3fdfdee</code></a>
ci: Use taiki-e/checkout-action action</li>
<li><a
href="0f8053d9af"><code>0f8053d</code></a>
ci: Use cargo-hack's --rust-version flag for msrv check</li>
<li>See full diff in <a
href="https://github.com/smol-rs/async-signal/compare/v0.2.13...v0.2.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-signal&package-manager=cargo&previous-version=0.2.13&new-version=0.2.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 00:52:05 +00:00
dependabot[bot]
0941407c8f build: bump fastrand from 2.3.0 to 2.4.1 (#44013)
Bumps [fastrand](https://github.com/smol-rs/fastrand) from 2.3.0 to
2.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/smol-rs/fastrand/releases">fastrand's
releases</a>.</em></p>
<blockquote>
<h2>v2.4.1</h2>
<ul>
<li>Fix build failure with <code>js</code> feature. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/125">#125</a>)</li>
</ul>
<h2>v2.4.0</h2>
<ul>
<li>Bump MSRV to 1.63. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/104">#104</a>)</li>
<li>Improve quality of f32/f64 generation. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/103">#103</a>)</li>
<li>Add <code>f{32,64}_inclusive</code> and
<code>Rng::f{32,64}_inclusive</code>. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/103">#103</a>)</li>
<li>Make <code>Rng::with_seed</code> const. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/107">#107</a>)</li>
<li>Update <code>getrandom</code> to 0.3. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/104">#104</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md">fastrand's
changelog</a>.</em></p>
<blockquote>
<h1>Version 2.4.1</h1>
<ul>
<li>Fix build failure with <code>js</code> feature. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/125">#125</a>)</li>
</ul>
<h1>Version 2.4.0</h1>
<ul>
<li>Bump MSRV to 1.63. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/104">#104</a>)</li>
<li>Improve quality of f32/f64 generation. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/103">#103</a>)</li>
<li>Add <code>f{32,64}_inclusive</code> and
<code>Rng::f{32,64}_inclusive</code>. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/103">#103</a>)</li>
<li>Make <code>Rng::with_seed</code> const. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/107">#107</a>)</li>
<li>Update <code>getrandom</code> to 0.3. (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/104">#104</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="728a5b503f"><code>728a5b5</code></a>
Release 2.4.1</li>
<li><a
href="0c619f6a39"><code>0c619f6</code></a>
Fix build failure with js feature</li>
<li><a
href="a4077e2373"><code>a4077e2</code></a>
ci: Add missing js feature test</li>
<li><a
href="1fd5bbb300"><code>1fd5bbb</code></a>
Release 2.4.0 (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/116">#116</a>)</li>
<li><a
href="074345b7e7"><code>074345b</code></a>
chore: make some documents clearer (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/115">#115</a>)</li>
<li><a
href="ce9a48c2ee"><code>ce9a48c</code></a>
chore: update dependencies to latest versions and bump MSRV to 1.63 (<a
href="https://redirect.github.com/smol-rs/fastrand/issues/104">#104</a>)</li>
<li><a
href="978dde1cad"><code>978dde1</code></a>
ci: Use reusable workflows for clippy</li>
<li><a
href="8561f13c21"><code>8561f13</code></a>
bench: Add benchmark of f32()</li>
<li><a
href="1def02cb23"><code>1def02c</code></a>
Fix rustdoc::broken_intra_doc_links warning</li>
<li><a
href="c2cbdd4965"><code>c2cbdd4</code></a>
Remove manual doc(cfg(..))</li>
<li>Additional commits viewable in <a
href="https://github.com/smol-rs/fastrand/compare/v2.3.0...v2.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=fastrand&package-manager=cargo&previous-version=2.3.0&new-version=2.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 00:41:56 +00:00
Taym Haddadi
ac4df79bd6 Make localStorage and sessionStorage throw on opaque origins (#44002)
Testing: covered by WPT test.
Fixes #43999

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-07 20:41:10 +00:00
Josh Matthews
9334d3094b script: Use the global's origin when claiming blob tokens. (#44004)
`global.api_base_url().origin()` returns a unique opaque origin when the
base URL is an opaque origin. When we use the global's origin instead,
requests for claimed blobs can now pass the same-origin check.

Testing: Newly passing tests.
Fixes: #43326
Fixes: #43973

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-07 19:40:15 +00:00
Kelechi Ebiri
a7e4b80b31 script: Support sprintf-style substitutions in console methods (#43897)
Implement the Console Formatter operation for all console methods.
Fixes: #43827

---------

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-07 18:55:36 +00:00
Abbas Olanrewaju Sarafa
66d232e1e7 Remove introduction_type_override field from HTMLScriptElement (#44003)
Removed ```introduction_type_override``` field from
```HTMLScriptElement``` & passed the new variable to
```fetch_inline_module_script```

Testing: No testing required, compiles successfully.
Fixes: #43980

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-07 18:36:21 +00:00
Simon Wülker
37a1f93b91 url: Let origins of file:// URLs be potentially trustworthy (#43989)
The origin of a `file` URL is unspecified. Engines act like they're
opaque except in a few special cases - one of which is the "is
potentially trustworthy" algorithm. This change allows consumers of
`servo-url` to distinguish between regular opaque origins and file
origins. Then we use that to mark file origins as "potentially
trustworthy" which is what the spec wants.

For now we can get away without changes to the `url` crate (the one used
in the wider ecosystem, not just servo), but I'm unsure if that will be
the case in the future.

Testing: This change adds a test
Fixes: https://github.com/servo/servo/issues/42540

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-07 18:29:30 +00:00
Alex Feyerke
f977c06f9d Modernize and improve the Android UI (#43795)
Modernize and improve the Android UI, and add browsing history panel.

---------

Signed-off-by: Alex Feyerke <alex@neighbourhood.ie>
2026-04-07 16:39:19 +00:00
Euclid Ye
8b1619ba1d script/net: Make URL List closer to spec (#43987)
[Redirected](https://fetch.spec.whatwg.org/#dom-response-redirected)
should be decided by the URL List.
Currently it does not. We add some TODO, fill URL in more places
according to spec.

Testing: This should not change behaviour, as URL list is mostly used by
[Redirected](https://fetch.spec.whatwg.org/#dom-response-redirected). If
we do it now, we get test failures as URL list is not fully set in all
spec steps.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-07 14:55:40 +00:00
Oriol Brufau
0615c394b9 stylo: Enable multiple color arguments in color-mix() (#43890)
Bumps Stylo to https://github.com/servo/stylo/pull/348

Testing: 2 WPT improve

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-04-07 14:08:50 +00:00
Narfinger
3612ba9e5b OHOS CI: Fix parsefromstring (#42995)
ParseFromString currently complains that it matches multiple trace
lines. The reason for that is a bit unclear as it should only produce
one alert. Local testing shows that it produces multiple (even for one
run). This should at least give us the metric back.

Testing: This is currently untested. As it is a small CI change that
can't break a broken test it should be fine.
Fixes: https://github.com/servo/servo/issues/42992

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-07 13:48:17 +00:00
Abubakar Abdulazeez Usman
750fb41bdb devtools: Include layer rules in CSS panel using rule tree (#43912)
DevTools was collecting CSS rules by walking stylesheets and matching
selector text. This ignored cascade order and did not correctly handle
rules inside layer blocks.

This change uses computed values (rule tree) to get the actual applied
rules in cascade order. It then maps those rules back to CSSStyleRule
using the declaration block identity, and walks the CSSOM to get
selector text and layer ancestry.

This fills ancestor_data with layer names and lets the inspector show
layered rules correctly.


Testing: 
- Verified using the minimized testcase from the issue

- Verified on https://www.sharyap.com/

- Confirmed that rules inside layer blocks are now shown with correct
order and hierarchy.


Fixes: #43541

Signed-off-by: arabson99 <arabiusman99@gmail.com>
2026-04-07 11:26:12 +00:00
Simon Wülker
57adfc136f script: Remove FIXME about deprecated performance.timing (#43996)
`performance.timing` is not going anywhere anytime soon. Deprecating it
is none of servo's concern. The spec links are also outdated.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-07 11:16:35 +00:00
eri
4f13fcc38d devtools: Pass steppingType to onPop hook (#43995)
Fixes crashes when stepping in certain situations.

Testing: Ran `mach test-devtools` and manual testing
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-07 09:57:20 +00:00
Messi II Innocent R.
88a08d775c Don't crash if rustup is not installed (#43982)
Check if rustup is available before calling it. 

If it is not found, skip the step with a warning instead of crashing.
This allows users who installed Rust through their distribution's
package manager (without rustup) to build Servo without errors.

Three places were updated:

- In command_base.py I added a skip automatic target installation for
cross-compilation
- In base.py, I added the skip toolchain installation
- In, bootstrap_commands.py , it is a skip clean-nightlies if rustup not
found

Fixes: #43871

Signed-off-by: Messi002 <rostandmessi2@gmail.com>
2026-04-07 09:42:55 +00:00
Narfinger
8a38c5e217 servoshell: Port from sig to signal_hook_registry (#43891)
Testing: We do not currently have a way to test signal handling in the
servoshell binary, so this change does not include tests.
Fixes: #43836

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-07 08:28:36 +00:00
atbrakhi
7a559ba459 devtools: Fix worker targets in debugger tab (#43981)
Firefox DevTools client determines target type by checking if the actor
contains specific substring. For workers it
[requires](https://searchfox.org/firefox-main/source/devtools/client/fronts/watcher.js#65)
`/workerTarget` in the actor name to create a `WorkerTargetFront`.

Testing: Manual testing
Fixes: #36727


<img width="1084" height="558" alt="Screenshot 2026-04-06 at 21 47 59"
src="https://github.com/user-attachments/assets/207a8368-0f8a-48a6-ab7e-a5ee3750381f"
/>

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-04-07 07:49:43 +00:00
dependabot[bot]
793f0c8ec8 build: bump zerofrom from 0.1.6 to 0.1.7 (#43986)
Bumps [zerofrom](https://github.com/unicode-org/icu4x) from 0.1.6 to
0.1.7.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/unicode-org/icu4x/blob/main/CHANGELOG.md">zerofrom's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>icu 2.2.x</h2>
<p>Several crates have had patch releases in the 2.2 stream:</p>
<ul>
<li>Components
<ul>
<li>(2.2.1) <code>icu_calendar</code>
<ul>
<li>Fix extended year calculations in Gregorian-like and Coptic-like
calendars (unicode-org#7849)</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2>icu4x 2.2</h2>
<ul>
<li>Components
<ul>
<li>General
<ul>
<li>Use HTTPS links in docs (unicode-org#7212)</li>
<li>Update MSRV to 1.86 (unicode-org#7576)</li>
<li>Updated to CLDR 48.2 (unicode-org#7792)</li>
<li>Replace <code>experimental</code> features with
<code>unstable</code> features (unicode-org#7566)</li>
<li>Add categories and keywords to Cargo.toml for all components
(unicode-org#7737)</li>
</ul>
</li>
<li><code>icu_calendar</code>
<ul>
<li>Add <code>Date::try_new</code>, which replaces
<code>Date::try_new_from_codes</code>, and takes typed year/month
values. (unicode-org#7773, unicode-org#7764)</li>
<li>New methods: <code>Date::try_new</code> (and primarily-internal
<code>Calendar::new_date</code>)</li>
<li>New types: <code>InputYear</code>, <code>DateNewError</code></li>
<li>Handle possible <code>Overflow</code> values on individual calendars
(unicode-org#7795)</li>
<li>New <code>Date::try_from_fields</code> API for fully general date
construction from various choices of year and month values
(unicode-org#7798)</li>
<li>New methods: <code>Date::try_from_fields()</code></li>
<li>New types: <code>DateFields</code>,
<code>DateFromFieldsOptions</code>, <code>Overflow</code>,
<code>MissingFieldsStrategy</code>,
<code>DateFromFieldsError</code></li>
<li>New associated method: <code>Calendar::from_fields()</code></li>
<li>New Date arithmetic APIs for adding and subtracting dates
(unicode-org#7798, unicode-org#7355, unicode-org#7257)</li>
<li>New methods: <code>Date::try_add_with_options</code>,
<code>Date::try_added_with_options</code>,
<code>Date::try_until_with_options</code></li>
<li>New types: <code>DateDuration</code>, <code>DateAddOptions</code>,
<code>DateDifferenceOptions</code>, <code>DateDurationUnit</code>,
<code>DateDurationParseError</code>, <code>DateAddError</code>,
<code>MismatchedCalendarError</code></li>
<li>New associated items: <code>Calendar::add</code>,
<code>Calendar::until</code>,
<code>Calendar::DateCompatibilityError</code></li>
<li>Introduce a new <code>Month</code> type, preferred over using month
codes (unicode-org#7147, unicode-org#7756)
<ul>
<li>New type: <code>Month</code></li>
<li>New method: <code>MonthInfo::to_input()</code></li>
</ul>
</li>
<li>Introduce year/date ranges to all APIs, documented on the APIs
themselves. <code>Date</code> now has a fundamental range (ISO years
between ±999,999), and most constructors enforce a stricter range of
±9999 years for input years. (unicode-org#7676, unicode-org#7062,
unicode-org#7629, unicode-org#7753, unicode-org#7219,
unicode-org#7227)</li>
<li>Add constructors with <code>Month</code> for lunisolar calendars
(unicode-org#7485)</li>
<li>New methods: <code>Date::try_new_korean_traditional()</code>,
<code>Date::try_new_chinese_traditional()</code>,
<code>Date::try_new_hebrew_v2()</code></li>
<li>Expose <code>LeapStatus</code> on <code>MonthInfo</code>
(unicode-org#7667)</li>
<li>New method: <code>MonthInfo::leap_status()</code></li>
<li>New enum: <code>LeapStatus</code></li>
<li>(Unstable) Integrate with <code>chrono</code>, <code>jiff</code>,
and <code>time</code> (unicode-org#7617, unicode-org#7711)</li>
<li>New impls: <code>From&lt;chrono::NaiveDate&gt;</code>,
<code>From&lt;jiff::civil::Date&gt;</code>,
<code>From&lt;time::Date&gt;</code> for
<code>Date&lt;Gregorian&gt;</code></li>
<li>Replace <code>Date::day_of_week</code> by <code>Date::weekday</code>
(unicode-org#7288)
<ul>
<li>New method: <code>Date::weekday()</code></li>
</ul>
</li>
<li>Deprecate <code>Date::new_from_iso</code>/<code>Date::to_iso</code>
(unicode-org#7287)</li>
<li>Deprecate <code>Date::extended_year()</code> (use
<code>Date::year().extended_year()</code>) (unicode-org#7289)</li>
<li>Remove <code>YearInfo: PartialEq</code> bound
(unicode-org#7743)</li>
<li>Start producing Meiji era only after Meiji 6 (unicode-org#7503)</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/unicode-org/icu4x/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zerofrom&package-manager=cargo&previous-version=0.1.6&new-version=0.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 01:00:46 +00:00
dependabot[bot]
d596c5dc9e build: bump cc from 1.2.58 to 1.2.59 (#43985)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.58 to 1.2.59.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.2.59</h2>
<h3>Fixed</h3>
<ul>
<li><em>(ar)</em> deterministic archives with <code>D</code> modifier
(<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1697">#1697</a>)</li>
</ul>
<h3>Other</h3>
<ul>
<li>Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1698">#1698</a>)</li>
<li>Fix target abi parsing for sanitiser targets (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1695">#1695</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.58...cc-v1.2.59">1.2.59</a>
- 2026-04-03</h2>
<h3>Fixed</h3>
<ul>
<li><em>(ar)</em> deterministic archives with <code>D</code> modifier
(<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1697">#1697</a>)</li>
</ul>
<h3>Other</h3>
<ul>
<li>Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1698">#1698</a>)</li>
<li>Fix target abi parsing for sanitiser targets (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1695">#1695</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f4c5ac7a7e"><code>f4c5ac7</code></a>
chore(cc): release v1.2.59 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1699">#1699</a>)</li>
<li><a
href="9cfcecbb9d"><code>9cfcecb</code></a>
Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1698">#1698</a>)</li>
<li><a
href="025d046f99"><code>025d046</code></a>
fix(ar): deterministic archives with <code>D</code> modifier (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1697">#1697</a>)</li>
<li><a
href="fe32d6834a"><code>fe32d68</code></a>
Fix target abi parsing dor sanitiser targets (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1695">#1695</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.58...cc-v1.2.59">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cc&package-manager=cargo&previous-version=1.2.58&new-version=1.2.59)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 00:54:38 +00:00
Simon Wülker
0ddc7a08d0 script: Lock blob URL entry during XHR open() (#43977)
This is a followup to https://github.com/servo/servo/pull/43746 that
applies the same fix to XHR. Refer to that PR for a description of the
problem.

Testing: New tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-06 19:46:52 +00:00
Babalola Taiwo J
6279f7bdef devtools: Rename ThreadActor variable names (#43955)
Renames local variables holding a `ThreadActor` instance to
`thread_actor`, following the `{}_actor` convention for actor variables
as described in #43606.

Changes:
- `actors/thread.rs`: `actor` → `thread_actor` in
`ThreadActor::register()`
- `lib.rs`: `thread` → `thread_actor` in
`handle_notifyscriptinterrupted` and `handle_create_frame_actor`

Part of #43606.

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-06 19:42:05 +00:00
Abbas Olanrewaju Sarafa
02a350d864 layout: Rename confusing ``SequentialLayoutState::collapse_margins`` (#43978)
Renamed ```SequentialLayoutState::collapse_margins``` to
```commit_margin``` in ```float.rs```, ```mod.rs``` &
```inline/mod.rs```

Testing: No testing required - just renaming. Compiles successfully.
Fixes: #43941

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 19:10:28 +00:00
Babalola Taiwo J
f38de75888 devtools: Rename SourceActor variable names (#43959)
Renames local variable holding a `SourceActor` instance to
`source_actor`, following the `{}_actor` convention for actor variables
as described in #43606.

Changes:
- `actors/source.rs`: `actor` → `source_actor` in
`SourceActor::register()`

Part of #43606.

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-06 16:01:26 +00:00
Babalola Taiwo J
a7870df4c7 devtools: Rename WorkerActor variables and add register method (#43963)
Renames local variable `worker` to `worker_actor` in `lib.rs` and
`root.rs`, following the `{}_actor` convention for actor struct
variables and `{}_name` for actor name string variables established in
#43606.

Also adds a `WorkerActor::register()` method (part of #43800), replacing
the inline struct construction in `lib.rs` with a consistent pattern
pattern matching other actors like `ThreadActor` and `SourceActor`.

**Changes:**
- `actors/worker.rs`: Add `WorkerActor::register()` method
- `actors/root.rs`: Rename `worker` → `worker_actor` in
`listServiceWorkerRegistrations` handler
- `lib.rs`: Replace inline struct construction with
`WorkerActor::register()` call

**Testing:** No testing required, compiles successfully.

Fixes: Part of #43606
Fixes: Part of #43800

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-06 15:37:58 +00:00
Jonathan Schwender
d21fc8238a profile: Add debug_span and minor refactoring (#43971)
Add an internal macro to avoid duplication, and use that to implement
the existing two `trace` and `info` macros and add `debug_span`. We skip
`warn` and `error` (from the tracing-rs library), since those names
don't fit our profiling usage too well, and 3 different levels should
also be enough. If we need more levels in the future we could still add
more macros than (after deciding on better names than warn and error)

Testing: Servo is built with the tracing feature in CI (for HarmonyOS)

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-06 15:22:49 +00:00
Simon Wülker
e73c010bb1 Force callers to claim blob url before making a fetch request (#43746)
`blob` URLs have a implicit blob URL entry attached, which stores the
data contained in the blob. The specification requires this entry to be
resolved as the URL is parsed. We only resolve it inside `net` when
loading the URL. That causes problems if the blob entry has been revoked
in the meantime - see https://github.com/servo/servo/issues/25226.

Ideally we would want to resolve blobs at parse-time as required. But
because `ServoUrl` is such a fundamental type, I've not managed to do
this change without having to touch hundreds of files at once.

Thus, we now require passing a `UrlWithBlobClaim` instead of a
`ServoUrl` when `fetch`-ing. This type proves that the caller has
acquired the blob beforehand.

As a temporary escape hatch, I've added
`UrlWithBlobClaim::from_url_without_having_claimed_blob`. That method
logs a warning if its used unsafely. This method is currently used in
most places to keep this change small. Only workers now acquire the blob
beforehand.

Testing: A new test starts to pass
Part of https://github.com/servo/servo/issues/43326
Part of https://github.com/servo/servo/issues/25226

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2026-04-06 14:21:55 +00:00
Tim van der Lippe
324fed274a script: Pass &mut JSContext to Clipboard API's (#43975)
Part of #40600
Follow-up to #43943

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-06 13:47:17 +00:00
Tim van der Lippe
cac1a7f0fc script: Add basic implementation of font-size command (#43287)
This makes the most basic tests pass for the font-size command. Future
PR's will continue the work,
but since this is already large enough, this is a good save point.

Part of #25005

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-06 13:23:36 +00:00
Euclid Ye
cb2dd62e62 net: Improve HTTP fetch compliance (#43970)
Most notably, implement step 5 and removes the incorrect place for it.
Part of follow up to #43798

Testing:
[Try](https://github.com/yezhizhen/servo/actions/runs/24021988217/job/70054752138)

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-06 12:28:52 +00:00
Abbas Olanrewaju Sarafa
3d0cfe34bb storage: Make add_new_environment return a Result instead of panicking (#43949)
Removed the ```.unwrap()``` in ```add_new_environment``` causing the
storage thread to panic on SQLite failures

Testing: Ran ```./mach test-wpt tests/wpt/tests/webstorage/```
Result; 
```
▶ TIMEOUT [expected OK] /webstorage/storage_local_setitem_quotaexceedederr.window.html

Ran 53 tests finished in 63.9 seconds.
  • 52 ran as expected.
  • 1 tests timed out unexpectedly
```
Fixes: #43880

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 12:25:52 +00:00
Martin Robinson
82c2f1434e fonts: Clean up application of word-spacing (#43899)
Let `word_spacing` be optional in `ShapingOptions` like
`letter_spacing`. In addition, send `None` for Canvas rendering instead
of the width of the space character. It is supposed to represent *extra*
space added between words. Finally, remove duplicated code that applied
word and letter spacing for the fast shaper. This can just reuse the
code from the Harfbuzz shaper.

Testing: This causes some canvas tests to start passing.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-06 09:20:34 +00:00
Taym Haddadi
12ab179b05 IndexedDB: Fix object-store key range handling (#43901)
Fix object-store key range handling

Testing: key range handling wpt test fixed.
Fixes: part of #40983

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-06 09:15:27 +00:00
Abbas Olanrewaju Sarafa
00aa8c0e85 devtools: Replace new with register for LayoutInspectorActor (#43954)
Replaced new with register for LayoutInspectorActor in walker.rs &
layout.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 09:13:33 +00:00
Abbas Olanrewaju Sarafa
c938e97b3c devtools: Replace new with register for TargetConfigurationActor (#43915)
Replaced new with register for TargetConfigurationActor in
target_configuration.rs & watcher.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 09:12:17 +00:00
elomscansio
a7bc4a6fa9 script: implement render-blocking option for script fetch and load events (#43741)
Implement render-blocking option for script fetch and load events

## Testing: 
### Test summary on main branch
```bash
  ▶ OK [expected CRASH] /html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html

Ran 470 tests finished in 217.9 seconds.
  • 453 ran as expected.
  • 4 tests crashed unexpectedly
  • 1 tests timed out unexpectedly
  • 11 tests unexpectedly okay
  • 2 tests had unexpected subtest results

/home/elomscansio/.local/share/uv/python/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 3 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

```

### Test summary for this commits
```bash

Ran 470 tests finished in 488.0 seconds.
  • 397 ran as expected.
  • 15 tests crashed unexpectedly
  • 27 tests timed out unexpectedly
  • 11 tests unexpectedly okay
  • 28 tests had unexpected subtest results

```
Fixes: #43697
Fixes: #43354

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
Signed-off-by: elomscansio <163124154+elomscansio@users.noreply.github.com>
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
Co-authored-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-06 08:08:43 +00:00
Abbas Olanrewaju Sarafa
414a97c2e3 devtools: Replace new with register for AccessibleWalkerActor (#43967)
Replaced new with register for AccessibleWalkerActor in accessibility.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 07:26:54 +00:00
dependabot[bot]
5184707255 build: bump tokio from 1.50.0 to 1.51.0 in the tokio-rs-related group across 1 directory (#43960)
Bumps the tokio-rs-related group with 1 update in the / directory:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.50.0 to 1.51.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.51.0</h2>
<h1>1.51.0 (April 3rd, 2026)</h1>
<h3>Added</h3>
<ul>
<li>net: implement <code>get_peer_cred</code> on Hurd (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7989">#7989</a>)</li>
<li>runtime: add <code>tokio::runtime::worker_index()</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7921">#7921</a>)</li>
<li>runtime: add runtime name (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7924">#7924</a>)</li>
<li>runtime: stabilize <code>LocalRuntime</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7557">#7557</a>)</li>
<li>wasm: add wasm32-wasip2 networking support (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7933">#7933</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>runtime: steal tasks from the LIFO slot (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7431">#7431</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>docs: do not show &quot;Available on non-loom only.&quot; doc label
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7977">#7977</a>)</li>
<li>macros: improve overall macro hygiene (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7997">#7997</a>)</li>
<li>sync: fix <code>notify_waiters</code> priority in
<code>Notify</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7996">#7996</a>)</li>
<li>sync: fix panic in <code>Chan::recv_many</code> when called with
non-empty vector on closed channel (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7991">#7991</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/7431">#7431</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7431">tokio-rs/tokio#7431</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7557">#7557</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7557">tokio-rs/tokio#7557</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7921">#7921</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7921">tokio-rs/tokio#7921</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7924">#7924</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7924">tokio-rs/tokio#7924</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7933">#7933</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7933">tokio-rs/tokio#7933</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7977">#7977</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7977">tokio-rs/tokio#7977</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7989">#7989</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7989">tokio-rs/tokio#7989</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7991">#7991</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7991">tokio-rs/tokio#7991</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7996">#7996</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7996">tokio-rs/tokio#7996</a>
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7997">#7997</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/7997">tokio-rs/tokio#7997</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0af06b7bab"><code>0af06b7</code></a>
chore: prepare Tokio v1.51.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8005">#8005</a>)</li>
<li><a
href="01a7f1dfab"><code>01a7f1d</code></a>
chore: prepare tokio-macros v2.7.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8004">#8004</a>)</li>
<li><a
href="eeb55c733b"><code>eeb55c7</code></a>
runtime: steal tasks from the LIFO slot (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7431">#7431</a>)</li>
<li><a
href="1fc450aefb"><code>1fc450a</code></a>
runtime: stabilize <code>LocalRuntime</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7557">#7557</a>)</li>
<li><a
href="324218f9bb"><code>324218f</code></a>
Merge tag 'tokio-1.47.4' (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8003">#8003</a>)</li>
<li><a
href="aa65d0d0b8"><code>aa65d0d</code></a>
chore: prepare Tokio v1.47.4 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/8002">#8002</a>)</li>
<li><a
href="bf18ed452d"><code>bf18ed4</code></a>
sync: fix panic in <code>Chan::recv_many</code> when called with
non-empty vector on clo...</li>
<li><a
href="43134f1e57"><code>43134f1</code></a>
wasm: add wasm32-wasip2 networking support (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7933">#7933</a>)</li>
<li><a
href="b4c3246d33"><code>b4c3246</code></a>
macros: improve overall macro hygiene (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7997">#7997</a>)</li>
<li><a
href="7947fa4bd7"><code>7947fa4</code></a>
rt: add runtime name (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/7924">#7924</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.50.0...tokio-1.51.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 07:16:38 +00:00
niya
06921b0725 devtools: rename the remaining NodeActor variables (#43969)
- Renames variables containing the `NodeActor` name to `node_name`

Testing: Manually tested with `mach test-devtools` 
Fixes: #43606 as described
[here](https://github.com/servo/servo/issues/43606#issuecomment-4189623228)
for `NodeActor`

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-06 07:05:26 +00:00
Martin Robinson
73c64b6182 servoshell: Only dismiss the most-recently opened IME (#43932)
Servo may hide and show IME when handling `blur` and `focus` events, but
those events can be fired asynchronously when `<iframe>`s are involved.
This change ensures that we only dismiss the IME when it was the
most-recently opened one, making it so that an asynchronously fired
'blur' event for another control doesn't dismiss a newly opened one.

Testing: We don't really have testing for this level of servoshell.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-06 07:02:26 +00:00
Abbas Olanrewaju Sarafa
9799656127 devtools: Replace new with register for PauseActor (#43957)
Replaced new with register for PauseActor in pause.rs & lib.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-06 05:20:01 +00:00
Abbas Olanrewaju Sarafa
b8cff58b6c devtools: Replace new with register for WatcherActor (#43911)
Replaced new with register for WatcherActor in browsing_context &
watcher.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2026-04-06 05:14:13 +00:00
Tim Miller
3b128b37e3 script: Fix GC tracing of compiled JSScript pointers in ClassicScript (#43933)
Stores the compiled JSScript pointer in a rooted location that is
traceable by the GC. This fixes a crash observed in an experimental C#
Servo binding that could not be reproduced in servoshell.

Testing: No automated deterministic way to trigger this problem.

---------

Signed-off-by: Tim Miller <innerlogic4321@gmail.com>
2026-04-06 04:44:37 +00:00
Euclid Ye
0353f11ee2 script/mach: Increase stack size of ScriptThread/StyleThread to 8MiB to match recursion depth of other browsers (#43888)
TL;DR: We increase stack size of `ScriptThread` to 8MiB, and set Stylo
stack size environment var
to 8 MiB for all builds. This only reserves virtual memory space which
is
basically unlimited for 64-bit machine,
matches the recursion depth of Chromium for the example, which also uses
8MiB.

Stylo stack increase is necessary to prevent overflow when
refreshing/navigating to the example,
probably because initial load restyle incrementally but not refresh.

Testing: Added a Servo-specific test.

---
For example in #43845, we get stack overflow when we got more than 394
nested shadow roots.
For Chromium, it happens for more than 1631: 
<img width="290" height="127" alt="image"
src="https://github.com/user-attachments/assets/b3d75627-4e80-4586-9b85-4b58d8a0cd33"
/>
For Firefox, it overflows for more than 1052.

Initially I thought we didn't implement this optimally, and have
unnecessary recursion depth.
But the real reason is explained in Rust std:
> The default stack size is platform-dependent and subject to change.
Currently, it is 2 MiB on all Tier-1 platforms.

For Chromium, the visual studio dumpbin shows the stack size :
```
Dump of file C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
OPTIONAL HEADER VALUES
          800000 size of stack reserve
```
This is hex value, which is $8*16^5$, exactly 8MiB.

After we make the same change in Servo, we are fine at 1601 and
overflows at 1602.
This matches Chromium behaviour, defeating firefox, and should not
create much overhead,
as this only reserves virtual memory space: 
I tried to increase the value to 512MiB, but task manager still says
73MB RAM used,
and we won't crash even with 10000 nested shadow roots. 
But that is just for more evidence and uncalled for.

Fixes: #43845

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-06 03:10:11 +00:00
dependabot[bot]
da9b9d9aa0 build: bump semver from 1.0.27 to 1.0.28 (#43966)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.27 to 1.0.28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/semver/releases">semver's
releases</a>.</em></p>
<blockquote>
<h2>1.0.28</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7625c7aa3f"><code>7625c7a</code></a>
Release 1.0.28</li>
<li><a
href="fd404d082c"><code>fd404d0</code></a>
Merge pull request 351 from czy-29/master</li>
<li><a
href="f75f26e984"><code>f75f26e</code></a>
The <code>doc_auto_cfg</code> and <code>doc_cfg</code> features have
been merged</li>
<li><a
href="9e2bfa2ec8"><code>9e2bfa2</code></a>
Enable <code>serde</code> on <code>docs.rs</code> and automatically add
<code>serde</code> flag to the docs</li>
<li><a
href="8591f2344b"><code>8591f23</code></a>
Unpin CI miri toolchain</li>
<li><a
href="66bdd2ce5f"><code>66bdd2c</code></a>
Pin CI miri to nightly-2026-02-11</li>
<li><a
href="324ffce5d9"><code>324ffce</code></a>
Switch from cargo bench to criterion</li>
<li><a
href="34133a568a"><code>34133a5</code></a>
Update actions/upload-artifact@v5 -&gt; v6</li>
<li><a
href="7f935ffc72"><code>7f935ff</code></a>
Update actions/upload-artifact@v4 -&gt; v5</li>
<li><a
href="c07fb91353"><code>c07fb91</code></a>
Switch from test::black_box to std::hint::black_box</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/semver/compare/1.0.27...1.0.28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=semver&package-manager=cargo&previous-version=1.0.27&new-version=1.0.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 00:56:15 +00:00
dependabot[bot]
2a47b3dcef build: bump libz-sys from 1.1.25 to 1.1.28 (#43962)
Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.1.25 to
1.1.28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libz-sys/releases">libz-sys's
releases</a>.</em></p>
<blockquote>
<h2>1.1.28</h2>
<p>This release is mainly for testing the new <code>maint</code> tool to
prevent wrong releases in future.</p>
<p>It also adds a macOS fix for when the <code>cc</code> based build
script is used.</p>
<h2>1.1.27</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump actions/download-artifact from 8.0.0 to 8.0.1 in the
github-actions group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/263">rust-lang/libz-sys#263</a></li>
<li>fix(zlib): remove unnecessary defines by <a
href="https://github.com/weihanglo"><code>@​weihanglo</code></a> in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/264">rust-lang/libz-sys#264</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/weihanglo"><code>@​weihanglo</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/264">rust-lang/libz-sys#264</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/libz-sys/compare/1.1.25...1.1.27">https://github.com/rust-lang/libz-sys/compare/1.1.25...1.1.27</a></p>
<h2>1.1.26 [YANKED]</h2>
<h2>YANKED</h2>
<p>These didn't contain the actual source code and thus wasn't
functional.</p>
<h2>What's Changed</h2>
<ul>
<li>Bump actions/download-artifact from 8.0.0 to 8.0.1 in the
github-actions group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/263">rust-lang/libz-sys#263</a></li>
<li>fix(zlib): remove unnecessary defines by <a
href="https://github.com/weihanglo"><code>@​weihanglo</code></a> in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/264">rust-lang/libz-sys#264</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/weihanglo"><code>@​weihanglo</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/libz-sys/pull/264">rust-lang/libz-sys#264</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/libz-sys/compare/1.1.25...1.1.26">https://github.com/rust-lang/libz-sys/compare/1.1.25...1.1.26</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="346d882bef"><code>346d882</code></a>
bump version to 1.1.28 for macOS arm build fix via CC</li>
<li><a
href="7b4f21928c"><code>7b4f219</code></a>
cargo fmt and clippy</li>
<li><a
href="613d426250"><code>613d426</code></a>
Create a new <code>maint</code> tool to prevent common publishing
mistakes (<a
href="https://redirect.github.com/rust-lang/libz-sys/issues/265">#265</a>)</li>
<li><a
href="e4f06f16f4"><code>e4f06f1</code></a>
fix(zng): use crc32_armv8 for ARM cc builds</li>
<li><a
href="847cabf870"><code>847cabf</code></a>
bump to 1.1.27 for re-release after 1.1.26 was yanked</li>
<li><a
href="613a5cbca2"><code>613a5cb</code></a>
adapt <code>cargo-zng</code> script to deal with Cargo.lock file (by
ignoring it)</li>
<li><a
href="a2f22b1b51"><code>a2f22b1</code></a>
bump patch level prior to release</li>
<li><a
href="580d147321"><code>580d147</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/libz-sys/issues/264">#264</a>
from weihanglo/freebsd</li>
<li><a
href="817bbc0c6d"><code>817bbc0</code></a>
fix(zlib): remove unnecessary defines</li>
<li><a
href="232b03a9f9"><code>232b03a</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/libz-sys/issues/263">#263</a>
from rust-lang/dependabot/github_actions/github-actio...</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/libz-sys/compare/1.1.25...1.1.28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libz-sys&package-manager=cargo&previous-version=1.1.25&new-version=1.1.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 00:41:52 +00:00
dependabot[bot]
56cc25aaf0 build: bump arc-swap from 1.9.0 to 1.9.1 (#43961)
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.9.0 to
1.9.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md">arc-swap's
changelog</a>.</em></p>
<blockquote>
<h1>1.9.1</h1>
<ul>
<li>One more SeqCst :-| (<a
href="https://redirect.github.com/vorner/arc-swap/issues/204">#204</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f100e6c2ee"><code>f100e6c</code></a>
One more SeqCst</li>
<li>See full diff in <a
href="https://github.com/vorner/arc-swap/compare/v1.9.0...v1.9.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=arc-swap&package-manager=cargo&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 00:37:16 +00:00
dependabot[bot]
ae1d4b56cf build: bump glib from 0.22.3 to 0.22.4 in the gstreamer-related group (#43958)
Bumps the gstreamer-related group with 1 update:
[glib](https://github.com/gtk-rs/gtk-rs-core).

Updates `glib` from 0.22.3 to 0.22.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gtk-rs/gtk-rs-core/releases">glib's
releases</a>.</em></p>
<blockquote>
<h2>0.22.4</h2>
<pre><code>Bilal Elmoussaoui:
      glib: Allow setting FINAL/DEPRECATED flags
      ci: Only run compile tests on glib crate
      Fix typos job
<p>Ignacio Casal Quinteiro:
glib-win32: fix export of function</p>
<p>Sebastian Dröge:
Update gir / gir-files
Regenerate with latest gir / gir-files
rustfmt: Update to 2024 edition
glib: Make sure to acquire the main context and make it thread default
in <code>MainContext::block_on()</code>
glib: Add various <code>#[allow(deprecated)]</code> to
<code>glib::wrapper!</code> for when the parent class/interface is
deprecated
Update versions to 0.22.4
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="48b79229f2"><code>48b7922</code></a>
Revert &quot;gio: Add &quot;D-Bus&quot; and &quot;DBus&quot; to
Cargo.toml keywords and description&quot;</li>
<li><a
href="42be84cb2e"><code>42be84c</code></a>
Update versions to 0.22.4</li>
<li><a
href="0835bbce70"><code>0835bbc</code></a>
glib: Add various <code>#[allow(deprecated)]</code> to
<code>glib::wrapper!</code> for when the par...</li>
<li><a
href="dc7961a302"><code>dc7961a</code></a>
gio: Add &quot;D-Bus&quot; and &quot;DBus&quot; to Cargo.toml keywords
and description</li>
<li><a
href="8377bd2cc7"><code>8377bd2</code></a>
glib-win32: fix export of function</li>
<li><a
href="d77af0b6c3"><code>d77af0b</code></a>
Fix typos job</li>
<li><a
href="9ea24d8403"><code>9ea24d8</code></a>
ci: Only run compile tests on glib crate</li>
<li><a
href="a9d5040cb4"><code>a9d5040</code></a>
glib: Allow setting FINAL/DEPRECATED flags</li>
<li><a
href="aae7fcb22c"><code>aae7fcb</code></a>
glib: Make sure to acquire the main context and make it thread default
in `Ma...</li>
<li><a
href="fac3d07f2a"><code>fac3d07</code></a>
rustfmt: Update to 2024 edition</li>
<li>Additional commits viewable in <a
href="https://github.com/gtk-rs/gtk-rs-core/compare/0.22.3...0.22.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=glib&package-manager=cargo&previous-version=0.22.3&new-version=0.22.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-06 00:17:52 +00:00
Sharan Poojari
57b86edb89 layout: Fix line breaking opportunities for Chinese and Japanese (#43744)
Enable `CJK-aware` line breaking in inline layout so Chinese/Japanese
text gets proper wrap opportunities instead of overflowing containers.

Testing: some WPT are now passing

---------

Signed-off-by: SharanRP <z8903830@gmail.com>
2026-04-05 23:15:54 +00:00
Abbas Olanrewaju Sarafa
674bd2567c devtools: Replace new with register for TabDescriptorActor (#43909)
Replaced new with register for TabDescriptorActor in browsing_context &
tab.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-05 21:47:40 +00:00
Tim van der Lippe
a1c8896eda script: Pass &mut JSContext to reflect_node_with_proto (#43952)
A lot (and I mean, really a lot) depends on these constructors.
Therefore, this is the one spaghetti ball that I could extract and
convert all `can_gc` to `cx`. There are some new introductions of
`temp_cx` in the callbacks of the servo parser, but we already had some
in other callbacks.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-05 18:07:30 +00:00
rovertrack
621f6b0cf7 servo: Use _ prefixed names for unused arguments for public API functions (#43947)
updated all methods that were using underscore in arguments

- `WebViewDelegate`
   - `notify_cursor_changed`: Added _cursor.
   - `notify_traversal_complete`: Added _traversal_id.
   - `notify_input_event_handled`: Added _event_id and _result.
   - `notify_fullscreen_state_changed`: Added _is_fullscreen.
   - `request_move_to`: Added _point.
   - `request_create_new`: Added _request.
   - `request_permission:` Added _request.
   - `show_bluetooth_device_dialog`: Added _request.
 - `WebXrRegistry`
    - `register`: Added _registry

Testing: No tests necessary as this is just renaming argument.
Fixes: #43894

Signed-off-by: Rover track <rishan.pgowda@gmail.com>
2026-04-05 16:03:51 +00:00
Muhammad Mostafa
bb368dbb12 script: Add error messages in StaticRange (#43260)
Adds specific InvalidNodeType error messages in StaticRange for
Constructor().

Part of [#40756](https://github.com/servo/servo/issues/40756)

Signed-off-by: Mohamed Mostafa <mohamedmoustafaa1998@gmail.com>
2026-04-05 12:40:03 +00:00
Tim van der Lippe
46582ec41d script: Remove CanGc::note() from create.rs (#43946)
Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-05 12:28:12 +00:00
Tim van der Lippe
496d808ab1 script: Pass &mut JSContext to consume_stream (#43944)
Migrates all but one `CanGc::note()` to `cx`. The
last one requires `invoke_script_environment_preparer` to have a safe
hook in mozjs.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-05 11:31:21 +00:00
Tim van der Lippe
1fd77d022e script: Pass &mut JSContext to make_atomic_setter (#43942)
Part of #42812

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-05 11:26:55 +00:00
Tim van der Lippe
cf1b104b1a script: Pass &mut JSContext to RoutedPromiseListener (#43943)
Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-05 11:18:25 +00:00
Martin Robinson
9da7484061 script: Support deleting words with backspace in textual inputs (#43940)
This change makes it so that when you press alt or control (depending on
the platform) while backspacing, entire words are deleted. This matches
the behavior of the major desktop platforms.

Testing: This change adds a Servo-specific test for this behavior as
well
as for normal backspacing.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-05 10:28:31 +00:00
Taym Haddadi
6d6d1d371e IndexedDB: Fix fire-success/error event exception handling and explicit commit (#43914)
Fix fire-success/error event exception handling and explicit commit

Testing: fire-success/error event wpt test fixed.
Fixes: part of #40983

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-05 07:26:34 +00:00
webbeef
0b5688fdfa parser: add a pretty printer for top-level json documents (#43702)
This adds a new resource implementing a simple pretty printer for json
documents.

Testing: build this branch and launch with `./mach run
https://httpbin.org/json`

<img width="1044" height="1064" alt="image"
src="https://github.com/user-attachments/assets/42680c4b-2971-482a-af2b-9017f0f81752"
/>

---------

Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-04-05 06:50:52 +00:00
Kingsley Yung
623ce59383 script: Move Web Crypto interfaces to script/dom/webcrypto (#43939)
Move interfaces defined by the Web Crypto specification to the
`script/dom/webcrypto/` from `script/dom/`. This includes `Crypto`,
`CryptoKey` and `SubtleCrypto` (with its submodules).

Testing: No behavior changes.
Fixes: Part of #38901

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-05 06:42:00 +00:00
Jonathan Schwender
e6ed6954b4 bootstrap: Sync packages with book (#43931)
This commit removes some unneeded lines from README.md in the
linux_packages folder. This will trigger `book-export` to run, since it
creates a diff in that folder.
Since the export only happens if there is a diff, and there have been
not changes since the auto sync PR landed, the formatting related
changes never got upstreamed (sorting the packages).

This also duplicates as a test of the #43920 (merged), to be absolutely
sure that it works as intended.

Testing: not required / in a way this is a test of our book-export
action.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-05 06:36:49 +00:00
Abbas Olanrewaju Sarafa
2476d98f34 devtools: Replace new with register for ThreadConfigurationActor (#43916)
Replaced new with register for ThreadConfigurationActor in
thread_configuration.rs & watcher.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-05 06:15:27 +00:00
Euclid Ye
bb94d98bb2 mach: Set up build mode (Side effect: Stylo thread stack size reduced to 512 KiB again for most build) (#43930)
Previously the mode is always "". Now we set it to the real profile.
Note that previously, all the build has 2MiB stylo thread stack size,
which is unintended.
What we wanted is to make it so for debug build, and 8MiB for ASAN.

Now, those other than debug/ASAN would have 512KiB default stack size
again.

Testing: Manually tested and printed the mode at
0b6b97384d/python/servo/command_base.py (L419-L420).
Fixes: #43927

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-05 01:51:58 +00:00
Servo WPT Sync
ff9e242de9 Sync WPT with upstream (05-04-2026) (#43938)
Automated downstream sync of changes from upstream as of 05-04-2026
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2026-04-05 01:39:41 +00:00
Jambong Ralpher
54987adba2 Automatically generate CONTENT_EVENT_HANDLER_NAMES from WebIDL (#43848)
Replaced the hand-written CONTENT_EVENT_HANDLER_NAMES list in
eventtarget.rs with an auto-generated version. A new
ContentEventHandlerNames method in codegen.py iterates through WebIDL
descriptors whose prototype chain includes Node, collects attribute
members with EventHandler callback types, and generates a sorted,
duplicate free Rust array. The list is included from eventtarget.rs
eliminating manual maintenance and ensuring it stays in sync
automatically.

Testing: Build passes with cargo build -j2 -p servo-script. The
generated ContentEventHandlerNames.rs produces the same set of event
handler names as the previous hand-written list. No new runtime tests
are needed since this is a compile time change.

Fixes: #43611

Signed-off-by: staysafe020 <jambongralpher@gmail.com>
2026-04-04 20:52:41 +00:00
Abbas Olanrewaju Sarafa
7c05e1556f devtools: Replace new with register for ProcessActor (#43923)
Replaced new with register for ProcessActor in process.rs & root.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 13:17:20 +00:00
Abbas Olanrewaju Sarafa
3af1abc013 devtools: Replace new with register for AccessibilityActor (#43907)
Replaced new with register for AccessibilityActor in browsing_context &
accessibility.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 13:14:16 +00:00
Jonathan Schwender
06f6320609 ci: Secure book-sync secrets with environment (#43920)
We defined a github environment `book-sync` which contains the required
secrets.
After merging this PR we can remove the secrets from the per-repository
secrets, which reduces the scope the secrets are available in, and has
the added restriction of only being available on protected branches.

Testing: Prior to this PR, the functionality was tested on the
`environments` branch and discussed in the maintainers chat. After this
PR is merged, a manual check should be done to ensure the book-export
workflow still continues to work as expected.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-04 11:34:27 +00:00
Tim van der Lippe
a683c03140 script: Pass &mut JSContext to make_int_setter (#43928)
Part of #42638

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-04 11:23:37 +00:00
Martin Robinson
953206e7c4 script: Add an initial implementation of relatedTarget forfocus/blur events (#43926)
This is an initial implementation for `relatedTarget` of `focus` and
`blur` events. As the code doesn't yet follow the specification this is
a bit tricky to associate with specification text, but this should be
correct. A later change will adapt the code to the "focusing steps" part
of the specification.

In addition, a duplicated call to `Element::set_focus_state` is removed.

Testing: This gets one more WPT test passing.

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-04-04 10:32:22 +00:00
Ashwin Naren
3718abd626 Prevent panic on client storage directory conflict (#43918)
Instead of erroring out, it makes sense to open an in memory database so
that the thread can keep functioning.

Fixes:
https://servo.zulipchat.com/#narrow/channel/263398-general/topic/WPT.20regression

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2026-04-04 10:24:24 +00:00
Abbas Olanrewaju Sarafa
571562c092 devtools: Replace new with register for NetworkEventActor (#43925)
Replaced new with register for NetworkEventActor in network_event.rs &
lib.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 09:24:45 +00:00
Abbas Olanrewaju Sarafa
86dca5f7dd devtools: Replace new with register for BrowsingContextActor (#43924)
Replaced new with register for BrowsingContextActor in
browsing_context.rs & lib.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 09:23:36 +00:00
Jonathan Schwender
42ba33d7ef mach: Fix typo in allocator feature name (#43922)
This name was mistyped during the rename of the servo crates to be
`servo-` prefixed.

Testing: Manual testing with `./mach build --with-asan`. This is not run
in CI.

Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
2026-04-04 09:15:58 +00:00
Abbas Olanrewaju Sarafa
0b6b97384d devtools: Replace new with register for PerformanceActor (#43921)
Replaced new with register for PerformanceActor in performance.rs &
root.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 08:27:26 +00:00
Abbas Olanrewaju Sarafa
b886d57024 devtools: Replace new with register for ThreadActor (#43910)
Replaced new with register for ThreadActor in browsing_context,
thread.rs & lib.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 07:47:23 +00:00
Abbas Olanrewaju Sarafa
f161acbdaf devtools: Replace new with register for BreakpointListActor (#43917)
Replaced new with register for BreakpointListActor in breakpoint.rs &
watcher.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 06:50:16 +00:00
Tim van der Lippe
20265ced1d script: Allow for implicit cx for setters (#43524)
Rather than specifying a cx for every single CSS property from Stylo, we
instead make it implicit. This allows us to remove the `CanGc::note()`
from the macro and pass in the `cx` as normal.

We can use a similar approach for setters in other elements where we use
the setter macros.

Part of #42812

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-04 06:46:13 +00:00
Abbas Olanrewaju Sarafa
4876a49eba devtools: Replace new with register for CssPropertiesActor (#43908)
Replaced new with register for CssPropertiesActor in browsing_context &
css_properties.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2026-04-04 05:57:41 +00:00
Abbas Olanrewaju Sarafa
2ce06e370d devtools: Replace new with register for NetworkParentActor (#43913)
Replaced new with register for NetworkParentActor in network_parent.rs &
watcher.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 04:59:45 +00:00
Abbas Olanrewaju Sarafa
410f4a4270 devtools: Replace new with register for ReflowActor (#43906)
Replaced new with register for ReflowActor in browsing_context &
reflow.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-04 04:56:07 +00:00
yvt
c6bb3cc363 Implement the IDL security check (#28583)
<https://heycam.github.io/webidl/#es-operations>
<https://html.spec.whatwg.org/multipage/#integration-with-idl>

This PR implements the IDL security check, which is an important (but
not only) mechanism to restrict cross-origin DOM accesses.

This implementation follows WebKit's behavior and not the specification
for the following reasons:

 - Neither Gecko nor WebKit implements the specification's behavior.
- This would require a relatively elaborate mechanism *just* to have
access to the target object's `CrossOriginProperties`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

---
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2026-04-04 04:18:08 +00:00
Simon Sapin
894327e5d9 Don’t print passing unit tests (#43902)
This removes from the output of `./mach test-unit` hundreds of lines
like:

```
        PASS [   0.011s] style_tests str::test_str_join_empty
```

Signed-off-by: Simon Sapin <simon@igalia.com>
2026-04-04 01:59:05 +00:00
xtqqczze
c8c200cf96 build(deps): bump rustix from 1.1.2 to 1.1.4 (#43898)
Signed-off-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
2026-04-04 00:55:03 +00:00
Taym Haddadi
2c5f981d46 indexeddb: abort pending worker upgrade and delete new db on rollback (#42998)
Abort pending upgrade requests when a worker closes, correctly roll back
newlyy created databases by deleting backend state on old_version == 0.

Testing: IndexedDB/worker-termination-aborts-upgrade.window.js.ini test
pass.
part of https://github.com/servo/servo/issues/40983

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-03 22:32:13 +00:00
Martijn Gribnau
9b69acb88b Replace normal struct instantiation with register for WalkerActor (#43881)
Part of a larger refactor to name all actors and variables consistently,
#43800.

Testing: not necessary beyond `mach test-devtools` per #43800 / #43606
Fixes: `#43800` ((not linking because it's one of many PR's).

Signed-off-by: Martijn Gribnau <garm@ilumeo.com>
2026-04-03 19:04:12 +00:00
Martin Robinson
c0d0a87b01 script: Modernize the HTMLElement WebIDL (#43904)
The WebIDL file for `HTMLElement` was quite out of date. This change
makes it match the current HTML specification and also moves `blur()` to
`HTMLOrSVGElement` as it is in the spec. The implementation is just a
copy of the one for `HTMLElement` as we do for `focus()`.

Testing: This should not change behavior (other than adding a `blur()`
method
for SVG -- which we don't support), so should be covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-03 18:25:33 +00:00
Martin Robinson
b9df62427b script: Expose legacy table cellSpacing, cellPadding, and align DOM properties (#43903)
We support these setting these as attributes on the `<table>` element
itself, so I suppose it also makes sense to support their DOM APIs as
well. This trades a teensy bit of code for compatability with a some old
web content.

Testing: This causes a handful of reflection subtests to start passing.
There
isn't much testing for the behavior of the attributes, but this is
legacy
behavior so it sort of makes sense.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-03 18:09:13 +00:00
Shubham Gupta
4e315eba20 paint: Use viewport meta tag's min-scale and max-scale to clamp pinch zoom (#40098)
**Note: Targeting Mobile devices only.**

Clamp Pinch Zoom factor using `viewport`' scale range parsed from
`<meta>` tag.

## **Behavior in Servo with this PR**

Zoom Type |  Device Type | Meta Supported |Range 
-- | -- | -- | -- 
Pinch Zoom |  Mobile | Yes |Parsed from <meta> 
Pinch Zoom |  Desktop | No |Default

## **Observed behavior in Chrome**:

Device Type | Viewport Meta Support (pref) | Pinch Zoom (No Reflow) |
Zoom (using keyboard)
-- | -- | -- | --
Mobile (Android) | Yes | Clamped within Viewport Meta Range | Applied to
Pinch Zoom*
Desktop (Touch Screen) | No | Clamped within Default Range | Same as
Zoom (using menu)

## References from Chromium:
- Defination of
[page_scale_delta](https://source.chromium.org/chromium/chromium/src/+/main:cc/trees/layer_tree_host_client.h;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=39?gsn=page_scale_delta&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dcc%2Ftrees%2Flayer_tree_host_client.h%23SKME3VsvfEmKrf_3d5aQckyeMEaDxgiGETVRCM1Haac);
-
[WebViewImpl::ApplyViewportChanges](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/exported/web_view_impl.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=4108?gsn=ApplyViewportChanges&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dthird_party%2Fblink%2Frenderer%2Fcore%2Fexported%2Fweb_view_impl.cc%23ll5snmeunTDzY4PwOwxyrNwNc4EI13SFfZnHIWuBsNw)
->
[SetPageScaleFactorAndLocation](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/exported/web_view_impl.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=2430?gsn=SetPageScaleFactorAndLocation&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dthird_party%2Fblink%2Frenderer%2Fcore%2Fexported%2Fweb_view_impl.cc%23wJPsxPYe-aA-buH8xy-IKLTHLqtZ_IgGsuARSYerlUE)
->
[SetScaleAndLocation](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/visual_viewport.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=513?gsn=SetScaleAndLocation&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dthird_party%2Fblink%2Frenderer%2Fcore%2Fframe%2Fvisual_viewport.cc%23u-DPCmPBwcQcKi3oKJ1duPI83otfHDXzsQI8KMYusaA)
->
[DidSetScaleOrLocation](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/visual_viewport.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=543?gsn=DidSetScaleOrLocation&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dthird_party%2Fblink%2Frenderer%2Fcore%2Fframe%2Fvisual_viewport.cc%23cUPTZHhvInyEDOapVOzXmCPKg9DO_tYGVZY7y0D9EBw)
->
[ClampToConstraints](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/page_scale_constraints.cc;drc=56c66e417c83e2096a4e4e8a5c4ab7bbd525c9f3;bpv=1;bpt=1;l=60?gsn=ClampToConstraints&gs=KYTHE%3A%2F%2Fkythe%3A%2F%2Fchromium.googlesource.com%2Fcodesearch%2Fchromium%2Fsrc%2F%2Fmain%3Flang%3Dc%252B%252B%3Fpath%3Dthird_party%2Fblink%2Frenderer%2Fcore%2Fframe%2Fpage_scale_constraints.cc%23hQCpRu6_p6TTaFLTpDMnO_d-g3SnRpG-p5UlazTZlK8)

Testing: New WPT Test Added:
`wpt/visual-viewport/viewport-scale-clamped.html`



Fixes: #40390 (Observed Inconsistent behavior with Chrome Android)

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-03 11:50:31 +00:00
Narfinger
6cece2de59 servo: Add WebView::load_request and UrlRequest to the API (#43338)
This is the continuation of https://github.com/servo/servo/pull/43310
with permission from https://github.com/longvatrong111 to continue the
work as they are currently busy.

This changes the previous PR by having a a new URLRequest object that
can have more parameters. Currently we only implement headers.


Testing: We only have unit tests for the embedder API and I am not sure
how they would look like in this case.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Co-authored-by: batu_hoang <longvatrong111@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-04-03 11:09:30 +00:00
Abbas Olanrewaju Sarafa
b95dbb8721 devtools: Replace new with register for ConsoleActor (#43896)
Replace new with register for ConsoleActor in console & lib.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-03 10:50:21 +00:00
Martin Robinson
f5c23cd711 servoshell: Only send ImeEvent::Dismissed when the user dismisses the IME (#43872)
We receive the `Ime::Disabled` event both when the user dismisses the
IME and
when Servo itself dismisses it (for instance, when changing focus on the
page).
Servo will blur the current element upon receiving
`ImeEvent::Dismissed`,
leading to spurious focus behavior. Address this by only sending this
message
to Servo when it was triggered by the user (as best as we can tell).
This
problem was revealed by improvements in the internal focus APIs.

This is a bit of a bandaid until we have a more robust IME API. There
are
still missing pieces in both Servo and in winit.

Testing: This is a bit tricky to test as it depends a lot on when
messages are
sent to servoshell from winit / the windowing system and when Servo
processes
focus events.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-03 10:41:49 +00:00
Martin Robinson
e3c894b12e servo: Remove WebViewDelegate::play_gamepad_haptic_effect and WebViewDelegate::stop_gamepad_haptic_effect (#43895)
This functionality was moved to the `GamepadDelegate`, but the old
delegate methods were never removed. They are currently unused.

Testing: This change just removes dead code, so no tests are necessary.
Fixes: #43743

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-03 10:23:08 +00:00
Simon Wülker
a9dd2b3d15 servo: Fix rustdoc warnings (#43892)
One warning remains:
```
warning: public documentation for `intercept` links to private item `InterceptedWebResourceLoad`
   --> components/servo/webview_delegate.rs:240:11
    |
240 |     /// [`InterceptedWebResourceLoad`].
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ this item is private
    |
    = note: this link resolves only because you passed `--document-private-items`, but will break without
    = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default

warning: `servo` (lib doc) generated 1 warning
```

I think that's a false positive, because `InterceptedWebResourceLoad`
*is* public.

Testing: We don't run `./mach doc` in CI, so there's no way to test this

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-03 10:19:38 +00:00
Abbas Olanrewaju Sarafa
91ede77766 devtools: Replace new with register for DeviceActor (#43893)
Replace new with register for DeviceActor in device & root.rs

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-03 10:18:04 +00:00
Babalola Taiwo J
ac712151b5 script: Fix assertion failure when stringifying cross-origin location object (#43844)
This fixes the assertion failure (`!JS_IsExceptionPending(*cx)`) that
happens when `console.log()` is called on a cross-origin location object
(e.g. `console.log(frame.contentWindow.location)`).

The problem was that `maybe_stringify_dom_object` calls `ToString` on
cross-origin objects, which throws a JS exception via the
`DissimilarOriginLocation` stringifier. That exception was never
cleared, so subsequent JS API calls would hit the assertion.

The fix refactors `console_argument_from_handle_value` using an
inner/outer function pattern based on @jdm's suggestion:
- The inner function returns `Result<ConsoleArgument, ()>` and returns
`Err(())` when `console_object_from_handle_value` returns `None` for an
object, instead of falling through to `stringify_handle_value` which
could trigger the same crash
- The outer function catches the `Err`, reports any pending JS exception
via `report_pending_exception`, and returns a fallback `ConsoleArgument`

Fixes #43530

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach fmt` produces no changes
- [x] There are tests for these changes

---------

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-04-03 10:15:05 +00:00
Sam
e6782a5bda script: Support auto generating all types of cx (#43174)
This will be useful in the future but for now we just always emit old
cx.

Testing: None
Work for #40600

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-04-03 08:43:58 +00:00
Abbas Olanrewaju Sarafa
c5c26230a2 devtools: Replace new with register for StyleSheetsActor (#43889)
Replaced new with register for StyleSheetsActor in browsing_context &
stylesheets

Testing: No testing required, compiles successfully.
Fixes: Part of #43800

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-03 07:00:54 +00:00
Kingsley Yung
c1e9e04868 script: Implement SubtleCrypto.supports (#43703)
Implement the `SubtleCrypto.supports` method in our WebCrypto API. The
*check support for an algorithm* algorithm is also implemented to
support the functionality of the `SubtleCrypto.supports` method.

The `SubtleCrypto.supports` method has two overloads. One of them has a
union containing a non-object value at the distinguishing index. Our
`codegen.py` currently does not support unions of non-object values at
distinguish index. So, `codegen.py` is also patched to extend its
support to unions of objects, strings, numbers and boolean values.

Specification of `SubtleCrypto.supports`:

https://wicg.github.io/webcrypto-modern-algos/#SubtleCrypto-method-supports
Specification of "check support for an algorithm":

https://wicg.github.io/webcrypto-modern-algos/#dfn-check-support-for-algorithm

Testing:
- Pass WPT tests related to `supports` method.
- Add new tests for IDL operation overloading with unions of various
types.

Fixes: Part of #40687

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-04-03 06:52:26 +00:00
Euclid Ye
b47ab9c500 net: Set "request-includes-credentials" and URL list of response for "HTTP-network-or-cache fetch" (#43798)
Part of #33616

Implement step 11, 13 of [HTTP-network-or-cache
fetch](https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch)

Testing: The value should be used in
https://fetch.spec.whatwg.org/#cross-origin-resource-policy-internal-check,
which will be done in a follow up. Right now it is not used.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-03 06:49:10 +00:00
treetmitterglad
0054b71d38 Fix error message for illegal HTML element constructors (#41107) (#43882)
Changes the error message for illegal HTML element constructors like
`new HTMLElement()` from `new.target must not be the active function
object` to `Illegal constructor.`, matching Chrome, Firefox, and the
HTML spec.

Ran `./mach test-wpt tests/wpt/tests/custom-elements`. 180 tests passed
as expected, 1 pre-existing unrelated crash in `HTMLMediaElement`.

#41107

Signed-off-by: Eli Bowman <asdfup@protonmail.com>
2026-04-03 01:41:56 +00:00
Josh Matthews
b386708c93 script: Move eventsource out of event module. (#43884)
The EventSource interface is unrelated to the other code in the event
module.

Testing: Just moving code around; no runtime impact.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-03 01:40:49 +00:00
CynthiaOketch
1385107eb9 wpt: Enable /infrastructure tests (#20889) (#43879)
Added the top-level `/infrastructure` WPT directory to `include.ini`,
which was previously excluded by the root `skip: true` default.

- Skipped `[reftest]` as I was unsure whether the failures indicate a
real bug in Servo's reftest engine
- Skipped `[testdriver][bidi]` as BiDi WebDriver is not supported
- Added metadata for known expected failures (service workers, shared
workers, expected-fail harness tests, etc.)
- Removed stale metadata for tests that now pass


Testing: 
  Ran` ./mach test-wpt infrastructure/ ` before and after the change.
                                                                  
  Before: 114 ran as expected, 69 unexpected results.
  After: 166 ran as expected. Remaining 15 unexpected results are
  all in /infrastructure/reftest/ which is skipped in include.ini.

Fixes: #20889

---------

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-04-03 00:46:22 +00:00
Oriol Brufau
b0582911db Upgrade Stylo to 2026-04-01 (#43878)
This continues  #43045

Changelog:
- Upstream:
74ddab4091...6de1071549
- Servo fixups:
9f2f4f3f1b...6cfce6f329

Stylo tracking issue: https://github.com/servo/stylo/issues/347

Summary of improvements:
 - Adding support for the CSS-wide `revert-rule` keyword
- `::details-content` becomes element-backed, thus accepting nested
pseudo-elements like `::details-content::before`.
- Custom properties can now be registered using dashed idents in their
syntax
 - Various `attr()` improvements

Testing: Various WPT improvements

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-04-03 00:03:25 +00:00
niya
b1fc99bc6c refactor: rename PropertyIteratorActor related variable names (#43876)
Rename variables associated with `PropertyIteratorActor`

Testing: Tested locally with `mach test-devtools`

Fixes: A part of #43606

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-02 19:06:09 +00:00
niya
ff4122bc51 devtools: rename ObjectActor and SymbolIteratorActor variables names (#43875)
Rename variables associated with `ObjectActor` and `SymbolIteratorActor`

Testing: Tested locally with mach test-devtools

Fixes: A part of https://github.com/servo/servo/issues/43606

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-02 17:52:01 +00:00
Martin Robinson
87627c4c74 script: Also set the focus state on focused area's shadow hosts (#43873)
The specification says that `:focus` should be active on all shadow
hosts of ancestors of focused areas. This change does that by exposing a
new `DocumentFocusHandler::set_focused_element` method and also using it
during the "removing steps." This is important because unlike the
"focusing steps" `set_focused_element` does not cause focus and blur
events.

Testing: This leads to a progression in results on 8 WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-02 17:21:16 +00:00
Kelechi Ebiri
e1f4c1f869 stylo: Update Stylo to remove PseudoElement::DetailsSummary. (#43849)
Companion PR for servo/stylo#345
Fixes: #43812

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-02 17:14:52 +00:00
Martin Robinson
ed8576b163 script: Move all focus-related code to components/script/document/focus.rs and create DocumentFocusHandler (#43868)
This continues the work to split up the large DOM structs. In this case
we create a helper struct to store focus-related state much like
`DocumentEventHandler`.

Testing: This is mostly code motion, so should be covered by existing
tests.
Fixes: #43720

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-02 14:11:32 +00:00
Abbas Olanrewaju Sarafa
782dce68c4 Used encoding-parsing algorithm in follow_hyperlink (#43822)
Used encoding-parsing algorithm in follow_hyperlink

Testing: Ran ```./mach test-wpt
tests/wpt/tests/html/semantics/links/links-created-by-a-and-area-elements```
Result;
```
Running 11 tests in web-platform-tests

Ran 11 tests finished in 74.9 seconds.
  • 11 ran as expected.
```

Second test;
```./mach test-wpt tests/wpt/tests/html/semantics/links/links-created-by-a-and-area-elements/anchor-src-encoding.html```
Result;
```
web-platform-test
~~~~~~~~~~~~~~~~~
Ran 2 checks (1 subtests, 1 tests)
Expected results: 2
Unexpected results: 0
OK
```

Fixes: #43508

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-04-02 13:45:08 +00:00
Jonathan Schwender
78ffbe8caa servo-hyper-serde: Use the workspace version (#43866)
`hyper_serde` currently has no dependants on crates.io. We give up the
independant versioning and simplify our setup by using the same version
as our workspace. The new crate is servo-hyper-serde.

Testing: Not required, policy change.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-02 12:25:12 +00:00
elomscansio
1e213e59b2 script: Move MutationObserver DOM interfaces to script/dom/mutationobserver (#43865)
Moves MutationObserver interfaces into script/dom/mutationobserver/
module from script/dom/.

Testing: Just a refactor shouldn't need any testing.
Fixes: Part of https://github.com/servo/servo/issues/38901

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2026-04-02 11:52:56 +00:00
Martin Robinson
33f74feffd script: Fully implement DocumentOrShadowRoot#activeElement (#43861)
`DocumentOrShadowRoot#activeElement` should return retargeted results.
What that means is that if the DOM anchor of the `Document`'s focused
focusable area is within a shadow root, `Document#activeElement` should
return the shadow host. This change implements that behavior, properly
returning the `activeElement` from both `Document` and `ShadowRoot`.

Testing: This causes a decent number of WPT tests and subtests to start
passing. One subtest starts to fail, because it uses the `autofocus`
attribute
which we do not yet support.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-02 11:12:30 +00:00
atbrakhi
9a43d43c32 devtools: Merge preview and scopes (#43860)
Before we had seperate parsing functions for preview and scopes. In this
change we merge them into one.

Testing: current tests are passing, also tested manually.
Fixes: #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-04-02 10:02:38 +00:00
Martin Robinson
5b743ef1f4 script: Run the focusing steps when navigating to a fragment (#43859)
When navigating to a fragment the specification says to run the focusing
steps. This is possible now that the focusing steps are properly
exposed. This change also adds support for the fallback option, which is
used when the focus target is not associated with a focuable area. In
this case the fallback is to focus the viewport.

Testing: This change adds a new WPT for this behavior, which was
seemingly not tested before.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-02 09:34:05 +00:00
Narfinger
f7d77754ff base: Implement MallocSizeOf for some more types (#43858)
This implements MallocSizeOf for a couple more types and removes some
"ignore_malloc_size_of" throughout the codebase.
- std::path::PathBuf
- tokio::sync::oneshot::Sender
- http::HeaderMap (with a reasonable approximation of iterating over all
headers)
- data_url::Mime by looking at the inner type
- http::Method: Is an enum internally
- urlpattern::Urlpattern: Iterating over all public fields that are
strings as an approximation.

Testing: We cannot test if MallocSizeOf is correct currently.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2026-04-02 08:13:08 +00:00
Tim van der Lippe
5fdd425dd2 script: Align navigate more with spec steps (#43857)
This moves step 23 to the end of the algorithm and also updates the spec
steps related to JavaScript navigations.

Testing: WPT

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-04-02 08:11:07 +00:00
Euclid Ye
beed34612c devtools: Update outdated TODO (#43851)
These were here 10 years ago.

1. All Actor names are already immutable: 
- All actor implementations store a name: String field set at
construction and never mutate it.
- The name is only used as key by `ActorRegistry` to look up
2. There is no `register_later`

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-02 07:37:16 +00:00
dependabot[bot]
12fb7f415d build: bump hyper from 1.8.1 to 1.9.0 (#43856)
Bumps [hyper](https://github.com/hyperium/hyper) from 1.8.1 to 1.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper/releases">hyper's
releases</a>.</em></p>
<blockquote>
<h2>v1.9.0</h2>
<h2>Features</h2>
<ul>
<li><strong>client:</strong>
<ul>
<li>expose HTTP/2 current max stream count (<a
href="https://redirect.github.com/hyperium/hyper/issues/4026">#4026</a>)
(<a
href="d51cb71569">d51cb715</a>)</li>
<li>add HTTP/2 <code>max_local_error_reset_streams</code> option (<a
href="https://redirect.github.com/hyperium/hyper/issues/4021">#4021</a>)
(<a
href="577874591c">57787459</a>)</li>
</ul>
</li>
<li><strong>error:</strong> add 'Error::is_parse_version_h2' method (<a
href="393c77c711">393c77c7</a>)</li>
<li><strong>http1:</strong> add UpgradeableConnection::into_parts (<a
href="e21205cfe4">e21205cf</a>)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li><strong>ffi:</strong> validate null pointers before dereferencing in
request/response functions (<a
href="https://redirect.github.com/hyperium/hyper/issues/4038">#4038</a>
(<a
href="28e73ccd23">28e73ccd</a>)</li>
<li><strong>http1:</strong>
<ul>
<li>allow keep-alive for chunked requests with trailers (<a
href="https://redirect.github.com/hyperium/hyper/issues/4043">#4043</a>)
(<a
href="7211ec25ef">7211ec25</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4044">#4044</a>)</li>
<li>use case-insensitive matching for trailer fields (<a
href="https://redirect.github.com/hyperium/hyper/issues/4011">#4011</a>)
(<a
href="3b344cac9f">3b344cac</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4010">#4010</a>)</li>
<li>use httparse config for Servers (<a
href="https://redirect.github.com/hyperium/hyper/issues/4002">#4002</a>)
(<a
href="bcb8ec5766">bcb8ec57</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/3923">#3923</a>)</li>
</ul>
</li>
<li><strong>http2:</strong>
<ul>
<li>cancel sending client request body on response future drop (<a
href="https://redirect.github.com/hyperium/hyper/issues/4042">#4042</a>)
(<a
href="5b17a69ebc">5b17a69e</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4040">#4040</a>)</li>
<li>non-utf8 char in Connection header may cause panic when calling
to_str (<a
href="https://redirect.github.com/hyperium/hyper/issues/4019">#4019</a>)
(<a
href="c36ca8a5c5">c36ca8a5</a>)</li>
</ul>
</li>
</ul>
<h2>Refactors and chores</h2>
<ul>
<li>docs(error): add more information about is_incomplete_message by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper/pull/3978">hyperium/hyper#3978</a></li>
<li>Run cargo-audit in CI to check for known vulnerabilities in
dependencies. by <a
href="https://github.com/f0rki"><code>@​f0rki</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/3246">hyperium/hyper#3246</a></li>
<li>refactor(http1): simplify match of Token parse error by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper/pull/3981">hyperium/hyper#3981</a></li>
<li>refactor(http1): use saturating_sub instead of manual impl by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper/pull/3983">hyperium/hyper#3983</a></li>
<li>refactor(http1): replace many args of Chunked::step with struct by
<a href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a>
in <a
href="https://redirect.github.com/hyperium/hyper/pull/3982">hyperium/hyper#3982</a></li>
<li>docs: fix comment in <code>put_slice()</code> by <a
href="https://github.com/coryan"><code>@​coryan</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/3986">hyperium/hyper#3986</a></li>
<li>test(lib): fix unused warnings due to feature gating test imports by
<a href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a>
in <a
href="https://redirect.github.com/hyperium/hyper/pull/3997">hyperium/hyper#3997</a></li>
<li>docs: improve Read trait and ReadBufCursor documentation by <a
href="https://github.com/majiayu000"><code>@​majiayu000</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4000">hyperium/hyper#4000</a></li>
<li>fix: use h1 parser config when parsing server req by <a
href="https://github.com/0xPoe"><code>@​0xPoe</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4002">hyperium/hyper#4002</a></li>
<li>test(server): fix flaky disable_keep_alive_mid_request by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper/pull/4009">hyperium/hyper#4009</a></li>
<li>chore(ci): update to actions/checkout@v6 by <a
href="https://github.com/tottoto"><code>@​tottoto</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4005">hyperium/hyper#4005</a></li>
<li>chore(ci): update to cargo-check-external-types 0.4.0 by <a
href="https://github.com/tottoto"><code>@​tottoto</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4006">hyperium/hyper#4006</a></li>
<li>update copyright year to 2026 by <a
href="https://github.com/jasmyhigh"><code>@​jasmyhigh</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4007">hyperium/hyper#4007</a></li>
<li>refactor: avoid unwrap examples by <a
href="https://github.com/0xPoe"><code>@​0xPoe</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4001">hyperium/hyper#4001</a></li>
<li>fix(http1): use case-insensitive matching for trailer fields by <a
href="https://github.com/HueCodes"><code>@​HueCodes</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4011">hyperium/hyper#4011</a></li>
<li>chore: convert bug report template to GitHub form by <a
href="https://github.com/njg7194"><code>@​njg7194</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4015">hyperium/hyper#4015</a></li>
<li>chore(ci): force toml mode in yq selecting msrv by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper/pull/4020">hyperium/hyper#4020</a></li>
<li>fix: non-utf8 char may cause panic when calling to_str by <a
href="https://github.com/cuiweixie"><code>@​cuiweixie</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4019">hyperium/hyper#4019</a></li>
<li>feat(http2/client): add <code>max_local_error_reset_streams</code>
option by <a
href="https://github.com/ffuugoo"><code>@​ffuugoo</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4021">hyperium/hyper#4021</a></li>
<li>chore: drop pin-utils dependency by <a
href="https://github.com/tottoto"><code>@​tottoto</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4023">hyperium/hyper#4023</a></li>
<li>[minor] doc: Fix HTTP/2 max concurrent stream link by <a
href="https://github.com/dentiny"><code>@​dentiny</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4037">hyperium/hyper#4037</a></li>
<li>fix(ffi): validate null pointers before dereferencing in
request/resp… by <a
href="https://github.com/DhruvaD1"><code>@​DhruvaD1</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4038">hyperium/hyper#4038</a></li>
<li>h2: expose current max stream count by <a
href="https://github.com/howardjohn"><code>@​howardjohn</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4026">hyperium/hyper#4026</a></li>
<li>fix(http1): allow keep-alive for chunked requests with trailers by
<a href="https://github.com/wi-adam"><code>@​wi-adam</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4043">hyperium/hyper#4043</a></li>
<li>fix(http2): cancel pipe_task and send RST_STREAM on response future
drop by <a
href="https://github.com/mmishra100"><code>@​mmishra100</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/4042">hyperium/hyper#4042</a></li>
<li>Add APIs to allow switching an HTTP1 connection to HTTP2 if H2
preface is seen by <a
href="https://github.com/pborzenkov"><code>@​pborzenkov</code></a> in <a
href="https://redirect.github.com/hyperium/hyper/pull/3996">hyperium/hyper#3996</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper/blob/master/CHANGELOG.md">hyper's
changelog</a>.</em></p>
<blockquote>
<h2>v1.9.0 (2026-03-31)</h2>
<h4>Bug Fixes</h4>
<ul>
<li><strong>ffi:</strong> validate null pointers before dereferencing in
request/response functions (<a
href="https://redirect.github.com/hyperium/hyper/issues/4038">#4038</a>
(<a
href="28e73ccd23">28e73ccd</a>)</li>
<li><strong>http1:</strong>
<ul>
<li>allow keep-alive for chunked requests with trailers (<a
href="https://redirect.github.com/hyperium/hyper/issues/4043">#4043</a>)
(<a
href="7211ec25ef">7211ec25</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4044">#4044</a>)</li>
<li>use case-insensitive matching for trailer fields (<a
href="https://redirect.github.com/hyperium/hyper/issues/4011">#4011</a>)
(<a
href="3b344cac9f">3b344cac</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4010">#4010</a>)</li>
<li>use httparse config for Servers (<a
href="https://redirect.github.com/hyperium/hyper/issues/4002">#4002</a>)
(<a
href="bcb8ec5766">bcb8ec57</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/3923">#3923</a>)</li>
</ul>
</li>
<li><strong>http2:</strong>
<ul>
<li>cancel sending client request body on response future drop (<a
href="https://redirect.github.com/hyperium/hyper/issues/4042">#4042</a>)
(<a
href="5b17a69ebc">5b17a69e</a>,
closes <a
href="https://redirect.github.com/hyperium/hyper/issues/4040">#4040</a>)</li>
<li>non-utf8 char in Connection header may cause panic when calling
to_str (<a
href="https://redirect.github.com/hyperium/hyper/issues/4019">#4019</a>)
(<a
href="c36ca8a5c5">c36ca8a5</a>)</li>
</ul>
</li>
</ul>
<h4>Features</h4>
<ul>
<li><strong>client:</strong>
<ul>
<li>expose HTTP/2 current max stream count (<a
href="https://redirect.github.com/hyperium/hyper/issues/4026">#4026</a>)
(<a
href="d51cb71569">d51cb715</a>)</li>
<li>add HTTP/2 <code>max_local_error_reset_streams</code> option (<a
href="https://redirect.github.com/hyperium/hyper/issues/4021">#4021</a>)
(<a
href="577874591c">57787459</a>)</li>
</ul>
</li>
<li><strong>error:</strong> add 'Error::is_parse_version_h2' method (<a
href="393c77c711">393c77c7</a>)</li>
<li><strong>http1:</strong> add UpgradeableConnection::into_parts (<a
href="e21205cfe4">e21205cf</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0d6c7d5469"><code>0d6c7d5</code></a>
v1.9.0</li>
<li><a
href="e21205cfe4"><code>e21205c</code></a>
feat(http1): add UpgradeableConnection::into_parts</li>
<li><a
href="393c77c711"><code>393c77c</code></a>
feat(error): add 'Error::is_parse_version_h2' method</li>
<li><a
href="5b17a69ebc"><code>5b17a69</code></a>
fix(http2): cancel sending client request body on response future drop
(<a
href="https://redirect.github.com/hyperium/hyper/issues/4042">#4042</a>)</li>
<li><a
href="7211ec25ef"><code>7211ec2</code></a>
fix(http1): allow keep-alive for chunked requests with trailers (<a
href="https://redirect.github.com/hyperium/hyper/issues/4043">#4043</a>)</li>
<li><a
href="d51cb71569"><code>d51cb71</code></a>
feat(client): expose HTTP/2 current max stream count (<a
href="https://redirect.github.com/hyperium/hyper/issues/4026">#4026</a>)</li>
<li><a
href="28e73ccd23"><code>28e73cc</code></a>
fix(ffi): validate null pointers before dereferencing in
request/response fun...</li>
<li><a
href="e13e783927"><code>e13e783</code></a>
docs(client): fix HTTP/2 max concurrent stream link to spec (<a
href="https://redirect.github.com/hyperium/hyper/issues/4037">#4037</a>)</li>
<li><a
href="8ba900853b"><code>8ba9008</code></a>
chore(dependencies): drop pin-utils dependency (<a
href="https://redirect.github.com/hyperium/hyper/issues/4023">#4023</a>)</li>
<li><a
href="577874591c"><code>5778745</code></a>
feat(client): add HTTP/2 <code>max_local_error_reset_streams</code>
option (<a
href="https://redirect.github.com/hyperium/hyper/issues/4021">#4021</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/hyperium/hyper/compare/v1.8.1...v1.9.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 05:55:40 +00:00
Kelechi Ebiri
ed78dadacb doc: explain how to create a WebView (#43712) (#43787)
Added a "Creating a WebView" section to the `WebView` doc comment
explaining that `WebViewBuilder` is the correct way to create a
`WebView`, with a usage example. Also expanded the `WebViewBuilder` doc
comment to be more descriptive.
Fixes: #43712

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-04-02 05:22:41 +00:00
dependabot[bot]
8bda09c65a build: bump libc from 0.2.183 to 0.2.184 (#43854)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.183 to 0.2.184.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/releases">libc's
releases</a>.</em></p>
<blockquote>
<h2>0.2.184</h2>
<h3>MSRV</h3>
<p>This release increases the MSRV of <code>libc</code> to 1.65. With
this update, you can now always use the
<code>core::ffi::c_*</code> types with <code>libc</code> definitions,
since <code>libc</code> has been changed to reexport from
<code>core</code> rather than redefining them. (This <em>usually</em>
worked before but had edge cases.)
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4972">#4972</a>)</p>
<h3>Added</h3>
<ul>
<li>BSD: Add <code>IP_MINTTL</code> to bsd (<a
href="https://redirect.github.com/rust-lang/libc/pull/5026">#5026</a>)</li>
<li>Cygwin: Add <code>TIOCM_DSR</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5031">#5031</a>)</li>
<li>FreeBSD: Added <code>xfile</code> structe and file descriptor types
(<a
href="https://redirect.github.com/rust-lang/libc/pull/5002">#5002</a>)</li>
<li>Linux: Add CAN netlink bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/5011">#5011</a>)</li>
<li>Linux: Add <code>struct ethhdr</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4239">#4239</a>)</li>
<li>Linux: Add <code>struct ifinfomsg</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5012">#5012</a>)</li>
<li>Linux: Define <code>max_align_t</code> for riscv64 (<a
href="https://redirect.github.com/rust-lang/libc/pull/5029">#5029</a>)</li>
<li>NetBSD: Add missing <code>CLOCK_</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5020">#5020</a>)</li>
<li>NuttX: Add <code>_SC_HOST_NAME_MAX</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5004">#5004</a>)</li>
<li>VxWorks: Add <code>flock</code> and <code>F_*LCK</code> constants
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4043">#4043</a>)</li>
<li>WASI: Add all <code>_SC_*</code> sysconf constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5023">#5023</a>)</li>
</ul>
<h3>Deprecated</h3>
<p>The remaining fixed-width integer aliases, <code>__uint128_t</code>,
<code>__uint128</code>, <code>__int128_t</code>, and
<code>__int128</code>,
have been deprecated. Use <code>i128</code> and <code>u128</code>
instead. (<a
href="https://redirect.github.com/rust-lang/libc/pull/4343">#4343</a>)</p>
<h3>Fixed</h3>
<ul>
<li><strong>breaking</strong> Redox: Fix signal action constant types
(<a
href="https://redirect.github.com/rust-lang/libc/pull/5009">#5009</a>)</li>
<li>EspIDF: Correct the value of <code>DT_*</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5034">#5034</a>)</li>
<li>Redox: Fix locale values and add <code>RTLD_NOLOAD</code>, some TCP
constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5025">#5025</a>)</li>
<li>Various: Use <code>Padding::new(&lt;zeroed&gt;)</code> rather than
<code>Padding::uninit()</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5036">#5036</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li><strong>potentially breaking</strong> Linux: Add new fields to
<code>struct ptrace_syscall_info</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4966">#4966</a>)</li>
<li>Re-export <code>core::ffi</code> integer types rather than
redefining (<a
href="https://redirect.github.com/rust-lang/libc/pull/5015">#5015</a>)</li>
<li>Redox: Update <code>F_DUPFD</code>, <code>IP</code>, and
<code>TCP</code> constants to match relibc (<a
href="https://redirect.github.com/rust-lang/libc/pull/4990">#4990</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/blob/0.2.184/CHANGELOG.md">libc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/libc/compare/0.2.183...0.2.184">0.2.184</a>
- 2026-04-01</h2>
<h3>MSRV</h3>
<p>This release increases the MSRV of <code>libc</code> to 1.65. With
this update, you can now always use the
<code>core::ffi::c_*</code> types with <code>libc</code> definitions,
since <code>libc</code> has been changed to reexport from
<code>core</code> rather than redefining them. (This <em>usually</em>
worked before but had edge cases.)
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4972">#4972</a>)</p>
<h3>Added</h3>
<ul>
<li>BSD: Add <code>IP_MINTTL</code> to bsd (<a
href="https://redirect.github.com/rust-lang/libc/pull/5026">#5026</a>)</li>
<li>Cygwin: Add <code>TIOCM_DSR</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5031">#5031</a>)</li>
<li>FreeBSD: Added <code>xfile</code> structe and file descriptor types
(<a
href="https://redirect.github.com/rust-lang/libc/pull/5002">#5002</a>)</li>
<li>Linux: Add CAN netlink bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/5011">#5011</a>)</li>
<li>Linux: Add <code>struct ethhdr</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4239">#4239</a>)</li>
<li>Linux: Add <code>struct ifinfomsg</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5012">#5012</a>)</li>
<li>Linux: Define <code>max_align_t</code> for riscv64 (<a
href="https://redirect.github.com/rust-lang/libc/pull/5029">#5029</a>)</li>
<li>NetBSD: Add missing <code>CLOCK_</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5020">#5020</a>)</li>
<li>NuttX: Add <code>_SC_HOST_NAME_MAX</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5004">#5004</a>)</li>
<li>VxWorks: Add <code>flock</code> and <code>F_*LCK</code> constants
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4043">#4043</a>)</li>
<li>WASI: Add all <code>_SC_*</code> sysconf constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5023">#5023</a>)</li>
</ul>
<h3>Deprecated</h3>
<p>The remaining fixed-width integer aliases, <code>__uint128_t</code>,
<code>__uint128</code>, <code>__int128_t</code>, and
<code>__int128</code>,
have been deprecated. Use <code>i128</code> and <code>u128</code>
instead. (<a
href="https://redirect.github.com/rust-lang/libc/pull/4343">#4343</a>)</p>
<h3>Fixed</h3>
<ul>
<li><strong>breaking</strong> Redox: Fix signal action constant types
(<a
href="https://redirect.github.com/rust-lang/libc/pull/5009">#5009</a>)</li>
<li>EspIDF: Correct the value of <code>DT_*</code> constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5034">#5034</a>)</li>
<li>Redox: Fix locale values and add <code>RTLD_NOLOAD</code>, some TCP
constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/5025">#5025</a>)</li>
<li>Various: Use <code>Padding::new(&lt;zeroed&gt;)</code> rather than
<code>Padding::uninit()</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/5036">#5036</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li><strong>potentially breaking</strong> Linux: Add new fields to
<code>struct ptrace_syscall_info</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4966">#4966</a>)</li>
<li>Re-export <code>core::ffi</code> integer types rather than
redefining (<a
href="https://redirect.github.com/rust-lang/libc/pull/5015">#5015</a>)</li>
<li>Redox: Update <code>F_DUPFD</code>, <code>IP</code>, and
<code>TCP</code> constants to match relibc (<a
href="https://redirect.github.com/rust-lang/libc/pull/4990">#4990</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1fd610c7e"><code>b1fd610</code></a>
chore: Release libc 0.2.184</li>
<li><a
href="f596819d7c"><code>f596819</code></a>
ci: Don't enforce cargo-semver-checks</li>
<li><a
href="4645f60c3a"><code>4645f60</code></a>
linux: update ptrace_syscall_info struct</li>
<li><a
href="14cbbec353"><code>14cbbec</code></a>
types: Remove <code>Padding::uninit</code></li>
<li><a
href="b5dcda885f"><code>b5dcda8</code></a>
pthread: Use <code>Padding::new(\&lt;zeroed&gt;)</code> rather than
<code>Padding::uninit()</code></li>
<li><a
href="bbb1c5d350"><code>bbb1c5d</code></a>
types: Add a <code>new</code> function to <code>Padding</code></li>
<li><a
href="df06e43309"><code>df06e43</code></a>
Fix locale values and add RTLD_NOLOAD, some TCP constants</li>
<li><a
href="078f5c6b3c"><code>078f5c6</code></a>
newlib/espidf: Move DT_* to espidf/mod.rs</li>
<li><a
href="d32b83db3c"><code>d32b83d</code></a>
Add IP_MINTTL to bsd</li>
<li><a
href="939e0ec2a8"><code>939e0ec</code></a>
Define max_align_t for riscv64-linux</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/libc/compare/0.2.183...0.2.184">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libc&package-manager=cargo&previous-version=0.2.183&new-version=0.2.184)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 04:51:16 +00:00
dependabot[bot]
eb296b77f6 build: bump the wayland-related group with 5 updates (#43853)
Bumps the wayland-related group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [wayland-client](https://github.com/smithay/wayland-rs) | `0.31.13` |
`0.31.14` |
| [wayland-cursor](https://github.com/smithay/wayland-rs) | `0.31.13` |
`0.31.14` |
| [wayland-protocols](https://github.com/smithay/wayland-rs) | `0.32.11`
| `0.32.12` |
| [wayland-protocols-plasma](https://github.com/smithay/wayland-rs) |
`0.3.11` | `0.3.12` |
| [wayland-protocols-wlr](https://github.com/smithay/wayland-rs) |
`0.3.11` | `0.3.12` |

Updates `wayland-client` from 0.31.13 to 0.31.14
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-cursor` from 0.31.13 to 0.31.14
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-protocols` from 0.32.11 to 0.32.12
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-protocols-plasma` from 0.3.11 to 0.3.12
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-protocols-wlr` from 0.3.11 to 0.3.12
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 04:44:54 +00:00
treetmitterglad
a81b15d5a5 devtools: Rename NodeActor variables in walker.rs (#43847)
Standardize variable naming in `WalkerActor` (`walker.rs`), renaming
`node` → `node_name` in `find_child` to follow the `{}_name` convention.

Testing: `./mach test-devtools`, all 60 tests pass.

Fixes: Part of #43606

Signed-off-by: Eli Bowman <asdfup@protonmail.com>
2026-04-01 23:27:27 +00:00
niya
6150b1b2c0 devtools: rename NodeActor related variables (#43841)
Rename variables associated with `NodeActor`

Testing: Tested locally with mach test-devtools

Fixes: A part of https://github.com/servo/servo/issues/43606

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
2026-04-01 23:13:52 +00:00
Messi II Innocent R.
ce61f2eaa9 Fix child disappearing with mixed overflow clip/visible. (#43620)
Fix child element disappearing when parent has mixed overflow
clip/visible

When a parent element clips overflow on one axis but not the other (e.g.
overflow-y: clip with overflow-x: visible), the non-clipped axis was
using f32::MIN/f32::MAX. On screens with a device pixel ratio above 1,
this causes child elements to disappear.

The fix uses LayoutRect::max_rect() instead.

Testing: Reproduced the bug using --device-pixel-ratio 2 on Linux and
the child disappears on main branch but renders correctly with this fix.


fixes: #43599

Signed-off-by: Messi002 <rostandmessi2@gmail.com>
2026-04-01 22:38:51 +00:00
Oriol Brufau
827129a1a9 layout: Update group index when reusing table-column box (#43846)
Even if we can reuse the box, its column group index may have changed,
e.g. due to the removal of a previous column group. So just update it.

Testing: Adding crash test
Fixes: #39142

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-04-01 21:44:26 +00:00
Martin Robinson
a486ed525e script: Move "scroll into view" call out of "focusing steps" (#43842)
`HTMLOrSVGElement#focus` specifies the "scroll into view" steps should
be run after focusing. This was happening implicitly as part of the
`Document`'s implementation of the "focusing steps." That behavior is
not in the specification, so this change moves the scrolling call to
where it is specified. Along with making the code match the
specification, this change simplifies it as well.

Testing: This should not modify behavior, so existing tests should
suffice.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-01 21:40:13 +00:00
Simon Wülker
155016354c script: Implement PerformanceMeasureOptions (#43753)
The relevant changes are in `Performance::Measure`, the rest are
comments I added.

Testing: New tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-01 20:15:16 +00:00
Simon Wülker
8791236c7a script: Let wheel, keyboard- and pointerevents be composed when fired by the user agent (#43799)
Addtionally, this updates lots of outdated spec links for mouse-related
things that have moved from the uievents spec to the pointerevents spec.

Testing: This change adds new tests

Part of https://github.com/servo/servo/issues/35997
Fixes https://github.com/servo/servo/issues/37772

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-04-01 19:59:10 +00:00
niya
305276c55a devtools: rename LongStringActor name variables (#43838)
Changes `name` to `long_string_name`
`long_string` to `long_string_actor`

Testing: Tested locally with mach test-devtools

Fixes: A part of #43606

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
2026-04-01 16:44:09 +00:00
Martin Robinson
ceac966c34 script: Remove focus transaction concept (#43834)
For years Servo has had the concept of a focus transaction which was
used only to allow falling back to focusing the viewport when focusing a
clicked element failed. As this concept isn't part of the specification,
this change removes it.

Instead, a `FocusableArea` (a specification concept) is passed to
the `Document` focusing code. A `FocusableArea` might also be the
`Document`'s viewport.

As part of this change, some focus-related methods are moved to `Node`
from `Element` as the `Document` is not an `Element`.  This brings the
code closer to implementing the "focusing steps" from the specification.

Testing: This should not change behavior and is thus covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-01 15:12:21 +00:00
Euclid Ye
5fb3877f9f layout/script: Free memory earlier by consuming instead of draining the temporary container if it is unused (#43826)
Follow up of https://github.com/servo/servo/pull/43226
This also allows us to remove some `mut` declaration.
Fix some unintended Chinese quotation mark.

Testing: This is a micro-optimization which does not change visible
behaviour.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-04-01 13:46:53 +00:00
Jonathan Schwender
a463495c90 webgpu: Fix feature guard (#43831)
Remove the dependency on the `webgpu` crate if the feature is disabled.

Note: This doesn't seem to improve the binary size in production mode,
so presumably dead code elimination is already working well.
Nevertheless, it's preferable to correctly feature guard and it should
save a bit of compile-time (when not building with the webgpu feature).


Testing: `webgpu` feature is enabled by default in CI, and we test
`--no-default-features` too in the HOS build in CI. `cargo tree -p servo
--no-default-features` does not show webgpu anymore after this change.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-01 13:41:12 +00:00
eri
187206dc5a devtools: Show variable values in scopes (#43792)
<img width="312" height="307" alt="image"
src="https://github.com/user-attachments/assets/30c8cd9a-9712-4b53-9487-37c289a14520"
/>

Testing: Ran mach test-devtools and manual testing
Part of: #36027
Depends on: #43791

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-01 13:08:18 +00:00
Mukilan Thiyagarajan
069aa65d54 config: Add documentation for the public API. (#43802)
Testing: No code changes, so no testing is required.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2026-04-01 11:50:19 +00:00
Martin Robinson
9cb65e242e script: Use TextInputWidget to implement <textarea> shadow DOM (#43770)
In addition to making it so that textual `<input>` and `<textarea>`
share a common shadow DOM structure, this allows styling the
`<textarea>` placeholder. It is now properly shown in grey.

Testing: This fixes a few WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-04-01 11:41:28 +00:00
eri
c121a46c4f CODEOWNERS: Add atbrakhi and eerii as DevTools owners (#43832)
We have been working on the DevTools code and would like to have
notifications of new patches so we can review them.

Signed-off-by: eri <eri@igalia.com>
2026-04-01 10:10:54 +00:00
Shubham Gupta
ef3e8f7123 wpt: Add more tests to css-device-adapt to verify clamp behavior. (#43715)
Add more tests with values other than non-default values. 
Earlier tests were curated around default value. So, we never know if
anything is wrong.

Testing: Add more tests and update test expectations. Tests fail right
now, which will be dealt with in next patches. It requires two PRs to
properly fix.

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-01 10:08:16 +00:00
shuppy
4041256e24 a11y: Miscellaneous cleanups to our accessibility code (#43772)
this patch cleans up a few minor issues in our accessibility code:

- we remove the initial synchronous TreeUpdate in
[WebView::set_accessibility_active()](https://doc.servo.org/servo/struct.WebView.html#method.set_accessibility_active).
it’s not actually necessary, because AccessKit only requires that
subtree updates happen after the graft node is created in the parent,
but those subtree updates can be delayed indefinitely. removing it
simplifies our API a bit.

- we rename notify_accessibility_tree_id() to
notify_document_accessibility_tree_id(), and do the same to the
underlying ConstellationToEmbedderMsg variant. this helps clarify that
we’re referring to the (active top-level) document’s accessibility tree.

- we make that method pub(crate) too. it doesn’t need to be pub.

- we remove the label property from webview-to-pipeline graft nodes.
properties set on graft nodes are only visible in the accesskit_consumer
API, not in the platform accessibility API, and we don’t need it in our
tests, so there’s no longer any reason to keep setting it.

Testing: updated the relevant libservo accessibility tests
Fixes: part of #4344

Signed-off-by: delan azabani <dazabani@igalia.com>
Co-authored-by: Alice Boxhall <alice@igalia.com>
2026-04-01 09:58:05 +00:00
shuppy
805519deac servoshell: Activate accessibility in all webviews (#43558)
this patch plumbs the webview accessibility trees (#43029, #43556) into
servoshell. we add a global flag in servoshell, which is set when the
platform activates accessibility and cleared when the platform
deactivates accessibility. the flag in turn [activates
accessibility](https://doc.servo.org/servo/struct.WebView.html#method.set_accessibility_active)
in existing and new webviews.

Testing: none in this patch, but will be covered by end-to-end platform
a11y tests in WPT
Fixes: part of #4344, extracted from our work in #42338

Signed-off-by: delan azabani <dazabani@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Alice Boxhall <alice@igalia.com>
2026-04-01 09:46:48 +00:00
eri
fdadd1d31d devtools: Improve encoding of ObjectActor (#43791)
Remove a duplicate `ObjectPreview` and use `ObjectActor::encode` for
serialization.

Testing: Ran mach test-devtools and manual tests.
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-04-01 09:45:18 +00:00
Jonathan Schwender
d0be4e845d release: Bump version number to 0.1 (#43797)
In preparation for the next release, bump the version number to 0.1. 0.1
will be an LTS release, which receives extended support in terms of
security updates (e.g. spidermonkey security updates). Please keep in
mind that as always no specific guarantees or response times are given,
and any updated are provided on a best effort basis.

Previously some projects had a demo integration of servo based on some
version of servo, and then never or rarely updated it. Providing an LTS
release offers an option to embedders to integrate servo, while reducing
API churn and having a somewhat fixed schedule to adhere to in terms of
upgrades. Currently, the plan is for a new LTS release every 6 months,
with additional documentation regarding API changes and recommended
migration patterns (best-effort and subject to change).

Testing: No functional changes. Additional testing will be performed
post-merge on the newly created release branch.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-01 09:18:50 +00:00
Jonathan Schwender
15cc2686da servo: Fix gstreamer_plugins feature guard (#43830)
Testing: gstreamer feature is enable in CI, and we test both mac and
windows, which guard the elements in the module.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-01 08:22:32 +00:00
Shubham Gupta
23e69b0658 wpt: Delete viewport-apply-initial-scale-after-navigation.html (#43701)
Scenario proposed should be best tested using unit tests.

Testing: TODO (Waiting for #43160)
Fixes: #41582

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-04-01 08:07:27 +00:00
CynthiaOketch
4f67866cbe devtools: Rename new_registered to register and standardize variable names for SourceActor (#43810)
Part of #43800 and #43606.

I removed the `new` method from `SourceActor` entirely, as it was only
used internally by `new_registered`. I renamed `new_registered` to
`register`, inlined the struct construction directly using `Self { ...
}`, and updated the registration call to use
`registry.register::<Self>(actor)` to match the standard pattern
established across other actors.

I also standardized variable names throughout `SourceActor` and its call
sites to follow the conventions set in #43606:
- Renamed `name` and `source` to `source_name` and `source_actor`
respectively in `SourceManager::find_source`
- Renamed `actor_name` to `source_name` in `SourceManager::source_forms`
- Renamed `actor_name` to `source_name` in
`handle_update_source_content` in lib.rs

Testing: Built with cargo and ran ./mach test-devtools. 59/60 tests
pass; the one failure (test_manual_pause) is a pre-existing intermittent
timeout unrelated to these changes.


Fixes: part of  #43606 and #43800

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-04-01 07:58:42 +00:00
niya
4ef7097dc1 devtools: Rename BreakpointListActor Variable Names (#43825)
- Changes `breakpoint_list` to `breakpoint_list_actor`

Testing: Tested locally with `mach test-devtools`

Fixes: A part of #43606

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
2026-04-01 07:38:09 +00:00
webbeef
2518f97dac script: Remove useless upcast::<Element> calls (#43824)
upcast::<Type>() is costly in general, but in some cases we can avoid
that call and use a direct field access instead.

Testing: no test change expected.

Signed-off-by: webbeef <me@webbeef.org>
2026-04-01 07:33:04 +00:00
Jonathan Schwender
f4877c190e Embed default resources in Servo applications using a servo-default-resources crate (#43182)
This PR considers the following constraints:

- Resources must be available when building servo via a published
crates.io package (i.e. no `../../../resources/<file>` file references).
- Minimal setup when writing tests (`nextest` spawns each test in its
own process, so we don't want to explicitly initialize the resource
handler for every `#[test]` fn)
- Use local resources when developing locally
- Support loading the resources from a proper resource directory if the
embedder wishes so, including via a custom mechanism, not necessarily as
files

(File) Resources that are only accessed from servoshell are out of scope
of this PR, since it mainly focusses on unblocking publishing `libservo`
to crates.io.

Baking the resources into the binary by default simplifies the setup a
lot. We already supported that before, but only for testing purposes and
explicitly not for production builds.

Using [`inventory`](https://crates.io/crates/inventory) adds a simple
way for the embedder to replace the default baked in resources, while
also keeping the test usage of baked in resources simple.

rippy.png is also referenced from image_cache - We simply duplicate it,
since the image is small, to avoid adding unnecessarily complex
solutions like adding a dedicated crate.


Testing: Covered by existing tests. [mach try
full](https://github.com/jschwe/servo/actions/runs/23811669469)
Fixes: Part of #43145

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-01 07:16:28 +00:00
niya
05946163f2 devtools: Rename PauseActor Variable Names (#43820)
- `PauseActor` is passed as a generic for only `new_name`
- Update the variable `pause` to `pause_name`

**Testing**: Tested locally with `mach test-devtools`

```
Ran 60 tests in 74.781s

OK (expected failures=6)
```

**Fixes**: A part of #43606

Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
2026-04-01 06:03:17 +00:00
Josh Matthews
c1bddb3801 script: Use snapshot of navigation target when navigating. (#43807)
This set of changes introduces a type matching the spec's "target
snapshot params" and uses it as part of determining the origin of new
documents. This has a side benefit of making our sandbox flag
determination more accurate, which leads to a bunch of sandboxing tests
passing as well as some new failures due to spec confusion about
origins.

Testing: Many new passing tests.
Part of the long road to #43149

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-04-01 04:45:12 +00:00
Taym Haddadi
c4d32e15cf indexeddb: fix structured cloning for transaction state, File, and FileList (#43805)
Testing: covered by WPT test.
Fixes: #43804

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-04-01 02:40:58 +00:00
dependabot[bot]
31b273dbb2 build: bump zerocopy from 0.8.47 to 0.8.48 (#43816)
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.8.47 to
0.8.48.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="aa7c31671c"><code>aa7c316</code></a>
Release 0.8.48 (<a
href="https://redirect.github.com/google/zerocopy/issues/3157">#3157</a>)</li>
<li><a
href="fa6fa90177"><code>fa6fa90</code></a>
[zerocopy] Re-enable big endian aarch64 types (<a
href="https://redirect.github.com/google/zerocopy/issues/3073">#3073</a>)</li>
<li><a
href="61b2407b73"><code>61b2407</code></a>
[hermes] Release 0.1.0-alpha.7 (<a
href="https://redirect.github.com/google/zerocopy/issues/3151">#3151</a>)</li>
<li><a
href="b2c394cfa9"><code>b2c394c</code></a>
[hermes] Clone <code>hermes</code> branch at bb0e9f9f (<a
href="https://redirect.github.com/google/zerocopy/issues/3149">#3149</a>)</li>
<li><a
href="a5bc780b51"><code>a5bc780</code></a>
[hermes] Add auto-approval for <code>Cargo.lock</code> and
<code>vendor</code> (<a
href="https://redirect.github.com/google/zerocopy/issues/3150">#3150</a>)</li>
<li><a
href="b29cc75f25"><code>b29cc75</code></a>
[ci] Add <code>all-jobs-succeed</code> job in
<code>auto-approve.yml</code> (<a
href="https://redirect.github.com/google/zerocopy/issues/3147">#3147</a>)</li>
<li><a
href="10ce7672d5"><code>10ce767</code></a>
[hermes] Add description to README (<a
href="https://redirect.github.com/google/zerocopy/issues/3148">#3148</a>)</li>
<li><a
href="d01f773e99"><code>d01f773</code></a>
[ci] Disambiguate &quot;All checks succeeded&quot; jobs by name (<a
href="https://redirect.github.com/google/zerocopy/issues/3145">#3145</a>)</li>
<li><a
href="19006f87d0"><code>19006f8</code></a>
[hermes] Initial commit (<a
href="https://redirect.github.com/google/zerocopy/issues/3144">#3144</a>)</li>
<li><a
href="c6b794933a"><code>c6b7949</code></a>
[CI] Bump the all-actions group with 6 updates (<a
href="https://redirect.github.com/google/zerocopy/issues/3143">#3143</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/google/zerocopy/compare/v0.8.47...v0.8.48">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zerocopy&package-manager=cargo&previous-version=0.8.47&new-version=0.8.48)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 00:57:36 +00:00
dependabot[bot]
1369f85038 build: bump uuid from 1.22.0 to 1.23.0 (#43818)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.22.0 to 1.23.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uuid-rs/uuid/releases">uuid's
releases</a>.</em></p>
<blockquote>
<h2>v1.23.0</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: add support for 'hyphenated' format in the serde module by <a
href="https://github.com/FrenchDilettante"><code>@​FrenchDilettante</code></a>
in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/865">uuid-rs/uuid#865</a></li>
<li>Fix a number of bugs in time-related code by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/872">uuid-rs/uuid#872</a></li>
<li>Reword invalid char error message by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/873">uuid-rs/uuid#873</a></li>
<li>Impl cleanups by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/874">uuid-rs/uuid#874</a></li>
<li>Use LazyLock to synchronize v1/v6 context initialization by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/875">uuid-rs/uuid#875</a></li>
<li>Prepare for 1.23.0 release by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/876">uuid-rs/uuid#876</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/FrenchDilettante"><code>@​FrenchDilettante</code></a>
made their first contribution in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/865">uuid-rs/uuid#865</a></li>
</ul>
<h2>Special thanks</h2>
<p><a href="https://github.com/meng-xu-cs"><code>@​meng-xu-cs</code></a>
raised a series of bugs against the timestamp logic in <code>uuid</code>
using automated tooling. The issues themselves were reasonably and
responsibly presented and the end result is a better <code>uuid</code>
library for everyone. Thanks!</p>
<h1>Deprecations</h1>
<p>This release includes the following deprecations:</p>
<ul>
<li><code>Context</code>: Renamed to <code>ContextV1</code></li>
<li><code>Timestamp::from_gregorian</code>: Renamed to
<code>Timestamp::from_gregorian_time</code></li>
</ul>
<h1>Change to <code>Version::Max</code></h1>
<p><code>Version::Max</code>'s <code>u8</code> representation has
changed from <code>0xff</code> to <code>0x0f</code> to match the value
returned by <code>Uuid::get_version_num</code>.</p>
<h1>Change to <code>Uuid::get_version</code> for the max UUID</h1>
<p><code>Uuid::get_version</code> will only return
<code>Some(Version::Max)</code> if the UUID is actually the max UUID
(all bytes are <code>0xff</code>). Previously it would return
<code>Some</code> if only the version field was <code>0x0f</code>. This
change matches the behaviour of the nil UUID, which only returns
<code>Some(Version::Nil)</code> if the UUID is the nil UUID (all bytes
are <code>0x00</code>).</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0">https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="00ab922d53"><code>00ab922</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/876">#876</a> from
uuid-rs/cargo/v1.23.0</li>
<li><a
href="726ba45fe3"><code>726ba45</code></a>
prepare for 1.23.0 release</li>
<li><a
href="996dadea02"><code>996dade</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/875">#875</a> from
uuid-rs/fix/context-ordering</li>
<li><a
href="e14047993b"><code>e140479</code></a>
simplify a use stmt</li>
<li><a
href="8ed9142847"><code>8ed9142</code></a>
reorganize and document more v7 context internals</li>
<li><a
href="e09a3225a8"><code>e09a322</code></a>
use LazyLock to synchronize v1/v6 context initialization</li>
<li><a
href="0f260cc671"><code>0f260cc</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/874">#874</a> from
uuid-rs/chore/impl-cleanups</li>
<li><a
href="1419e91097"><code>1419e91</code></a>
clean up and refactor main lib tests</li>
<li><a
href="ceeaf4b7b5"><code>ceeaf4b</code></a>
ensure we don't overflow on counters less than 12</li>
<li><a
href="63bc8f52e5"><code>63bc8f5</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/873">#873</a> from
uuid-rs/fix/error-msg</li>
<li>Additional commits viewable in <a
href="https://github.com/uuid-rs/uuid/compare/v1.22.0...v1.23.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=cargo&previous-version=1.22.0&new-version=1.23.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 00:56:07 +00:00
dependabot[bot]
c056b71664 build: bump simd-adler32 from 0.3.8 to 0.3.9 (#43815)
Bumps [simd-adler32](https://github.com/mcountryman/simd-adler32) from
0.3.8 to 0.3.9.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mcountryman/simd-adler32/commits/v0.3.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=simd-adler32&package-manager=cargo&previous-version=0.3.8&new-version=0.3.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 00:42:28 +00:00
dependabot[bot]
36922eed85 build: bump the wayland-related group with 3 updates (#43814)
Bumps the wayland-related group with 3 updates:
[wayland-backend](https://github.com/smithay/wayland-rs),
[wayland-scanner](https://github.com/smithay/wayland-rs) and
[wayland-sys](https://github.com/smithay/wayland-rs).

Updates `wayland-backend` from 0.3.14 to 0.3.15
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-scanner` from 0.31.9 to 0.31.10
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />

Updates `wayland-sys` from 0.31.10 to 0.31.11
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/smithay/wayland-rs/commits">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 00:27:29 +00:00
Martin Robinson
d3c39bb68c script: Add support for ShadowRoot.delegatesFocus and start implementing the focusing steps (#43811)
This change has two main interdependent parts:

1. It starts to align Servo's focus code with what is written in the
   HTML specification. This is going to be a gradual change, so there
   are still many parts that do not match the specification yet. Still,
   this adds the major pieces.
2. It adds initial support for the `ShadowRoot.delegatesFocus` property
   which controls how focusing a shadow DOM root can delegate focus to
   one of its children.

Testing: This causes a few WPT tests to start passing.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-03-31 21:23:47 +00:00
Nico Burns
dc7487573f Implement direction property for CSS Grid (#42118)
Implement the `direction` property for CSS Grid:

- Upgrade to [Taffy
v0.10.0](github.com/DioxusLabs/taffy/releases/tag/v0.10.0)
- Add conversion function from Stylo's `Direction` enum to Taffy's
`Direction` enum
- Update assertions

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-03-31 18:20:57 +00:00
Kingsley Yung
4d0c29c2c7 script: Require HMAC comparison to be constant time (#43773)
We should compare HMAC signatures in constant time when validating
user-provided signatures, to prevent leaking timing information
proportional to the number of matching bytes. The WebCrypto
specification has also updated to require to use constant-time
comparison in HMAC signatures.

We update our implementation accordingly. Since we are still using the
`aws-lc-rs` crate for our HMAC implementation, we use the function
`verify_slices_are_equal` provided by `aws_lc_rs::constant_time` to
guarantees the comparison is constant-time.

Specification Update:
c962bc7ebb
Testing: Existing tests suffice.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-03-31 18:18:05 +00:00
Martin Robinson
fe9386ed7a script: Remove the special inner editor click focus workaround (#43803)
This workaround was only necessary when click focusing didn't look up
the ancestry chain for an applicable focusable area. Now that this
happens (via the code directly after), the workaround is no longer
necessary.

Testing: This should not change behvior so is covered by existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-03-31 15:14:38 +00:00
eri
a2980c07fa devtools: Replace new with register for PreferenceActor (#43801)
Testing: Compilation is enough
Part of: #43800

Signed-off-by: eri <eri@igalia.com>
2026-03-31 14:52:50 +00:00
niya
d9efd44c4c script: move fullscreen functionality to script/dom/fullscreen (#43771)
# Checklist

Relevant methods in Document are:

- [x] enter_fullscreen
- [x] exit_fullscreen
- [x] get_allow_fullscreen

Relevant method in DocumentOrShadowRoot is:
- [x] get_fullscreen_element

Relevant methods in Element are:

- [x] fullscreen_element_ready_check

Relevant structs in element.rs are:

- [x] ElementPerformFullscreenExit
- [x] ElementPerformFullscreenEnter

Testing: The PR moves functions around and we don't need to modify any
tests
Fixes: #43719

---------

Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
2026-03-31 14:14:23 +00:00
nortti0
11687b3263 Port Servo to FreeBSD (#43116)
Add the minimum amount of FreeBSD-specific code to Servo, where no
platform-neutral fallback exists.

Testing: I've succesfully built and run Servo on FreeBSD with these
changes (and some fixes to dependencies). There's no functional change
to any other targets. This pull request was created with Servo running
on FreeBSD.
Fixes: #11625

---------

Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
2026-03-31 14:11:13 +00:00
Tim van der Lippe
26a1942a33 Add script to show stale intermittent issues (#41739)
This script shows any issue which has not received any updates for over
a month. This means it is no longer intermittent and therefore can be
closed.

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-03-31 14:09:20 +00:00
Servo WPT Sync
54bc366160 Sync WPT with upstream (31-03-2026) (#43789)
Automated downstream sync of changes from upstream as of 31-03-2026
[no-wpt-sync]

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
Signed-off-by: Sam <16504129+sagudev@users.noreply.github.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-03-31 09:37:26 +00:00
Steven Novaryo
9caea2d16f base: Tidy up the usage of PipelineNamespaceId (#43790)
Use constant variable to define the `PipelineNamespaceId` for
`Constellation` and `Embedder`, and fix the comment describing the
declaration `next_pipeline_namespace_id`.

Testing: A successful build should be enough for the minimal
refactoring.

Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
2026-03-31 08:52:08 +00:00
Steven Novaryo
01689d241a layout: Persist ExternalScrollId for ::before and ::after pseudo element. (#43231)
In general, for a normal `BoxFragment`, a `ExternalScrollId` is created
by directly using the `OpaqueNode::id` which is the heap address of the
`Node`. But for a `BoxFragment` from a `::before` or `::after` pseudo
element, we are using the next unused id (starting from zero) with an
increment of two.

This patch modifies so that we are using the bitwise or of
`OpaqueNode::id` and `FragmentType` as the `ExternalScrollId`. With
these changes, the `ExternalScrollId` for the pseudo elements would
remain the same after reflow (instead of getting a new scroll id).

Testing: New WPT test
Fixes: #43308

---------

Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
2026-03-31 06:13:06 +00:00
Kelechi Ebiri
bb667737a9 script: Let Console::internal_warn take String instead of DOMString (#43780)
All callers were constructing a DOMString only to have it immediately
converted back to String inside internal_warn, resulting in an
unnecessary allocation and clone. This changes the parameter type to
String and updates all call sites to pass the result of format! or
.to_string() directly.

Fixes: #43091

---------

Signed-off-by: Kelechi Ebiri <ebiritg@gmail.com>
2026-03-31 06:02:13 +00:00
webbeef
5db86cc5f0 layout: remove noisy debug println (#43785)
These were forgotten in 17a7ee037b

Testing: no testing needed

Signed-off-by: webbeef <me@webbeef.org>
2026-03-31 01:38:14 +00:00
dependabot[bot]
efe01668ea build: bump cc from 1.2.57 to 1.2.58 (#43783)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.57 to 1.2.58.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.2.58</h2>
<h3>Other</h3>
<ul>
<li>Update Compile-time Requirements to add info about clang-cl.exe (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1693">#1693</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.57...cc-v1.2.58">1.2.58</a>
- 2026-03-27</h2>
<h3>Other</h3>
<ul>
<li>Update Compile-time Requirements to add info about clang-cl.exe (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1693">#1693</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bf119a1581"><code>bf119a1</code></a>
chore(cc): release v1.2.58 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1694">#1694</a>)</li>
<li><a
href="8b8d71f0ec"><code>8b8d71f</code></a>
Update Compile-time Requirements to add info about clang-cl.exe (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1693">#1693</a>)</li>
<li><a
href="8c6b2d7cad"><code>8c6b2d7</code></a>
Update rusqlite requirement from 0.38.0 to 0.39.0 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1691">#1691</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.57...cc-v1.2.58">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cc&package-manager=cargo&previous-version=1.2.57&new-version=1.2.58)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 00:38:41 +00:00
Abbas Olanrewaju Sarafa
4f316b7f84 script: Remove unnecessary Window::unminify_css field (#43778)
Initialize unminified_css_dir directly in Window::new instead of storing
a separate unminify_css bool and lazily setting the dir in
init_document.

Testing: Ran ```./mach run --unminify-css google.com``` also checked
```ls unminified-css/``` result was ```www.google.com www.gstatic.com```
Fixes: #43730

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 20:57:28 +00:00
Budiman Arbenta
35c3731c46 script: Implement <input type=range> widget's layout (#41562)
Implement the layout of `<input type="range">`. Support automatically
calculating the position of thumb based on the current input value, and
the size of range-track and range-thumb. Added a
document.has_script_or_layout_blocker function to detect whether it is
possible to run box_area_query during bind_to_tree, add delay_task if
there are blocker.

Here are some of the fixes made in this PR:
1. Fixed the structure for input type range's pseudo elements.
2. Fixed the positioning of input type range's thumb based on current
value, width, and direction.
3. Allow input type range to stretch vertically in a bigger container.

Original PR: #41024
Stylo PR: https://github.com/servo/stylo/pull/310

Testing: Some improvements in WPT tests, with a few regressions. This
change includes a Servo-specific appearance test to detect unexpected
changes to the look and feel of range widgets.
Fixes: #22728

---------

Signed-off-by: Budiman Arbenta <arbenta6@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: rayguo17 <tin.tun.aung1@huawei.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-03-30 20:20:58 +00:00
batu_hoang
399c8ebe31 servo: Add SiteDataManager::set_cookie_for_url and SiteDataManager::cookies_for_url (#43600)
Expose set_cookie_for_url, get_cookie_for_url, allow applications to
get/set cookies.

Testing: Unit test for `SiteDataManager` and manual test with
ServoShell.

---------

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
2026-03-30 17:13:35 +00:00
CynthiaOketch
3a5031fd2a script: Move Element attribute getters/setters into attributes.rs (#43774)
Following #43714, which moved the element interfaces into the `element/`
directory and extracted `get_int_attribute` into `attributes.rs` as a
proof-of-concept, this PR moves the remaining attribute getter/setter
methods out of `element.rs` into the separate `attributes.rs` file.

  The following methods were moved:
  - `set_atomic_attribute`
  - `set_bool_attribute`
  - `get_url_attribute` / `set_url_attribute`
  - `get_trusted_type_url_attribute`
  - `get_trusted_html_attribute`
  - `get_string_attribute` / `set_string_attribute`
  - `get_nullable_string_attribute` / `set_nullable_string_attribute`
  - `get_tokenlist_attribute` / `set_tokenlist_attribute`
  - `set_atomic_tokenlist_attribute`
  - `set_int_attribute`
  - `get_uint_attribute` / `set_uint_attribute`

  This reduces the size of `element.rs` and groups all attribute-related
  helper methods together in one place.


Testing: 
No tests required as this is a pure code move with no behavioural
changes. The existing test suite covers the moved methods indirectly
through their callers. `cargo check` passes cleanly.

part of #38901
part of #43709
part of #43714

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-03-30 17:08:44 +00:00
Shubham Gupta
2d29c38e42 layout: Do not consider broken image as contentful (#43475)
1. Broken Images are skipped for FirstContentfulPaint as per specs.
2. Update the WPT test.

Testing: `tests/wpt/tests/paint-timing/fcp-only/fcp-broken-image.html`

---------

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-03-30 15:40:08 +00:00
Ashwin Naren
2566b477ce storage: implement obtaining a storage bottle map, and create and delete databse (#42139)
Add a storage client concept, meant to implement
https://storage.spec.whatwg.org/

Implement https://storage.spec.whatwg.org/#obtain-a-storage-bottle-map

Also adds create and delete database functionality for the storage map
proxy, with a view towards indexeddb integration.


Testing: Unit tests cover basic functionality.

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Taym Haddadi <haddadi.taym@gmail.com>
2026-03-30 15:38:50 +00:00
Martin Robinson
322dfd0115 layout: Combine some common text segment data into FontAndScriptInfo (#43653)
This starts splitting out commonly shared data into a new data structure
that will make it easier to compare old shaping results to new ones in
the future. This eliminates some memory usage during inline layout, but
adds 8 bytes per segment (usually one per inline box). We hope to
recover this memory by storing one `GlyphStore` per `TextRunSegment`,
which
should recover 16 bytes.

Testing: This should not change behavior so is covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2026-03-30 13:15:23 +00:00
Kingsley Yung
c4ccb715e4 script: Guarantee constant-time all-zero check on X25519 secret (#43775)
The "deriveBits" operation of X25519 in WebCrypto throws an
OperationError when the secret is all-zero value. The check must be done
in constant time.

Although our implementation enforces comparing all bytes one-by-one
without early exit, it still does not guarantee the `u8` comparison is
constant-time due to compiler optimization and CPU microarchitectural
effects.

We switch to using the function `was_contributory` provided by the
`x25519-dalek` crate to check whether the secret is all-zero value, as
it guarantees constant-time execution. This enhances the security of our
WebCrypto API.

Testing: Security enhancement. Existing tests suffice.

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2026-03-30 12:34:50 +00:00
Martin Robinson
17a7ee037b layout: Integrate ::first-letter support into the InlineFormattingContextBuilder (#43692)
This change merges the first letter implementation into the
`InlineFormattingContextBuilder` as its more associated with inline
layout. The downside is that, due to ownership issues in Rust, the
builder must be unwrapped after ensuring it. Additionally, ensure
that `::first-letter` boxes are properly stored in a box slot meaning
that restyles work properly.

This change also makes a few small cleanups to the `first_letter_range`
function in addition to moving it to the inline code.

Testing: This does not change behavior and so should be covered by
existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2026-03-30 11:40:09 +00:00
Abbas Olanrewaju Sarafa
6e799ca694 devtools: Rename FrameActor variable names (#43767)
Renamed FrameActor variable names to match standards in thread & lib.rs

Testing: No testing required.
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 09:58:29 +00:00
Jonathan Schwender
1a86292f20 embedder_traits: Add documentation for ResourceReaderMethods (#43769)
Testing: Documentation only, testing not required

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <martin@abandonedwig.info>
2026-03-30 09:32:45 +00:00
Abbas Olanrewaju Sarafa
07a4335f4c devtools: Rename ThreadConfigurationActor variable names (#43765)
Renamed ThreadConfigurationActor variable names in watcher.rs.

Testing: No testing required.
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:21:31 +00:00
Abbas Olanrewaju Sarafa
906679a8c1 devtools: Rename ThreadActor variable names (#43723)
Renamed ThreadActor variable names in breakpoint, browsing_context,
watcher, worker & lib.rs.

Testing: No testing required.
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:14:12 +00:00
Abbas Olanrewaju Sarafa
134e4c7db1 devtools: Rename InspectorActor variable names (#43724)
Renamed InspectorActor variable names in browsing_context, inspector &
lib.rs

Testing: No testing required.
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:12:01 +00:00
59935 changed files with 3446448 additions and 73189 deletions

View File

@@ -1,6 +1,7 @@
[profile.default]
# Print a slow warning after period, terminate unit-test after 4x period.
slow-timeout = { period = "5s", terminate-after = 4 }
status-level = "leak"
[profile.ci]
fail-fast = false

View File

@@ -14,6 +14,9 @@ RUN apt-get update \
&& /tmp/linux_packages/generate_pkg_list.sh /tmp/linux_packages/apt/* | xargs apt-get install -y --no-install-recommends \
&& curl --version
# Required due to https://github.com/servo/servo/issues/35029
RUN apt purge -y fonts-droid-fallback
# Please keep `RUST_VERSION` in sync with the `rust-toolchain.toml` file.
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \

View File

@@ -16,9 +16,17 @@
"postCreateCommand":
"./mach bootstrap --yes",
"mounts": [
"source=servo-cargo-target,target=/var/servo-cargo-target,type=volume"
],
"containerEnv": {
"CC": "clang",
"CXX": "clang++",
// at least on macOS the workspace directory can be mounted as case-insensitve,
// which causes build errors in mozjs. Using a volume avoids this issue, and can
// also improve performance.
"CARGO_TARGET_DIR": "/var/servo-cargo-target",
"UV_PROJECT_ENVIRONMENT": ".devcontainer-venv"
}
}

4
.github/CODEOWNERS vendored
View File

@@ -39,6 +39,10 @@
# Reviewers for XPath related code
/components/xpath @simonwuelker
# Reviewers for DevTools
/components/devtools @atbrakhi @eerii
/components/shared/devtools @atbrakhi @eerii
# Reviewers for CI related code
/.github/workflows @sagudev
/.github/actions @sagudev

25
.github/ISSUE_TEMPLATE/roadmap.md vendored Normal file
View File

@@ -0,0 +1,25 @@
---
name: Roadmap Issue
about: Create an issue to track in the Servo roadmap
title: ''
labels: B-roadmap
assignees: ''
---
## Roadmap Issue
**Description:**
A clear and concise description of the work that will be done.
**Area:** e.g. Layout, Script, Performance, ...
**People:** Who are planning to work on this task.
Leave it blank if it's just something interesting for the project,
but nobody is planning to work on at the moment.
---
Feel free to add any other comments on the issue after this line.

View File

@@ -52,6 +52,11 @@ updates:
objc2-related:
patterns:
- "objc2*"
rustls-webpki-related:
patterns:
- rustls-webpki
- webpki-roots
- webpki-root-certs
sea-query-related:
patterns:
- "sea-query"

View File

@@ -9,6 +9,9 @@ jobs:
# Run job only on servo/servo
if: github.repository == 'servo/servo'
runs-on: ubuntu-latest
environment:
name: book-sync
deployment: false
steps:
- name: Check out Servo
uses: actions/checkout@v6

View File

@@ -1,4 +1,3 @@
#
name: Build Docker image and push to GitHub Packages
# This workflow file is adapted from the example at https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-a-registry-using-a-personal-access-token
@@ -7,46 +6,123 @@ on:
branches:
- main
# Only rebuild if the Dockerfile or dependencies change.
paths:
paths: &container-paths
- '.devcontainer/**'
- 'python/servo/platform/linux_packages/**'
- '.github/workflows/docker.yml'
workflow_dispatch:
pull_request:
branches:
- main
paths: *container-paths
env:
IMAGE_NAME: devcontainer-ubuntu
IMAGE_DOWNLOAD_PATH: docker-image-artifacts
# AMD64 and ARM64 label names are what docker chose
AMD64_IMAGE_ARCHIVE: devcontainer-ubuntu-amd64.tar
ARM64_IMAGE_ARCHIVE: devcontainer-ubuntu-arm64.tar
AMD64_IMAGE_ARTIFACT_NAME: devcontainer-ubuntu-image-amd64
ARM64_IMAGE_ARTIFACT_NAME: devcontainer-ubuntu-image-arm64
jobs:
devcontainer_ubuntu:
runs-on: ubuntu-latest
# We probably don't want to spam the package registry of every developer
# thats working on servo and has actions enabled on their fork.
# You can comment this if to test changes to the workflow locally in your fork,
# use manual workflow dispatch in your fork.
if: github.repository_owner == 'servo' || github.event_name == 'workflow_dispatch'
devcontainer_ubuntu_build:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
platform: linux/amd64
runner: ubuntu-24.04
image_archive: devcontainer-ubuntu-amd64.tar
image_artifact_name: devcontainer-ubuntu-image-amd64
- arch: arm64
platform: linux/arm64
runner: ubuntu-24.04-arm
image_archive: devcontainer-ubuntu-arm64.tar
image_artifact_name: devcontainer-ubuntu-image-arm64
permissions:
packages: write
contents: read
env:
IMAGE_NAME: devcontainer-ubuntu
steps:
- uses: actions/checkout@v6
- name: Build image
run: docker build . --file .devcontainer/Ubuntu.Dockerfile --tag ${{ env.IMAGE_NAME }} --label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
- name: Build ${{ matrix.arch }} image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/servo/$IMAGE_NAME
docker build . \
--file .devcontainer/Ubuntu.Dockerfile \
--platform ${{ matrix.platform }} \
--tag ${{ env.IMAGE_NAME }}:${{ matrix.arch }} \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Save ${{ matrix.arch }} image
if: github.event_name != 'pull_request'
run: docker save --output "${{ matrix.image_archive }}" "${{ env.IMAGE_NAME }}:${{ matrix.arch }}"
- name: Upload ${{ matrix.arch }} image artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.image_artifact_name }}
path: ${{ matrix.image_archive }}
archive: false
if-no-files-found: error
devcontainer_ubuntu_publish:
runs-on: ubuntu-24.04
needs:
- devcontainer_ubuntu_build
# Use manual workflow dispatch in your fork to test changes.
if: (github.event_name == 'push' && github.repository_owner == 'servo') || github.event_name == 'workflow_dispatch'
permissions:
contents: read
packages: write
steps:
- uses: actions/download-artifact@v8
with:
path: ${{ env.IMAGE_DOWNLOAD_PATH }}
merge-multiple: true
- name: List downloaded image artifacts
run: ls -R "${{ env.IMAGE_DOWNLOAD_PATH }}"
- name: Derive image metadata
id: image_meta
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/servo/${{ env.IMAGE_NAME }}
# This changes all uppercase characters to lowercase.
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[A-Z]' '[a-z]')
# This strips the git ref prefix from the version.
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# This uses the Docker `latest` tag convention.
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
# Todo: It would be nice to add another tag here, that has a version number, or a date-tag.
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
[ "$VERSION" = "main" ] && VERSION=latest
echo "IMAGE_ID=$IMAGE_ID"
echo "VERSION=$VERSION"
echo "image_id=$IMAGE_ID" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "multiarch_tag=$IMAGE_ID:$VERSION" >> "$GITHUB_OUTPUT"
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push platform images and publish manifest list
run: |
for archive in "${{ env.AMD64_IMAGE_ARCHIVE }}" "${{ env.ARM64_IMAGE_ARCHIVE }}"; do
docker load --input "${{ env.IMAGE_DOWNLOAD_PATH }}/$archive"
done
IMAGE_TAGS=()
for arch in amd64 arm64; do
IMAGE=${{ steps.image_meta.outputs.image_id }}:$arch-${{ steps.image_meta.outputs.version }}
IMAGE_TAGS+=("$IMAGE")
docker tag ${{ env.IMAGE_NAME }}:$arch "$IMAGE"
docker push "$IMAGE"
done
# This pushes to the registry
docker buildx imagetools create --tag ${{ steps.image_meta.outputs.multiarch_tag }} "${IMAGE_TAGS[@]}"

View File

@@ -145,7 +145,9 @@ jobs:
- name: Change Mirror Priorities
if: ${{ runner.environment != 'self-hosted' }}
uses: ./.github/actions/apt-mirrors
- uses: taiki-e/install-action@v2
- name: Install cargo nextest
if: ${{ inputs.unit-tests }}
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Bootstrap dependencies
@@ -155,7 +157,7 @@ jobs:
sudo apt update
echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
sudo apt install -qy tshark
./mach bootstrap --yes --skip-lints
./mach bootstrap --yes --skip-lints --skip-nextest
# Always install crown, even on self-hosted runners, because it is tightly
# coupled to the rustc version, and we may have the wrong version if the
@@ -287,6 +289,7 @@ jobs:
# lld seems to use less memory and prevents OOM errors during linking.
# We can remove this after upgrading to Rust 1.90, where lld will be the default.
RUSTFLAGS: "-C link-arg=-fuse-ld=lld"
LLVM_OBJDUMP: llvm-objdump-14
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked

View File

@@ -109,9 +109,11 @@ jobs:
- if: ${{ runner.environment == 'self-hosted' }}
# Same as `git switch --detach FETCH_HEAD`, but fixes up dirty working
# trees, in case the runner image was baked with a dirty working tree.
# Safeguard: -- means FETCH_HEAD is revision instead of path.
# See <https://github.com/servo/servo/pull/44309>
run: |
git switch --detach
git reset --hard FETCH_HEAD
git reset --hard FETCH_HEAD --
- if: runner.environment != 'self-hosted'
name: Setup Python
@@ -125,14 +127,16 @@ jobs:
- name: Install crown
run: cargo install --path support/crown
- uses: taiki-e/install-action@v2
- name: Install cargo nextest
if: ${{ inputs.unit-tests }}
uses: taiki-e/install-action@v2
with:
tool: nextest
- if: runner.environment != 'self-hosted'
name: Bootstrap
run: |
./mach bootstrap --yes --skip-lints
./mach bootstrap --yes --skip-lints --skip-nextest
brew install gnu-tar
- name: Build (${{ inputs.profile }})
run: |

View File

@@ -126,14 +126,16 @@ jobs:
- name: Install crown
run: cargo install --path support/crown
- uses: taiki-e/install-action@v2
- name: Install cargo nextest
if: ${{ inputs.unit-tests }}
uses: taiki-e/install-action@v2
with:
tool: nextest
- if: runner.environment != 'self-hosted'
name: Bootstrap
run: |
./mach bootstrap --yes --skip-lints
./mach bootstrap --yes --skip-lints --skip-nextest
brew install gnu-tar
- name: Build (${{ inputs.profile }})
run: |

View File

@@ -182,9 +182,11 @@ jobs:
run: git fetch --depth=1 origin $GITHUB_SHA
- if: ${{ github.event_name == 'pull_request_target' }}
run: git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
# Safeguard: -- means FETCH_HEAD is revision instead of path.
# See <https://github.com/servo/servo/pull/44309>
- run: |
git switch --detach
git reset --hard FETCH_HEAD
git reset --hard FETCH_HEAD --
- name: Adding test files to directory
run: cp -r support/hitrace-bencher/* support/openharmony/AppScope/resources/resfile/
- name: Build for aarch64 HarmonyOS

View File

@@ -13,6 +13,10 @@ on:
description: '`true` to create a release on this repo, false to release to the nightly-releases repo'
type: boolean
default: false
crates_io:
description: '`true` to publish to crates.io'
type: boolean
default: false
release_tag:
required: true
type: string
@@ -28,6 +32,9 @@ jobs:
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Create Draft GH Release
runs-on: ubuntu-latest
environment: &publish-environment
name: publish
deployment: false
steps:
- id: create-release
run: |
@@ -46,7 +53,7 @@ jobs:
TEMP_TAG=$(basename "$RELEASE_URL")
RELEASE_ID=$( \
gh api -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "X-GitHub-Api-Version: 2026-03-10" \
"/repos/${RELEASE_REPO}/releases/tags/${TEMP_TAG}" \
| jq '.id' \
)
@@ -66,37 +73,64 @@ jobs:
&& (inputs.regular_release || false) == false
name: Publish GH Release
runs-on: ubuntu-latest
environment: *publish-environment
steps:
- name: Publish as latest (success)
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
- name: Publish release (success)
if: ${{ !contains(needs.*.result, 'failure') && (!contains(needs.*.result, 'cancelled') && !cancelled()) }}
env:
MAKE_LATEST: ${{ github.event_name == 'schedule' && 'true' || 'false' }}
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "X-GitHub-Api-Version: 2026-03-10" \
/repos/${RELEASE_REPO}/releases/${RELEASE_ID} \
-F draft=false
- name: Publish as latest (failure)
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
-F draft=false \
-f make_latest="${MAKE_LATEST}"
- name: Publish release (failure)
if: ${{ contains(needs.*.result, 'failure') || (contains(needs.*.result, 'cancelled') || cancelled()) }}
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "X-GitHub-Api-Version: 2026-03-10" \
/repos/${RELEASE_REPO}/releases/${RELEASE_ID} \
-F prerelease=true -F draft=false
-F prerelease=true \
-F draft=false \
-f make_latest=false
env:
GITHUB_TOKEN: ${{ inputs.regular_release && github.token || secrets.NIGHTLY_REPO_TOKEN }}
RELEASE_ID: ${{ needs.create-draft-release.outputs.release-id }}
needs:
- create-draft-release
- upload-vendored-source
- upload-linux-nightly
- upload-win-nightly
- upload-mac-nightly
- upload-mac-arm64-nightly
- upload-android-nightly
- upload-ohos-nightly
- upload-artifacts-nightly
- upload-artifacts-release
publish-crates-io:
name: 'Publish to crates.io'
if: github.repository == 'servo/servo' && (inputs.crates_io || false)
environment:
name: publish_crates_io
deployment: false
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
SERVO_CRATES_IO_SLEEP_AFTER_PUBLISH_SECONDS: "30"
SERVO_CRATES_IO_VERIFY_PUBLISHED_TIMEOUT_SECONDS: "300"
SERVO_CRATES_IO_VERIFY_PUBLISHED_INTERVAL_SECONDS: "10"
# Verification requires building, which is incredibly slow and also increases our attack surface.
# If we decide for an extra verification, we should add a seperate job before this one, which
# does a `dry-run` publish without any elevated permissions.
run: |
python3 etc/ci/publish_crates_io.py --no-verify
build-win:
# This job is only useful when run on upstream servo.
@@ -113,6 +147,7 @@ jobs:
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload vendored source archive
runs-on: ubuntu-latest
environment: *publish-environment
permissions:
contents: write
id-token: write
@@ -141,45 +176,100 @@ jobs:
env:
GITHUB_TOKEN: ${{ inputs.regular_release && github.token || secrets.NIGHTLY_REPO_TOKEN }}
upload-win-nightly:
upload-artifacts-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
needs:
environment: *publish-environment
needs: &upload-artifacts-needs
- create-draft-release
- build-win
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-win.outputs.artifact_ids }}
artifact_platform: windows-msvc
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
- build-mac
- build-mac-arm64
- build-linux
- build-android
- build-ohos
strategy: &upload-artifacts-strategy
fail-fast: false
matrix:
include:
- artifact_ids: ${{ needs.build-win.outputs.artifact_ids }}
artifact_platform: windows-msvc
- artifact_ids: ${{ needs.build-mac.outputs.artifact_ids }}
artifact_platform: mac
- artifact_ids: ${{ needs.build-mac-arm64.outputs.artifact_ids }}
artifact_platform: mac-arm64
- artifact_ids: ${{ needs.build-linux.outputs.artifact_ids }}
artifact_platform: linux
- artifact_ids: ${{ needs.build-android.outputs.artifact_ids }}
artifact_platform: android
- artifact_ids: ${{ needs.build-ohos.outputs.artifact_ids }}
artifact_platform: ohos
env:
ARTIFACT_IDS: ${{ matrix.artifact_ids }}
ARTIFACT_PLATFORM: ${{ matrix.artifact_platform }}
GITHUB_RELEASE_ID: ${{ needs.create-draft-release.outputs.release-id }}
RELEASE_REPO: ${{ github.repository_owner }}/servo-nightly-builds
RELEASE_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
steps: &upload-artifacts-steps
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github
etc/ci
fetch-depth: '1'
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Validate artifact IDs
run: |
if [[ -z "${ARTIFACT_IDS}" ]]; then
echo "Error: No artifact IDs provided."
echo "Help: Check the build job's outputs.artifact_ids value."
echo "If you recently renamed the build job without updating the corresponding output reference,"
echo "that is likely the cause of this error."
exit 1
fi
- uses: actions/download-artifact@v8
with:
artifact-ids: ${{ env.ARTIFACT_IDS }}
merge-multiple: true
path: release-artifacts
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: 'release-artifacts/*'
- name: Upload release artifacts
run: |
./etc/ci/upload_nightly.py "${ARTIFACT_PLATFORM}" \
--secret-from-environment \
--github-release-id "${GITHUB_RELEASE_ID}" \
release-artifacts/*
upload-win-release:
upload-artifacts-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
runs-on: ubuntu-latest
environment: *publish-environment
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-win
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-win.outputs.artifact_ids }}
artifact_platform: windows-msvc
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
needs: *upload-artifacts-needs
strategy: *upload-artifacts-strategy
env:
ARTIFACT_IDS: ${{ matrix.artifact_ids }}
ARTIFACT_PLATFORM: ${{ matrix.artifact_platform }}
GITHUB_RELEASE_ID: ${{ needs.create-draft-release.outputs.release-id }}
RELEASE_REPO: ${{ github.repository_owner }}/servo
RELEASE_REPO_TOKEN: ${{ github.token }}
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
steps: *upload-artifacts-steps
build-mac:
@@ -191,46 +281,6 @@ jobs:
profile: "production"
force-github-hosted-runner: true # <https://github.com/servo/servo/issues/33296>
upload-mac-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
permissions:
id-token: write
attestations: write
needs:
- create-draft-release
- build-mac
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-mac.outputs.artifact_ids }}
artifact_platform: mac
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
upload-mac-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-mac
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-mac.outputs.artifact_ids }}
artifact_platform: mac
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
build-mac-arm64:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
@@ -240,46 +290,6 @@ jobs:
profile: "production"
force-github-hosted-runner: true # <https://github.com/servo/servo/issues/33296>
upload-mac-arm64-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
permissions:
id-token: write
attestations: write
needs:
- create-draft-release
- build-mac-arm64
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-mac-arm64.outputs.artifact_ids }}
artifact_platform: mac-arm64
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
upload-mac-arm64-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-mac-arm64
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-mac-arm64.outputs.artifact_ids }}
artifact_platform: mac-arm64
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
build-linux:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
@@ -289,96 +299,15 @@ jobs:
profile: "production"
force-github-hosted-runner: true # <https://github.com/servo/servo/issues/33296>
upload-linux-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
permissions:
id-token: write
attestations: write
needs:
- create-draft-release
- build-linux
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-linux.outputs.artifact_ids }}
artifact_platform: linux
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
upload-linux-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-linux
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-linux.outputs.artifact_ids }}
artifact_platform: linux
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
build-android:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Build release (Android)
uses: ./.github/workflows/android.yml
with:
profile: "release"
profile: "production"
secrets: inherit
upload-android-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
permissions:
id-token: write
attestations: write
needs:
- create-draft-release
- build-android
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-android.outputs.artifact_ids }}
artifact_platform: android
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
upload-android-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-android
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-android.outputs.artifact_ids }}
artifact_platform: android
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
build-ohos:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
@@ -388,43 +317,3 @@ jobs:
profile: "production"
upload_library: true
secrets: inherit
upload-ohos-nightly:
# Only run scheduled nightly builds on upstream servo.
if: |
(github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch')
&& (inputs.regular_release || false) == false
permissions:
id-token: write
attestations: write
needs:
- create-draft-release
- build-ohos
secrets:
github_upload_token: ${{ secrets.NIGHTLY_REPO_TOKEN }}
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-ohos.outputs.artifact_ids }}
artifact_platform: ohos
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}
upload-ohos-release:
if: github.event_name == 'workflow_dispatch' && inputs.regular_release
permissions:
id-token: write
attestations: write
# Necessary for the github token to upload artifacts to the release.
contents: write
needs:
- create-draft-release
- build-ohos
secrets:
s3_upload_token: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
uses: ./.github/workflows/upload_release.yml
with:
artifact_ids: ${{ needs.build-ohos.outputs.artifact_ids }}
artifact_platform: ohos
github_release_id: ${{ needs.create-draft-release.outputs.release-id }}
target_repo: ${{ github.repository_owner }}/${{ inputs.regular_release && 'servo' || 'servo-nightly-builds' }}

View File

@@ -1,69 +0,0 @@
name: Upload and Attest Release Assets
on:
workflow_call:
inputs:
artifact_platform:
type: string
required: true
description: "The platform of the release artifacts to upload."
target_repo:
type: string
required: true
description: "The target repository owner and name (e.g. `servo/servo`) where the release will be created."
github_release_id:
type: string
required: true
description: "The ID of the GitHub release to which assets will be added."
artifact_ids:
required: true
type: string
description: "A comma-separated list of artifact IDs to upload."
secrets:
github_upload_token:
required: false
description: "A GitHub token with permission to upload release assets. If omitted github.token will be used instead."
s3_upload_token:
required: true
description: "A token with permission to upload release artifacts to our S3 bucket."
jobs:
upload-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github
etc/ci
fetch-depth: '1'
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Validate artifact IDs
run: |
if [[ -z "${{ inputs.artifact_ids }}" ]]; then
echo "Error: No artifact IDs provided."
echo "Help: Check the calling workflow's output.artifact_ids parameter, usually created by a build workflow."
echo "If you recently renamed the build job for the artifacts, without updating the `outputs.artifact_ids` "
echo "parameter then this might be the cause of the error."
exit 1
fi
- uses: actions/download-artifact@v8
with:
artifact-ids: ${{ inputs.artifact_ids }}
merge-multiple: true
path: release-artifacts
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: 'release-artifacts/*'
- name: Upload release artifacts
run: |
./etc/ci/upload_nightly.py ${{ inputs.artifact_platform}} \
--secret-from-environment \
--github-release-id ${{ inputs.github_release_id }} \
release-artifacts/*
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.s3_upload_token }}
RELEASE_REPO_TOKEN: ${{ secrets.github_upload_token || github.token }}
RELEASE_REPO: ${{ inputs.target_repo }}

View File

@@ -157,13 +157,13 @@ jobs:
- name: Smoketest
run: .\mach smoketest --profile ${{ inputs.profile }}
- name: Install cargo nextest
if: ${{ runner.environment != 'self-hosted' }}
if: ${{ runner.environment != 'self-hosted' && inputs.unit-tests }}
uses: taiki-e/install-action@v2
with:
tool: nextest
# On self-hosted windows runners the install-action fails
- name: Install cargo nextest (self-hosted)
if: ${{ runner.environment == 'self-hosted' }}
if: ${{ runner.environment == 'self-hosted' && inputs.unit-tests }}
run: cargo install cargo-nextest --locked
- name: Unit tests
if: ${{ inputs.unit-tests }}

1462
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@ default-members = ["ports/servoshell"]
exclude = [".cargo", "support/crown"]
[workspace.package]
version = "0.0.6"
version = "0.1.0"
authors = ["The Servo Project Developers"]
repository = "https://github.com/servo/servo"
# A generic description for packages that don't have a meaningful description yet.
@@ -37,7 +37,7 @@ arboard = "3"
argon2 = { version = "0.5", features = ["alloc"] }
arrayvec = "0.7"
async-tungstenite = { version = "0.34", features = ["tokio-rustls-webpki-roots"] }
atomic_refcell = "0.1.13"
atomic_refcell = "0.1.14"
aws-lc-rs = { version = "1.16", default-features = false, features = ["aws-lc-sys"] }
backtrace = "0.3"
base64 = "0.22.1"
@@ -46,6 +46,8 @@ bitflags = "2.11"
brotli = "8.0.2"
bytemuck = "1"
byteorder = "1.5"
bytes = "1.0"
byte-slice-cast = "1.2.3"
cbc = "0.1.2"
cfg-if = "1.0.4"
chacha20poly1305 = "0.10"
@@ -75,7 +77,7 @@ futures-util = { version = "0.3", default-features = false }
gleam = "0.15"
glib = "0.22"
glib-sys = "0.22"
glow = "0.16.0"
glow = "0.17.0"
gstreamer = { version = "0.25", features = ["v1_18"] }
gstreamer-app = "0.25"
gstreamer-audio = "0.25"
@@ -97,7 +99,7 @@ hkdf = "0.12"
html5ever = "0.39"
http = "1.4"
http-body-util = "0.1"
hyper = "1.8"
hyper = "1.9"
hyper-rustls = { version = "0.27", default-features = false, features = ["http1", "http2", "logging", "tls12", "webpki-tokio"] }
hyper-util = { version = "0.1", features = ["client-legacy", "http2", "tokio", "client-proxy"] }
icu_locid = "1.5.0"
@@ -105,13 +107,15 @@ icu_properties = "1.5.0"
icu_segmenter = "1.5.0"
image = { version = "0.25", default-features = false, features = ["avif", "rayon", "bmp", "gif", "ico", "jpeg", "png", "webp"] }
imsz = "0.4"
indexmap = { version = "2.11.4", features = ["std"] }
indexmap = { version = "2.14.0", features = ["std"] }
inventory = { version = "0.3.24" }
ipc-channel = "0.21"
itertools = "0.14"
js = { package = "mozjs", version = "=0.15.7", default-features = false, features = ["libz-sys", "intl"] }
js = { package = "mozjs", version = "=0.15.9", default-features = false, features = ["libz-sys", "intl"] }
keyboard-types = { version = "0.8.3", features = ["serde", "webdriver"] }
kurbo = { version = "0.12", features = ["euclid"] }
libc = "0.2"
lru = "0.17"
log = "0.4.29"
mach2 = "0.6"
malloc_size_of_derive = "0.1"
@@ -127,6 +131,7 @@ nix = "0.30"
nom = "8.0.0"
nom-rfc8288 = "0.4.0"
num-bigint-dig = "0.8"
num-complex = "0.4.6"
num-derive = "0.4.2"
num-traits = "0.2"
num_cpus = "1.17.0"
@@ -147,6 +152,7 @@ postcard = { version = "1.1.3", default-features = false, features = ["use-std"]
proc-macro2 = "1"
quote = "1"
rand = "0.9"
rangemap = "1.7.1"
raw-window-handle = "0.6"
rayon = "1"
read-fonts = "0.35.0"
@@ -156,33 +162,34 @@ rsa = { version = "0.9.10", features = ["sha1", "sha2"] }
rustc-hash = "2.1.2"
rustls = { version = "0.23", default-features = false, features = ["logging", "std", "tls12"] }
rustls-pki-types = "1.14"
rustls-platform-verifier = "0.6.2"
sea-query = { version = "1.0.0-rc.31", default-features = false, features = ["backend-sqlite", "derive"] }
sea-query-rusqlite = { version = "0.8.0-rc.15" }
rustls-platform-verifier = "0.7.0"
sea-query = { version = "=1.0.0-rc.31", default-features = false, features = ["backend-sqlite", "derive"] }
sea-query-rusqlite = { version = "=0.8.0-rc.15" }
sec1 = "0.7"
selectors = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
selectors = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
serde = "1.0.228"
serde_bytes = "0.11"
serde_core = "1.0.226"
serde_json = "1.0"
servo_arc = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
servo_arc = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
sha1 = "0.10"
sha2 = "0.10"
sha3 = "0.10"
speexdsp-resampler = "0.1.0"
skrifa = "0.37.0"
smallvec = { version = "1.15", features = ["serde", "union"] }
string_cache = "0.9"
strum = { version = "0.28", features = ["derive"] }
stylo = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
stylo_atoms = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
stylo_dom = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
stylo_traits = { git = "https://github.com/servo/stylo", rev = "938e58caf26b6d0437291ce875dd5b0dd8a52d4f" }
surfman = { version = "0.11.0", features = ["chains"] }
stylo = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
stylo_atoms = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
stylo_dom = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
stylo_traits = { git = "https://github.com/servo/stylo", rev = "a556f4cbd15fc289039261661b049a5dc845cd80" }
surfman = { version = "0.12.0", features = ["chains"] }
syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] }
synstructure = "0.13"
taffy = { version = "0.9.2", default-features = false, features = ["calc", "detailed_layout_info", "grid", "std"] }
taffy = { version = "0.10.1", default-features = false, features = ["calc", "detailed_layout_info", "grid", "std"] }
tendril = { version = "0.5", features = ["encoding_rs"] }
tikv-jemalloc-sys = "0.6.1"
tikv-jemallocator = "0.6.1"
@@ -204,13 +211,14 @@ unicode-segmentation = "1.13.2"
url = "2.5"
urlpattern = "0.3"
utf-8 = "0.7"
uuid = { version = "1.22.0", features = ["v4", "v5"] }
uuid = { version = "1.23.1", features = ["v4", "v5"] }
vello = "0.6"
vello_cpu = "0.0.4"
webdriver = "0.53.0"
webdriver = { version = "0.53.0", default-features = false }
webpki-roots = "1.0"
webrender = { version = "0.68", features = ["capture"] }
webrender_api = "0.68"
web_atoms = "0.2"
wgpu-core = "26"
wgpu-types = "26"
winapi = "0.3"
@@ -219,8 +227,8 @@ winit = "0.30.13"
wio = "0.2"
wr_malloc_size_of = "0.2.2"
x25519-dalek = { version = "2.0.1", features = ["static_secrets"] }
xi-unicode = "0.3.0"
xml5ever = "0.39"
yuv = { version = "0.8.13", features = ["rayon"] }
############################################################################################
## Workspace-local dependencies
@@ -229,73 +237,74 @@ xml5ever = "0.39"
# be listed here, between the `Begin` and `End` comments, so that we can easily find and
# update the version requirements when bumping the workspace version.
# Begin workspace-version dependencies - Don't change this comment, we grep for it in scripts!
deny_public_fields = { package = "servo-deny-public-fields", version = "0.0.6", path = "components/deny_public_fields" }
devtools = { package = "servo-devtools", version = "0.0.6", path = "components/devtools" }
devtools_traits = { package = "servo-devtools-traits", version = "0.0.6", path = "components/shared/devtools" }
dom_struct = { package = "servo-dom-struct", version = "0.0.6", path = "components/dom_struct" }
embedder_traits = { package = "servo-embedder-traits", version = "0.0.6", path = "components/shared/embedder" }
fonts = { package = "servo-fonts", version = "0.0.6", path = "components/fonts" }
fonts_traits = { package = "servo-fonts-traits", version = "0.0.6", path = "components/shared/fonts" }
jstraceable_derive = { package = "servo-jstraceable-derive", version = "0.0.6", path = "components/jstraceable_derive" }
layout = { package = "servo-layout", version = "0.0.6", path = "components/layout" }
layout_api = { package = "servo-layout-api", version = "0.0.6", path = "components/shared/layout" }
malloc_size_of = { package = "servo-malloc-size-of", version = "0.0.6", path = "components/malloc_size_of" }
media = { package = "servo-media-thread", version = "0.0.6", path = "components/media/media-thread" }
metrics = { package = "servo-metrics", version = "0.0.6", path = "components/metrics" }
net = { package = "servo-net", version = "0.0.6", path = "components/net" }
net_traits = { package = "servo-net-traits", version = "0.0.6", path = "components/shared/net" }
paint = { package = "servo-paint", version = "0.0.6", path = "components/paint" }
paint_api = { package = "servo-paint-api", version = "0.0.6", path = "components/shared/paint" }
pixels = { package = "servo-pixels", version = "0.0.6", path = "components/pixels" }
profile = { package = "servo-profile", version = "0.0.6", path = "components/profile" }
profile_traits = { package = "servo-profile-traits", version = "0.0.6", path = "components/shared/profile" }
script = { package = "servo-script", version = "0.0.6", path = "components/script" }
script_bindings = { package = "servo-script-bindings", version = "0.0.6", path = "components/script_bindings" }
script_traits = { package = "servo-script-traits", version = "0.0.6", path = "components/shared/script" }
servo = { version = "0.0.6", path = "components/servo", default-features = false }
servo-allocator = { version = "0.0.6", path = "components/allocator" }
servo-background-hang-monitor = { version = "0.0.6", path = "components/background_hang_monitor" }
servo-background-hang-monitor-api = { version = "0.0.6", path = "components/shared/background_hang_monitor" }
servo-base = { version = "0.0.6", path = "components/shared/base" }
servo-bluetooth = { version = "0.0.6", path = "components/bluetooth" }
servo-bluetooth-traits = { version = "0.0.6", path = "components/shared/bluetooth" }
servo-canvas = { version = "0.0.6", path = "components/canvas" }
servo-canvas-traits = { version = "0.0.6", path = "components/shared/canvas" }
servo-config = { version = "0.0.6", path = "components/config" }
servo-config-macro = { version = "0.0.6", path = "components/config/macro" }
servo-constellation = { version = "0.0.6", path = "components/constellation" }
servo-constellation-traits = { version = "0.0.6", path = "components/shared/constellation" }
servo-geometry = { version = "0.0.6", path = "components/geometry" }
servo-media = { version = "0.0.6", path = "components/media/servo-media" }
servo-media-audio = { version = "0.0.6", path = "components/media/audio" }
servo-media-auto = { version = "0.0.6", path = "components/media/backends/auto" }
servo-media-derive = { version = "0.0.6", path = "components/media/servo-media-derive" }
servo-media-dummy = { version = "0.0.6", path = "components/media/backends/dummy" }
servo-media-gstreamer = { version = "0.0.6", path = "components/media/backends/gstreamer" }
servo-media-gstreamer-render = { version = "0.0.6", path = "components/media/backends/gstreamer/render" }
servo-media-gstreamer-render-android = { version = "0.0.6", path = "components/media/backends/gstreamer/render-android" }
servo-media-gstreamer-render-unix = { version = "0.0.6", path = "components/media/backends/gstreamer/render-unix" }
servo-media-player = { version = "0.0.6", path = "components/media/player" }
servo-media-streams = { version = "0.0.6", path = "components/media/streams" }
servo-media-traits = { version = "0.0.6", path = "components/media/traits" }
servo-media-webrtc = { version = "0.0.6", path = "components/media/webrtc" }
servo-tracing = { version = "0.0.6", path = "components/servo_tracing" }
servo-url = { version = "0.0.6", path = "components/url" }
storage = { package = "servo-storage", version = "0.0.6", path = "components/storage" }
storage_traits = { package = "servo-storage-traits", version = "0.0.6", path = "components/shared/storage" }
timers = { package = "servo-timers", version = "0.0.6", path = "components/timers" }
webdriver_server = { package = "servo-webdriver-server", version = "0.0.6", path = "components/webdriver_server" }
webgl = { package = "servo-webgl", version = "0.0.6", path = "components/webgl", default-features = false }
webgpu = { package = "servo-webgpu", version = "0.0.6", path = "components/webgpu" }
webgpu_traits = { package = "servo-webgpu-traits", version = "0.0.6", path = "components/shared/webgpu" }
webxr = { package = "servo-webxr", version = "0.0.6", path = "components/webxr" }
webxr-api = { package = "servo-webxr-api", version = "0.0.6", path = "components/shared/webxr" }
xpath = { package = "servo-xpath", version = "0.0.6", path = "components/xpath" }
deny_public_fields = { package = "servo-deny-public-fields", version = "0.1.0", path = "components/deny_public_fields" }
devtools = { package = "servo-devtools", version = "0.1.0", path = "components/devtools" }
devtools_traits = { package = "servo-devtools-traits", version = "0.1.0", path = "components/shared/devtools" }
dom_struct = { package = "servo-dom-struct", version = "0.1.0", path = "components/dom_struct" }
embedder_traits = { package = "servo-embedder-traits", version = "0.1.0", path = "components/shared/embedder" }
fonts = { package = "servo-fonts", version = "0.1.0", path = "components/fonts" }
fonts_traits = { package = "servo-fonts-traits", version = "0.1.0", path = "components/shared/fonts" }
hyper_serde = { package = "servo-hyper-serde", version = "0.1.0", path = "components/hyper_serde" }
jstraceable_derive = { package = "servo-jstraceable-derive", version = "0.1.0", path = "components/jstraceable_derive" }
layout = { package = "servo-layout", version = "0.1.0", path = "components/layout" }
layout_api = { package = "servo-layout-api", version = "0.1.0", path = "components/shared/layout" }
malloc_size_of = { package = "servo-malloc-size-of", version = "0.1.0", path = "components/malloc_size_of" }
media = { package = "servo-media-thread", version = "0.1.0", path = "components/media/media-thread" }
metrics = { package = "servo-metrics", version = "0.1.0", path = "components/metrics" }
net = { package = "servo-net", version = "0.1.0", path = "components/net" }
net_traits = { package = "servo-net-traits", version = "0.1.0", path = "components/shared/net" }
paint = { package = "servo-paint", version = "0.1.0", path = "components/paint" }
paint_api = { package = "servo-paint-api", version = "0.1.0", path = "components/shared/paint" }
pixels = { package = "servo-pixels", version = "0.1.0", path = "components/pixels" }
profile = { package = "servo-profile", version = "0.1.0", path = "components/profile" }
profile_traits = { package = "servo-profile-traits", version = "0.1.0", path = "components/shared/profile" }
script = { package = "servo-script", version = "0.1.0", path = "components/script" }
script_bindings = { package = "servo-script-bindings", version = "0.1.0", path = "components/script_bindings" }
script_traits = { package = "servo-script-traits", version = "0.1.0", path = "components/shared/script" }
servo = { version = "0.1.0", path = "components/servo", default-features = false }
servo-allocator = { version = "0.1.0", path = "components/allocator" }
servo-background-hang-monitor = { version = "0.1.0", path = "components/background_hang_monitor" }
servo-background-hang-monitor-api = { version = "0.1.0", path = "components/shared/background_hang_monitor" }
servo-base = { version = "0.1.0", path = "components/shared/base" }
servo-bluetooth = { version = "0.1.0", path = "components/bluetooth" }
servo-bluetooth-traits = { version = "0.1.0", path = "components/shared/bluetooth" }
servo-canvas = { version = "0.1.0", path = "components/canvas" }
servo-canvas-traits = { version = "0.1.0", path = "components/shared/canvas" }
servo-config = { version = "0.1.0", path = "components/config" }
servo-config-macro = { version = "0.1.0", path = "components/config/macro" }
servo-constellation = { version = "0.1.0", path = "components/constellation" }
servo-constellation-traits = { version = "0.1.0", path = "components/shared/constellation" }
servo-default-resources = { version = "0.1.0", path = "components/default-resources" }
servo-geometry = { version = "0.1.0", path = "components/geometry" }
servo-media = { version = "0.1.0", path = "components/media/servo-media" }
servo-media-audio = { version = "0.1.0", path = "components/media/audio" }
servo-media-auto = { version = "0.1.0", path = "components/media/backends/auto" }
servo-media-derive = { version = "0.1.0", path = "components/media/servo-media-derive" }
servo-media-dummy = { version = "0.1.0", path = "components/media/backends/dummy" }
servo-media-gstreamer = { version = "0.1.0", path = "components/media/backends/gstreamer" }
servo-media-gstreamer-render = { version = "0.1.0", path = "components/media/backends/gstreamer/render" }
servo-media-gstreamer-render-android = { version = "0.1.0", path = "components/media/backends/gstreamer/render-android" }
servo-media-gstreamer-render-unix = { version = "0.1.0", path = "components/media/backends/gstreamer/render-unix" }
servo-media-ohos = { version = "0.1.0", path = "components/media/backends/ohos" }
servo-media-player = { version = "0.1.0", path = "components/media/player" }
servo-media-streams = { version = "0.1.0", path = "components/media/streams" }
servo-media-traits = { version = "0.1.0", path = "components/media/traits" }
servo-media-webrtc = { version = "0.1.0", path = "components/media/webrtc" }
servo-tracing = { version = "0.1.0", path = "components/servo_tracing" }
servo-url = { version = "0.1.0", path = "components/url" }
servo-wakelock = { version = "0.1.0", path = "components/wakelock" }
storage = { package = "servo-storage", version = "0.1.0", path = "components/storage" }
storage_traits = { package = "servo-storage-traits", version = "0.1.0", path = "components/shared/storage" }
timers = { package = "servo-timers", version = "0.1.0", path = "components/timers" }
webdriver_server = { package = "servo-webdriver-server", version = "0.1.0", path = "components/webdriver_server" }
webgl = { package = "servo-webgl", version = "0.1.0", path = "components/webgl", default-features = false }
webgpu = { package = "servo-webgpu", version = "0.1.0", path = "components/webgpu" }
webgpu_traits = { package = "servo-webgpu-traits", version = "0.1.0", path = "components/shared/webgpu" }
webxr = { package = "servo-webxr", version = "0.1.0", path = "components/webxr" }
webxr-api = { package = "servo-webxr-api", version = "0.1.0", path = "components/shared/webxr" }
xpath = { package = "servo-xpath", version = "0.1.0", path = "components/xpath" }
# End workspace-version dependencies - Don't change this comment, we grep for it in scripts!
# Independently versioned workspace local crates. These crates will not take part in auto-bumps.
hyper_serde = { package = "servo-hyper-serde", version = "0.13.2", path = "components/hyper_serde" }
# RSA key generation could be very slow without compilation
# optimizations, in development mode. Without optimizations, WPT might
# consider RSA key generation tests fail due to timeout.
@@ -361,7 +370,7 @@ codegen-units = 1
# web_atoms = { path = "../html5ever/web_atoms" }
# xml5ever = { path = "../html5ever/xml5ever" }
# tendril = { path = "../html5ever/tendril" }
#
# For WebRender:
#
# webrender = { path = "../webrender/webrender" }
@@ -376,12 +385,6 @@ codegen-units = 1
# Or for CSP crate:
# content-security-policy = { path = "../rust-content-security-policy" }
#
# Pending egui bumping their accesskit version: https://github.com/emilk/egui/pull/7850
# This is only used in servoshell.
# TODO: When these are no longer needed remove the exception in deny.toml as well.
egui = { git = "https://github.com/emilk/egui.git", rev = "5d8f393335e051785b4fd3af9ef92eda5b61177f" }
egui-winit = { git = "https://github.com/emilk/egui.git", rev = "5d8f393335e051785b4fd3af9ef92eda5b61177f" }
#
# Or for Stylo:
#
# [patch."https://github.com/servo/stylo"]

View File

@@ -1,4 +1,5 @@
*Describe the changes that this pull request makes here. This will be the commit message.*
*Describe the changes that this pull request makes here. This will be the commit message
and it should go at the top of the pull request.*
Testing: *Describe how this pull request is tested or why it doesn't require tests*
Fixes: *Link to an issue this pull requests fixes or remove this line if there is no issue*
Testing: *Describe the new automated tests that cover this change or explain why it doesn't require tests.*
Fixes: *Link to an issue this pull request fixes or remove this line if there is no issue.*

View File

@@ -37,6 +37,7 @@ pub use self::background_hang_monitor::*;
)
),
all(target_os = "windows", target_arch = "aarch64"),
target_os = "freebsd"
))]
pub(crate) use crate::sampler::DummySampler as SamplerImpl;
#[cfg(all(

View File

@@ -318,7 +318,7 @@ impl<DrawTarget: GenericDrawTarget> CanvasData<DrawTarget> {
let (descriptor, data) = {
let _span =
profile_traits::trace_span!("image_descriptor_and_serializable_data",).entered();
profile_traits::trace_span!("image_descriptor_and_serializable_data").entered();
self.draw_target.image_descriptor_and_serializable_data()
};

View File

@@ -2,6 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! This crate provides two mechanisms for configuring the behaviour of the Servo engine.
//! - The [`opts`] module exposes a set of global flags that are initialized once
//! and cannot be changed at runtime.
//! - The [`prefs`] module provides a mechanism to get and set global preference
//! values that can be changed at runtime.
#![deny(unsafe_code)]
pub mod opts;

View File

@@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Configuration options for a single run of the servo application. Created
//! from command line arguments.
//! Options are global configuration options that are initialized once and cannot be changed at
//! runtime.
use std::default::Default;
use std::path::PathBuf;
@@ -12,15 +12,14 @@ use std::sync::OnceLock;
use serde::{Deserialize, Serialize};
/// Global flags for Servo, currently set on the command line.
/// The set of global options supported by Servo. The values for these can be configured during
/// initialization of Servo and cannot be changed later at runtime.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Opts {
/// `None` to disable the time profiler or `Some` to enable it with:
/// `None` to disable the time profiler or `Some` to enable it with either:
///
/// - an interval in seconds to cause it to produce output on that interval.
/// (`i.e. -p 5`).
/// - a file path to write profiling info to a TSV file upon Servo's termination.
/// (`i.e. -p out.tsv`).
pub time_profiling: Option<OutputOptions>,
/// When the profiler is enabled, this is an optional path to dump a self-contained HTML file
@@ -79,10 +78,10 @@ pub struct Opts {
pub unminify_css: bool,
}
/// Debug options for Servo, currently set on the command line with -Z
/// Debug options for Servo.
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct DiagnosticsLogging {
/// List all the debug options.
/// Print all the debug options supported by Servo to the standard output.
pub help: bool,
/// Print the DOM after each restyle.
@@ -202,9 +201,9 @@ impl DiagnosticsLogging {
}
}
/// The destination for the time profiler reports.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub enum OutputOptions {
/// Database connection config (hostname, name, user, pass)
FileName(String),
Stdout(f64),
}
@@ -241,16 +240,16 @@ static OPTIONS: OnceLock<Opts> = OnceLock::new();
/// Initialize options.
///
/// Should only be called once at process startup.
/// Must be called before the first call to [get].
/// Must be called before the first call to [`get`].
pub fn initialize_options(opts: Opts) {
OPTIONS.set(opts).expect("Already initialized");
}
/// Get the servo options
///
/// If the servo options have not been initialized by calling [initialize_options], then the
/// options will be initialized to default values. Outside of tests the options should
/// be explicitly initialized.
/// If the servo options have not been initialized by calling [`initialize_options`], then the
/// options will be initialized to default values. Outside of tests the options should be
/// explicitly initialized.
#[inline]
pub fn get() -> &'static Opts {
// In unit-tests using default options reduces boilerplate.

View File

@@ -5,6 +5,7 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
/// The types of preference values in Servo.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub enum PrefValue {
Float(f64),
@@ -16,6 +17,8 @@ pub enum PrefValue {
}
impl PrefValue {
/// Parse the `input` string as a preference value. Defaults to a `PrefValue::Str` if the input
/// cannot be parsed as valid value of one of the other types.
pub fn from_booleanish_str(input: &str) -> Self {
match input {
"false" => PrefValue::Bool(false),
@@ -95,11 +98,23 @@ impl_pref_from! {
impl_from_pref! {
PrefValue::Float => f64,
PrefValue::Int => i64,
PrefValue::UInt => u64,
PrefValue::Str => String,
PrefValue::Bool => bool,
}
// The default generated from `impl_from_pref` would cause panic
// when converting from PrefValue::Int.
impl TryFrom<PrefValue> for u64 {
type Error = String;
fn try_from(other: PrefValue) -> Result<Self, Self::Error> {
match other {
PrefValue::UInt(value) => Ok(value),
PrefValue::Int(value) if value >= 0 => Ok(value as u64),
_ => Err(format!("Cannot convert {other:?} to u64")),
}
}
}
impl From<[f64; 4]> for PrefValue {
fn from(other: [f64; 4]) -> PrefValue {
PrefValue::Array(IntoIterator::into_iter(other).map(|v| v.into()).collect())

View File

@@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! Preferences are the global configuration options that can be changed at runtime.
use std::env::consts::ARCH;
use std::sync::{RwLock, RwLockReadGuard};
use std::time::Duration;
@@ -13,7 +15,12 @@ pub use crate::pref_util::PrefValue;
static PREFERENCES: RwLock<Preferences> = RwLock::new(Preferences::const_default());
/// A trait to be implemented by components that wish to be notified about runtime changes to the
/// global preferences for the current process.
pub trait PreferencesObserver: Send + Sync {
/// This method is called when the global preferences have been updated. The argument to the
/// method is an array of tuples where the first component is the name of the preference and
/// the second component is the new value of the preference.
fn prefs_changed(&self, _changes: &[(&'static str, PrefValue)]) {}
}
@@ -25,10 +32,13 @@ pub fn get() -> RwLockReadGuard<'static, Preferences> {
PREFERENCES.read().unwrap()
}
/// Subscribe to notifications about changes to the global preferences for the current process.
pub fn add_observer(observer: Box<dyn PreferencesObserver>) {
OBSERVERS.write().unwrap().push(observer);
}
/// Update the values of the global preferences for the current process. This also notifies the
/// observers previously added using [`add_observer`].
pub fn set(preferences: Preferences) {
// Map between Stylo preference names and Servo preference names as the This should be
// kept in sync with components/script/dom/bindings/codegen/run.py which generates the
@@ -72,6 +82,16 @@ macro_rules! pref {
};
}
/// The set of global preferences supported by Servo.
///
/// Each preference has a default value that determines its initial state. These defaults
/// fall into roughly three categories:
/// - **Stable**: enabled by default.
/// - **Experimental**: disabled by default, but intended to be enabled for experimental use.
/// - **Unstable**: disabled by default.
///
/// For a full overview of which preferences are experimental, see the
/// [experimental features documentation](https://book.servo.org/design-documentation/experimental-features.html).
#[derive(Clone, Deserialize, Serialize, ServoPreferences)]
pub struct Preferences {
pub fonts_default: String,
@@ -131,6 +151,8 @@ pub struct Preferences {
pub dom_gamepad_enabled: bool,
// feature: Geolocation API | #38903 | Web/API/Geolocation_API
pub dom_geolocation_enabled: bool,
// feature: Screen Wake Lock API | #43615 | Web/API/Screen_Wake_Lock_API
pub dom_wakelock_enabled: bool,
// feature: IndexedDB | #6963 | Web/API/IndexedDB_API
pub dom_indexeddb_enabled: bool,
// feature: IntersectionObserver | #35767 | Web/API/Intersection_Observer_API
@@ -151,10 +173,16 @@ pub struct Preferences {
pub dom_permissions_testing_allowed_in_nonsecure_contexts: bool,
// feature: ResizeObserver | #39790 | Web/API/ResizeObserver
pub dom_resize_observer_enabled: bool,
// feature: Sanitizer API | #43948 | Web/API/HTML_Sanitizer_API
pub dom_sanitizer_enabled: bool,
pub dom_script_asynch: bool,
// feature: Storage API | #43976 | Web/API/Storage_API
pub dom_storage_manager_api_enabled: bool,
// feature: ServiceWorker | #36538 | Web/API/Service_Worker_API
pub dom_serviceworker_enabled: bool,
pub dom_serviceworker_timeout_seconds: i64,
// feature: SharedWorker | #7458 | Web/API/SharedWorker
pub dom_sharedworker_enabled: bool,
pub dom_servo_helpers_enabled: bool,
pub dom_servoparser_async_html_tokenizer_enabled: bool,
pub dom_testbinding_enabled: bool,
@@ -353,6 +381,7 @@ impl Preferences {
dom_fullscreen_test: false,
dom_gamepad_enabled: true,
dom_geolocation_enabled: false,
dom_wakelock_enabled: false,
dom_indexeddb_enabled: false,
dom_intersection_observer_enabled: false,
dom_microdata_testing_enabled: false,
@@ -365,9 +394,12 @@ impl Preferences {
dom_permissions_enabled: false,
dom_permissions_testing_allowed_in_nonsecure_contexts: false,
dom_resize_observer_enabled: true,
dom_sanitizer_enabled: false,
dom_script_asynch: true,
dom_storage_manager_api_enabled: false,
dom_serviceworker_enabled: false,
dom_serviceworker_timeout_seconds: 60,
dom_sharedworker_enabled: false,
dom_servo_helpers_enabled: false,
dom_servoparser_async_html_tokenizer_enabled: false,
dom_testbinding_enabled: false,

View File

@@ -19,7 +19,7 @@ bluetooth = ["servo-bluetooth-traits"]
gamepad = ["embedder_traits/gamepad"]
tracing = ["dep:tracing", "servo-canvas/tracing"]
vello = ["servo-canvas/vello"]
webgpu = ["script_traits/webgpu"]
webgpu = ["dep:webgpu", "dep:webgpu_traits", "script_traits/webgpu"]
[lints.clippy]
unwrap_used = "deny"
@@ -28,6 +28,7 @@ panic = "deny"
[dependencies]
accesskit = { workspace = true }
backtrace = { workspace = true }
base64 = { workspace = true }
content-security-policy = { workspace = true }
crossbeam-channel = { workspace = true }
devtools_traits = { workspace = true }
@@ -58,12 +59,13 @@ servo-config = { workspace = true }
servo-constellation-traits = { workspace = true }
servo-tracing = { workspace = true }
servo-url = { workspace = true }
servo-wakelock = { workspace = true }
storage_traits = { workspace = true }
stylo = { workspace = true }
stylo_traits = { workspace = true }
tracing = { workspace = true, optional = true }
webgpu = { workspace = true }
webgpu_traits = { workspace = true }
webgpu = { workspace = true, optional = true }
webgpu_traits = { workspace = true, optional = true }
webxr-api = { workspace = true }
[target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_env="ohos"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies]

View File

@@ -145,7 +145,8 @@ use servo_base::generic_channel::{
GenericCallback, GenericSend, GenericSender, RoutedReceiver, SendError,
};
use servo_base::id::{
BrowsingContextGroupId, BrowsingContextId, HistoryStateId, MessagePortId, MessagePortRouterId,
BrowsingContextGroupId, BrowsingContextId, CONSTELLATION_PIPELINE_NAMESPACE_ID,
FIRST_CONTENT_PIPELINE_NAMESPACE_ID, HistoryStateId, MessagePortId, MessagePortRouterId,
PainterId, PipelineId, PipelineNamespace, PipelineNamespaceId, PipelineNamespaceRequest,
ScriptEventLoopId, WebViewId,
};
@@ -158,14 +159,16 @@ use servo_canvas_traits::canvas::{CanvasId, CanvasMsg};
use servo_canvas_traits::webgl::WebGLThreads;
use servo_config::{opts, pref};
use servo_constellation_traits::{
AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, DocumentState,
EmbedderToConstellationMessage, IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, Job,
LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent,
PortMessageTask, PortTransferInfo, SWManagerMsg, SWManagerSenders, ScreenshotReadinessResponse,
ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerManagerFactory, ServiceWorkerMsg,
StructuredSerializedData, TraversalDirection, UserContentManagerAction, WindowSizeType,
AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, ConstellationInterest,
DocumentState, EmbedderToConstellationMessage, IFrameLoadInfo, IFrameLoadInfoWithData,
IFrameSizeMsg, Job, LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior,
PaintMetricEvent, PortMessageTask, PortTransferInfo, SWManagerMsg, SWManagerSenders,
ScreenshotReadinessResponse, ScriptToConstellationMessage, ScrollStateUpdate,
ServiceWorkerManagerFactory, ServiceWorkerMsg, StructuredSerializedData, TargetSnapshotParams,
TraversalDirection, UserContentManagerAction, WindowSizeType,
};
use servo_url::{Host, ImmutableOrigin, ServoUrl};
use servo_wakelock::{WakeLockProvider, WakeLockType};
use storage_traits::StorageThreads;
use storage_traits::client_storage::ClientStorageThreadMessage;
use storage_traits::indexeddb::{IndexedDBThreadMsg, SyncOperation};
@@ -189,7 +192,13 @@ use crate::process_manager::ProcessManager;
use crate::serviceworker::ServiceWorkerUnprivilegedContent;
use crate::session_history::{NeedsToReload, SessionHistoryChange, SessionHistoryDiff};
type PendingApprovalNavigations = FxHashMap<PipelineId, (LoadData, NavigationHistoryBehavior)>;
struct PendingApprovalNavigation {
load_data: LoadData,
history_behaviour: NavigationHistoryBehavior,
target_snapshot_params: TargetSnapshotParams,
}
type PendingApprovalNavigations = FxHashMap<PipelineId, PendingApprovalNavigation>;
#[derive(Debug)]
/// The state used by MessagePortInfo to represent the various states the port can be in.
@@ -405,6 +414,9 @@ pub struct Constellation<STF, SWF> {
/// Bookkeeping for BroadcastChannel functionnality.
broadcast_channels: BroadcastChannels,
/// Tracks which pipelines have registered interest in each notification category.
pipeline_interests: FxHashMap<ConstellationInterest, FxHashSet<PipelineId>>,
/// The set of all the pipelines in the browser. (See the `pipeline` module
/// for more details.)
pipelines: FxHashMap<PipelineId, Pipeline>,
@@ -476,6 +488,13 @@ pub struct Constellation<STF, SWF> {
/// Pipeline ID of the active media session.
active_media_session: Option<PipelineId>,
/// Aggregate screen wake lock count across all webviews. The provider is notified
/// only when this transitions 0→1 (acquire) or N→0 (release).
screen_wake_lock_count: u32,
/// Provider for OS-level screen wake lock acquisition and release.
wake_lock_provider: Box<dyn WakeLockProvider>,
/// The image bytes associated with the BrokenImageIcon embedder resource.
/// Read during startup and provided to image caches that are created
/// on an as-needed basis, rather than retrieving it every time.
@@ -573,6 +592,9 @@ pub struct InitialConstellationState {
/// The async runtime.
pub async_runtime: Box<dyn AsyncRuntime>,
/// The wake lock provider for acquiring and releasing OS-level screen wake locks.
pub wake_lock_provider: Box<dyn WakeLockProvider>,
}
/// When we are exiting a pipeline, we can either force exiting or not. A normal exit
@@ -651,8 +673,7 @@ where
let swmanager_receiver = swmanager_ipc_receiver.route_preserving_errors();
// Zero is reserved for the embedder.
PipelineNamespace::install(PipelineNamespaceId(1));
PipelineNamespace::install(CONSTELLATION_PIPELINE_NAMESPACE_ID);
#[cfg(feature = "webgpu")]
let webrender_wgpu = WebRenderWGPU {
@@ -696,12 +717,11 @@ where
message_ports: Default::default(),
message_port_routers: Default::default(),
broadcast_channels: Default::default(),
pipeline_interests: Default::default(),
pipelines: Default::default(),
browsing_contexts: Default::default(),
pending_changes: vec![],
// We initialize the namespace at 2, since we reserved
// namespace 0 for the embedder, and 0 for the constellation
next_pipeline_namespace_id: Cell::new(PipelineNamespaceId(2)),
next_pipeline_namespace_id: Cell::new(FIRST_CONTENT_PIPELINE_NAMESPACE_ID),
time_profiler_chan: state.time_profiler_chan,
mem_profiler_chan: state.mem_profiler_chan.clone(),
phantom: PhantomData,
@@ -726,6 +746,8 @@ where
active_keyboard_modifiers: Modifiers::empty(),
hard_fail,
active_media_session: None,
screen_wake_lock_count: 0,
wake_lock_provider: state.wake_lock_provider,
broken_image_icon_data: broken_image_icon_data.clone(),
process_manager: ProcessManager::new(state.mem_profiler_chan),
async_runtime: state.async_runtime,
@@ -853,16 +875,11 @@ where
},
None => self
.browsing_context_group_set
.iter()
.filter_map(|(_, bc_group)| {
if bc_group
.values()
.filter(|bc_group| {
bc_group
.top_level_browsing_context_set
.contains(webview_id)
{
Some(bc_group)
} else {
None
}
})
.last()
.ok_or(
@@ -1023,6 +1040,7 @@ where
load_data: LoadData,
is_private: bool,
throttled: bool,
target_snapshot_params: TargetSnapshotParams,
) {
if self.shutting_down {
return;
@@ -1064,6 +1082,7 @@ where
viewport_details: initial_viewport_details,
user_content_manager_id,
theme,
target_snapshot_params,
};
let pipeline = match Pipeline::spawn(new_pipeline_info, event_loop, self, throttled) {
Ok(pipeline) => pipeline,
@@ -1157,7 +1176,7 @@ where
inherited_secure_context: Option<bool>,
throttled: bool,
) {
debug!("{}: Creating new browsing context", browsing_context_id);
debug!("{browsing_context_id}: Creating new browsing context");
let bc_group_id = match self
.browsing_context_group_set
.iter_mut()
@@ -1253,10 +1272,12 @@ where
self.process_manager.register(&mut sel);
let request = {
let oper = sel.select();
let oper = {
let _span = profile_traits::trace_span!("handle_request::select").entered();
sel.select()
};
let index = oper.index();
let _span = profile_traits::trace_span!("handle_request::select").entered();
match index {
0 => oper
.recv(&self.namespace_receiver)
@@ -1330,6 +1351,7 @@ where
}
}
#[servo_tracing::instrument(skip_all)]
fn handle_request_from_swmanager(&mut self, message: SWManagerMsg) {
match message {
SWManagerMsg::PostMessageToClient => {
@@ -1358,9 +1380,15 @@ where
};
match pending {
Some((load_data, history_handling)) => {
Some(pending) => {
if allowed {
self.load_url(webview_id, pipeline_id, load_data, history_handling);
self.load_url(
webview_id,
pipeline_id,
pending.load_data,
pending.history_behaviour,
pending.target_snapshot_params,
);
} else {
if let Some((sender, id)) = &self.webdriver_load_status_sender {
if pipeline_id == *id {
@@ -1395,8 +1423,13 @@ where
// Load a new page from a typed url
// If there is already a pending page (self.pending_changes), it will not be overridden;
// However, if the id is not encompassed by another change, it will be.
EmbedderToConstellationMessage::LoadUrl(webview_id, url) => {
let load_data = LoadData::new_for_new_unrelated_webview(url);
EmbedderToConstellationMessage::LoadUrl(webview_id, url_request) => {
let mut load_data = LoadData::new_for_new_unrelated_webview(url_request.url);
if !url_request.headers.is_empty() {
load_data.headers.extend(url_request.headers);
}
let ctx_id = BrowsingContextId::from(webview_id);
let pipeline_id = match self.browsing_contexts.get(&ctx_id) {
Some(ctx) => ctx.pipeline_id,
@@ -1411,6 +1444,7 @@ where
pipeline_id,
load_data,
NavigationHistoryBehavior::Push,
TargetSnapshotParams::default(),
);
},
// Create a new top level browsing context. Will use response_chan to return
@@ -1822,12 +1856,17 @@ where
self.handle_change_running_animations_state(source_pipeline_id, animation_state)
},
// Ask the embedder for permission to load a new page.
ScriptToConstellationMessage::LoadUrl(load_data, history_handling) => {
ScriptToConstellationMessage::LoadUrl(
load_data,
history_handling,
target_snapshot_params,
) => {
self.schedule_navigation(
webview_id,
source_pipeline_id,
load_data,
history_handling,
target_snapshot_params,
);
},
ScriptToConstellationMessage::AbortLoadUrl => {
@@ -1884,15 +1923,20 @@ where
data,
);
},
ScriptToConstellationMessage::Focus(focused_child_browsing_context_id, sequence) => {
self.handle_focus_msg(
ScriptToConstellationMessage::FocusAncestorBrowsingContextsForFocusingSteps(
focused_child_browsing_context_id,
sequence,
) => {
self.handle_focus_ancestor_browsing_contexts_for_focusing_steps(
source_pipeline_id,
focused_child_browsing_context_id,
sequence,
);
},
ScriptToConstellationMessage::FocusRemoteDocument(focused_browsing_context_id) => {
self.handle_focus_remote_document_msg(focused_browsing_context_id);
ScriptToConstellationMessage::FocusRemoteBrowsingContext(
focused_browsing_context_id,
) => {
self.handle_focus_remote_browsing_context(focused_browsing_context_id);
},
ScriptToConstellationMessage::SetThrottledComplete(throttled) => {
self.handle_set_throttled_complete(source_pipeline_id, throttled);
@@ -1975,6 +2019,20 @@ where
warn!("Unable to forward DOMMessage for postMessage call");
}
},
ScriptToConstellationMessage::RegisterInterest(interest) => {
self.pipeline_interests
.entry(interest)
.or_default()
.insert(source_pipeline_id);
},
ScriptToConstellationMessage::UnregisterInterest(interest) => {
if let Some(set) = self.pipeline_interests.get_mut(&interest) {
set.remove(&source_pipeline_id);
if set.is_empty() {
self.pipeline_interests.remove(&interest);
}
}
},
ScriptToConstellationMessage::BroadcastStorageEvent(
storage,
url,
@@ -2065,6 +2123,26 @@ where
let _ = event_loop.send(ScriptThreadMessage::TriggerGarbageCollection);
}
},
ScriptToConstellationMessage::AcquireWakeLock(type_) => match type_ {
WakeLockType::Screen => {
self.screen_wake_lock_count += 1;
if self.screen_wake_lock_count == 1 {
if let Err(e) = self.wake_lock_provider.acquire(type_) {
warn!("Failed to acquire screen wake lock: {e}");
}
}
},
},
ScriptToConstellationMessage::ReleaseWakeLock(type_) => match type_ {
WakeLockType::Screen => {
self.screen_wake_lock_count = self.screen_wake_lock_count.saturating_sub(1);
if self.screen_wake_lock_count == 0 {
if let Err(e) = self.wake_lock_provider.release(type_) {
warn!("Failed to release screen wake lock: {e}");
}
}
},
},
}
}
@@ -2589,7 +2667,17 @@ where
);
}
for pipeline in self.pipelines.values() {
let interested = match self
.pipeline_interests
.get(&ConstellationInterest::StorageEvent)
{
Some(set) => set,
None => return,
}
.iter()
.filter_map(|interested_id| self.pipelines.get(interested_id));
for pipeline in interested {
if pipeline.id == pipeline_id || pipeline.url.origin() != origin {
continue;
}
@@ -2897,6 +2985,12 @@ where
return;
};
// Clean up any registered interests for this pipeline.
self.pipeline_interests.retain(|_, set| {
set.remove(&pipeline_id);
!set.is_empty()
});
// Now that the Script and Constellation parts of Servo no longer have a reference to
// this pipeline, tell `Paint` that it has shut down. This is delayed until the
// last moment.
@@ -3019,6 +3113,7 @@ where
new_load_data,
is_private,
throttled,
TargetSnapshotParams::default(),
);
self.add_pending_change(SessionHistoryChange {
webview_id,
@@ -3130,23 +3225,19 @@ where
};
webview.accessibility_active = active;
self.constellation_to_embedder_proxy.send(
ConstellationToEmbedderMsg::AccessibilityTreeIdChanged(
webview_id,
webview.active_top_level_pipeline_id.into(),
),
let Some(pipeline_id) = webview.active_top_level_pipeline_id else {
return;
};
let epoch = webview.active_top_level_pipeline_epoch;
// Forward the activation to the webviews active top-level pipeline, if any. For inactive
// pipelines (documents in bfcache), we only need to forward the activation if and when they
// become active (see set_frame_tree_for_webview()).
// There are two sites like this; this is the a11y activation site.
self.send_message_to_pipeline(
pipeline_id,
ScriptThreadMessage::SetAccessibilityActive(pipeline_id, active, epoch),
"Set accessibility active after closure",
);
// Forward the activation to the webviews active pipelines (of those that represent
// documents). For inactive pipelines (documents in bfcache), we only need to forward the
// activation if and when they become active (see set_frame_tree_for_webview()).
for pipeline_id in self.active_pipelines_for_webview(webview_id) {
self.send_message_to_pipeline(
pipeline_id,
ScriptThreadMessage::SetAccessibilityActive(pipeline_id, active),
"Set accessibility active after closure",
);
}
}
fn forward_input_event(
@@ -3223,13 +3314,7 @@ where
// its focused browsing context to be itself.
self.webviews.insert(
webview_id,
ConstellationWebView::new(
&self.constellation_to_embedder_proxy,
webview_id,
pipeline_id,
browsing_context_id,
user_content_manager_id,
),
ConstellationWebView::new(webview_id, browsing_context_id, user_content_manager_id),
);
// https://html.spec.whatwg.org/multipage/#creating-a-new-browsing-context-group
@@ -3251,6 +3336,7 @@ where
load_data,
is_private,
throttled,
TargetSnapshotParams::default(),
);
self.add_pending_change(SessionHistoryChange {
webview_id,
@@ -3390,6 +3476,7 @@ where
new_pipeline_id,
is_private,
mut history_handling,
target_snapshot_params,
..
} = load_info.info;
@@ -3469,6 +3556,7 @@ where
load_info.load_data,
is_private,
browsing_context_throttled,
target_snapshot_params,
);
self.add_pending_change(SessionHistoryChange {
webview_id,
@@ -3616,9 +3704,7 @@ where
self.webviews.insert(
new_webview_id,
ConstellationWebView::new(
&self.constellation_to_embedder_proxy,
new_webview_id,
new_pipeline_id,
new_browsing_context_id,
user_content_manager_id,
),
@@ -3732,6 +3818,7 @@ where
source_id: PipelineId,
load_data: LoadData,
history_handling: NavigationHistoryBehavior,
target_snapshot_params: TargetSnapshotParams,
) {
match self.pending_approval_navigations.entry(source_id) {
Entry::Occupied(_) => {
@@ -3741,7 +3828,11 @@ where
);
},
Entry::Vacant(entry) => {
let _ = entry.insert((load_data.clone(), history_handling));
let _ = entry.insert(PendingApprovalNavigation {
load_data: load_data.clone(),
history_behaviour: history_handling,
target_snapshot_params,
});
},
};
// Allow the embedder to handle the url itself
@@ -3761,6 +3852,7 @@ where
source_id: PipelineId,
load_data: LoadData,
history_handling: NavigationHistoryBehavior,
target_snapshot_params: TargetSnapshotParams,
) -> Option<PipelineId> {
debug!(
"{}: Loading ({}replacing): {}",
@@ -3823,6 +3915,7 @@ where
browsing_context_id,
load_data,
history_handling,
target_snapshot_params,
);
let result = match self.pipelines.get(&parent_pipeline_id) {
Some(parent_pipeline) => parent_pipeline.event_loop.send(msg),
@@ -3880,6 +3973,7 @@ where
load_data,
is_private,
is_throttled,
target_snapshot_params,
);
self.add_pending_change(SessionHistoryChange {
webview_id,
@@ -4174,6 +4268,10 @@ where
load_data.clone(),
is_private,
throttled,
// TODO(jdm): We need to store the original target snapshot params
// with the pipeline when it's created, so we can support reloading
// a discarded document properly.
TargetSnapshotParams::default(),
);
self.add_pending_change(SessionHistoryChange {
webview_id,
@@ -4413,7 +4511,7 @@ where
}
#[servo_tracing::instrument(skip_all)]
fn handle_focus_msg(
fn handle_focus_ancestor_browsing_contexts_for_focusing_steps(
&mut self,
pipeline_id: PipelineId,
focused_child_browsing_context_id: Option<BrowsingContextId>,
@@ -4453,23 +4551,20 @@ where
self.focus_browsing_context(Some(pipeline_id), focused_browsing_context_id);
}
fn handle_focus_remote_document_msg(&mut self, focused_browsing_context_id: BrowsingContextId) {
let pipeline_id = match self.browsing_contexts.get(&focused_browsing_context_id) {
Some(browsing_context) => browsing_context.pipeline_id,
None => return warn!("Browsing context {} not found", focused_browsing_context_id),
fn handle_focus_remote_browsing_context(&mut self, target: BrowsingContextId) {
let Some(browsing_context) = self.browsing_contexts.get(&target) else {
return warn!("{target:?} not found for focus message");
};
// Ignore if its active document isn't fully active.
if self.get_activity(pipeline_id) != DocumentActivity::FullyActive {
debug!(
"Ignoring the remote focus request because pipeline {} of \
browsing context {} is not fully active",
pipeline_id, focused_browsing_context_id,
);
return;
let pipeline_id = browsing_context.pipeline_id;
let Some(pipeline) = self.pipelines.get(&pipeline_id) else {
return warn!("{pipeline_id:?} not found for focus message");
};
if let Err(error) = pipeline
.event_loop
.send(ScriptThreadMessage::FocusDocument(pipeline_id))
{
self.handle_send_error(pipeline_id, error);
}
self.focus_browsing_context(None, focused_browsing_context_id);
}
/// Perform [the focusing steps][1] for the active document of
@@ -4570,7 +4665,10 @@ where
// > substeps: [...]
for &pipeline in old_focus_chain_pipelines.iter() {
if Some(pipeline.id) != initiator_pipeline_id {
let msg = ScriptThreadMessage::Unfocus(pipeline.id, pipeline.focus_sequence);
let msg = ScriptThreadMessage::UnfocusDocumentAsPartOfFocusingSteps(
pipeline.id,
pipeline.focus_sequence,
);
trace!("Sending {:?} to {}", msg, pipeline.id);
if let Err(e) = pipeline.event_loop.send(msg) {
send_errors.push((pipeline.id, e));
@@ -4590,49 +4688,35 @@ where
// Don't send a message to the browsing context that initiated this
// focus operation. It already knows that it has gotten focus.
if Some(pipeline.id) != initiator_pipeline_id {
let msg = if let Some(child_browsing_context_id) = child_browsing_context_id {
// Focus the container element of `child_browsing_context_id`.
ScriptThreadMessage::FocusIFrame(
if let Err(error) = pipeline.event_loop.send(
ScriptThreadMessage::FocusDocumentAsPartOfFocusingSteps(
pipeline.id,
child_browsing_context_id,
pipeline.focus_sequence,
)
} else {
// Focus the document.
ScriptThreadMessage::FocusDocument(pipeline.id, pipeline.focus_sequence)
};
trace!("Sending {:?} to {}", msg, pipeline.id);
if let Err(e) = pipeline.event_loop.send(msg) {
send_errors.push((pipeline.id, e));
child_browsing_context_id,
),
) {
send_errors.push((pipeline.id, error));
}
} else {
trace!(
"Not notifying {} - it's the initiator of this focus operation",
pipeline.id
);
}
child_browsing_context_id = Some(pipeline.browsing_context_id);
}
if let (Some(pipeline), Some(child_browsing_context_id)) =
(first_common_pipeline_in_chain, child_browsing_context_id)
{
if let Some(pipeline) = first_common_pipeline_in_chain {
if Some(pipeline.id) != initiator_pipeline_id {
// Focus the container element of `child_browsing_context_id`.
let msg = ScriptThreadMessage::FocusIFrame(
pipeline.id,
child_browsing_context_id,
pipeline.focus_sequence,
);
trace!("Sending {:?} to {}", msg, pipeline.id);
if let Err(e) = pipeline.event_loop.send(msg) {
send_errors.push((pipeline.id, e));
if let Err(error) = pipeline.event_loop.send(
ScriptThreadMessage::FocusDocumentAsPartOfFocusingSteps(
pipeline.id,
pipeline.focus_sequence,
child_browsing_context_id,
),
) {
send_errors.push((pipeline.id, error));
}
}
}
for (pipeline_id, e) in send_errors {
self.handle_send_error(pipeline_id, e);
for (pipeline_id, error) in send_errors {
self.handle_send_error(pipeline_id, error);
}
}
@@ -4713,7 +4797,7 @@ where
let _ = response_sender.send(is_open);
},
WebDriverCommandMsg::FocusBrowsingContext(browsing_context_id) => {
self.handle_focus_remote_document_msg(browsing_context_id);
self.handle_focus_remote_browsing_context(browsing_context_id);
},
// TODO: This should use the ScriptThreadMessage::EvaluateJavaScript command
WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd) => {
@@ -5054,9 +5138,16 @@ where
// If the browsing context is focused, focus the document
let msg = if is_focused {
ScriptThreadMessage::FocusDocument(pipeline_id, pipeline.focus_sequence)
ScriptThreadMessage::FocusDocumentAsPartOfFocusingSteps(
pipeline_id,
pipeline.focus_sequence,
None,
)
} else {
ScriptThreadMessage::Unfocus(pipeline_id, pipeline.focus_sequence)
ScriptThreadMessage::UnfocusDocumentAsPartOfFocusingSteps(
pipeline_id,
pipeline.focus_sequence,
)
};
if let Err(e) = pipeline.event_loop.send(msg) {
self.handle_send_error(pipeline_id, e);
@@ -5735,23 +5826,6 @@ where
})
}
/// Convert a webview to a flat list of active pipeline ids, for activating accessibility.
fn active_pipelines_for_webview(&self, webview_id: WebViewId) -> Vec<PipelineId> {
let mut result = vec![];
let mut browsing_context_ids = vec![BrowsingContextId::from(webview_id)];
while let Some(browsing_context_id) = browsing_context_ids.pop() {
let Some(browsing_context) = self.browsing_contexts.get(&browsing_context_id) else {
continue;
};
let Some(pipeline) = self.pipelines.get(&browsing_context.pipeline_id) else {
continue;
};
result.push(browsing_context.pipeline_id);
browsing_context_ids.extend(pipeline.children.iter().copied());
}
result
}
/// Send the frame tree for the given webview to `Paint`.
#[servo_tracing::instrument(skip_all)]
fn set_frame_tree_for_webview(&mut self, webview_id: WebViewId) {
@@ -5759,35 +5833,55 @@ where
// avoiding this panic would require a mechanism for dealing
// with low-resource scenarios.
let browsing_context_id = BrowsingContextId::from(webview_id);
if let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) {
if let Some(webview) = self.webviews.get_mut(&webview_id) {
if frame_tree.pipeline.id != webview.active_top_level_pipeline_id {
webview.active_top_level_pipeline_id = frame_tree.pipeline.id;
self.constellation_to_embedder_proxy.send(
ConstellationToEmbedderMsg::AccessibilityTreeIdChanged(
webview_id,
webview.active_top_level_pipeline_id.into(),
),
);
}
}
debug!("{}: Sending frame tree", browsing_context_id);
self.paint_proxy
.send(PaintMessage::SetFrameTreeForWebView(webview_id, frame_tree));
}
let Some(webview) = self.webviews.get(&webview_id) else {
let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) else {
return;
};
let active = webview.accessibility_active;
for pipeline_id in self.active_pipelines_for_webview(webview_id) {
let new_pipeline_id = frame_tree.pipeline.id;
debug!("{}: Sending frame tree", browsing_context_id);
self.paint_proxy
.send(PaintMessage::SetFrameTreeForWebView(webview_id, frame_tree));
let Some(webview) = self.webviews.get_mut(&webview_id) else {
return;
};
if webview.active_top_level_pipeline_id == Some(new_pipeline_id) {
return;
}
let old_pipeline_id = webview.active_top_level_pipeline_id;
let old_epoch = webview.active_top_level_pipeline_epoch;
let new_epoch = old_epoch.next();
let accessibility_active = webview.accessibility_active;
webview.active_top_level_pipeline_id = Some(new_pipeline_id);
webview.active_top_level_pipeline_epoch = new_epoch;
// Deactivate accessibility in the now-inactive top-level document in the WebView.
// This ensures that the document stops sending tree updates, since they will be
// discarded in libservo anyway, and also ensures that when accessibility is
// reactivated, the document sends the whole accessibility tree from scratch.
if let Some(old_pipeline_id) = old_pipeline_id {
self.send_message_to_pipeline(
pipeline_id,
ScriptThreadMessage::SetAccessibilityActive(pipeline_id, active),
old_pipeline_id,
ScriptThreadMessage::SetAccessibilityActive(old_pipeline_id, false, old_epoch),
"Set accessibility active after closure",
);
}
// Forward activation to layout for the active top-level document in the WebView.
// There are two sites like this; this is the navigation (or bfcache traversal) site.
self.send_message_to_pipeline(
new_pipeline_id,
ScriptThreadMessage::SetAccessibilityActive(
new_pipeline_id,
accessibility_active,
new_epoch,
),
"Set accessibility active after closure",
);
}
#[servo_tracing::instrument(skip_all)]

View File

@@ -3,15 +3,15 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use embedder_traits::user_contents::UserContentManagerId;
use embedder_traits::{GenericEmbedderProxy, InputEvent, MouseLeftViewportEvent, Theme};
use embedder_traits::{InputEvent, MouseLeftViewportEvent, Theme};
use euclid::Point2D;
use log::warn;
use rustc_hash::FxHashMap;
use script_traits::{ConstellationInputEvent, ScriptThreadMessage};
use servo_base::Epoch;
use servo_base::id::{BrowsingContextId, PipelineId, WebViewId};
use style_traits::CSSPixel;
use super::embedder::ConstellationToEmbedderMsg;
use crate::browsingcontext::BrowsingContext;
use crate::pipeline::Pipeline;
use crate::session_history::JointSessionHistory;
@@ -23,7 +23,9 @@ pub(crate) struct ConstellationWebView {
webview_id: WebViewId,
/// The [`PipelineId`] of the currently active pipeline at the top level of this WebView.
pub active_top_level_pipeline_id: PipelineId,
pub active_top_level_pipeline_id: Option<PipelineId>,
/// A counter for changes to [`Self::active_top_level_pipeline_id`].
pub active_top_level_pipeline_epoch: Epoch,
/// The currently focused browsing context in this webview for key events.
/// The focused pipeline is the current entry of the focused browsing
@@ -61,21 +63,15 @@ pub(crate) struct ConstellationWebView {
impl ConstellationWebView {
pub(crate) fn new(
embedder_proxy: &GenericEmbedderProxy<ConstellationToEmbedderMsg>,
webview_id: WebViewId,
active_top_level_pipeline_id: PipelineId,
focused_browsing_context_id: BrowsingContextId,
user_content_manager_id: Option<UserContentManagerId>,
) -> Self {
embedder_proxy.send(ConstellationToEmbedderMsg::AccessibilityTreeIdChanged(
webview_id,
active_top_level_pipeline_id.into(),
));
Self {
webview_id,
user_content_manager_id,
active_top_level_pipeline_id,
active_top_level_pipeline_id: None,
active_top_level_pipeline_epoch: Epoch::default(),
focused_browsing_context_id,
hovered_browsing_context_id: None,
last_mouse_move_point: Default::default(),

View File

@@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use accesskit::TreeId;
use embedder_traits::{
InputEventOutcome, JSValue, JavaScriptEvaluationError, JavaScriptEvaluationId,
MediaSessionEvent, NewWebViewDetails, TraversalId,
@@ -48,7 +47,4 @@ pub enum ConstellationToEmbedderMsg {
AllowNavigationRequest(WebViewId, PipelineId, ServoUrl),
/// The history state has changed.
HistoryChanged(WebViewId, Vec<ServoUrl>, usize),
/// Notifies the embedder that the AccessKit [`TreeId`] for the top-level document in this
/// WebView has been changed (or initially set).
AccessibilityTreeIdChanged(WebViewId, TreeId),
}

View File

@@ -65,6 +65,7 @@ impl ProcessManager {
receiver
}
#[servo_tracing::instrument(skip_all)]
pub fn remove(&mut self, index: usize) {
let (mut process, _) = self.processes.swap_remove(index);
debug!("Removing process pid={}", process.pid());

View File

@@ -141,11 +141,15 @@ mod from_script {
target!("RemoveBroadcastChannelNameInRouter")
},
Self::ScheduleBroadcast(..) => target!("ScheduleBroadcast"),
Self::RegisterInterest(..) => target!("RegisterInterest"),
Self::UnregisterInterest(..) => target!("UnregisterInterest"),
Self::BroadcastStorageEvent(..) => target!("BroadcastStorageEvent"),
Self::ChangeRunningAnimationsState(..) => target!("ChangeRunningAnimationsState"),
Self::CreateCanvasPaintThread(..) => target!("CreateCanvasPaintThread"),
Self::Focus(..) => target!("Focus"),
Self::FocusRemoteDocument(..) => target!("FocusRemoteDocument"),
Self::FocusAncestorBrowsingContextsForFocusingSteps(..) => {
target!("FocusAncestorBrowsingContextsForFocusingSteps")
},
Self::FocusRemoteBrowsingContext(..) => target!("FocusRemoteBrowsingContext"),
Self::GetTopForBrowsingContext(..) => target!("GetTopForBrowsingContext"),
Self::GetBrowsingContextInfo(..) => target!("GetBrowsingContextInfo"),
Self::GetDocumentOrigin(..) => target!("GetDocumentOrigin"),
@@ -187,6 +191,8 @@ mod from_script {
target!("RespondToScreenshotReadinessRequest")
},
Self::TriggerGarbageCollection => target!("TriggerGarbageCollection"),
Self::AcquireWakeLock(..) => target!("AcquireWakeLock"),
Self::ReleaseWakeLock(..) => target!("ReleaseWakeLock"),
}
}
}

View File

@@ -0,0 +1,16 @@
[package]
name = "servo-default-resources"
version.workspace = true
authors.workspace = true
repository.workspace = true
description.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
path = "lib.rs"
[dependencies]
embedder_traits = { workspace = true }

View File

@@ -0,0 +1,39 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::path::PathBuf;
use embedder_traits::resources::{Resource, ResourceReaderMethods};
/// A default resource reader that provides baked in resources.
pub struct DefaultResourceReader;
impl ResourceReaderMethods for DefaultResourceReader {
fn sandbox_access_files(&self) -> Vec<PathBuf> {
vec![]
}
fn sandbox_access_files_dirs(&self) -> Vec<PathBuf> {
vec![]
}
fn read(&self, file: Resource) -> Vec<u8> {
match file {
Resource::BluetoothBlocklist => &include_bytes!("resources/gatt_blocklist.txt")[..],
Resource::DomainList => &include_bytes!("resources/public_domains.txt")[..],
Resource::HstsPreloadList => &include_bytes!("resources/hsts_preload.fstmap")[..],
Resource::BadCertHTML => &include_bytes!("resources/badcert.html")[..],
Resource::NetErrorHTML => &include_bytes!("resources/neterror.html")[..],
Resource::BrokenImageIcon => &include_bytes!("resources/rippy.png")[..],
Resource::CrashHTML => &include_bytes!("resources/crash.html")[..],
Resource::DirectoryListingHTML => {
&include_bytes!("resources/directory-listing.html")[..]
},
Resource::AboutMemoryHTML => &include_bytes!("resources/about-memory.html")[..],
Resource::DebuggerJS => &include_bytes!("resources/debugger.js")[..],
Resource::JsonViewerHTML => &include_bytes!("resources/json-viewer.html")[..],
}
.to_owned()
}
}
embedder_traits::submit_resource_reader!(&DefaultResourceReader);

View File

@@ -0,0 +1,611 @@
if ("dbg" in this) {
throw new Error("Debugger script must not run more than once!");
}
const dbg = new Debugger;
const debuggeesToPipelineIds = new Map;
const debuggeesToWorkerIds = new Map;
const sourceIdsToScripts = new Map;
const frameActorsToFrames = new Map;
const environmentActorsToEnvironments = new Map;
// <https://searchfox.org/firefox-main/source/devtools/server/actors/thread.js#155>
// Possible values for the `why.type` attribute in "paused" event
const PAUSE_REASONS = {
INTERRUPTED: "interrupted", // Associated with why.onNext attribute
RESUME_LIMIT: "resumeLimit",
};
// Find script by scriptId within a script tree
function findScriptById(script, scriptId) {
if (script.sourceStart === scriptId) {
return script;
}
for (const child of script.getChildScripts()) {
const found = findScriptById(child, scriptId);
if (found) return found;
}
return null;
}
// Walk script tree and call callback for each script
function walkScriptTree(script, callback) {
callback(script);
for (const child of script.getChildScripts()) {
walkScriptTree(child, callback);
}
}
// Find a key by a value in a map
function findKeyByValue(map, search) {
for (const [key, value] of map) {
if (value === search) return key;
}
return undefined;
}
dbg.uncaughtExceptionHook = function(error) {
console.error(`[debugger] Uncaught exception at ${error.fileName}:${error.lineNumber}:${error.columnNumber}: ${error.name}: ${error.message}`);
};
dbg.onNewScript = function(script) {
// TODO: handle wasm (`script.source.introductionType == wasm`)
sourceIdsToScripts.set(script.source.id, script);
notifyNewSource({
pipelineId: debuggeesToPipelineIds.get(script.global),
workerId: debuggeesToWorkerIds.get(script.global),
spidermonkeyId: script.source.id,
url: script.source.url,
urlOverride: script.source.displayURL,
text: script.source.text,
introductionType: script.source.introductionType ?? null,
});
};
// Track a new debuggee global
addEventListener("addDebuggee", event => {
const {global, pipelineId, workerId} = event;
const debuggerObject = dbg.addDebuggee(global);
debuggeesToPipelineIds.set(debuggerObject, pipelineId);
if (workerId !== undefined) {
debuggeesToWorkerIds.set(debuggerObject, workerId);
}
});
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/previewers.js#80>
const previewers = {
Function: [],
Array: [],
Object: [],
// TODO: Add Map, FormData etc
};
// Convert debuggee value to property descriptor value
// <https://searchfox.org/firefox-main/source/devtools/server/actors/object/utils.js#116>
function createValueGrip(value, depth = 0) {
switch (typeof value) {
case "undefined":
return { valueType: "undefined" };
case "boolean":
return { valueType: "boolean", booleanValue: value };
case "number":
if (value === Infinity) {
return { valueType: "Infinity" };
} else if (value === -Infinity) {
return { valueType: "-Infinity" };
} else if (Number.isNaN(value)) {
return { valueType: "NaN" };
} else if (Object.is(value, -0)) {
return { valueType: "-0" };
}
return { valueType: "number", numberValue: value };
case "string":
return { valueType: "string", stringValue: value };
case "object":
if (value === null) {
return { valueType: "null" };
}
// Debugger.Object - get preview using registered previewers
// <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.object/index.html>
return {
valueType: "object",
objectClass: value.class,
preview: getPreview(value, depth),
};
default:
return { valueType: "string", stringValue: String(value) };
}
}
// Extract own properties from a debuggee object
// <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.object/index.html#function-properties-of-the-debugger-object-prototype>
function extractOwnProperties(obj, depth) {
const ownProperties = [];
let totalLength = 0;
let names;
try {
names = obj.getOwnPropertyNames();
totalLength = names.length;
} catch (e) {
return { ownProperties, ownPropertiesLength: 0 };
}
for (const name of names) {
try {
const desc = obj.getOwnPropertyDescriptor(name);
if (desc) {
const prop = {
name: name,
configurable: desc.configurable ?? false,
enumerable: desc.enumerable ?? false,
writable: desc.writable ?? false,
isAccessor: desc.get !== undefined || desc.set !== undefined,
value: createValueGrip(undefined, depth + 1),
};
if (desc.value !== undefined) {
prop.value = createValueGrip(desc.value, depth + 1);
} else if (desc.get) {
try {
const result = desc.get.call(obj);
if (result && "return" in result) {
prop.value = createValueGrip(result.return, depth + 1);
}
} catch (e) { }
}
ownProperties.push(prop);
}
} catch (e) {
// For now skip properties that throw on access
}
}
return { ownProperties, ownPropertiesLength: totalLength };
}
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/previewers.js#125>
previewers.Function.push(function FunctionPreviewer(obj, depth) {
const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth);
let function_details = {
name: obj.name,
displayName: obj.displayName,
parameterNames: obj.parameterNames ? obj.parameterNames: [],
isAsync: obj.isAsyncFunction,
isGenerator: obj.isGeneratorFunction,
}
if (depth > 1) {
return { kind: "Object", function: function_details, ownPropertiesLength };
}
return {
kind: "Object",
ownProperties,
ownPropertiesLength,
function: function_details
};
});
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/previewers.js#172>
previewers.Array.push(function ArrayPreviewer(obj, depth) {
const lengthDescriptor = obj.getOwnPropertyDescriptor("length");
const length = lengthDescriptor ? lengthDescriptor.value : 0;
if (depth > 1) {
return {
kind: "ArrayLike",
arrayLength: length,
};
}
const items = [];
for (let i = 0; i < length; i++) {
try {
const desc = obj.getOwnPropertyDescriptor(i);
if (desc && desc.value !== undefined) {
const grip = createValueGrip(desc.value, depth);
delete grip.preview;
items.push(grip);
}
} catch (e) {
// For now skip properties that throw on access
}
}
return {
kind: "ArrayLike",
arrayLength: length,
items: items,
};
});
// Generic fallback for object previewer
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/previewers.js#856>
previewers.Object.push(function ObjectPreviewer(obj, depth) {
const { ownProperties, ownPropertiesLength } = extractOwnProperties(obj, depth);
if (depth > 1) {
return { kind: "Object", ownPropertiesLength };
}
return {
kind: "Object",
ownProperties,
ownPropertiesLength,
};
});
function getPreview(obj, depth) {
const className = obj.class;
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object.js#295>
const typePreviewers = previewers[className] || previewers.Object;
for (const previewer of typePreviewers) {
const result = previewer(obj, depth);
if (result) return result;
}
return { ownProperties: [], ownPropertiesLength: 0 };
}
// Evaluate some javascript code in the global context of the debuggee
// See executeInGlobal() at <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.object/index.html#function-properties-of-the-debugger-object-prototype>
addEventListener("eval", event => {
const {code, pipelineId, workerId, frameActorId} = event;
let completionValue;
if (frameActorId) {
const frame = frameActorsToFrames.get(frameActorId);
// <https://searchfox.org/firefox-main/source/js/src/doc/Debugger/Debugger.Frame.md#223>
if (frame?.onStack) {
completionValue = frame.eval(code);
} else {
completionValue = { throw: "Frame not available" };
}
} else {
const object = workerId !== undefined ?
findKeyByValue(debuggeesToWorkerIds, workerId) :
findKeyByValue(debuggeesToPipelineIds, pipelineId);
completionValue = object.executeInGlobal(code);
}
// Completion values: <https://firefox-source-docs.mozilla.org/devtools/backend/protocol.html#completion-values>
let resultValue;
if (completionValue === null) {
resultValue = { completionType: "terminated", value: createValueGrip(undefined), hasException: false };
} else if ("throw" in completionValue) {
// See adoptDebuggeeValue() in <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger/index.html>
// <https://searchfox.org/firefox-main/source/devtools/server/actors/webconsole/eval-with-debugger.js#312>
// we probably don't need adoptDebuggeeValue, as we only have one debugger instance for now
// let value = dbg.adoptDebuggeeValue(completionValue.throw);
resultValue = { completionType: "throw", value: createValueGrip(completionValue.throw), hasException: true };
} else if ("return" in completionValue) {
resultValue = { completionType: "return", value: createValueGrip(completionValue.return), hasException: false };
}
// To avoid recursion errors in the WebIDL, preview needs to live outside of the property descriptor
if (resultValue.value.preview) {
resultValue.preview = resultValue.value.preview;
delete resultValue.value.preview;
}
evalResult(event, resultValue);
});
addEventListener("getPossibleBreakpoints", event => {
const {spidermonkeyId} = event;
const script = sourceIdsToScripts.get(spidermonkeyId);
const result = [];
walkScriptTree(script, (currentScript) => {
for (const location of currentScript.getPossibleBreakpoints()) {
location["scriptId"] = currentScript.sourceStart;
result.push(location);
}
});
getPossibleBreakpointsResult(event, result);
});
function createFrameActor(frame, pipelineId) {
let frameActorId = findKeyByValue(frameActorsToFrames, frame);
if (!frameActorId) {
// TODO: Check if we already have an actor for this frame
frameActorId = registerFrameActor(pipelineId, {
// TODO: Some properties throw if terminated is true
// TODO: arguments: frame.arguments,
displayName: frame.script.displayName,
onStack: frame.onStack,
oldest: frame.older == null,
terminated: frame.terminated,
type_: frame.type,
url: frame.script.url,
});
if (!frameActorId) {
console.error("[debugger] Couldn't create frame");
return undefined;
}
frameActorsToFrames.set(frameActorId, frame);
}
return frameActorId;
}
function handlePauseAndRespond(frame, pauseReason) {
dbg.onEnterFrame = undefined;
clearSteppingHooks(frame);
// Get the pipeline ID for this debuggee
const pipelineId = debuggeesToPipelineIds.get(frame.script.global);
if (!pipelineId) {
console.error("[debugger] No pipeline ID for frame's global");
return undefined;
}
let frameActorId = createFrameActor(frame, pipelineId);
// <https://github.com/mozilla-firefox/firefox/blob/63719d122f9214f37fd1d285a91897b8345b88b0/js/src/doc/Debugger/Debugger.Script.md?plain=1#L293-L303>
const offset = frame.offset;
const offsetMetadata = frame.script.getOffsetMetadata(offset);
const frameOffset = {
frameActorId,
column: offsetMetadata.columnNumber - 1,
line: offsetMetadata.lineNumber
};
// Notify devtools and enter pause loop. This blocks until Resume.
pauseAndRespond(
pipelineId,
frameOffset,
pauseReason
);
// <https://web.archive.org/web/20251212212538/https://firefox-source-docs.mozilla.org/js/Debugger/Conventions.html#resumption-values>
// Return undefined to continue execution normally after resume.
return undefined;
}
addEventListener("frames", event => {
const {pipelineId, start, count} = event;
let frameList = handleListFrames(pipelineId, start, count);
listFramesResult(frameList);
})
// <https://searchfox.org/firefox-main/source/devtools/server/actors/thread.js#1425>
function handleListFrames(pipelineId, start, count) {
let frame = dbg.getNewestFrame()
const walkToParentFrame = () => {
if (!frame) {
return;
}
const currentFrame = frame;
frame = null;
if (currentFrame.older) {
frame = currentFrame.older;
}
}
let i = 0;
while (frame && i < start) {
walkToParentFrame();
i++;
}
// Return count frames, or all remaining frames if count is not defined.
const frames = [];
for (; frame && (!count || i < start + count); i++, walkToParentFrame()) {
const frameActorId = createFrameActor(frame, pipelineId);
frames.push(frameActorId);
}
return frames;
}
addEventListener("setBreakpoint", event => {
const {spidermonkeyId, scriptId, offset} = event;
const script = sourceIdsToScripts.get(spidermonkeyId);
const target = findScriptById(script, scriptId);
if (target) {
target.setBreakpoint(offset, {
// setBreakpoint(offset, handler) in <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.script/index.html#function-properties-of-the-debugger-script-prototype-object>
// The hit handler receives a Debugger.Frame instance representing the currently executing stack frame.
hit: (frame) => handlePauseAndRespond(frame, {type_: "breakpoint"})
});
}
});
// <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.frame/index.html>
addEventListener("interrupt", event => {
dbg.onEnterFrame = (frame) => handlePauseAndRespond(
frame,
{ type_: PAUSE_REASONS.INTERRUPTED, onNext: true }
);
});
function makeSteppingHooks(steppingType, startFrame) {
return {
onEnterFrame: (frame) => {
const { onStep, onPop } = makeSteppingHooks("next", frame);
frame.onStep = onStep;
frame.onPop = onPop;
},
onStep: () => {
const meta = startFrame.script.getOffsetMetadata(startFrame.offset);
if (meta.isBreakpoint && meta.isStepStart) {
return handlePauseAndRespond(startFrame, { type_: PAUSE_REASONS.RESUME_LIMIT });
}
},
onPop: (completion) => {
this.reportedPop = true;
suspendedFrame = startFrame;
if (steppingType !== "finish") {
// TODO: completion contains the return value, we have to send it back
// <https://searchfox.org/firefox-main/source/devtools/server/actors/thread.js#1026>
return handlePauseAndRespond(startFrame, { type_: steppingType });
}
attachSteppingHooks("next", startFrame);
},
}
}
function getNextStepFrame(frame) {
const endOfFrame = frame.reportedPop;
const stepFrame = endOfFrame ? frame.older : frame;
if (!stepFrame || !stepFrame.script) {
return null;
}
return stepFrame;
}
// <https://searchfox.org/firefox-main/source/devtools/server/actors/thread.js#1235>
function attachSteppingHooks(steppingType, frame) {
if (steppingType === "finish" && frame.reportedPop) {
steppingType = "next";
}
const stepFrame = getNextStepFrame(frame);
if (!stepFrame) {
steppingType = "step";
}
const { onEnterFrame, onStep, onPop } = makeSteppingHooks(
steppingType,
frame,
);
if (steppingType === "step") {
dbg.onEnterFrame = onEnterFrame;
}
if (stepFrame) {
switch (steppingType) {
case "step":
case "next":
if (stepFrame.script) {
stepFrame.onStep = onStep;
}
case "finish":
stepFrame.onPop = onPop;
break;
}
}
}
function clearSteppingHooks(suspendedFrame) {
if (suspendedFrame) {
suspendedFrame.onStep = undefined;
suspendedFrame.onPop = undefined;
}
let frame = this.youngestFrame;
if (frame?.onStack) {
while (frame) {
frame.onStep = undefined;
frame.onPop = undefined;
frame = frame.older;
}
}
}
// <https://firefox-source-docs.mozilla.org/devtools/backend/protocol.html#resuming-a-thread>
addEventListener("resume", event => {
const {resumeLimitType: steppingType, frameActorID} = event;
let frame = dbg.getNewestFrame();
if (frameActorID) {
frame = frameActorsToFrames.get(frameActorID);
if (!frame) {
console.error("[debugger] Couldn't find frame");
}
}
if (steppingType) {
attachSteppingHooks(steppingType, frame);
} else {
clearSteppingHooks(frame);
}
});
// <https://firefox-source-docs.mozilla.org/devtools-user/debugger-api/debugger.script/index.html#function-properties-of-the-debugger-script-prototype-object>
// There may be more than one breakpoint at the same offset with different handlers, but we dont handle that case for now.
addEventListener("clearBreakpoint", event => {
const {spidermonkeyId, scriptId, offset} = event;
const script = sourceIdsToScripts.get(spidermonkeyId);
const target = findScriptById(script, scriptId);
if (target) {
// If the instance refers to a JSScript, remove all breakpoints set in this script at that offset.
target.clearAllBreakpoints(offset);
}
});
// TODO: Get variables (scopes don't show if they don't have a variable)
function createEnvironmentActor(environment) {
let actor = findKeyByValue(environmentActorsToEnvironments, environment);
if (!actor) {
let info = {};
if (environment.type == "declarative") {
info.type_ = environment.calleeScript ? "function" : "block";
} else {
info.type_ = environment.type;
}
info.scopeKind = environment.scopeKind;
if (environment.calleeScript) {
info.functionDisplayName = environment.calleeScript.displayName;
}
let parent = null;
if (environment.parent) {
parent = createEnvironmentActor(environment.parent);
}
if (environment.type == "declarative") {
info.bindingVariables = buildBindings(environment)
}
actor = registerEnvironmentActor(info, parent);
environmentActorsToEnvironments.set(actor, environment);
}
return actor;
}
function buildBindings(environment) {
let bindingVars = [];
for (const name of environment.names()) {
const value = environment.getVariable(name);
const property = {
name: name,
configurable: false,
enumerable: true,
writable: !value?.optimizedOut,
isAccessor: false,
value: createValueGrip(value),
};
// To avoid recursion errors in the WebIDL, preview needs to live outside of the property descriptor
let preview = undefined;
if (property.value.preview) {
preview = property.value.preview;
delete property.value.preview;
}
bindingVars.push({ property, preview });
}
return bindingVars;
}
// Get a `Debugger.Environment` instance within which evaluation is taking place.
// <https://searchfox.org/firefox-main/source/devtools/server/actors/frame.js#109>
addEventListener("getEnvironment", event => {
const {frameActorId} = event;
frame = frameActorsToFrames.get(frameActorId);
const actor = createEnvironmentActor(frame.environment);
getEnvironmentResult(actor);
});

View File

@@ -0,0 +1,269 @@
<html>
<head>
<style>
body {
font-family: monospace;
margin: 0;
padding: 0;
background: #fff;
color: #333;
}
#json-raw {
display: none;
}
#viewer {
display: none;
padding: 0.5em 1em;
line-height: 1.5;
&.active {
display: block;
}
}
#toolbar {
display: flex;
gap: 1em;
padding: 0.5em;
align-items: center;
background: #f5f5f5;
border-bottom: 1px solid #ddd;
& button {
min-width: 5em;
&.active {
background: #ddd;
font-weight: bold;
}
}
}
#raw-view {
display: none;
padding: 0.5em 1em;
white-space: pre-wrap;
word-break: break-all;
&.active {
display: block;
}
}
.json-error {
padding: 0.5em 1em;
color: #c00;
font-weight: bold;
}
/* Syntax highlighting for Json data types */
.json-key {
color: #881391;
}
.json-string {
color: #1a1aa6;
}
.json-number {
color: #1c00cf;
}
.json-boolean {
color: #0d22aa;
}
.json-null {
color: #808080;
}
/* Collapsible tree */
.toggle {
cursor: pointer;
user-select: none;
&::before {
content: "\25BC";
display: inline-block;
width: 1em;
transition: transform 0.1s;
}
&.collapsed::before {
transform: rotate(-90deg);
}
}
.collapsible {
margin-left: 1.5em;
&.hidden {
display: none;
}
}
.bracket {
color: #333;
}
.comma {
color: #333;
}
.line {
padding-left: 0;
}
</style>
<script>
// Shortcut to create an element with an optional class and text content.
function createElement(name, classes = null, textContent = null) {
let node = document.createElement(name);
if (classes) {
node.className = classes;
}
if (textContent) {
node.textContent = textContent;
}
return node;
}
function renderNode(value, container) {
if (value === null) {
let s = createElement("span", "json-null", "null");
container.append(s);
} else if (typeof value === "boolean") {
let s = createElement("span", "json-boolean", String(value));
container.append(s);
} else if (typeof value === "number") {
let s = createElement("span", "json-number", String(value));
container.append(s);
} else if (typeof value === "string") {
let s = createElement("span", "json-string", JSON.stringify(value));
container.append(s);
} else if (Array.isArray(value)) {
renderArray(value, container);
} else if (typeof value === "object") {
renderObject(value, container);
}
}
function renderObject(obj, container) {
let keys = Object.keys(obj);
if (keys.length === 0) {
container.append(createElement("span", "bracket", "{}"));
return;
}
let toggle = createElement("span", "toggle");
container.append(toggle);
container.append(createElement("span", "bracket", "{"));
let inner = createElement("div", "collapsible");
container.append(inner);
keys.forEach((key, i) => {
let line = createElement("div", "line");
line.append(createElement("span", "json-key", JSON.stringify(key)));
line.append(document.createTextNode(": "));
renderNode(obj[key], line);
if (i < keys.length - 1) {
line.append(createElement("span", "comma", ","));
}
inner.append(line);
});
container.append(createElement("span", "bracket", "}"));
toggle.onclick = function () {
toggle.classList.toggle("collapsed");
inner.classList.toggle("hidden");
};
}
function renderArray(arr, container) {
if (arr.length === 0) {
container.append(createElement("span", "bracket", "[]"));
return;
}
let toggle = createElement("span", "toggle");
container.append(toggle);
container.append(createElement("span", "bracket", "["));
let inner = createElement("div", "collapsible");
container.append(inner);
arr.forEach((item, i) => {
let line = createElement("div", "line");
renderNode(item, line);
if (i < arr.length - 1) {
line.append(createElement("span", "comma", ","));
}
inner.append(line);
});
container.append(createElement("span", "bracket", "]"));
toggle.onclick = function () {
toggle.classList.toggle("collapsed");
inner.classList.toggle("hidden");
};
}
document.addEventListener("DOMContentLoaded", function () {
const viewer = document.getElementById("viewer");
const prettyButton = document.getElementById("pretty-toggle");
const rawButton = document.getElementById("raw-toggle");
const rawView = document.getElementById("raw-view");
const rawText = rawView.innerText;
let data;
let parseError = null;
try {
data = JSON.parse(rawText);
} catch (e) {
parseError = e;
}
if (parseError) {
let errDiv = createElement(
"div",
"json-error",
"Invalid JSON: " + parseError.message,
);
viewer.append(errDiv);
viewer.append(createElement("pre", null, rawText));
} else {
renderNode(data, viewer);
rawView.textContent = JSON.stringify(data, null, 2);
}
// Toggle buttons
prettyButton.onclick = function () {
viewer.classList.add("active");
rawView.classList.remove("active");
prettyButton.classList.add("active");
rawButton.classList.remove("active");
};
rawButton.onclick = function () {
rawView.classList.add("active");
viewer.classList.remove("active");
rawButton.classList.add("active");
prettyButton.classList.remove("active");
};
});
</script>
</head>
<body>
<div id="toolbar">
<button id="pretty-toggle" class="active">Pretty</button>
<button id="raw-toggle">Raw</button>
</div>
<div id="viewer" class="active"></div>
<pre id="raw-view">

View File

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

View File

@@ -49,7 +49,6 @@ impl ActorError {
/// A common trait for all devtools actors that encompasses an immutable name
/// and the ability to process messages that are directed to particular actors.
/// TODO: ensure the name is immutable
pub(crate) trait Actor: Any + ActorAsAny + Send + Sync + MallocSizeOf {
fn handle_message(
&self,
@@ -157,11 +156,19 @@ impl ActorRegistry {
}
/// Create a unique name based on a monotonically increasing suffix
/// TODO: Merge this with `register/register_later` and don't allow to
/// TODO: Merge this with `register` and don't allow to
/// create new names without registering an actor.
pub fn new_name<T: Actor>(&self) -> String {
let suffix = self.next.fetch_add(1, Ordering::Relaxed);
format!("{}{}", Self::base_name::<T>(), suffix)
let base = Self::base_name::<T>();
// Firefox DevTools client requires "/workerTarget" in actor name to recognize workers
// <https://searchfox.org/firefox-main/source/devtools/client/fronts/watcher.js#65>
if base.contains("WorkerTarget") {
format!("/workerTarget{}", suffix)
} else {
format!("{}{}", base, suffix)
}
}
/// Add an actor to the registry of known actors that can receive messages.

View File

@@ -0,0 +1,34 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use malloc_size_of_derive::MallocSizeOf;
use crate::ActorMsg;
use crate::actor::{Actor, ActorEncode, ActorRegistry};
#[derive(MallocSizeOf)]
pub(crate) struct BlackboxingActor {
name: String,
}
impl Actor for BlackboxingActor {
fn name(&self) -> String {
self.name.clone()
}
}
impl BlackboxingActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}
impl ActorEncode<ActorMsg> for BlackboxingActor {
fn encode(&self, _: &ActorRegistry) -> ActorMsg {
ActorMsg { actor: self.name() }
}
}

View File

@@ -62,8 +62,9 @@ impl Actor for BreakpointListActor {
let browsing_context_actor =
registry.find::<BrowsingContextActor>(&self.browsing_context_name);
let thread = registry.find::<ThreadActor>(&browsing_context_actor.thread);
let source = thread
let thread_actor =
registry.find::<ThreadActor>(&browsing_context_actor.thread_name);
let source = thread_actor
.source_manager
.find_source(registry, &source_url)
.ok_or(ActorError::Internal)?;
@@ -98,8 +99,9 @@ impl Actor for BreakpointListActor {
let browsing_context_actor =
registry.find::<BrowsingContextActor>(&self.browsing_context_name);
let thread = registry.find::<ThreadActor>(&browsing_context_actor.thread);
let source = thread
let thread_actor =
registry.find::<ThreadActor>(&browsing_context_actor.thread_name);
let source = thread_actor
.source_manager
.find_source(registry, &source_url)
.ok_or(ActorError::Internal)?;
@@ -124,11 +126,14 @@ impl Actor for BreakpointListActor {
}
impl BreakpointListActor {
pub fn new(name: String, browsing_context_name: String) -> Self {
Self {
name,
pub fn register(registry: &ActorRegistry, browsing_context_name: String) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
browsing_context_name,
}
};
registry.register::<Self>(actor);
name
}
}

View File

@@ -139,13 +139,13 @@ pub(crate) struct BrowsingContextActor {
active_pipeline_id: AtomicRefCell<PipelineId>,
active_outer_window_id: AtomicRefCell<DevtoolsOuterWindowId>,
pub browsing_context_id: DevtoolsBrowsingContextId,
accessibility: String,
accessibility_name: String,
pub console_name: String,
css_properties_name: String,
pub(crate) inspector: String,
pub(crate) inspector_name: String,
reflow_name: String,
style_sheets_name: String,
pub thread: String,
pub thread_name: String,
_tab: String,
// Different pipelines may run on different script threads.
// These should be kept around even when the active pipeline is updated,
@@ -197,7 +197,8 @@ impl Actor for BrowsingContextActor {
impl BrowsingContextActor {
#[expect(clippy::too_many_arguments)]
pub(crate) fn new(
pub(crate) fn register(
registry: &ActorRegistry,
console_name: String,
browser_id: DevtoolsBrowserId,
browsing_context_id: DevtoolsBrowsingContextId,
@@ -205,8 +206,7 @@ impl BrowsingContextActor {
pipeline_id: PipelineId,
outer_window_id: DevtoolsOuterWindowId,
script_sender: GenericSender<DevtoolScriptControlMsg>,
registry: &ActorRegistry,
) -> BrowsingContextActor {
) -> String {
let name = registry.new_name::<BrowsingContextActor>();
let DevtoolsPageInfo {
title,
@@ -215,8 +215,7 @@ impl BrowsingContextActor {
..
} = page_info;
let accessibility_actor =
AccessibilityActor::new(registry.new_name::<AccessibilityActor>());
let accessibility_name = AccessibilityActor::register(registry);
let properties = (|| {
let (properties_sender, properties_receiver) = generic_channel::channel()?;
@@ -224,25 +223,21 @@ impl BrowsingContextActor {
properties_receiver.recv().ok()
})()
.unwrap_or_default();
let css_properties_actor =
CssPropertiesActor::new(registry.new_name::<CssPropertiesActor>(), properties);
let css_properties_name = CssPropertiesActor::register(registry, properties);
let inspector = InspectorActor::register(registry, name.clone());
let inspector_name = InspectorActor::register(registry, name.clone());
let reflow_actor = ReflowActor::new(registry.new_name::<ReflowActor>());
let reflow_name = ReflowActor::register(registry);
let style_sheets_actor = StyleSheetsActor::new(registry.new_name::<StyleSheetsActor>());
let style_sheets_name = StyleSheetsActor::register(registry);
let tab_descriptor_actor =
TabDescriptorActor::new(registry, name.clone(), is_top_level_global);
let tab_descriptor_name =
TabDescriptorActor::register(registry, name.clone(), is_top_level_global);
let thread = ThreadActor::new(
registry.new_name::<ThreadActor>(),
script_sender.clone(),
Some(name.clone()),
);
let thread_name =
ThreadActor::register(registry, script_sender.clone(), Some(name.clone()));
let watcher_actor = WatcherActor::new(
let watcher_name = WatcherActor::register(
registry,
name.clone(),
SessionContext::new(SessionContextType::BrowserElement),
@@ -251,8 +246,8 @@ impl BrowsingContextActor {
let mut script_chans = FxHashMap::default();
script_chans.insert(pipeline_id, script_sender);
let target = BrowsingContextActor {
name,
let actor = BrowsingContextActor {
name: name.clone(),
script_chans: AtomicRefCell::new(script_chans),
title: AtomicRefCell::new(title),
url: AtomicRefCell::new(url.into_string()),
@@ -260,26 +255,20 @@ impl BrowsingContextActor {
active_outer_window_id: AtomicRefCell::new(outer_window_id),
browser_id,
browsing_context_id,
accessibility: accessibility_actor.name(),
accessibility_name,
console_name,
css_properties_name: css_properties_actor.name(),
inspector,
reflow_name: reflow_actor.name(),
style_sheets_name: style_sheets_actor.name(),
_tab: tab_descriptor_actor.name(),
thread: thread.name(),
watcher_name: watcher_actor.name(),
css_properties_name,
inspector_name,
reflow_name,
style_sheets_name,
_tab: tab_descriptor_name,
thread_name,
watcher_name,
};
registry.register(accessibility_actor);
registry.register(css_properties_actor);
registry.register(reflow_actor);
registry.register(style_sheets_actor);
registry.register(tab_descriptor_actor);
registry.register(thread);
registry.register(watcher_actor);
registry.register::<Self>(actor);
target
name
}
pub(crate) fn handle_new_global(
@@ -404,13 +393,13 @@ impl ActorEncode<BrowsingContextActorMsg> for BrowsingContextActor {
browsing_context_id: self.browsing_context_id.value(),
outer_window_id: self.outer_window_id().value(),
is_top_level_target: true,
accessibility_actor: self.accessibility.clone(),
accessibility_actor: self.accessibility_name.clone(),
console_actor: self.console_name.clone(),
css_properties_actor: self.css_properties_name.clone(),
inspector_actor: self.inspector.clone(),
inspector_actor: self.inspector_name.clone(),
reflow_actor: self.reflow_name.clone(),
style_sheets_actor: self.style_sheets_name.clone(),
thread_actor: self.thread.clone(),
thread_actor: self.thread_name.clone(),
target_type: TargetType::Frame,
}
}

View File

@@ -10,27 +10,23 @@ use std::collections::HashMap;
use std::sync::atomic::{AtomicBool, Ordering};
use atomic_refcell::AtomicRefCell;
use devtools_traits::DebuggerValue::{
self, BooleanValue, NullValue, NumberValue, ObjectValue, StringValue, VoidValue,
};
use devtools_traits::{
ConsoleArgument, ConsoleMessage, ConsoleMessageFields, DevtoolScriptControlMsg, PageError,
StackFrame, get_time_stamp,
ConsoleMessage, ConsoleMessageFields, DevtoolScriptControlMsg, PageError, StackFrame,
get_time_stamp,
};
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{self, Map, Number, Value};
use serde_json::{self, Map, Value};
use servo_base::generic_channel::{self, GenericSender};
use servo_base::id::TEST_PIPELINE_ID;
use uuid::Uuid;
use crate::actor::{Actor, ActorError, ActorRegistry};
use crate::actors::browsing_context::BrowsingContextActor;
use crate::actors::object::{ObjectActor, ObjectPropertyDescriptor};
use crate::actors::worker::WorkerActor;
use crate::actors::worker::WorkerTargetActor;
use crate::protocol::{ClientRequest, DevtoolsConnection, JsonPacketStream};
use crate::resource::{ResourceArrayType, ResourceAvailable};
use crate::{EmptyReplyMsg, StreamId, UniqueId};
use crate::{EmptyReplyMsg, StreamId, UniqueId, debugger_value_to_json};
#[derive(Clone, Serialize, MallocSizeOf)]
#[serde(rename_all = "camelCase")]
@@ -53,87 +49,13 @@ impl DevtoolsConsoleMessage {
arguments: message
.arguments
.into_iter()
.map(|argument| console_argument_to_value(argument, registry))
.map(|argument| debugger_value_to_json(registry, argument))
.collect(),
stacktrace: message.stacktrace,
}
}
}
fn console_argument_to_value(argument: ConsoleArgument, registry: &ActorRegistry) -> Value {
match argument {
ConsoleArgument::String(value) => Value::String(value),
ConsoleArgument::Integer(value) => Value::Number(value.into()),
ConsoleArgument::Number(value) => {
Number::from_f64(value).map(Value::from).unwrap_or_default()
},
ConsoleArgument::Boolean(value) => Value::Bool(value),
ConsoleArgument::Object(object) => {
// Create a new actor for the object.
// These are currently never cleaned up, and we make no attempt at re-using the same actor
// if the same object is logged repeatedly.
let actor = ObjectActor::register(registry, None, object.class.clone());
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct DevtoolsConsoleObjectArgument {
r#type: String,
actor: String,
class: String,
own_property_length: usize,
extensible: bool,
frozen: bool,
sealed: bool,
is_error: bool,
preview: DevtoolsConsoleObjectArgumentPreview,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct DevtoolsConsoleObjectArgumentPreview {
kind: String,
own_properties: HashMap<String, ObjectPropertyDescriptor>,
own_properties_length: usize,
}
let own_properties: HashMap<String, ObjectPropertyDescriptor> = object
.own_properties
.into_iter()
.map(|property| {
let property_descriptor = ObjectPropertyDescriptor {
configurable: property.configurable,
enumerable: property.enumerable,
writable: property.writable,
value: console_argument_to_value(property.value, registry),
};
(property.key, property_descriptor)
})
.collect();
let argument = DevtoolsConsoleObjectArgument {
r#type: "object".to_owned(),
actor,
class: object.class,
own_property_length: own_properties.len(),
extensible: true,
frozen: false,
sealed: false,
is_error: false,
preview: DevtoolsConsoleObjectArgumentPreview {
kind: "Object".to_string(),
own_properties_length: own_properties.len(),
own_properties,
},
};
// to_value can fail if the implementation of Serialize fails or there are non-string map keys.
// Neither should be possible here
serde_json::to_value(argument).unwrap()
},
}
}
#[derive(Clone, Serialize, MallocSizeOf)]
#[serde(rename_all = "camelCase")]
struct DevtoolsPageError {
@@ -272,13 +194,15 @@ pub(crate) struct ConsoleActor {
}
impl ConsoleActor {
pub fn new(name: String, root: Root) -> Self {
Self {
name,
pub fn register(registry: &ActorRegistry, name: String, root: Root) -> String {
let actor = Self {
name: name.clone(),
root,
cached_events: Default::default(),
client_ready_to_receive_messages: false.into(),
}
};
registry.register(actor);
name
}
fn script_chan(&self, registry: &ActorRegistry) -> GenericSender<DevtoolScriptControlMsg> {
@@ -287,8 +211,8 @@ impl ConsoleActor {
.find::<BrowsingContextActor>(browsing_context_name)
.script_chan(),
Root::DedicatedWorker(worker_name) => registry
.find::<WorkerActor>(worker_name)
.script_chan
.find::<WorkerTargetActor>(worker_name)
.script_sender
.clone(),
}
}
@@ -301,124 +225,7 @@ impl ConsoleActor {
.pipeline_id(),
),
Root::DedicatedWorker(worker_name) => {
UniqueId::Worker(registry.find::<WorkerActor>(worker_name).worker_id)
},
}
}
// TODO: This should be handled with struct serialization instead of manually adding values to a map
fn value_to_json(value: DebuggerValue, registry: &ActorRegistry) -> Value {
let mut m = Map::new();
match value {
VoidValue => {
m.insert("type".to_owned(), Value::String("undefined".to_owned()));
Value::Object(m)
},
NullValue => {
m.insert("type".to_owned(), Value::String("null".to_owned()));
Value::Object(m)
},
BooleanValue(val) => Value::Bool(val),
NumberValue(val) => {
if val.is_nan() {
m.insert("type".to_owned(), Value::String("NaN".to_owned()));
Value::Object(m)
} else if val.is_infinite() {
if val < 0. {
m.insert("type".to_owned(), Value::String("-Infinity".to_owned()));
} else {
m.insert("type".to_owned(), Value::String("Infinity".to_owned()));
}
Value::Object(m)
} else if val == 0. && val.is_sign_negative() {
m.insert("type".to_owned(), Value::String("-0".to_owned()));
Value::Object(m)
} else {
Value::Number(Number::from_f64(val).unwrap())
}
},
StringValue(s) => Value::String(s),
ObjectValue {
uuid,
class,
preview,
} => {
let properties = preview
.clone()
.and_then(|preview| preview.own_properties)
.unwrap_or_default();
let actor = ObjectActor::register_with_properties(
registry,
Some(uuid),
class.clone(),
properties,
);
m.insert("type".to_owned(), Value::String("object".to_owned()));
m.insert("class".to_owned(), Value::String(class));
m.insert("actor".to_owned(), Value::String(actor));
m.insert("extensible".to_owned(), Value::Bool(true));
m.insert("frozen".to_owned(), Value::Bool(false));
m.insert("sealed".to_owned(), Value::Bool(false));
// Build preview
// <https://searchfox.org/firefox-main/source/devtools/server/actors/object/previewers.js#849>
let Some(preview) = preview else {
return Value::Object(m);
};
let mut preview_map = Map::new();
if preview.kind == "ArrayLike" {
if let Some(length) = preview.array_length {
preview_map.insert("length".to_owned(), Value::Number(length.into()));
}
} else {
if let Some(ref props) = preview.own_properties {
let mut own_props_map = Map::new();
for prop in props {
let descriptor =
serde_json::to_value(ObjectPropertyDescriptor::from(prop)).unwrap();
own_props_map.insert(prop.name.clone(), descriptor);
}
preview_map
.insert("ownProperties".to_owned(), Value::Object(own_props_map));
}
if let Some(length) = preview.own_properties_length {
preview_map.insert(
"ownPropertiesLength".to_owned(),
Value::Number(length.into()),
);
m.insert("ownPropertyLength".to_owned(), Value::Number(length.into()));
}
}
preview_map.insert("kind".to_owned(), Value::String(preview.kind));
// Function-specific metadata
if let Some(function) = preview.function {
if let Some(name) = function.name {
m.insert("name".to_owned(), Value::String(name));
}
if let Some(display_name) = function.display_name {
m.insert("displayName".to_owned(), Value::String(display_name));
}
m.insert(
"parameterNames".to_owned(),
Value::Array(
function
.parameter_names
.into_iter()
.map(Value::String)
.collect(),
),
);
m.insert("isAsync".to_owned(), Value::Bool(function.is_async));
m.insert("isGenerator".to_owned(), Value::Bool(function.is_generator));
}
m.insert("preview".to_owned(), Value::Object(preview_map));
Value::Object(m)
UniqueId::Worker(registry.find::<WorkerTargetActor>(worker_name).worker_id)
},
}
}
@@ -454,7 +261,7 @@ impl ConsoleActor {
let reply = EvaluateJSReply {
from: self.name(),
input,
result: Self::value_to_json(eval_result.value, registry),
result: debugger_value_to_json(registry, eval_result.value),
timestamp: get_time_stamp(),
exception: Value::Null,
exception_message: Value::Null,

View File

@@ -74,8 +74,11 @@ impl Actor for DeviceActor {
}
impl DeviceActor {
pub fn new(name: String) -> DeviceActor {
DeviceActor { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = DeviceActor { name: name.clone() };
registry.register::<Self>(actor);
name
}
pub fn description() -> ActorDescription {

View File

@@ -10,12 +10,12 @@ use serde::Serialize;
use serde_json::Value;
use crate::actor::{Actor, ActorEncode, ActorRegistry};
use crate::actors::object::ObjectActorMsg;
use crate::actors::object::{ObjectActorMsg, ObjectPropertyDescriptor};
#[derive(Serialize)]
struct EnvironmentBindings {
arguments: Vec<Value>,
variables: HashMap<String, EnvironmentVariableDesc>,
variables: HashMap<String, ObjectPropertyDescriptor>,
}
#[derive(Serialize)]
@@ -24,14 +24,6 @@ struct EnvironmentFunction {
display_name: String,
}
#[derive(Serialize)]
struct EnvironmentVariableDesc {
value: String,
configurable: bool,
enumerable: bool,
writable: bool,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct EnvironmentActorMsg {
@@ -110,15 +102,13 @@ impl ActorEncode<EnvironmentActorMsg> for EnvironmentActor {
.binding_variables
.clone()
.into_iter()
.map(|(key, value)| {
.map(|ref property_descriptor| {
(
key,
EnvironmentVariableDesc {
value,
configurable: false,
enumerable: true,
writable: false,
},
property_descriptor.name.clone(),
ObjectPropertyDescriptor::from_property_descriptor(
registry,
property_descriptor,
),
)
})
.collect(),

View File

@@ -60,7 +60,7 @@ pub(crate) struct FrameActorMsg {
pub(crate) struct FrameActor {
name: String,
object_actor: String,
source_actor: String,
source_name: String,
frame_result: FrameInfo,
current_offset: AtomicRefCell<(u32, u32)>,
}
@@ -84,16 +84,16 @@ impl Actor for FrameActor {
let Some((tx, rx)) = channel() else {
return Err(ActorError::Internal);
};
let source = registry.find::<SourceActor>(&self.source_actor);
source
let source_actor = registry.find::<SourceActor>(&self.source_name);
source_actor
.script_sender
.send(DevtoolScriptControlMsg::GetEnvironment(self.name(), tx))
.map_err(|_| ActorError::Internal)?;
let environment = rx.recv().map_err(|_| ActorError::Internal)?;
let environment_name = rx.recv().map_err(|_| ActorError::Internal)?;
let msg = FrameEnvironmentReply {
from: self.name(),
environment: registry.encode::<EnvironmentActor, _>(&environment),
environment: registry.encode::<EnvironmentActor, _>(&environment_name),
};
// This reply has a `type` field but it doesn't need a followup,
// unlike most messages. We need to skip the validity check.
@@ -109,16 +109,16 @@ impl Actor for FrameActor {
impl FrameActor {
pub fn register(
registry: &ActorRegistry,
source_actor: String,
source_name: String,
frame_result: FrameInfo,
) -> String {
let object_actor = ObjectActor::register(registry, None, "Object".to_owned());
let object_name = ObjectActor::register(registry, None, "Object".to_owned(), None);
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
object_actor,
source_actor,
object_actor: object_name,
source_name,
frame_result,
current_offset: Default::default(),
};
@@ -153,7 +153,7 @@ impl ActorEncode<FrameActorMsg> for FrameActor {
oldest: self.frame_result.oldest,
state,
where_: FrameWhere {
actor: self.source_actor.clone(),
actor: self.source_name.clone(),
line,
column,
},

View File

@@ -4,7 +4,6 @@
//! Liberally derived from the [Firefox JS implementation](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/inspector.js).
use atomic_refcell::AtomicRefCell;
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{self, Map, Value};
@@ -17,11 +16,13 @@ use crate::protocol::ClientRequest;
use crate::{ActorMsg, StreamId};
pub mod accessibility;
pub mod accessible_walker;
pub mod css_properties;
pub mod highlighter;
pub mod layout;
pub mod node;
pub mod page_style;
pub mod simulator;
pub mod style_rule;
pub mod walker;
@@ -55,7 +56,7 @@ pub(crate) struct InspectorActor {
name: String,
highlighter_name: String,
page_style_name: String,
pub(crate) walker: String,
pub(crate) walker_name: String,
}
impl Actor for InspectorActor {
@@ -91,7 +92,7 @@ impl Actor for InspectorActor {
"getWalker" => {
let msg = GetWalkerReply {
from: self.name(),
walker: registry.encode::<WalkerActor, _>(&self.walker),
walker: registry.encode::<WalkerActor, _>(&self.walker_name),
};
request.reply_final(&msg)?
},
@@ -112,34 +113,22 @@ impl Actor for InspectorActor {
impl InspectorActor {
pub fn register(registry: &ActorRegistry, browsing_context_name: String) -> String {
let highlighter_actor = HighlighterActor {
name: registry.new_name::<HighlighterActor>(),
browsing_context_name: browsing_context_name.clone(),
};
let highlighter_name = HighlighterActor::register(registry, browsing_context_name.clone());
let page_style_actor = PageStyleActor {
name: registry.new_name::<PageStyleActor>(),
};
let page_style_name = PageStyleActor::register(registry);
let walker = WalkerActor {
name: registry.new_name::<WalkerActor>(),
mutations: AtomicRefCell::new(vec![]),
browsing_context_name,
};
let walker_name = WalkerActor::register(registry, browsing_context_name);
let actor = Self {
let inspector_actor = Self {
name: registry.new_name::<InspectorActor>(),
highlighter_name: highlighter_actor.name(),
page_style_name: page_style_actor.name(),
walker: walker.name(),
highlighter_name,
page_style_name,
walker_name,
};
let name = actor.name();
let inspector_name = inspector_actor.name();
registry.register(highlighter_actor);
registry.register(page_style_actor);
registry.register(walker);
registry.register(actor);
registry.register(inspector_actor);
name
inspector_name
}
}

View File

@@ -11,6 +11,8 @@ use serde_json::{Map, Value};
use crate::StreamId;
use crate::actor::{Actor, ActorError, ActorRegistry};
use crate::actors::inspector::accessible_walker::AccessibleWalkerActor;
use crate::actors::inspector::simulator::SimulatorActor;
use crate::protocol::ClientRequest;
#[derive(Serialize)]
@@ -90,14 +92,11 @@ impl Actor for AccessibilityActor {
request.reply_final(&msg)?
},
"getSimulator" => {
// TODO: Create actual simulator
let actor = registry.new_name::<SimulatorActor>();
registry.register(SimulatorActor {
name: actor.clone(),
});
let msg = GetSimulatorReply {
from: self.name(),
simulator: ActorMsg { actor },
simulator: ActorMsg {
actor: SimulatorActor::register(registry),
},
};
request.reply_final(&msg)?
},
@@ -111,14 +110,11 @@ impl Actor for AccessibilityActor {
request.reply_final(&msg)?
},
"getWalker" => {
// TODO: Create actual accessible walker
let actor = registry.new_name::<AccessibleWalkerActor>();
registry.register(AccessibleWalkerActor {
name: actor.clone(),
});
let msg = GetWalkerReply {
from: self.name(),
walker: ActorMsg { actor },
walker: ActorMsg {
actor: AccessibleWalkerActor::register(registry),
},
};
request.reply_final(&msg)?
},
@@ -129,29 +125,10 @@ impl Actor for AccessibilityActor {
}
impl AccessibilityActor {
pub fn new(name: String) -> Self {
Self { name }
}
}
#[derive(MallocSizeOf)]
pub(crate) struct SimulatorActor {
name: String,
}
impl Actor for SimulatorActor {
fn name(&self) -> String {
self.name.clone()
}
}
#[derive(MallocSizeOf)]
pub(crate) struct AccessibleWalkerActor {
name: String,
}
impl Actor for AccessibleWalkerActor {
fn name(&self) -> String {
self.name.clone()
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -0,0 +1,27 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use malloc_size_of_derive::MallocSizeOf;
use crate::actor::{Actor, ActorRegistry};
#[derive(MallocSizeOf)]
pub(crate) struct AccessibleWalkerActor {
name: String,
}
impl AccessibleWalkerActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}
impl Actor for AccessibleWalkerActor {
fn name(&self) -> String {
self.name.clone()
}
}

View File

@@ -57,7 +57,16 @@ impl Actor for CssPropertiesActor {
}
impl CssPropertiesActor {
pub fn new(name: String, properties: HashMap<String, CssDatabaseProperty>) -> Self {
Self { name, properties }
pub fn register(
registry: &ActorRegistry,
properties: HashMap<String, CssDatabaseProperty>,
) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
properties,
};
registry.register::<Self>(actor);
name
}
}

View File

@@ -97,12 +97,22 @@ impl Actor for HighlighterActor {
}
impl HighlighterActor {
pub fn register(registry: &ActorRegistry, browsing_context_name: String) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
browsing_context_name,
};
registry.register::<Self>(actor);
name
}
fn instruct_script_thread_to_highlight_node(
&self,
node_actor: Option<String>,
node_name: Option<String>,
registry: &ActorRegistry,
) {
let node_id = node_actor.map(|node_actor| registry.actor_to_script(node_actor));
let node_id = node_name.map(|node_name| registry.actor_to_script(node_name));
let browsing_context_actor =
registry.find::<BrowsingContextActor>(&self.browsing_context_name);
browsing_context_actor

View File

@@ -74,8 +74,11 @@ impl Actor for LayoutInspectorActor {
}
impl LayoutInspectorActor {
pub fn new(name: String) -> Self {
Self { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -9,7 +9,8 @@ use std::collections::HashMap;
use atomic_refcell::AtomicRefCell;
use devtools_traits::{
AttrModification, DevtoolScriptControlMsg, EventListenerInfo, NodeInfo, ShadowRootMode,
AttrModification, DevtoolScriptControlMsg, EventListenerInfo, MatchedRule, NodeInfo,
ShadowRootMode,
};
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
@@ -132,7 +133,7 @@ pub(crate) struct NodeActor {
pub script_chan: GenericSender<DevtoolScriptControlMsg>,
pub pipeline: PipelineId,
pub walker: String,
pub style_rules: AtomicRefCell<HashMap<(String, usize), String>>,
pub style_rules: AtomicRefCell<HashMap<MatchedRule, String>>,
}
impl Actor for NodeActor {
@@ -257,6 +258,30 @@ impl Actor for NodeActor {
}
}
impl NodeActor {
pub fn register(
registry: &ActorRegistry,
script_id: String,
script_chan: GenericSender<DevtoolScriptControlMsg>,
pipeline: PipelineId,
walker: String,
) -> String {
let name = registry.new_name::<Self>();
registry.register_script_actor(script_id, name.clone());
let actor = Self {
name: name.clone(),
script_chan,
pipeline,
walker,
style_rules: AtomicRefCell::new(HashMap::new()),
};
registry.register(actor);
name
}
}
pub trait NodeInfoToProtocol {
fn encode(
self,
@@ -277,18 +302,13 @@ impl NodeInfoToProtocol for NodeInfo {
) -> NodeActorMsg {
let get_or_register_node_actor = |id: &str| {
if !registry.script_actor_registered(id.to_string()) {
let name = registry.new_name::<NodeActor>();
registry.register_script_actor(id.to_string(), name.clone());
let node_actor = NodeActor {
name: name.clone(),
script_chan: script_chan.clone(),
NodeActor::register(
registry,
id.to_string(),
script_chan.clone(),
pipeline,
walker: walker.clone(),
style_rules: AtomicRefCell::new(HashMap::new()),
};
registry.register(node_actor);
name
walker.clone(),
)
} else {
registry.script_to_actor(id.to_string())
}

View File

@@ -6,11 +6,10 @@
//! properties applied, including the attributes and layout of each element.
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::iter::once;
use devtools_traits::DevtoolScriptControlMsg::{GetLayout, GetSelectors};
use devtools_traits::{AutoMargins, ComputedNodeLayout};
use devtools_traits::{AutoMargins, ComputedNodeLayout, MatchedRule};
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{self, Map, Value};
@@ -130,33 +129,40 @@ impl Actor for PageStyleActor {
}
impl PageStyleActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
fn get_applied(
&self,
request: ClientRequest,
msg: &Map<String, Value>,
registry: &ActorRegistry,
) -> Result<(), ActorError> {
let target = msg
let node_name = msg
.get("node")
.ok_or(ActorError::MissingParameter)?
.as_str()
.ok_or(ActorError::BadParameterType)?;
let node = registry.find::<NodeActor>(target);
let walker = registry.find::<WalkerActor>(&node.walker);
let node_actor = registry.find::<NodeActor>(node_name);
let walker = registry.find::<WalkerActor>(&node_actor.walker);
let browsing_context_actor = walker.browsing_context_actor(registry);
let entries: Vec<_> = find_child(
&node.script_chan,
node.pipeline,
target,
&node_actor.script_chan,
node_actor.pipeline,
node_name,
registry,
&walker.root(registry)?.actor,
vec![],
|msg| msg.actor == target,
|msg| msg.actor == node_name,
)
.unwrap_or_default()
.into_iter()
.flat_map(|node| {
let inherited = (node.actor != target).then(|| node.actor.clone());
let inherited = (node.actor != node_name).then(|| node.actor.clone());
let node_actor = registry.find::<NodeActor>(&node.actor);
// Get the css selectors that match this node present in the currently active stylesheets.
@@ -177,28 +183,33 @@ impl PageStyleActor {
// For each selector (plus an empty one that represents the style attribute)
// get all of the rules associated with it.
once(("".into(), usize::MAX))
.chain(selectors)
.filter_map(move |selector| {
let rule = match node_actor.style_rules.borrow_mut().entry(selector) {
Entry::Vacant(e) => {
let name = registry.new_name::<StyleRuleActor>();
let actor = StyleRuleActor::new(
name.clone(),
node_actor.name(),
(!e.key().0.is_empty()).then_some(e.key().clone()),
);
let rule = actor.applied(registry)?;
let style_attribute_rule = MatchedRule {
selector: "".into(),
stylesheet_index: usize::MAX,
block_id: 0,
ancestor_data: vec![],
};
registry.register(actor);
e.insert(name);
rule
},
Entry::Occupied(e) => {
let actor = registry.find::<StyleRuleActor>(e.get());
actor.applied(registry)?
},
};
once(style_attribute_rule)
.chain(selectors)
.filter_map(move |matched_rule| {
let style_rule_name = node_actor
.style_rules
.borrow_mut()
.entry(matched_rule.clone())
.or_insert_with(|| {
StyleRuleActor::register(
registry,
node_actor.name(),
(matched_rule.stylesheet_index != usize::MAX)
.then_some(matched_rule.clone()),
)
})
.clone();
let rule = registry
.find::<StyleRuleActor>(&style_rule_name)
.applied(registry)?;
if inherited.is_some() && rule.declarations.is_empty() {
return None;
}
@@ -226,31 +237,30 @@ impl PageStyleActor {
msg: &Map<String, Value>,
registry: &ActorRegistry,
) -> Result<(), ActorError> {
let target = msg
let node_name = msg
.get("node")
.ok_or(ActorError::MissingParameter)?
.as_str()
.ok_or(ActorError::BadParameterType)?;
let node_actor = registry.find::<NodeActor>(target);
let computed = (|| match node_actor
let node_actor = registry.find::<NodeActor>(node_name);
let style_attribute_rule = devtools_traits::MatchedRule {
selector: "".into(),
stylesheet_index: usize::MAX,
block_id: 0,
ancestor_data: vec![],
};
let style_rule_name = node_actor
.style_rules
.borrow_mut()
.entry(("".into(), usize::MAX))
{
Entry::Vacant(e) => {
let name = registry.new_name::<StyleRuleActor>();
let actor = StyleRuleActor::new(name.clone(), target.into(), None);
let computed = actor.computed(registry)?;
registry.register(actor);
e.insert(name);
Some(computed)
},
Entry::Occupied(e) => {
let actor = registry.find::<StyleRuleActor>(e.get());
Some(actor.computed(registry)?)
},
})()
.unwrap_or_default();
.entry(style_attribute_rule)
.or_insert_with(|| StyleRuleActor::register(registry, node_name.into(), None))
.clone();
let computed = registry
.find::<StyleRuleActor>(&style_rule_name)
.computed(registry)
.unwrap_or_default();
let msg = GetComputedReply {
computed,
from: self.name(),
@@ -264,20 +274,20 @@ impl PageStyleActor {
msg: &Map<String, Value>,
registry: &ActorRegistry,
) -> Result<(), ActorError> {
let target = msg
let node_name = msg
.get("node")
.ok_or(ActorError::MissingParameter)?
.as_str()
.ok_or(ActorError::BadParameterType)?;
let node = registry.find::<NodeActor>(target);
let walker = registry.find::<WalkerActor>(&node.walker);
let node_actor = registry.find::<NodeActor>(node_name);
let walker = registry.find::<WalkerActor>(&node_actor.walker);
let browsing_context_actor = walker.browsing_context_actor(registry);
let (tx, rx) = generic_channel::channel().ok_or(ActorError::Internal)?;
browsing_context_actor
.script_chan()
.send(GetLayout(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(target.to_owned()),
registry.actor_to_script(node_name.to_owned()),
tx,
))
.map_err(|_| ActorError::Internal)?;

View File

@@ -0,0 +1,27 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use malloc_size_of_derive::MallocSizeOf;
use crate::actor::{Actor, ActorRegistry};
#[derive(MallocSizeOf)]
pub(crate) struct SimulatorActor {
name: String,
}
impl SimulatorActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}
impl Actor for SimulatorActor {
fn name(&self) -> String {
self.name.clone()
}
}

View File

@@ -11,6 +11,7 @@ use std::collections::HashMap;
use devtools_traits::DevtoolScriptControlMsg::{
GetAttributeStyle, GetComputedStyle, GetDocumentElement, GetStylesheetStyle, ModifyRule,
};
use devtools_traits::{AncestorData, MatchedRule};
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{Map, Value};
@@ -28,7 +29,7 @@ const ELEMENT_STYLE_TYPE: u32 = 100;
#[serde(rename_all = "camelCase")]
pub(crate) struct AppliedRule {
actor: String,
ancestor_data: Vec<()>,
ancestor_data: Vec<AncestorData>,
authored_text: String,
css_text: String,
pub declarations: Vec<AppliedDeclaration>,
@@ -82,8 +83,8 @@ pub(crate) struct StyleRuleActorMsg {
#[derive(MallocSizeOf)]
pub(crate) struct StyleRuleActor {
name: String,
node: String,
selector: Option<(String, usize)>,
node_name: String,
selector: Option<MatchedRule>,
}
impl Actor for StyleRuleActor {
@@ -121,14 +122,14 @@ impl Actor for StyleRuleActor {
.collect();
// Query the rule modification
let node = registry.find::<NodeActor>(&self.node);
let walker = registry.find::<WalkerActor>(&node.walker);
let node_actor = registry.find::<NodeActor>(&self.node_name);
let walker = registry.find::<WalkerActor>(&node_actor.walker);
let browsing_context_actor = walker.browsing_context_actor(registry);
browsing_context_actor
.script_chan()
.send(ModifyRule(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(self.node.clone()),
registry.actor_to_script(self.node_name.clone()),
modifications,
))
.map_err(|_| ActorError::Internal)?;
@@ -142,17 +143,24 @@ impl Actor for StyleRuleActor {
}
impl StyleRuleActor {
pub fn new(name: String, node: String, selector: Option<(String, usize)>) -> Self {
Self {
name,
node,
pub fn register(
registry: &ActorRegistry,
node: String,
selector: Option<MatchedRule>,
) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
node_name: node,
selector,
}
};
registry.register::<Self>(actor);
name
}
pub fn applied(&self, registry: &ActorRegistry) -> Option<AppliedRule> {
let node = registry.find::<NodeActor>(&self.node);
let walker = registry.find::<WalkerActor>(&node.walker);
let node_actor = registry.find::<NodeActor>(&self.node_name);
let walker = registry.find::<WalkerActor>(&node_actor.walker);
let browsing_context_actor = walker.browsing_context_actor(registry);
let (document_sender, document_receiver) = generic_channel::channel()?;
@@ -169,19 +177,15 @@ impl StyleRuleActor {
// not, this represents the style attribute.
let (style_sender, style_receiver) = generic_channel::channel()?;
let req = match &self.selector {
Some(selector) => {
let (selector, stylesheet) = selector.clone();
GetStylesheetStyle(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(self.node.clone()),
selector,
stylesheet,
style_sender,
)
},
Some(matched_rule) => GetStylesheetStyle(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(self.node_name.clone()),
matched_rule.clone(),
style_sender,
),
None => GetAttributeStyle(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(self.node.clone()),
registry.actor_to_script(self.node_name.clone()),
style_sender,
),
};
@@ -190,7 +194,11 @@ impl StyleRuleActor {
Some(AppliedRule {
actor: self.name(),
ancestor_data: vec![], // TODO: Fill with hierarchy
ancestor_data: self
.selector
.as_ref()
.map(|r| r.ancestor_data.clone())
.unwrap_or_default(),
authored_text: "".into(),
css_text: "".into(), // TODO: Specify the css text
declarations: style
@@ -210,7 +218,7 @@ impl StyleRuleActor {
})
.collect(),
href: node.base_uri,
selectors: self.selector.iter().map(|(s, _)| s).cloned().collect(),
selectors: self.selector.iter().map(|r| r.selector.clone()).collect(),
selectors_specificity: self.selector.iter().map(|_| 1).collect(),
type_: ELEMENT_STYLE_TYPE,
traits: StyleRuleActorTraits {
@@ -223,8 +231,8 @@ impl StyleRuleActor {
&self,
registry: &ActorRegistry,
) -> Option<HashMap<String, ComputedDeclaration>> {
let node = registry.find::<NodeActor>(&self.node);
let walker = registry.find::<WalkerActor>(&node.walker);
let node_actor = registry.find::<NodeActor>(&self.node_name);
let walker = registry.find::<WalkerActor>(&node_actor.walker);
let browsing_context_actor = walker.browsing_context_actor(registry);
let (style_sender, style_receiver) = generic_channel::channel()?;
@@ -232,7 +240,7 @@ impl StyleRuleActor {
.script_chan()
.send(GetComputedStyle(
browsing_context_actor.pipeline_id(),
registry.actor_to_script(self.node.clone()),
registry.actor_to_script(self.node_name.clone()),
style_sender,
))
.ok()?;

View File

@@ -213,14 +213,14 @@ impl Actor for WalkerActor {
},
"getLayoutInspector" => {
// TODO: Create actual layout inspector actor
let layout_inspector_name = LayoutInspectorActor::register(registry);
let layout_inspector_actor =
LayoutInspectorActor::new(registry.new_name::<LayoutInspectorActor>());
registry.find::<LayoutInspectorActor>(&layout_inspector_name);
let msg = GetLayoutInspectorReply {
from: self.name(),
actor: layout_inspector_actor.encode(registry),
};
registry.register(layout_inspector_actor);
request.reply_final(&msg)?
},
"getMutations" => self.handle_get_mutations(request, registry)?,
@@ -237,7 +237,7 @@ impl Actor for WalkerActor {
.ok_or(ActorError::MissingParameter)?
.as_str()
.ok_or(ActorError::BadParameterType)?;
let node = msg
let node_name = msg
.get("node")
.ok_or(ActorError::MissingParameter)?
.as_str()
@@ -247,7 +247,7 @@ impl Actor for WalkerActor {
browsing_context_actor.pipeline_id(),
&self.name,
registry,
node,
node_name,
vec![],
|msg| msg.display_name == selector,
)
@@ -280,6 +280,17 @@ impl Actor for WalkerActor {
}
impl WalkerActor {
pub fn register(registry: &ActorRegistry, browsing_context_name: String) -> String {
let name = registry.new_name::<WalkerActor>();
let actor = WalkerActor {
name: name.clone(),
mutations: AtomicRefCell::new(vec![]),
browsing_context_name,
};
registry.register::<Self>(actor);
name
}
pub(crate) fn browsing_context_actor(
&self,
registry: &ActorRegistry,
@@ -378,7 +389,7 @@ pub fn find_child(
pipeline: PipelineId,
name: &str,
registry: &ActorRegistry,
node: &str,
node_name: &str,
mut hierarchy: Vec<NodeActorMsg>,
compare_fn: impl Fn(&NodeActorMsg) -> bool + Clone,
) -> Result<Vec<NodeActorMsg>, Vec<NodeActorMsg>> {
@@ -386,7 +397,7 @@ pub fn find_child(
script_chan
.send(GetChildren(
pipeline,
registry.actor_to_script(node.into()),
registry.actor_to_script(node_name.into()),
tx,
))
.unwrap();

View File

@@ -73,9 +73,14 @@ impl Actor for LongStringActor {
}
impl LongStringActor {
pub fn new(registry: &ActorRegistry, full_string: String) -> Self {
pub fn register(registry: &ActorRegistry, full_string: String) -> String {
let name = registry.new_name::<Self>();
LongStringActor { name, full_string }
let actor = Self {
name: name.clone(),
full_string,
};
registry.register::<Self>(actor);
name
}
pub fn long_string_obj(&self) -> LongStringObj {

View File

@@ -468,9 +468,10 @@ impl Actor for NetworkEventActor {
let (encoding, text) = if mime_type.is_some() {
// Queue a LongStringActor for this body
let body_string = String::from_utf8_lossy(body).to_string();
let long_string = LongStringActor::new(registry, body_string);
let value = long_string.long_string_obj();
registry.register(long_string);
let long_string_name = LongStringActor::register(registry, body_string);
let value = registry
.find::<LongStringActor>(&long_string_name)
.long_string_obj();
(None, serde_json::to_value(value).unwrap())
} else {
let b64 = STANDARD.encode(&body.0);
@@ -535,13 +536,16 @@ impl Actor for NetworkEventActor {
}
impl NetworkEventActor {
pub fn new(name: String, resource_id: u64, watcher_name: String) -> NetworkEventActor {
NetworkEventActor {
name,
pub fn register(registry: &ActorRegistry, resource_id: u64, watcher_name: String) -> String {
let name = registry.new_name::<Self>();
let actor = NetworkEventActor {
name: name.clone(),
resource_id,
watcher_name,
..Default::default()
}
};
registry.register::<Self>(actor);
name
}
pub fn add_request(&self, request: HttpRequest) {

View File

@@ -2,21 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::collections::HashMap;
use devtools_traits::{DebuggerValue, PropertyDescriptor};
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{Map, Number, Value};
use serde_json::{Map, Value};
use crate::StreamId;
use crate::actor::{Actor, ActorEncode, ActorError, ActorRegistry};
use crate::actors::property_iterator::PropertyIteratorActor;
use crate::actors::symbol_iterator::SymbolIteratorActor;
use crate::protocol::ClientRequest;
#[derive(Serialize)]
pub(crate) struct ObjectPreview {
kind: String,
url: String,
}
use crate::{StreamId, debugger_value_to_json};
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
@@ -45,6 +42,37 @@ struct PrototypeReply {
prototype: ObjectActorMsg,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct ObjectPreview {
pub kind: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub own_properties: Option<HashMap<String, ObjectPropertyDescriptor>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub own_properties_length: Option<u32>,
#[serde(flatten)]
#[serde(skip_serializing_if = "Option::is_none")]
pub function: Option<FunctionPreview>,
#[serde(skip_serializing_if = "Option::is_none")]
pub length: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Value>>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct FunctionPreview {
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
pub parameter_names: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_async: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_generator: Option<bool>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct ObjectActorMsg {
@@ -52,78 +80,46 @@ pub(crate) struct ObjectActorMsg {
#[serde(rename = "type")]
type_: String,
class: String,
own_property_length: i32,
#[serde(skip_serializing_if = "Option::is_none")]
own_property_length: Option<u32>,
extensible: bool,
frozen: bool,
sealed: bool,
is_error: bool,
preview: ObjectPreview,
#[serde(skip_serializing_if = "Option::is_none")]
preview: Option<ObjectPreview>,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct ObjectPropertyDescriptor {
pub value: Value,
pub configurable: bool,
pub enumerable: bool,
pub writable: bool,
pub value: Value,
pub is_accessor: bool,
}
impl From<&PropertyDescriptor> for ObjectPropertyDescriptor {
fn from(prop: &PropertyDescriptor) -> Self {
impl ObjectPropertyDescriptor {
pub(crate) fn from_property_descriptor(
registry: &ActorRegistry,
prop: &PropertyDescriptor,
) -> Self {
Self {
value: debugger_value_to_json(registry, prop.value.clone()),
configurable: prop.configurable,
enumerable: prop.enumerable,
writable: prop.writable,
value: debugger_value_to_json(&prop.value, &prop.name),
is_accessor: prop.is_accessor,
}
}
}
/// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/utils.js#148>
fn debugger_value_to_json(value: &DebuggerValue, name: &str) -> Value {
match value {
DebuggerValue::VoidValue => {
let mut v = Map::new();
v.insert("type".to_owned(), Value::String("undefined".to_owned()));
Value::Object(v)
},
DebuggerValue::NullValue => Value::Null,
DebuggerValue::BooleanValue(boolean) => Value::Bool(*boolean),
DebuggerValue::NumberValue(num) => {
if num.is_nan() {
let mut v = Map::new();
v.insert("type".to_owned(), Value::String("NaN".to_owned()));
Value::Object(v)
} else if num.is_infinite() {
let mut v = Map::new();
let type_str = if num.is_sign_positive() {
"Infinity"
} else {
"-Infinity"
};
v.insert("type".to_owned(), Value::String(type_str.to_owned()));
Value::Object(v)
} else {
Value::Number(Number::from_f64(*num).unwrap_or(Number::from(0)))
}
},
DebuggerValue::StringValue(str) => Value::String(str.clone()),
DebuggerValue::ObjectValue { class, .. } => {
let mut v = Map::new();
v.insert("type".to_owned(), Value::String("object".to_owned()));
v.insert("class".to_owned(), Value::String(class.clone()));
v.insert("name".to_owned(), Value::String(name.into()));
Value::Object(v)
},
}
}
#[derive(MallocSizeOf)]
pub(crate) struct ObjectActor {
name: String,
_uuid: Option<String>,
class: String,
properties: Vec<PropertyDescriptor>,
preview: Option<devtools_traits::ObjectPreview>,
}
impl Actor for ObjectActor {
@@ -142,11 +138,49 @@ impl Actor for ObjectActor {
) -> Result<(), ActorError> {
match msg_type {
"enumProperties" => {
let property_iterator_name =
PropertyIteratorActor::register(registry, self.properties.clone());
let property_iterator =
let properties = self.preview.as_ref().map_or_else(Vec::new, |preview| {
if preview.kind == "ArrayLike" {
// For arrays, convert items to indexed properties
// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor#description>
let mut props: Vec<PropertyDescriptor> = preview
.items
.as_ref()
.map(|items| {
items
.iter()
.enumerate()
.map(|(index, value)| PropertyDescriptor {
name: index.to_string(),
value: value.clone(),
configurable: true,
enumerable: true,
writable: true,
is_accessor: false,
})
.collect()
})
.unwrap_or_default();
// Add length property
if let Some(length) = preview.array_length {
// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length#value>
props.push(PropertyDescriptor {
name: "length".to_string(),
value: DebuggerValue::NumberValue(length as f64),
configurable: false,
enumerable: false,
writable: true,
is_accessor: false,
});
}
props
} else {
preview.own_properties.clone().unwrap_or_default()
}
});
let property_iterator_name = PropertyIteratorActor::register(registry, properties);
let property_iterator_actor =
registry.find::<PropertyIteratorActor>(&property_iterator_name);
let count = property_iterator.count();
let count = property_iterator_actor.count();
let msg = EnumReply {
from: self.name(),
iterator: EnumIterator {
@@ -160,18 +194,15 @@ impl Actor for ObjectActor {
},
"enumSymbols" => {
let symbol_iterator = SymbolIteratorActor {
name: registry.new_name::<SymbolIteratorActor>(),
};
let symbol_iterator_name = SymbolIteratorActor::register(registry);
let msg = EnumReply {
from: self.name(),
iterator: EnumIterator {
actor: symbol_iterator.name(),
actor: symbol_iterator_name,
type_: EnumIteratorType::SymbolIterator,
count: 0,
},
};
registry.register(symbol_iterator);
request.reply_final(&msg)?
},
@@ -190,15 +221,11 @@ impl Actor for ObjectActor {
}
impl ObjectActor {
pub fn register(registry: &ActorRegistry, uuid: Option<String>, class: String) -> String {
Self::register_with_properties(registry, uuid, class, Vec::new())
}
pub fn register_with_properties(
pub fn register(
registry: &ActorRegistry,
uuid: Option<String>,
class: String,
properties: Vec<PropertyDescriptor>,
preview: Option<devtools_traits::ObjectPreview>,
) -> String {
let Some(uuid) = uuid else {
let name = registry.new_name::<Self>();
@@ -206,7 +233,7 @@ impl ObjectActor {
name: name.clone(),
_uuid: None,
class,
properties,
preview,
};
registry.register(actor);
return name;
@@ -217,7 +244,7 @@ impl ObjectActor {
name: name.clone(),
_uuid: Some(uuid.clone()),
class,
properties,
preview,
};
registry.register_script_actor(uuid, name.clone());
@@ -231,31 +258,58 @@ impl ObjectActor {
}
impl ActorEncode<ObjectActorMsg> for ObjectActor {
fn encode(&self, _: &ActorRegistry) -> ObjectActorMsg {
ObjectActorMsg {
fn encode(&self, registry: &ActorRegistry) -> ObjectActorMsg {
let mut msg = ObjectActorMsg {
actor: self.name(),
type_: "object".into(),
class: self.class.clone(),
own_property_length: self.properties.len() as i32,
extensible: true,
frozen: false,
sealed: false,
is_error: false,
preview: ObjectPreview {
kind: "ObjectWithURL".into(),
url: "".into(), // TODO: Use the correct url
},
}
}
}
#[derive(MallocSizeOf)]
struct SymbolIteratorActor {
name: String,
}
impl Actor for SymbolIteratorActor {
fn name(&self) -> String {
self.name.clone()
preview: None,
own_property_length: None,
};
// Build preview
// <https://searchfox.org/firefox-main/source/devtools/server/actors/object/previewers.js#849>
let Some(preview) = self.preview.clone() else {
return msg;
};
msg.own_property_length = preview.own_properties_length;
let function = preview.function.map(|function| FunctionPreview {
name: function.name.clone(),
display_name: function.display_name.clone(),
parameter_names: function.parameter_names.clone(),
is_async: function.is_async,
is_generator: function.is_generator,
});
let preview = ObjectPreview {
kind: preview.kind.clone(),
own_properties: preview.own_properties.map(|own_properties| {
own_properties
.iter()
.map(|prop| {
(
prop.name.clone(),
ObjectPropertyDescriptor::from_property_descriptor(registry, prop),
)
})
.collect()
}),
own_properties_length: preview.own_properties_length,
function,
length: preview.array_length,
items: preview.items.map(|items| {
items
.iter()
.map(|item| debugger_value_to_json(registry, item.clone()))
.collect()
}),
};
msg.preview = Some(preview);
msg
}
}

View File

@@ -4,13 +4,13 @@
use malloc_size_of_derive::MallocSizeOf;
use crate::actor::Actor;
use crate::actor::{Actor, ActorRegistry};
/// Referenced by `ThreadActor` when replying to `interupt` messages.
/// <https://searchfox.org/firefox-main/source/devtools/server/actors/thread.js#1699>
#[derive(MallocSizeOf)]
pub(crate) struct PauseActor {
pub name: String,
name: String,
}
impl Actor for PauseActor {
@@ -18,3 +18,12 @@ impl Actor for PauseActor {
self.name.clone()
}
}
impl PauseActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -98,8 +98,11 @@ impl Actor for PerformanceActor {
}
impl PerformanceActor {
pub fn new(name: String) -> PerformanceActor {
PerformanceActor { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = PerformanceActor { name: name.clone() };
registry.register::<Self>(actor);
name
}
pub fn description() -> ActorDescription {

View File

@@ -17,8 +17,11 @@ pub(crate) struct PreferenceActor {
}
impl PreferenceActor {
pub fn new(name: String) -> Self {
Self { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -68,8 +68,11 @@ impl Actor for ProcessActor {
}
impl ProcessActor {
pub fn new(name: String) -> Self {
Self { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -51,7 +51,7 @@ impl Actor for PropertyIteratorActor {
fn handle_message(
&self,
request: ClientRequest,
_registry: &ActorRegistry,
registry: &ActorRegistry,
msg_type: &str,
msg: &Map<String, Value>,
_id: StreamId,
@@ -66,7 +66,10 @@ impl Actor for PropertyIteratorActor {
let mut own_properties = HashMap::new();
for prop in self.properties.iter().skip(start).take(count) {
own_properties.insert(prop.name.clone(), ObjectPropertyDescriptor::from(prop));
own_properties.insert(
prop.name.clone(),
ObjectPropertyDescriptor::from_property_descriptor(registry, prop),
);
}
let reply = SliceReply {

View File

@@ -47,7 +47,10 @@ impl Actor for ReflowActor {
}
impl ReflowActor {
pub fn new(name: String) -> Self {
Self { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -22,7 +22,7 @@ use crate::actors::performance::PerformanceActor;
use crate::actors::preference::PreferenceActor;
use crate::actors::process::{ProcessActor, ProcessActorMsg};
use crate::actors::tab::{TabDescriptorActor, TabDescriptorActorMsg};
use crate::actors::worker::{WorkerActor, WorkerActorMsg};
use crate::actors::worker::{WorkerTargetActor, WorkerTargetActorMsg};
use crate::protocol::{ActorDescription, ClientRequest};
use crate::{EmptyReplyMsg, StreamId};
@@ -123,7 +123,7 @@ pub(crate) struct ProtocolDescriptionReply {
#[derive(Serialize)]
struct ListWorkersReply {
from: String,
workers: Vec<WorkerActorMsg>,
workers: Vec<WorkerTargetActorMsg>,
}
#[derive(Serialize)]
@@ -248,12 +248,12 @@ impl Actor for RootActor {
.borrow()
.iter()
.map(|worker_name| {
let worker = registry.find::<WorkerActor>(worker_name);
let url = worker.url.to_string();
let worker_actor = registry.find::<WorkerTargetActor>(worker_name);
let url = worker_actor.url.to_string();
// Find correct scope url in the service worker
let scope = url.clone();
ServiceWorkerRegistrationMsg {
actor: worker.name(),
actor: worker_actor.name(),
scope,
url: url.clone(),
registration_state: "".to_string(),
@@ -263,11 +263,11 @@ impl Actor for RootActor {
installing_worker: None,
waiting_worker: None,
active_worker: Some(ServiceWorkerInfo {
actor: worker.name(),
actor: worker_actor.name(),
url,
state: 4, // activated
state_text: "activated".to_string(),
id: worker.worker_id.to_string(),
id: worker_actor.worker_id.to_string(),
fetch: false,
traits: HashMap::new(),
}),
@@ -310,7 +310,7 @@ impl Actor for RootActor {
.workers
.borrow()
.iter()
.map(|worker_name| registry.encode::<WorkerActor, _>(worker_name))
.map(|worker_name| registry.encode::<WorkerTargetActor, _>(worker_name))
.collect(),
};
request.reply_final(&reply)?
@@ -347,28 +347,24 @@ impl RootActor {
/// Registers the root actor and its global actors (those not associated with a specific target).
pub fn register(registry: &mut ActorRegistry) {
// Global actors
let device_actor = DeviceActor::new(registry.new_name::<DeviceActor>());
let perf = PerformanceActor::new(registry.new_name::<PerformanceActor>());
let preference_actor = PreferenceActor::new(registry.new_name::<PreferenceActor>());
let device_name = DeviceActor::register(registry);
let performance_name = PerformanceActor::register(registry);
let preference_name = PreferenceActor::register(registry);
// Process descriptor
let process_actor = ProcessActor::new(registry.new_name::<ProcessActor>());
let process_name = ProcessActor::register(registry);
// Root actor
let root_actor = Self {
global_actors: GlobalActors {
device_actor: device_actor.name(),
perf_actor: perf.name(),
preference_actor: preference_actor.name(),
device_actor: device_name,
perf_actor: performance_name,
preference_actor: preference_name,
},
process_name: process_actor.name(),
process_name,
..Default::default()
};
registry.register(perf);
registry.register(device_actor);
registry.register(process_actor);
registry.register(preference_actor);
registry.register(root_actor);
}

View File

@@ -64,7 +64,7 @@ impl SourceManager {
self.source_actor_names
.borrow()
.iter()
.map(|actor_name| registry.find::<SourceActor>(actor_name).source_form())
.map(|source_name| registry.find::<SourceActor>(source_name).source_form())
.collect()
}
@@ -73,10 +73,10 @@ impl SourceManager {
registry: &ActorRegistry,
source_url: &str,
) -> Option<DowncastableActorArc<SourceActor>> {
for name in self.source_actor_names.borrow().iter() {
let source = registry.find::<SourceActor>(name);
if source.url == ServoUrl::from_str(source_url).ok()? {
return Some(source);
for source_name in self.source_actor_names.borrow().iter() {
let source_actor = registry.find::<SourceActor>(source_name);
if source_actor.url == ServoUrl::from_str(source_url).ok()? {
return Some(source_actor);
}
}
None
@@ -143,29 +143,8 @@ struct GetBreakpointPositionsRequest {
}
impl SourceActor {
pub fn new(
name: String,
url: ServoUrl,
content: Option<String>,
content_type: Option<String>,
spidermonkey_id: u32,
introduction_type: String,
script_sender: GenericSender<DevtoolScriptControlMsg>,
) -> SourceActor {
SourceActor {
name,
url,
content: AtomicRefCell::new(content),
content_type,
is_black_boxed: false,
spidermonkey_id,
introduction_type,
script_sender,
}
}
#[expect(clippy::too_many_arguments)]
pub fn new_registered(
pub fn register(
registry: &ActorRegistry,
pipeline_id: PipelineId,
url: ServoUrl,
@@ -175,21 +154,20 @@ impl SourceActor {
introduction_type: String,
script_sender: GenericSender<DevtoolScriptControlMsg>,
) -> String {
let source_actor_name = registry.new_name::<Self>();
let source_actor = SourceActor::new(
source_actor_name.clone(),
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
url,
content,
content: AtomicRefCell::new(content),
content_type,
is_black_boxed: false,
spidermonkey_id,
introduction_type,
script_sender,
);
registry.register(source_actor);
registry.register_source_actor(pipeline_id, &source_actor_name);
source_actor_name
};
registry.register::<Self>(actor);
registry.register_source_actor(pipeline_id, &name);
name
}
pub fn source_form(&self) -> SourceForm {

View File

@@ -10,11 +10,41 @@ use crate::StreamId;
use crate::actor::{Actor, ActorError, ActorRegistry};
use crate::protocol::ClientRequest;
/// <https://searchfox.org/mozilla-central/source/devtools/server/actors/resources/stylesheets.js>
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct StyleSheetData {
/// Unique identifier for this stylesheet.
resource_id: String,
/// The URL of the stylesheet. Optional for inline stylesheets.
href: Option<String>,
/// The URL of the document that owns this stylesheet.
node_href: String,
/// Whether the stylesheet is disabled.
disabled: bool,
/// The title of the stylesheet.
title: String,
/// Whether this is a browser stylesheet.
system: bool,
/// Whether this stylesheet was created by DevTools.
is_new: bool,
/// Optional source map URL.
source_map_url: Option<String>,
/// The index of this stylesheet in the document's stylesheet list.
style_sheet_index: i32,
// TODO: the following fields will be implemented later once we fetch the stylesheets
// constructed: bool,
// file_name: Option<String>,
// at_rules: Vec<Rule>,
// rule_count: u32,
// source_map_base_url: String,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct GetStyleSheetsReply {
from: String,
style_sheets: Vec<u32>, // TODO: real JSON structure.
style_sheets: Vec<StyleSheetData>,
}
#[derive(MallocSizeOf)]
@@ -38,6 +68,7 @@ impl Actor for StyleSheetsActor {
"getStyleSheets" => {
let msg = GetStyleSheetsReply {
from: self.name(),
// TODO: Fetch actual stylesheets from the script thread.
style_sheets: vec![],
};
request.reply_final(&msg)?
@@ -50,7 +81,10 @@ impl Actor for StyleSheetsActor {
}
impl StyleSheetsActor {
pub fn new(name: String) -> StyleSheetsActor {
StyleSheetsActor { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = StyleSheetsActor { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -0,0 +1,27 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use malloc_size_of_derive::MallocSizeOf;
use crate::actor::{Actor, ActorRegistry};
#[derive(MallocSizeOf)]
pub(crate) struct SymbolIteratorActor {
name: String,
}
impl SymbolIteratorActor {
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}
impl Actor for SymbolIteratorActor {
fn name(&self) -> String {
self.name.clone()
}
}

View File

@@ -167,19 +167,21 @@ impl Actor for TabDescriptorActor {
}
impl TabDescriptorActor {
pub(crate) fn new(
pub(crate) fn register(
registry: &ActorRegistry,
browsing_context_name: String,
is_top_level_global: bool,
) -> TabDescriptorActor {
) -> String {
let name = registry.new_name::<Self>();
let root_actor = registry.find::<RootActor>("root");
root_actor.tabs.borrow_mut().push(name.clone());
TabDescriptorActor {
name,
let actor = TabDescriptorActor {
name: name.clone(),
browsing_context_name,
is_top_level_global,
}
};
registry.register::<Self>(actor);
name
}
pub(crate) fn is_top_level_global(&self) -> bool {

View File

@@ -116,18 +116,21 @@ pub(crate) struct ThreadActor {
}
impl ThreadActor {
pub fn new(
name: String,
pub fn register(
registry: &ActorRegistry,
script_sender: GenericSender<DevtoolScriptControlMsg>,
browsing_context_name: Option<String>,
) -> ThreadActor {
ThreadActor {
name,
) -> String {
let name = registry.new_name::<Self>();
let actor = ThreadActor {
name: name.clone(),
source_manager: SourceManager::new(),
script_sender,
frames: Default::default(),
browsing_context_name,
}
};
registry.register::<Self>(actor);
name
}
}
@@ -146,14 +149,11 @@ impl Actor for ThreadActor {
) -> Result<(), ActorError> {
match msg_type {
"attach" => {
let pause = registry.new_name::<PauseActor>();
registry.register(PauseActor {
name: pause.clone(),
});
let pause_name = PauseActor::register(registry);
let msg = ThreadAttached {
from: self.name(),
type_: "paused".to_owned(),
actor: pause,
actor: pause_name,
frame: 0,
error: 0,
recording_endpoint: 0,
@@ -243,7 +243,7 @@ impl Actor for ThreadActor {
from: self.name(),
frames: result
.iter()
.map(|frame| registry.encode::<FrameActor, _>(frame))
.map(|frame_name| registry.encode::<FrameActor, _>(frame_name))
.collect(),
};
request.reply_final(&msg)?

View File

@@ -23,8 +23,9 @@ use servo_url::ServoUrl;
use self::network_parent::NetworkParentActor;
use super::breakpoint::BreakpointListActor;
use super::thread::ThreadActor;
use super::worker::WorkerActorMsg;
use super::worker::WorkerTargetActorMsg;
use crate::actor::{Actor, ActorEncode, ActorError, ActorRegistry};
use crate::actors::blackboxing::BlackboxingActor;
use crate::actors::browsing_context::{BrowsingContextActor, BrowsingContextActorMsg};
use crate::actors::console::ConsoleActor;
use crate::actors::root::RootActor;
@@ -34,7 +35,7 @@ use crate::actors::watcher::target_configuration::{
use crate::actors::watcher::thread_configuration::ThreadConfigurationActor;
use crate::protocol::{ClientRequest, DevtoolsConnection, JsonPacketStream};
use crate::resource::{ResourceArrayType, ResourceAvailable};
use crate::{ActorMsg, EmptyReplyMsg, IdMap, StreamId, WorkerActor};
use crate::{ActorMsg, EmptyReplyMsg, IdMap, StreamId, WorkerTargetActor};
pub mod network_parent;
pub mod target_configuration;
@@ -83,7 +84,7 @@ impl SessionContext {
("network-event", true),
("network-event-stacktrace", false),
("reflow", true),
("stylesheet", false),
("stylesheet", true),
("source", true),
("thread-state", false),
("server-sent-event", false),
@@ -110,7 +111,7 @@ pub enum SessionContextType {
#[serde(untagged)]
enum TargetActorMsg {
BrowsingContext(BrowsingContextActorMsg),
Worker(WorkerActorMsg),
Worker(WorkerTargetActorMsg),
}
#[derive(Serialize)]
@@ -146,6 +147,13 @@ struct GetThreadConfigurationActorReply {
configuration: ActorMsg,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct GetBlackboxingActorReply {
from: String,
blackboxing: ActorMsg,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct GetBreakpointListActorReply {
@@ -184,9 +192,10 @@ pub(crate) struct WatcherActor {
name: String,
pub browsing_context_name: String,
network_parent_name: String,
target_configuration: String,
thread_configuration: String,
breakpoint_list: String,
target_configuration_name: String,
thread_configuration_name: String,
breakpoint_list_name: String,
blackboxing_name: String,
session_context: SessionContext,
}
@@ -266,7 +275,7 @@ impl Actor for WatcherActor {
from: self.name(),
type_: "target-available-form".into(),
target: TargetActorMsg::Worker(
registry.encode::<WorkerActor, _>(worker_name),
registry.encode::<WorkerTargetActor, _>(worker_name),
),
};
let _ = request.write_json_packet(&worker_msg);
@@ -277,7 +286,7 @@ impl Actor for WatcherActor {
from: self.name(),
type_: "target-available-form".into(),
target: TargetActorMsg::Worker(
registry.encode::<WorkerActor, _>(worker_name),
registry.encode::<WorkerTargetActor, _>(worker_name),
),
};
let _ = request.write_json_packet(&worker_msg);
@@ -332,7 +341,7 @@ impl Actor for WatcherActor {
},
"source" => {
let thread_actor =
registry.find::<ThreadActor>(&browsing_context_actor.thread);
registry.find::<ThreadActor>(&browsing_context_actor.thread_name);
browsing_context_actor.resources_array(
thread_actor.source_manager.source_forms(registry),
resource.into(),
@@ -341,11 +350,12 @@ impl Actor for WatcherActor {
);
for worker_name in &*root_actor.workers.borrow() {
let worker_actor = registry.find::<WorkerActor>(worker_name);
let thread = registry.find::<ThreadActor>(&worker_actor.thread);
let worker_actor = registry.find::<WorkerTargetActor>(worker_name);
let thread_actor =
registry.find::<ThreadActor>(&worker_actor.thread_name);
worker_actor.resources_array(
thread.source_manager.source_forms(registry),
thread_actor.source_manager.source_forms(registry),
resource.into(),
ResourceArrayType::Available,
&mut request,
@@ -364,7 +374,7 @@ impl Actor for WatcherActor {
);
for worker_name in &*root_actor.workers.borrow() {
let worker_actor = registry.find::<WorkerActor>(worker_name);
let worker_actor = registry.find::<WorkerTargetActor>(worker_name);
let console_actor =
registry.find::<ConsoleActor>(&worker_actor.console_name);
@@ -376,6 +386,17 @@ impl Actor for WatcherActor {
);
}
},
"stylesheet" => {
// TODO: Fetch actual stylesheets from the script thread.
// For now, send an empty array.
let empty: Vec<serde_json::Value> = vec![];
browsing_context_actor.resources_array(
empty,
resource.into(),
ResourceArrayType::Available,
&mut request,
);
},
"network-event" => {},
_ => warn!("resource {} not handled yet", resource),
}
@@ -405,7 +426,7 @@ impl Actor for WatcherActor {
let msg = GetTargetConfigurationActorReply {
from: self.name(),
configuration: registry
.encode::<TargetConfigurationActor, _>(&self.target_configuration),
.encode::<TargetConfigurationActor, _>(&self.target_configuration_name),
};
request.reply_final(&msg)?
},
@@ -413,7 +434,7 @@ impl Actor for WatcherActor {
let msg = GetThreadConfigurationActorReply {
from: self.name(),
configuration: registry
.encode::<ThreadConfigurationActor, _>(&self.thread_configuration),
.encode::<ThreadConfigurationActor, _>(&self.thread_configuration_name),
};
request.reply_final(&msg)?
},
@@ -421,7 +442,14 @@ impl Actor for WatcherActor {
let msg = GetBreakpointListActorReply {
from: self.name(),
breakpoint_list: registry
.encode::<BreakpointListActor, _>(&self.breakpoint_list),
.encode::<BreakpointListActor, _>(&self.breakpoint_list_name),
};
request.reply_final(&msg)?
},
"getBlackboxingActor" => {
let msg = GetBlackboxingActorReply {
from: self.name(),
blackboxing: registry.encode::<BlackboxingActor, _>(&self.blackboxing_name),
};
request.reply_final(&msg)?
},
@@ -438,38 +466,33 @@ impl ResourceAvailable for WatcherActor {
}
impl WatcherActor {
pub fn new(
pub fn register(
registry: &ActorRegistry,
browsing_context_name: String,
session_context: SessionContext,
) -> Self {
let network_parent_actor =
NetworkParentActor::new(registry.new_name::<NetworkParentActor>());
let target_configuration =
TargetConfigurationActor::new(registry.new_name::<TargetConfigurationActor>());
let thread_configuration =
ThreadConfigurationActor::new(registry.new_name::<ThreadConfigurationActor>());
let breakpoint_list = BreakpointListActor::new(
registry.new_name::<BreakpointListActor>(),
browsing_context_name.clone(),
);
) -> String {
let network_parent_name = NetworkParentActor::register(registry);
let target_configuration_name = TargetConfigurationActor::register(registry);
let thread_configuration_name = ThreadConfigurationActor::register(registry);
let breakpoint_list_name =
BreakpointListActor::register(registry, browsing_context_name.clone());
let blackboxing_name = BlackboxingActor::register(registry);
let watcher_actor = Self {
name: registry.new_name::<WatcherActor>(),
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
browsing_context_name,
network_parent_name: network_parent_actor.name(),
target_configuration: target_configuration.name(),
thread_configuration: thread_configuration.name(),
breakpoint_list: breakpoint_list.name(),
network_parent_name,
target_configuration_name,
thread_configuration_name,
breakpoint_list_name,
blackboxing_name,
session_context,
};
registry.register(network_parent_actor);
registry.register(target_configuration);
registry.register(thread_configuration);
registry.register(breakpoint_list);
registry.register::<Self>(actor);
watcher_actor
name
}
pub fn emit_will_navigate<'a>(

View File

@@ -46,8 +46,11 @@ impl Actor for NetworkParentActor {
}
impl NetworkParentActor {
pub fn new(name: String) -> Self {
Self { name }
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self { name: name.clone() };
registry.register::<Self>(actor);
name
}
}

View File

@@ -105,9 +105,10 @@ impl Actor for TargetConfigurationActor {
}
impl TargetConfigurationActor {
pub fn new(name: String) -> Self {
Self {
name,
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
configuration: HashMap::new(),
supported_options: HashMap::from([
("cacheDisabled", false),
@@ -128,7 +129,9 @@ impl TargetConfigurationActor {
("tracerOptions", false),
("useSimpleHighlightersForReducedMotion", false),
]),
}
};
registry.register::<Self>(actor);
name
}
}

View File

@@ -49,11 +49,14 @@ impl Actor for ThreadConfigurationActor {
}
impl ThreadConfigurationActor {
pub fn new(name: String) -> Self {
Self {
name,
pub fn register(registry: &ActorRegistry) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
_configuration: HashMap::new(),
}
};
registry.register::<Self>(actor);
name
}
}

View File

@@ -27,24 +27,50 @@ pub enum WorkerType {
}
#[derive(MallocSizeOf)]
pub(crate) struct WorkerActor {
pub(crate) struct WorkerTargetActor {
pub name: String,
pub console_name: String,
pub thread: String,
pub thread_name: String,
pub worker_id: WorkerId,
pub url: ServoUrl,
pub type_: WorkerType,
pub script_chan: GenericSender<DevtoolScriptControlMsg>,
pub script_sender: GenericSender<DevtoolScriptControlMsg>,
pub streams: AtomicRefCell<FxHashSet<StreamId>>,
}
impl ResourceAvailable for WorkerActor {
impl ResourceAvailable for WorkerTargetActor {
fn actor_name(&self) -> String {
self.name.clone()
}
}
impl Actor for WorkerActor {
impl WorkerTargetActor {
pub fn register(
registry: &ActorRegistry,
console_name: String,
thread_name: String,
worker_id: WorkerId,
url: ServoUrl,
worker_type: WorkerType,
script_sender: GenericSender<DevtoolScriptControlMsg>,
) -> String {
let name = registry.new_name::<Self>();
let actor = Self {
name: name.clone(),
console_name,
thread_name,
worker_id,
url,
type_: worker_type,
script_sender,
streams: Default::default(),
};
registry.register::<Self>(actor);
name
}
}
impl Actor for WorkerTargetActor {
fn name(&self) -> String {
self.name.clone()
}
@@ -67,7 +93,7 @@ impl Actor for WorkerActor {
request.write_json_packet(&msg)?;
self.streams.borrow_mut().insert(stream_id);
// FIXME: fix messages to not require forging a pipeline for worker messages
self.script_chan
self.script_sender
.send(WantsLiveNotifications(TEST_PIPELINE_ID, true))
.unwrap();
},
@@ -76,7 +102,7 @@ impl Actor for WorkerActor {
let msg = ConnectReply {
from: self.name(),
type_: "connected".to_owned(),
thread_actor: self.thread.clone(),
thread_actor: self.thread_name.clone(),
console_actor: self.console_name.clone(),
};
// FIXME: we dont send an actual reply (message without type), which seems to be a bug?
@@ -109,7 +135,7 @@ impl Actor for WorkerActor {
fn cleanup(&self, stream_id: StreamId) {
self.streams.borrow_mut().remove(&stream_id);
if self.streams.borrow().is_empty() {
self.script_chan
self.script_sender
.send(WantsLiveNotifications(TEST_PIPELINE_ID, false))
.unwrap();
}
@@ -156,7 +182,7 @@ struct WorkerTraits {
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct WorkerActorMsg {
pub(crate) struct WorkerTargetActorMsg {
actor: String,
console_actor: String,
thread_actor: String,
@@ -169,12 +195,12 @@ pub(crate) struct WorkerActorMsg {
target_type: String,
}
impl ActorEncode<WorkerActorMsg> for WorkerActor {
fn encode(&self, _: &ActorRegistry) -> WorkerActorMsg {
WorkerActorMsg {
impl ActorEncode<WorkerTargetActorMsg> for WorkerTargetActor {
fn encode(&self, _: &ActorRegistry) -> WorkerTargetActorMsg {
WorkerTargetActorMsg {
actor: self.name(),
console_actor: self.console_name.clone(),
thread_actor: self.thread.clone(),
thread_actor: self.thread_name.clone(),
id: self.worker_id.0.to_string(),
url: self.url.to_string(),
traits: WorkerTraits {

View File

@@ -5,16 +5,29 @@
use std::path::Path;
use std::{env, fs};
use chrono::Local;
use chrono::{TimeZone, Utc};
fn main() {
println!("cargo:rerun-if-env-changed=SOURCE_DATE_EPOCH");
// Parsing as suggested on <https://reproducible-builds.org/docs/source-date-epoch/>
let now = match env::var("SOURCE_DATE_EPOCH") {
Ok(val) => Utc
.timestamp_opt(
val.parse::<i64>()
.expect("SOURCE_DATE_EPOCH should be a valid integer"),
0,
)
.unwrap(),
Err(_) => Utc::now(),
};
let build_id = now.format("%Y%m%d%H%M%S").to_string();
let path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("build_id.rs");
fs::write(
path,
format!(
"const BUILD_ID: &str = \"{}\";",
Local::now().format("%Y%m%d%H%M%S")
),
)
.unwrap();
// The build ID is used in Firefox devtools, `getDateFromBuildID` function:
// <https://searchfox.org/firefox-main/rev/be31b3948198286e39a9855e414823cb17b6e94c/devtools/client/shared/remote-debugging/version-checker.js#21-24>
// The expected format is: yyyyMMddHHmmss.
// The date is than later used to check devtools compatibility:
// <https://searchfox.org/firefox-main/rev/be31b3948198286e39a9855e414823cb17b6e94c/devtools/client/shared/remote-debugging/version-checker.js#133-139>
fs::write(path, format!("const BUILD_ID: &str = \"{build_id}\";")).unwrap();
}

View File

@@ -22,9 +22,9 @@ use std::thread;
use crossbeam_channel::{Receiver, Sender, unbounded};
use devtools_traits::{
ChromeToDevtoolsControlMsg, ConsoleLogLevel, ConsoleMessage, ConsoleMessageFields,
DevtoolScriptControlMsg, DevtoolsControlMsg, DevtoolsPageInfo, DomMutation, EnvironmentInfo,
FrameInfo, FrameOffset, NavigationState, NetworkEvent, PauseReason, ScriptToDevtoolsControlMsg,
SourceInfo, WorkerId, get_time_stamp,
DebuggerValue, DevtoolScriptControlMsg, DevtoolsControlMsg, DevtoolsPageInfo, DomMutation,
EnvironmentInfo, FrameInfo, FrameOffset, NavigationState, NetworkEvent, PauseReason,
ScriptToDevtoolsControlMsg, SourceInfo, WorkerId, get_time_stamp,
};
use embedder_traits::{AllowOrDeny, EmbedderMsg, EmbedderProxy};
use log::{trace, warn};
@@ -35,6 +35,7 @@ use rand::{RngCore, rng};
use resource::{ResourceArrayType, ResourceAvailable};
use rustc_hash::FxHashMap;
use serde::Serialize;
use serde_json::{Map, Number, Value};
use servo_base::generic_channel::{self, GenericSender};
use servo_base::id::{BrowsingContextId, PipelineId, WebViewId};
use servo_config::pref;
@@ -48,12 +49,13 @@ use crate::actors::framerate::FramerateActor;
use crate::actors::inspector::InspectorActor;
use crate::actors::inspector::walker::WalkerActor;
use crate::actors::network_event::NetworkEventActor;
use crate::actors::object::ObjectActor;
use crate::actors::pause::PauseActor;
use crate::actors::root::RootActor;
use crate::actors::source::SourceActor;
use crate::actors::thread::{ThreadActor, ThreadInterruptedReply};
use crate::actors::watcher::WatcherActor;
use crate::actors::worker::{WorkerActor, WorkerType};
use crate::actors::worker::{WorkerTargetActor, WorkerType};
use crate::id::IdMap;
use crate::network_handler::handle_network_event;
use crate::protocol::{DevtoolsConnection, JsonPacketStream};
@@ -61,6 +63,7 @@ use crate::protocol::{DevtoolsConnection, JsonPacketStream};
mod actor;
/// <https://searchfox.org/mozilla-central/source/devtools/server/actors>
mod actors {
pub mod blackboxing;
pub mod breakpoint;
pub mod browsing_context;
pub mod console;
@@ -82,6 +85,7 @@ mod actors {
pub mod root;
pub mod source;
pub mod stylesheets;
pub mod symbol_iterator;
pub mod tab;
pub mod thread;
pub mod timeline;
@@ -345,7 +349,7 @@ impl DevtoolsInstance {
column_number: css_error.column,
time_stamp: get_time_stamp(),
},
arguments: vec![css_error.msg.into()],
arguments: vec![DebuggerValue::StringValue(css_error.msg)],
stacktrace: None,
};
let console_message =
@@ -475,42 +479,33 @@ impl DevtoolsInstance {
let console_name = self.registry.new_name::<ConsoleActor>();
let parent_actor = if let Some(id) = worker_id {
let thread = ThreadActor::new(
self.registry.new_name::<ThreadActor>(),
script_sender.clone(),
None,
);
let thread_name = thread.name();
self.registry.register(thread);
let thread_name = ThreadActor::register(&self.registry, script_sender.clone(), None);
let worker_type = if page_info.is_service_worker {
WorkerType::Service
} else {
WorkerType::Dedicated
};
let worker_name = self.registry.new_name::<WorkerActor>();
let worker = WorkerActor {
name: worker_name.clone(),
console_name: console_name.clone(),
thread: thread_name,
worker_id: id,
url: page_info.url,
type_: worker_type,
script_chan: script_sender,
streams: Default::default(),
};
let worker_name = WorkerTargetActor::register(
&self.registry,
console_name.clone(),
thread_name,
id,
page_info.url,
worker_type,
script_sender,
);
let root_actor = self.registry.find::<RootActor>("root");
if page_info.is_service_worker {
root_actor
.service_workers
.borrow_mut()
.push(worker.name.clone());
.push(worker_name.clone());
} else {
root_actor.workers.borrow_mut().push(worker.name.clone());
root_actor.workers.borrow_mut().push(worker_name.clone());
}
self.actor_workers.insert(id, worker_name.clone());
self.registry.register(worker);
Root::DedicatedWorker(worker_name)
} else {
@@ -519,7 +514,8 @@ impl DevtoolsInstance {
.browsing_contexts
.entry(browsing_context_id)
.or_insert_with(|| {
let browsing_context_actor = BrowsingContextActor::new(
BrowsingContextActor::register(
&self.registry,
console_name.clone(),
devtools_browser_id,
devtools_browsing_context_id,
@@ -527,11 +523,7 @@ impl DevtoolsInstance {
pipeline_id,
devtools_outer_window_id,
script_sender.clone(),
&self.registry,
);
let browsing_context_name = browsing_context_actor.name();
self.registry.register(browsing_context_actor);
browsing_context_name
)
});
let browsing_context_actor = self
.registry
@@ -540,9 +532,7 @@ impl DevtoolsInstance {
Root::BrowsingContext(browsing_context_name.clone())
};
let console_actor = ConsoleActor::new(console_name, parent_actor);
self.registry.register(console_actor);
ConsoleActor::register(&self.registry, console_name, parent_actor);
}
fn handle_title_changed(&self, pipeline_id: PipelineId, title: String) {
@@ -600,8 +590,10 @@ impl DevtoolsInstance {
.find::<BrowsingContextActor>(browsing_context_name);
let inspector_actor = self
.registry
.find::<InspectorActor>(&browsing_context_actor.inspector);
let walker_actor = self.registry.find::<WalkerActor>(&inspector_actor.walker);
.find::<InspectorActor>(&browsing_context_actor.inspector_name);
let walker_actor = self
.registry
.find::<WalkerActor>(&inspector_actor.walker_name);
for connection in self.connections.lock().unwrap().values_mut() {
walker_actor.handle_dom_mutation(dom_mutation.clone(), connection)?;
@@ -632,7 +624,7 @@ impl DevtoolsInstance {
let worker_name = self.actor_workers.get(&worker_id)?;
Some(
self.registry
.find::<WorkerActor>(worker_name)
.find::<WorkerTargetActor>(worker_name)
.console_name
.clone(),
)
@@ -688,13 +680,11 @@ impl DevtoolsInstance {
let resource_id = self.next_resource_id;
self.next_resource_id += 1;
let network_event_name = self.registry.new_name::<NetworkEventActor>();
let network_event_actor =
NetworkEventActor::new(network_event_name.clone(), resource_id, watcher_name);
let network_event_name =
NetworkEventActor::register(&self.registry, resource_id, watcher_name);
self.actor_requests
.insert(request_id, network_event_name.clone());
self.registry.register(network_event_actor);
network_event_name
}
@@ -708,7 +698,7 @@ impl DevtoolsInstance {
let source_content = source_info
.content
.or_else(|| self.registry.inline_source_content(pipeline_id));
let source_actor = SourceActor::new_registered(
let source_actor = SourceActor::register(
&self.registry,
pipeline_id,
source_info.url,
@@ -730,14 +720,14 @@ impl DevtoolsInstance {
let thread_actor_name = self
.registry
.find::<WorkerActor>(worker_name)
.thread
.find::<WorkerTargetActor>(worker_name)
.thread_name
.clone();
let thread_actor = self.registry.find::<ThreadActor>(&thread_actor_name);
thread_actor.source_manager.add_source(&source_actor);
let worker_actor = self.registry.find::<WorkerActor>(worker_name);
let worker_actor = self.registry.find::<WorkerTargetActor>(worker_name);
for stream in self.connections.lock().unwrap().values_mut() {
worker_actor.resource_array(
@@ -760,7 +750,7 @@ impl DevtoolsInstance {
let browsing_context_actor = self
.registry
.find::<BrowsingContextActor>(browsing_context_name);
browsing_context_actor.thread.clone()
browsing_context_actor.thread_name.clone()
};
let thread_actor = self.registry.find::<ThreadActor>(&thread_actor_name);
@@ -783,8 +773,8 @@ impl DevtoolsInstance {
}
fn handle_update_source_content(&mut self, pipeline_id: PipelineId, source_content: String) {
for actor_name in self.registry.source_actor_names_for_pipeline(pipeline_id) {
let source_actor = self.registry.find::<SourceActor>(&actor_name);
for source_name in self.registry.source_actor_names_for_pipeline(pipeline_id) {
let source_actor = self.registry.find::<SourceActor>(&source_name);
let mut content = source_actor.content.borrow_mut();
if content.is_none() {
*content = Some(source_content.clone());
@@ -814,23 +804,20 @@ impl DevtoolsInstance {
let browsing_context_actor = self
.registry
.find::<BrowsingContextActor>(browsing_context_name);
let thread = self
let thread_actor = self
.registry
.find::<ThreadActor>(&browsing_context_actor.thread);
.find::<ThreadActor>(&browsing_context_actor.thread_name);
let pause = self.registry.new_name::<PauseActor>();
self.registry.register(PauseActor {
name: pause.clone(),
});
let pause_name = PauseActor::register(&self.registry);
let frame = self.registry.find::<FrameActor>(&frame_offset.actor);
frame.set_offset(frame_offset.column, frame_offset.line);
let frame_actor = self.registry.find::<FrameActor>(&frame_offset.actor);
frame_actor.set_offset(frame_offset.column, frame_offset.line);
let msg = ThreadInterruptedReply {
from: thread.name(),
from: thread_actor.name(),
type_: "paused".to_owned(),
actor: pause,
frame: frame.encode(&self.registry),
actor: pause_name,
frame: frame_actor.encode(&self.registry),
why: pause_reason,
};
@@ -856,34 +843,34 @@ impl DevtoolsInstance {
let browsing_context_actor = self
.registry
.find::<BrowsingContextActor>(browsing_context_name);
let thread = self
let thread_actor = self
.registry
.find::<ThreadActor>(&browsing_context_actor.thread);
.find::<ThreadActor>(&browsing_context_actor.thread_name);
let source = match thread
let source_name = match thread_actor
.source_manager
.find_source(&self.registry, &frame.url)
{
Some(source) => source.name(),
Some(source_actor) => source_actor.name(),
None => {
warn!("No source actor found for URL: {}", frame.url);
return;
},
};
let frame = FrameActor::register(&self.registry, source, frame);
let frame_name = FrameActor::register(&self.registry, source_name, frame);
let _ = result_sender.send(frame);
let _ = result_sender.send(frame_name);
}
fn handle_create_environment_actor(
&mut self,
result_sender: GenericSender<String>,
environment: EnvironmentInfo,
environment_info: EnvironmentInfo,
parent: Option<String>,
) {
let frame = EnvironmentActor::register(&self.registry, environment, parent);
let _ = result_sender.send(frame);
let environment_name = EnvironmentActor::register(&self.registry, environment_info, parent);
let _ = result_sender.send(environment_name);
}
}
@@ -964,3 +951,51 @@ fn handle_client(
registry.cleanup(stream_id);
}
/// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/utils.js#148>
pub(crate) fn debugger_value_to_json(registry: &ActorRegistry, value: DebuggerValue) -> Value {
let mut v = Map::new();
match value {
DebuggerValue::VoidValue => {
v.insert("type".to_owned(), Value::String("undefined".to_owned()));
Value::Object(v)
},
DebuggerValue::NullValue => {
v.insert("type".to_owned(), Value::String("null".to_owned()));
Value::Object(v)
},
DebuggerValue::BooleanValue(boolean) => Value::Bool(boolean),
DebuggerValue::NumberValue(val) => {
if val.is_nan() {
v.insert("type".to_owned(), Value::String("NaN".to_owned()));
Value::Object(v)
} else if val.is_infinite() {
if val < 0. {
v.insert("type".to_owned(), Value::String("-Infinity".to_owned()));
} else {
v.insert("type".to_owned(), Value::String("Infinity".to_owned()));
}
Value::Object(v)
} else if val == 0. && val.is_sign_negative() {
v.insert("type".to_owned(), Value::String("-0".to_owned()));
Value::Object(v)
} else {
Value::Number(Number::from_f64(val).unwrap())
}
},
DebuggerValue::StringValue(str) => Value::String(str),
DebuggerValue::ObjectValue {
uuid,
class,
preview,
..
} => {
// TODO: We should have a field called `ownPropertyLength` here
// That will show "{...}" when an object has more properties
let object_name = ObjectActor::register(registry, Some(uuid), class, preview);
let object_msg = registry.encode::<ObjectActor, _>(&object_name);
let value = serde_json::to_value(object_msg).unwrap_or_default();
Value::Object(value.as_object().cloned().unwrap_or_default())
},
}
}

View File

@@ -9,7 +9,6 @@ use std::io::{self, ErrorKind, Read, Write};
use std::net::{Shutdown, SocketAddr, TcpStream};
use std::sync::{Arc, Mutex};
use log::debug;
use malloc_size_of_derive::MallocSizeOf;
use serde::Serialize;
use serde_json::{self, Value, json};
@@ -36,53 +35,6 @@ pub trait JsonPacketStream {
fn read_json_packet(&mut self) -> Result<Option<Value>, String>;
}
impl JsonPacketStream for TcpStream {
fn write_json_packet<T: Serialize>(&mut self, message: &T) -> Result<(), ActorError> {
let s = serde_json::to_string(message).map_err(|_| ActorError::Internal)?;
debug!("<- {}", s);
write!(self, "{}:{}", s.len(), s).map_err(|_| ActorError::Internal)?;
Ok(())
}
fn read_json_packet(&mut self) -> Result<Option<Value>, String> {
// https://firefox-source-docs.mozilla.org/devtools/backend/protocol.html#stream-transport
// In short, each JSON packet is [ascii length]:[JSON data of given length]
let mut buffer = vec![];
loop {
let mut buf = [0];
let byte = match self.read(&mut buf) {
Ok(0) => return Ok(None), // EOF
Err(e) if e.kind() == ErrorKind::ConnectionReset => return Ok(None), // EOF
Ok(1) => buf[0],
Ok(_) => unreachable!(),
Err(e) => return Err(e.to_string()),
};
match byte {
b':' => {
let packet_len_str = match String::from_utf8(buffer) {
Ok(packet_len) => packet_len,
Err(_) => return Err("nonvalid UTF8 in packet length".to_owned()),
};
let packet_len = match packet_len_str.parse::<u64>() {
Ok(packet_len) => packet_len,
Err(_) => return Err("packet length missing / not parsable".to_owned()),
};
let mut packet = String::new();
self.take(packet_len)
.read_to_string(&mut packet)
.map_err(|e| e.to_string())?;
debug!("{}", packet);
return match serde_json::from_str(&packet) {
Ok(json) => Ok(Some(json)),
Err(err) => Err(err.to_string()),
};
},
c => buffer.push(c),
}
}
}
}
/// Wraps a Remote Debugging Protocol TCP stream, guaranteeing that network
/// operations are synchronized when cloning across threads.
#[derive(Clone, MallocSizeOf)]

View File

@@ -66,11 +66,11 @@ objc2-core-foundation = { workspace = true }
objc2-core-graphics = { workspace = true }
objc2-core-text = { workspace = true }
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies]
freetype-sys = { workspace = true }
servo-allocator = { workspace = true }
[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
[target.'cfg(all(any(target_os = "linux", target_os = "freebsd"), not(target_env = "ohos")))'.dependencies]
fontconfig_sys = { package = "yeslogic-fontconfig-sys", version = "6" }
[target.'cfg(target_os = "android")'.dependencies]

View File

@@ -32,7 +32,7 @@ use style::properties::style_structs::Font as FontStyleStruct;
use style::values::computed::font::{
FamilyName, FontFamilyNameSyntax, GenericFontFamily, SingleFontFamily,
};
use style::values::computed::{FontStretch, FontStyle, FontSynthesis, FontWeight, XLang};
use style::values::computed::{FontStretch, FontStyle, FontSynthesis, FontWeight};
use unicode_script::Script;
use webrender_api::{FontInstanceFlags, FontInstanceKey, FontVariation};
@@ -389,7 +389,7 @@ pub struct ShapingOptions {
/// determine the amount of spacing to apply.
pub letter_spacing: Option<Au>,
/// Spacing to add between each word. Corresponds to the CSS 2.1 `word-spacing` property.
pub word_spacing: Au,
pub word_spacing: Option<Au>,
/// The Unicode script property of the characters in this run.
pub script: Script,
/// The preferred language, obtained from the `lang` attribute.
@@ -470,7 +470,7 @@ impl Font {
/// Fast path for ASCII text that only needs simple horizontal LTR kerning.
fn shape_text_fast(&self, text: &str, options: &ShapingOptions) -> GlyphStore {
let mut glyph_store = GlyphStore::new(text, text.len(), options);
let mut glyph_store = GlyphStore::new(text.len(), options);
let mut prev_glyph_id = None;
for (string_byte_offset, byte) in text.bytes().enumerate() {
let character = byte as char;
@@ -478,26 +478,22 @@ impl Font {
continue;
};
let mut advance = advance_for_shaped_glyph(
Au::from_f64_px(self.glyph_h_advance(glyph_id)),
character,
options,
);
let mut advance = Au::from_f64_px(self.glyph_h_advance(glyph_id));
let offset = prev_glyph_id.map(|prev| {
let h_kerning = Au::from_f64_px(self.glyph_h_kerning(prev, glyph_id));
advance += h_kerning;
Point2D::new(h_kerning, Au::zero())
});
glyph_store.add_glyph(
character,
&ShapedGlyph {
glyph_id,
string_byte_offset,
advance,
offset,
},
);
let mut glyph = ShapedGlyph {
glyph_id,
string_byte_offset,
advance,
offset,
};
glyph.adjust_for_character(character, options, self);
glyph_store.add_glyph(character, &glyph);
prev_glyph_id = Some(glyph_id);
}
glyph_store
@@ -600,7 +596,7 @@ impl Deref for FontRef {
pub struct FallbackKey {
script: Script,
unicode_block: Option<UnicodeBlock>,
lang: XLang,
language: Language,
}
impl FallbackKey {
@@ -608,7 +604,7 @@ impl FallbackKey {
Self {
script: Script::from(options.character),
unicode_block: options.character.block(),
lang: options.lang.clone(),
language: options.language,
}
}
}
@@ -656,7 +652,7 @@ impl FontGroup {
font_context: &FontContext,
codepoint: char,
next_codepoint: Option<char>,
lang: XLang,
language: Language,
) -> Option<FontRef> {
// Tab characters are converted into spaces when rendering.
// TODO: We should not render a tab character. Instead they should be converted into tab stops
@@ -666,7 +662,7 @@ impl FontGroup {
_ => codepoint,
};
let options = FallbackFontSelectionOptions::new(codepoint, next_codepoint, lang);
let options = FallbackFontSelectionOptions::new(codepoint, next_codepoint, language);
let should_look_for_small_caps = self.descriptor.variant == font_variant_caps::T::SmallCaps &&
options.character.is_ascii_lowercase();
@@ -962,7 +958,7 @@ pub struct FontBaseline {
/// let mapped_weight = apply_font_config_to_style_mapping(&mapping, weight as f64);
/// ```
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
any(target_os = "linux", target_os = "macos", target_os = "freebsd"),
not(target_env = "ohos")
))]
pub(crate) fn map_platform_values_to_style_values(mapping: &[(f64, f64)], value: f64) -> f64 {
@@ -982,25 +978,3 @@ pub(crate) fn map_platform_values_to_style_values(mapping: &[(f64, f64)], value:
mapping[mapping.len() - 1].1
}
/// Computes the total advance for a glyph, taking `letter-spacing` and `word-spacing` into account.
pub(super) fn advance_for_shaped_glyph(
mut advance: Au,
character: char,
options: &ShapingOptions,
) -> Au {
if let Some(letter_spacing) = options.letter_spacing_for_character(character) {
advance += letter_spacing;
};
// CSS 2.1 § 16.4 states that "word spacing affects each space (U+0020) and non-breaking
// space (U+00A0) left in the text after the white space processing rules have been
// applied. The effect of the property on other word-separator characters is undefined."
// We elect to only space the two required code points.
if character == ' ' || character == '\u{a0}' {
// https://drafts.csswg.org/css-text-3/#word-spacing-property
advance += options.word_spacing;
}
advance
}

View File

@@ -16,6 +16,7 @@ use fonts_traits::{
};
use log::{debug, trace};
use malloc_size_of_derive::MallocSizeOf;
use net_traits::blob_url_store::UrlWithBlobClaim;
use net_traits::policy_container::PolicyContainer;
use net_traits::request::{
CredentialsMode, Destination, InsecureRequestsPolicy, Referrer, RequestBuilder, RequestClient,
@@ -646,7 +647,15 @@ impl FontContextWebFontMethods for Arc<FontContext> {
};
let rule: &FontFaceRule = lock.read_with(guard);
let Some(font_face) = rule.font_face() else {
// Per https://github.com/w3c/csswg-drafts/issues/1133 an @font-face rule
// is valid as far as the CSS parser is concerned even if it doesnt have
// a font-family or src declaration.
// However, both are required for the rule to represent an actual font face.
if rule.descriptors.font_family.is_none() {
continue;
}
let Some(ref sources) = rule.descriptors.src else {
continue;
};
@@ -661,7 +670,7 @@ impl FontContextWebFontMethods for Arc<FontContext> {
number_loading += 1;
self.start_loading_one_web_font(
Some(webview_id),
font_face.sources(),
sources,
css_font_face_descriptors,
WebFontLoadInitiator::Stylesheet(Box::new(initiator)),
document_context,
@@ -978,7 +987,7 @@ impl RemoteWebFontDownloader {
let request = RequestBuilder::new(
state.webview_id,
url.clone().into(),
UrlWithBlobClaim::from_url_without_having_claimed_blob(url.clone().into()),
Referrer::ReferrerUrl(document_context.document_url.clone()),
)
.destination(Destination::Font)

View File

@@ -243,10 +243,6 @@ pub struct GlyphStore {
/// but that may not be the case with `white-space: break-spaces`.
ends_with_whitespace: bool,
/// Whether or not this glyph store contains only a single glyph for a single
/// preserved newline.
is_single_preserved_newline: bool,
/// Whether or not this [`GlyphStore`] has right-to-left text, which has implications
/// about the order of the glyphs in the store.
is_rtl: bool,
@@ -256,7 +252,7 @@ impl GlyphStore {
/// Initializes the glyph store with the given capacity, but doesn't actually add any glyphs.
///
/// Use the `add_*` methods to store glyph data.
pub(crate) fn new(text: &str, length: usize, options: &ShapingOptions) -> Self {
pub(crate) fn new(length: usize, options: &ShapingOptions) -> Self {
Self {
glyphs: Vec::with_capacity(length),
detailed_glyphs: Default::default(),
@@ -269,7 +265,6 @@ impl GlyphStore {
ends_with_whitespace: options
.flags
.contains(ShapingFlags::ENDS_WITH_WHITESPACE_SHAPING_FLAG),
is_single_preserved_newline: text.len() == 1 && text.starts_with('\n'),
is_rtl: options.flags.contains(ShapingFlags::RTL_FLAG),
}
}
@@ -303,7 +298,7 @@ impl GlyphStore {
};
let mut previous_character_offset = None;
let mut glyph_store = GlyphStore::new(text, shaped_glyph_data.len(), options);
let mut glyph_store = GlyphStore::new(shaped_glyph_data.len(), options);
for mut shaped_glyph in shaped_glyph_data.iter() {
// The glyph "cluster" (HarfBuzz terminology) is the byte offset in the string that
// this glyph corresponds to. More than one glyph can share a cluster.
@@ -389,12 +384,6 @@ impl GlyphStore {
self.is_whitespace
}
/// Whether or not this [`GlyphStore`] is a single preserved newline.
#[inline]
pub fn is_single_preserved_newline(&self) -> bool {
self.is_single_preserved_newline
}
/// Whether or not this [`GlyphStore`] ends with whitespace.
#[inline]
pub fn ends_with_whitespace(&self) -> bool {
@@ -540,7 +529,7 @@ impl ShapedGlyph {
/// TODO: This should all likely move to layout. In particular, proper tab stops
/// are context sensitive and be based on the size of the space character in the
/// inline formatting context.
fn adjust_for_character(
pub(crate) fn adjust_for_character(
&mut self,
character: char,
shaping_options: &ShapingOptions,
@@ -561,9 +550,11 @@ impl ShapedGlyph {
// space (U+00A0) left in the text after the white space processing rules have been
// applied. The effect of the property on other word-separator characters is undefined."
// We elect to only space the two required code points.
if character == ' ' || character == '\u{a0}' {
// https://drafts.csswg.org/css-text-3/#word-spacing-property
self.advance += shaping_options.word_spacing;
if let Some(word_spacing) = shaping_options.word_spacing {
if character == ' ' || character == '\u{a0}' {
// https://drafts.csswg.org/css-text-3/#word-spacing-property
self.advance += word_spacing;
}
}
}
}

View File

@@ -28,9 +28,9 @@ pub use font_store::FontTemplates;
pub use fonts_traits::*;
pub(crate) use glyph::*;
pub use glyph::{GlyphInfo, GlyphStore};
use icu_locid::subtags::Language;
pub use platform::font_list::fallback_font_families;
pub(crate) use shapers::*;
use style::values::computed::XLang;
pub use system_font_service::SystemFontService;
use unicode_properties::{EmojiStatus, UnicodeEmoji, emoji};
@@ -47,7 +47,7 @@ pub(crate) enum EmojiPresentationPreference {
pub struct FallbackFontSelectionOptions {
pub(crate) character: char,
pub(crate) presentation_preference: EmojiPresentationPreference,
pub(crate) lang: XLang,
pub(crate) language: Language,
}
impl Default for FallbackFontSelectionOptions {
@@ -55,13 +55,13 @@ impl Default for FallbackFontSelectionOptions {
Self {
character: ' ',
presentation_preference: EmojiPresentationPreference::None,
lang: XLang::get_initial_value(),
language: Language::UND,
}
}
}
impl FallbackFontSelectionOptions {
pub(crate) fn new(character: char, next_character: Option<char>, lang: XLang) -> Self {
pub(crate) fn new(character: char, next_character: Option<char>, language: Language) -> Self {
let presentation_preference = match next_character {
Some(next_character) if emoji::is_emoji_presentation_selector(next_character) => {
EmojiPresentationPreference::Emoji
@@ -89,7 +89,7 @@ impl FallbackFontSelectionOptions {
Self {
character,
presentation_preference,
lang,
language,
}
}
}

View File

@@ -19,12 +19,13 @@ use fontconfig_sys::{
FcPatternDestroy, FcPatternGetInteger, FcPatternGetString, FcResultMatch, FcSetSystem,
};
use fonts_traits::{FontTemplate, FontTemplateDescriptor, LocalFontIdentifier};
use icu_locid::subtags::language;
use libc::{c_char, c_int};
use log::debug;
use servo_base::text::{UnicodeBlock, UnicodeBlockMethod};
use style::Atom;
use style::values::computed::font::GenericFontFamily;
use style::values::computed::{FontStretch, FontStyle, FontWeight, XLang};
use style::values::computed::{FontStretch, FontStyle, FontWeight};
use unicode_script::Script;
use crate::font::map_platform_values_to_style_values;
@@ -188,13 +189,13 @@ pub fn fallback_font_families(options: FallbackFontSelectionOptions) -> Vec<&'st
// In Japanese typography, it is not common to use different fonts
// for Kanji(Han), Hiragana, and Katakana within the same document.
// We uniformly fallback to Japanese fonts when the document language is Japanese.
_ if options.lang == XLang(Atom::from("ja")) => {
_ if options.language == language!("ja") => {
families.push("TakaoPGothic");
},
_ if matches!(
Script::from(options.character),
Script::Bopomofo | Script::Han
) && options.lang != XLang(Atom::from("ja")) =>
) && options.language != language!("ja") =>
{
families.push("WenQuanYi Micro Hei");
},

View File

@@ -5,7 +5,10 @@
pub mod font;
mod freetype_face;
#[cfg(all(target_os = "linux", not(target_env = "ohos"), not(ohos_mock)))]
#[cfg(any(
all(target_os = "linux", not(target_env = "ohos"), not(ohos_mock)),
target_os = "freebsd"
))]
pub mod font_list;
#[cfg(target_os = "android")]

View File

@@ -3,12 +3,15 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::collections::HashMap;
use std::ffi::OsStr;
use std::fs::File;
use std::os::unix::ffi::OsStrExt;
use std::path::{Path, PathBuf};
use std::sync::LazyLock;
use std::{fs, io};
use log::{debug, error, warn};
use read_fonts::FileRef::{Collection, Font as OHOS_Font};
use read_fonts::{FileRef, FontRef, TableProvider};
use servo_base::text::{UnicodeBlock, UnicodeBlockMethod};
use style::Atom;
use style::values::computed::font::GenericFontFamily;
@@ -95,105 +98,59 @@ fn enumerate_font_files() -> io::Result<Vec<PathBuf>> {
Ok(font_list)
}
fn detect_hos_font_style(font_modifiers: &[&str]) -> Option<String> {
if font_modifiers.contains(&"Italic") {
fn detect_hos_font_style(font: &FontRef, file_path: &str) -> Option<String> {
// This implementation uses the postscript (post) table, which is one of the mandatory tables
// according to TrueType's reference manual (https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html).
// Therefore, raise an error if Fontations fails to read this table for some reason.
// If angle is 0, then the font style is normal. otherwise, italic.
if font
.post()
.unwrap_or_else(|_| {
panic!("Failed to read {:?}'s postscript table!", file_path);
})
.italic_angle() !=
(0 as i32).into()
{
Some("italic".to_string())
} else {
None
}
}
// Note: The weights here are taken from the `alias` section of the fontconfig.json
fn detect_hos_font_weight_alias(font_modifiers: &[&str]) -> Option<i32> {
if font_modifiers.contains(&"Light") {
Some(100)
} else if font_modifiers.contains(&"Regular") {
Some(400)
} else if font_modifiers.contains(&"Medium") {
Some(700)
} else if font_modifiers.contains(&"Bold") {
Some(900)
} else {
None
fn detect_hos_font_weight_alias(font: &FontRef) -> Option<i32> {
// According to TrueType's reference manual (https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html),
// os2 is an optional table. Therefore, if Fontations fails to read this table, we don't treat this as an error
// and we simply return `None`.
match font.os2() {
Ok(result) => Some(result.us_weight_class() as i32),
Err(_) => None,
}
}
fn noto_weight_alias(alias: &str) -> Option<i32> {
match alias.to_ascii_lowercase().as_str() {
"thin" => Some(100),
"extralight" => Some(200),
"light" => Some(300),
"regular" => Some(400),
"medium" => Some(500),
"semibold" => Some(600),
"bold" => Some(700),
"extrabold" => Some(800),
"black" => Some(900),
_unknown_alias => {
warn!("Unknown weight alias `{alias}` encountered.");
None
},
}
}
fn detect_hos_font_width(font_modifiers: &[&str]) -> FontWidth {
if font_modifiers.contains(&"Condensed") {
FontWidth::Condensed
} else {
FontWidth::Normal
}
}
/// Split a Noto font filename into the family name with spaces
///
/// E.g. `NotoSansTeluguUI` -> `Noto Sans Telugu UI`
/// Or for older OH 4.1 fonts: `NotoSans_JP_Bold` -> `Noto Sans JP Bold`
fn split_noto_font_name(name: &str) -> Vec<String> {
let mut name_components = vec![];
let mut current_word = String::new();
let mut chars = name.chars();
// To not split acronyms like `UI` or `CJK`, we only start a new word if the previous
// char was not uppercase.
let mut previous_char_was_uppercase = true;
if let Some(first) = chars.next() {
current_word.push(first);
for c in chars {
if c.is_uppercase() {
if !previous_char_was_uppercase {
name_components.push(current_word.clone());
current_word = String::new();
}
previous_char_was_uppercase = true;
current_word.push(c)
} else if c == '_' {
name_components.push(current_word.clone());
current_word = String::new();
previous_char_was_uppercase = true;
// Skip the underscore itself
fn detect_hos_font_width(font: &FontRef) -> FontWidth {
// According to TrueType's reference manual (https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html),
// os2 is an optional table. Therefore, if Fontations fails to read this table, we don't treat this as an error
// and we simply return `FontWidth::Normal` as a default.
match font.os2() {
Ok(result) => {
let font_width = result.us_width_class().clone();
// According to https://learn.microsoft.com/en-us/typography/opentype/spec/os2#uswidthclass,
// value between 1 & 4 inclusive represents condensed type.
if font_width >= 1 && font_width <= 4 {
FontWidth::Condensed
} else {
previous_char_was_uppercase = false;
current_word.push(c)
FontWidth::Normal
}
}
},
Err(_) => FontWidth::Normal,
}
if !current_word.is_empty() {
name_components.push(current_word);
}
name_components
}
/// Parse the font file names to determine the available FontFamilies
///
/// Note: For OH 5.0+ this function is intended to only be a fallback path, if parsing the
/// `fontconfig.json` fails for some reason. Beta 1 of OH 5.0 still has a bug in the fontconfig.json
/// though, so the "normal path" is currently unimplemented.
fn parse_font_filenames(font_files: Vec<PathBuf>) -> Vec<FontFamily> {
let harmonyos_prefix = "HarmonyOS_Sans";
let weight_aliases = ["Light", "Regular", "Medium", "Bold"];
let style_modifiers = ["Italic"];
let width_modifiers = ["Condensed"];
/// This function generates list of `FontFamily` based on font files with the extension `.otf`, `.ttc`, or `.otf`.
/// If a font file's extension is .ttc, then all the font within it will be processed one by one.
#[servo_tracing::instrument(skip_all)]
fn get_system_font_families(font_files: Vec<PathBuf>) -> Vec<FontFamily> {
let mut families: HashMap<String, Vec<Font>> = HashMap::new();
let font_files: Vec<PathBuf> = font_files
@@ -211,77 +168,36 @@ fn parse_font_filenames(font_files: Vec<PathBuf>) -> Vec<FontFamily> {
})
.collect();
let harmony_os_fonts = font_files.iter().filter_map(|file_path| {
let stem = file_path.file_stem()?.to_str()?;
let stem_no_prefix = stem.strip_prefix(harmonyos_prefix)?;
let name_components: Vec<&str> = stem_no_prefix.split('_').collect();
let style = detect_hos_font_style(&name_components);
let weight = detect_hos_font_weight_alias(&name_components);
let width = detect_hos_font_width(&name_components);
let mut all_families = Vec::new();
let mut name_components = name_components;
// If we remove all the modifiers, we are left with the family name
name_components.retain(|component| {
!weight_aliases.contains(component) &&
!style_modifiers.contains(component) &&
!width_modifiers.contains(component) &&
!component.is_empty()
});
name_components.insert(0, "HarmonyOS Sans");
let family_name = name_components.join(" ");
let font = Font {
filepath: file_path.to_str()?.to_string(),
weight,
style,
width,
for font_file in font_files.iter() {
let Ok(font_bytes) =
File::open(font_file).and_then(|file| unsafe { memmap2::Mmap::map(&file) })
else {
continue;
};
let Ok(file_ref) = FileRef::new(&font_bytes) else {
continue;
};
Some((family_name, font))
});
let noto_fonts = font_files.iter().filter_map(|file_path| {
let stem = file_path.file_stem()?.to_str()?;
// Filter out non-noto fonts
if !stem.starts_with("Noto") {
return None;
match file_ref {
OHOS_Font(font) => {
if let Some(result) = get_family_name_and_generate_font_struct(&font, &font_file) {
all_families.push(result);
}
},
Collection(font_collection) => {
// Process all the font files within the collection one by one.
for f in font_collection.iter() {
if let Some(result) =
get_family_name_and_generate_font_struct(&(f.unwrap()), &font_file)
{
all_families.push(result);
};
}
},
}
// Strip the weight alias from the filename, e.g. `-Regular` or `_Regular`.
// We use `rsplit_once()`, since there is e.g. `NotoSansPhags-Pa-Regular.ttf`, where the
// Pa is part of the font family name and not a modifier.
// There seem to be no more than one modifier at once per font filename.
let (base, weight) = if let Some((stripped_base, weight_suffix)) =
stem.rsplit_once("-").or_else(|| stem.rsplit_once("_"))
{
(stripped_base, noto_weight_alias(weight_suffix))
} else {
(stem, None)
};
// Do some special post-processing for `NotoSansPhags-Pa-Regular.ttf` and any friends.
let base = if base.contains("-") {
if !base.ends_with("-Pa") {
warn!("Unknown `-` pattern in Noto font filename: {base}");
}
// Note: We assume here that the following character is uppercase, so that
// the word splitting later functions correctly.
base.replace("-", "")
} else {
base.to_string()
};
// Remove suffixes `[wght]` or `[wdth,wght]`. These suffixes seem to be mutually exclusive
// with the weight alias suffixes from before.
let base_name = base
.strip_suffix("[wght]")
.or_else(|| base.strip_suffix("[wdth,wght]"))
.unwrap_or(base.as_str());
let family_name = split_noto_font_name(base_name).join(" ");
let font = Font {
filepath: file_path.to_str()?.to_string(),
weight,
..Default::default()
};
Some((family_name, font))
});
let all_families = harmony_os_fonts.chain(noto_fonts);
}
for (family_name, font) in all_families {
if let Some(font_list) = families.get_mut(&family_name) {
@@ -297,6 +213,49 @@ fn parse_font_filenames(font_files: Vec<PathBuf>) -> Vec<FontFamily> {
.collect()
}
fn get_family_name_and_generate_font_struct(
font_ref: &FontRef,
file_path: &PathBuf,
) -> Option<(String, Font)> {
// Parse the file path to string. If this fails, then skip this font.
let Some(file_path_string_slice) = file_path.to_str() else {
return None;
};
let file_path_str = file_path_string_slice.to_string();
// Obtain the font's styling
let style = detect_hos_font_style(font_ref, file_path_string_slice);
let weight = detect_hos_font_weight_alias(font_ref);
let width = detect_hos_font_width(font_ref);
// Get the family name via the name table. According to TrueType's reference manual (https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html),
// the name table is a mandatory table. Therefore, if Fontations fails to read this table for whatever reason, return `None` to skip this font altogether.
let Ok(font_name_table) = font_ref.name() else {
return None;
};
let Some(family_name) = font_name_table
.name_record()
.iter()
.filter(|record| record.name_id().to_u16() == 1) // According to the reference manual, name identifier code (nameID) `1` is the font family name.
.find_map(|record| {
record
.string(font_name_table.string_data())
.ok()
.map(|s| s.to_string())
})
else {
return None;
};
let font = Font {
filepath: file_path_str,
weight,
style,
width,
};
Some((family_name, font))
}
impl FontList {
fn new() -> FontList {
FontList {
@@ -309,7 +268,7 @@ impl FontList {
fn detect_installed_font_families() -> Vec<FontFamily> {
let mut families = enumerate_font_files()
.inspect_err(|e| error!("Failed to enumerate font files due to `{e:?}`"))
.map(parse_font_filenames)
.map(get_system_font_families)
.unwrap_or_else(|_| FontList::fallback_font_families());
families.extend(Self::hardcoded_font_families());
families
@@ -543,20 +502,23 @@ pub fn fallback_font_families(options: FallbackFontSelectionOptions) -> Vec<&'st
UnicodeBlock::HangulJamoExtendedA |
UnicodeBlock::HangulJamoExtendedB |
UnicodeBlock::HangulSyllables => {
families.push("Noto Sans CJK");
families.push("Noto Serif CJK");
families.push("Noto Sans CJK KR");
families.push("Noto Sans Mono CJK KR");
families.push("Noto Serif CJK KR");
families.push("Noto Sans KR");
},
UnicodeBlock::Hiragana |
UnicodeBlock::Katakana |
UnicodeBlock::KatakanaPhoneticExtensions => {
families.push("Noto Sans CJK");
families.push("Noto Serif CJK");
families.push("Noto Sans CJK JP");
families.push("Noto Sans Mono CJK JP");
families.push("Noto Serif CJK JP");
families.push("Noto Sans JP");
},
UnicodeBlock::HalfwidthandFullwidthForms => {
families.push("HarmonyOS Sans SC");
families.push("Noto Sans CJK");
families.push("Noto Sans CJK SC");
families.push("Noto Sans Mono CJK SC");
},
_ => {},
}
@@ -590,31 +552,14 @@ mod test {
use std::path::PathBuf;
#[test]
fn split_noto_font_name_test() {
use super::split_noto_font_name;
assert_eq!(
split_noto_font_name("NotoSansSinhala"),
vec!["Noto", "Sans", "Sinhala"]
);
assert_eq!(
split_noto_font_name("NotoSansTamilUI"),
vec!["Noto", "Sans", "Tamil", "UI"]
);
assert_eq!(
split_noto_font_name("NotoSerifCJK"),
vec!["Noto", "Serif", "CJK"]
);
}
#[test]
fn test_parse_font_filenames() {
use super::parse_font_filenames;
let families = parse_font_filenames(vec![PathBuf::from("NotoSansCJK-Regular.ttc")]);
fn test_get_system_font_families() {
use super::get_system_font_families;
let families = get_system_font_families(vec![PathBuf::from("NotoSansCJK-Regular.ttc")]);
assert_eq!(families.len(), 1);
let family = families.first().unwrap();
assert_eq!(family.name, "Noto Sans CJK".to_string());
let families = parse_font_filenames(vec![
let families = get_system_font_families(vec![
PathBuf::from("NotoSerifGeorgian[wdth,wght].ttf"),
PathBuf::from("HarmonyOS_Sans_Naskh_Arabic_UI.ttf"),
PathBuf::from("HarmonyOS_Sans_Condensed.ttf"),
@@ -627,34 +572,6 @@ mod test {
assert_eq!(families.len(), 4);
}
#[test]
fn test_parse_noto_sans_phags_pa() {
use super::parse_font_filenames;
let families = parse_font_filenames(vec![PathBuf::from("NotoSansPhags-Pa-Regular.ttf")]);
let family = families.first().unwrap();
assert_eq!(family.name, "Noto Sans Phags Pa");
}
#[test]
fn test_old_noto_sans() {
use super::parse_font_filenames;
let families = parse_font_filenames(vec![
PathBuf::from("NotoSans_JP_Regular.otf"),
PathBuf::from("NotoSans_KR_Regular.otf"),
PathBuf::from("NotoSans_JP_Bold.otf"),
]);
assert_eq!(families.len(), 2, "actual families: {families:?}");
let first_family = families.first().unwrap();
let second_family = families.last().unwrap();
// We don't have a requirement on the order of the family names,
// we just want to test existence.
let names = [first_family.name.as_str(), second_family.name.as_str()];
assert!(names.contains(&"Noto Sans JP"));
assert!(names.contains(&"Noto Sans KR"));
}
#[test]
fn print_detected_families() {
let list = super::FontList::detect_installed_font_families();

View File

@@ -472,17 +472,17 @@ impl Font {
// the value stored in the HTML lang attribute is a BCP 47 language tag. These two
// formats are generally compatible, but we may need to make refinements here in
// the future.
let language = CFString::from_str(&options.lang.0);
let language = if !options.language.is_empty() {
Some(&*CFString::from_str(options.language.as_str()))
} else {
None
};
let string = CFString::from_str(&options.character.to_string());
let font = unsafe {
self.handle.ctfont.for_string_with_language(
&string,
CFRange::new(0, string.length()),
if !options.lang.0.is_empty() {
Some(&*language)
} else {
None
},
language,
)
};

View File

@@ -5,6 +5,7 @@
use std::ffi::c_void;
use fonts_traits::LocalFontIdentifier;
use icu_locid::subtags::language;
use log::debug;
use objc2_core_foundation::{CFDictionary, CFRetained, CFSet, CFString, CFType, CFURL};
use objc2_core_text::{
@@ -13,7 +14,6 @@ use objc2_core_text::{
};
use servo_base::text::{UnicodeBlock, UnicodeBlockMethod, unicode_plane};
use style::Atom;
use style::values::computed::XLang;
use style::values::computed::font::GenericFontFamily;
use unicode_script::Script;
@@ -132,7 +132,7 @@ pub fn fallback_font_families(options: FallbackFontSelectionOptions) -> Vec<&'st
// In Japanese typography, it is not common to use different fonts
// for Kanji(Han), Hiragana, and Katakana within the same document. Since Hiragino supports
// a comprehensive set of Japanese kanji, we uniformly fallback to Hiragino for all Japanese text.
_ if options.lang == XLang(Atom::from("ja")) => {
_ if options.language == language!("ja") => {
families.push("Hiragino Sans");
families.push("Hiragino Kaku Gothic ProN");
},
@@ -141,7 +141,7 @@ pub fn fallback_font_families(options: FallbackFontSelectionOptions) -> Vec<&'st
// language font to try for fallback is rather arbitrary. Usually, though,
// we hope that font prefs will have handled this earlier.
_ if matches!(script, Script::Bopomofo | Script::Han) &&
options.lang != XLang(Atom::from("ja")) =>
options.language != language!("ja") =>
{
// TODO: Need to differentiate between traditional and simplified Han here!
families.push("Songti SC");

View File

@@ -3,32 +3,32 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
any(target_os = "linux", target_os = "macos", target_os = "freebsd"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use servo_base::text::{UnicodeBlock, UnicodeBlockMethod};
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
any(target_os = "linux", target_os = "macos", target_os = "freebsd"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use unicode_script::Script;
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
any(target_os = "linux", target_os = "macos", target_os = "freebsd"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use crate::FallbackFontSelectionOptions;
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))]
pub use crate::platform::freetype::{font, font_list};
#[cfg(target_os = "macos")]
pub use crate::platform::macos::{core_text_font_cache, font, font_list};
#[cfg(target_os = "windows")]
pub use crate::platform::windows::{font, font_list};
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))]
pub mod freetype;
#[cfg(target_os = "macos")]
@@ -45,7 +45,7 @@ mod windows {
}
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
any(target_os = "linux", target_os = "macos", target_os = "freebsd"),
not(target_os = "android"),
not(target_env = "ohos")
))]

View File

@@ -77,7 +77,7 @@ fn test_font_can_do_fast_shaping() {
// Fast shaping requires a font with a kern table and no GPOS or GSUB tables.
let shaping_options = ShapingOptions {
letter_spacing: None,
word_spacing: Au::zero(),
word_spacing: None,
script: Script::Latin,
language: Language::UND,
flags: ShapingFlags::empty(),
@@ -88,7 +88,7 @@ fn test_font_can_do_fast_shaping() {
// Non-Latin script should never have fast shaping.
let shaping_options = ShapingOptions {
letter_spacing: None,
word_spacing: Au::zero(),
word_spacing: None,
script: Script::Cherokee,
language: Language::UND,
flags: ShapingFlags::empty(),
@@ -99,7 +99,7 @@ fn test_font_can_do_fast_shaping() {
// Right-to-left text should never use fast shaping.
let shaping_options = ShapingOptions {
letter_spacing: None,
word_spacing: Au::zero(),
word_spacing: None,
script: Script::Latin,
language: Language::UND,
flags: ShapingFlags::RTL_FLAG,

View File

@@ -21,6 +21,7 @@ mod font_context {
PlatformFontMethods, SystemFontServiceMessage, SystemFontServiceProxy,
SystemFontServiceProxySender, fallback_font_families,
};
use icu_locid::subtags::Language;
use net_traits::{ResourceThreads, start_fetch_thread};
use paint_api::CrossProcessPaintApi;
use parking_lot::Mutex;
@@ -30,7 +31,6 @@ mod font_context {
use style::computed_values::font_optical_sizing::T as FontOpticalSizing;
use style::properties::longhands::font_variant_caps::computed_value::T as FontVariantCaps;
use style::properties::style_structs::Font as FontStyleStruct;
use style::values::computed::XLang;
use style::values::computed::font::{
FamilyName, FontFamily, FontFamilyList, FontFamilyNameSyntax, FontStretch, FontStyle,
FontSynthesis, FontWeight, SingleFontFamily,
@@ -264,7 +264,7 @@ mod font_context {
let group = context.context.font_group(ServoArc::new(style));
let font = group
.find_by_codepoint(&mut context.context, 'a', None, XLang::get_initial_value())
.find_by_codepoint(&mut context.context, 'a', None, Language::UND)
.unwrap();
assert_eq!(&font_face_name(&font.identifier()), "csstest-ascii");
assert_eq!(
@@ -277,7 +277,7 @@ mod font_context {
);
let font = group
.find_by_codepoint(&mut context.context, 'a', None, XLang::get_initial_value())
.find_by_codepoint(&mut context.context, 'a', None, Language::UND)
.unwrap();
assert_eq!(&font_face_name(&font.identifier()), "csstest-ascii");
assert_eq!(
@@ -290,7 +290,7 @@ mod font_context {
);
let font = group
.find_by_codepoint(&mut context.context, 'á', None, XLang::get_initial_value())
.find_by_codepoint(&mut context.context, 'á', None, Language::UND)
.unwrap();
assert_eq!(&font_face_name(&font.identifier()), "csstest-basic-regular");
assert_eq!(
@@ -313,7 +313,7 @@ mod font_context {
let group = context.context.font_group(ServoArc::new(style));
let font = group
.find_by_codepoint(&mut context.context, 'a', None, XLang::get_initial_value())
.find_by_codepoint(&mut context.context, 'a', None, Language::UND)
.unwrap();
assert_eq!(
&font_face_name(&font.identifier()),
@@ -322,7 +322,7 @@ mod font_context {
);
let font = group
.find_by_codepoint(&mut context.context, 'á', None, XLang::get_initial_value())
.find_by_codepoint(&mut context.context, 'á', None, Language::UND)
.unwrap();
assert_eq!(
&font_face_name(&font.identifier()),

View File

@@ -1,6 +1,6 @@
[package]
name = "servo-hyper-serde"
version = "0.13.2"
version.workspace = true
edition.workspace = true
authors = ["The Servo Project Developers"]
description = "Serde support for hyper types."

View File

@@ -19,6 +19,7 @@ doctest = false
tracing = ["dep:tracing"]
[dependencies]
accesskit = { workspace = true }
app_units = { workspace = true }
atomic_refcell = { workspace = true }
bitflags = { workspace = true }
@@ -27,8 +28,9 @@ embedder_traits = { workspace = true }
euclid = { workspace = true }
fonts = { workspace = true }
fonts_traits = { workspace = true }
html5ever = { workspace = true }
web_atoms = { workspace = true }
icu_locid = { workspace = true }
icu_properties = { workspace = true, features = ["compiled_data"] }
icu_segmenter = { workspace = true }
itertools = { workspace = true }
kurbo = { workspace = true }
@@ -46,6 +48,7 @@ rustc-hash = { workspace = true }
script = { workspace = true }
script_traits = { workspace = true }
selectors = { workspace = true }
serde = { workspace = true }
servo_arc = { workspace = true }
servo-base = { workspace = true }
servo-config = { workspace = true }
@@ -64,7 +67,6 @@ unicode-script = { workspace = true }
unicode_categories = { workspace = true }
url = { workspace = true }
webrender_api = { workspace = true }
xi-unicode = { workspace = true }
[dev-dependencies]
num-traits = { workspace = true }

Some files were not shown because too many files have changed in this diff Show More