Commit graph

51457 commits

Author SHA1 Message Date
sagudev
5cdb0865ba
canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793)
`surface()` returns `SourceSurface` which is/was meant as optimization
when passing from canvas to canvas (in vello that would be wgpu texture;
but raquote does not really have this) while bytes returns something
that must impl AsRef<[u8]> (this is more generic then `&[u8]` as it
allows us to have type with drop impl - wgpu's BufferView).

Testing: This is just refactoring (protected by rust), but there are WPT
tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-05-01 14:18:56 +00:00
Martin Robinson
0d21992edd
script: Clamp table spans according to the HTML specification (#36703)
Previously, spans were partially clamped during layout, but this means
that accessing and setting these properties via script wouldn't behave
according to the HTML specification. In addition, the value wasn't
floored in layout, so could lead to panics. This change improves
clamping and moves it to script.
    
Testing: This change includes a new WPT test.
Fixes #36699.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-05-01 13:25:34 +00:00
Martin Robinson
b10fc49e8a
deps: Upgrade to latest version of our downstream WebRender fork (0.67) (#36770)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Fixes: #36717.
Testing: This is covered by existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-05-01 11:16:41 +00:00
sagudev
d1f7a90619
canvas: Move CompositionOrBlending and ellipse() from RaqoteBackend to Backend (#36790)
Small fixes of abstraction.

We do not need to generalize `CompositionOrBlending`, because it's from
canvas_traits.
Ellipse impl that uses arc is not backend specific, so it serves as good
trait default.

Reviewable per commit.


Testing: Only refactoring, but there are WPT tests

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-05-01 09:57:20 +00:00
Simon Wülker
cfc7115867
Send info about the DocumentType node to the devtools inspector (#36787)
This makes the DOCTYPE tag show up correctly in the inspector.

Before:

![image](https://github.com/user-attachments/assets/fd101337-95ce-45ee-8ac5-ae701109eb94)

After:

![image](https://github.com/user-attachments/assets/4e80f4c0-6ae4-4c53-88ca-614803caa032)


Testing: We don't have devtools tests

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-01 06:37:23 +00:00
sagudev
be0f4470c7
Use backend trait with associated types for 2d canvas backends abstraction (#36783)
Current abstraction was leaky and very hard to understand/impl because
it was so intervened with actual implementation.

Now we generalize both `CanvasState` and `CanvasData` over `B: Beckend`,
meaning that every type/method must be part of trait interface (that
lives in `beckend.rs`). Using associated trait types instead of `Box<dyn
>` allows us too remove the need for wrapper types (and `to_raquote()`
methods) as we can implement helper traits on (foreign) raquote types.
The only time we actually do dispatch (by enum) is at `Canvas` methods.

Implementation now only need to implement all backend traits and
helpers. I tried to restrain myself from actually cleaning abstraction
(where possible), to keep this change as much mechanical as possible,
but we should absolutely do that as a follow up.

Testing: Rust as we only do refactor, but there are also WPT tests

try run: 1476065852

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-05-01 04:16:23 +00:00
Simon Wülker
8c318af307
Fix mach test-jquery (#36786)
Fixes https://github.com/servo/servo/issues/36740

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-01 01:56:15 +00:00
Simon Wülker
d8c2a7eaf1
Set cryptographic nonce metadata for module script fetch operations (#36776)
This fixes a bunch of CSP errors on reddit.com

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-30 20:53:24 +00:00
dependabot[bot]
53107ec157
build(deps): bump synstructure from 0.13.1 to 0.13.2 (#36778)
Bumps [synstructure](https://github.com/mystor/synstructure) from 0.13.1
to 0.13.2.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/mystor/synstructure/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=synstructure&package-manager=cargo&previous-version=0.13.1&new-version=0.13.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-30 20:45:30 +00:00
Servo WPT Sync
bfa0a61375
Sync WPT with upstream (30-04-2025) (#36785)
Automated downstream sync of changes from upstream as of 30-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-04-30 19:46:03 +00:00
sagudev
c3fcefdc32
Let (Offscreen)RenderingContext implement CanvasContext (#36712)
this allows us to simplify canvas element/offscreen impl to only call
CanvasContext implementations (no more match statements).

This will help with impl more offscreen canvas contextl.

Testing: WPT and rustc

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-30 18:52:57 +00:00
dependabot[bot]
772f0b2df9
build(deps): bump sha2 from 0.10.8 to 0.10.9 (#36780)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.8 to
0.10.9.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="82c36a428f"><code>82c36a4</code></a>
sha2: add soft-compact backend (backport of <a
href="https://redirect.github.com/RustCrypto/hashes/issues/686">#686</a>)
(<a
href="https://redirect.github.com/RustCrypto/hashes/issues/687">#687</a>)</li>
<li><a
href="c1e85ae6d5"><code>c1e85ae</code></a>
ci: remove pre-1.56 jobs and other fixes (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/688">#688</a>)</li>
<li><a
href="a667dd94f9"><code>a667dd9</code></a>
skein: fix implementation for output sizes not multiple of 8 (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/682">#682</a>)</li>
<li><a
href="62b6ff1c59"><code>62b6ff1</code></a>
Fix blake2 and ascon-hash CI (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/521">#521</a>)</li>
<li><a
href="f3b657cfac"><code>f3b657c</code></a>
Expose belt_compress to public (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/520">#520</a>)</li>
<li><a
href="9f66cb810c"><code>9f66cb8</code></a>
md4: Optimize compress to improve hash performance (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/519">#519</a>)</li>
<li><a
href="70a2b62c50"><code>70a2b62</code></a>
Add simpler code snippet to the documentation (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/515">#515</a>)</li>
<li><a
href="e3ab2579a0"><code>e3ab257</code></a>
Update Cargo.lock</li>
<li><a
href="c640781bc1"><code>c640781</code></a>
ascon-hash: Add Zeroize feature (<a
href="https://redirect.github.com/RustCrypto/hashes/issues/480">#480</a>)</li>
<li><a
href="cfda39f5cf"><code>cfda39f</code></a>
Update Cargo.lock</li>
<li>See full diff in <a
href="https://github.com/RustCrypto/hashes/compare/sha2-v0.10.8...sha2-v0.10.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sha2&package-manager=cargo&previous-version=0.10.8&new-version=0.10.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-30 18:00:27 +00:00
dependabot[bot]
ad1f7ceea4
build(deps): bump wayland-backend from 0.3.9 to 0.3.10 (#36781)
Bumps [wayland-backend](https://github.com/smithay/wayland-rs) from
0.3.9 to 0.3.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 />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wayland-backend&package-manager=cargo&previous-version=0.3.9&new-version=0.3.10)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-30 17:59:39 +00:00
dependabot[bot]
f5134efa0e
build(deps): bump webpki-roots from 0.26.9 to 0.26.10 (#36779)
Bumps [webpki-roots](https://github.com/rustls/webpki-roots) from 0.26.9
to 0.26.10.
<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>0.26.10</h2>
<p>Incorporates CCADB April updates.</p>
<p>Roots removed due to <a
href="https://wiki.mozilla.org/CA/Root_CA_Lifecycles">https://wiki.mozilla.org/CA/Root_CA_Lifecycles</a>
/ <a
href="https://bugzilla.mozilla.org/show_bug.cgi?id=1957685">https://bugzilla.mozilla.org/show_bug.cgi?id=1957685</a>:</p>
<ul>
<li>&quot;AAA Certificate Services&quot;</li>
<li>&quot;Baltimore CyberTrust Root&quot;</li>
<li>&quot;Entrust.net Certification Authority (2048)&quot;</li>
<li>&quot;GlobalSign Root CA&quot;</li>
<li>&quot;Go Daddy Class 2 Certification Authority&quot;</li>
<li>&quot;Starfield Class 2 Certification Authority&quot;</li>
<li>&quot;XRamp Global Certification Authority&quot;</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>0.26.10: April CCADB updates by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/96">rustls/webpki-roots#96</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki-roots/compare/v/0.26.9...v/0.26.10">https://github.com/rustls/webpki-roots/compare/v/0.26.9...v/0.26.10</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e37165d995"><code>e37165d</code></a>
webpki-(roots|root-certs): v0.26.9 -&gt; v0.26.10</li>
<li><a
href="4a4e2aa5d6"><code>4a4e2aa</code></a>
April CCADB updates:</li>
<li><a
href="82c433e58c"><code>82c433e</code></a>
webpki-ccadb: support placeholder absent trust bits</li>
<li><a
href="5b76d00f04"><code>5b76d00</code></a>
Address new nightly clippy lints</li>
<li><a
href="7c4a88225c"><code>7c4a882</code></a>
Move to 2021 edition</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki-roots/compare/v/0.26.9...v/0.26.10">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=0.26.9&new-version=0.26.10)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-30 17:58:57 +00:00
dependabot[bot]
3bef0161fe
build(deps): bump winit from 0.30.9 to 0.30.10 (#36777)
Bumps [winit](https://github.com/rust-windowing/winit) from 0.30.9 to
0.30.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-windowing/winit/releases">winit's
releases</a>.</em></p>
<blockquote>
<h2>Winit version 0.30.10</h2>
<h3>Added</h3>
<ul>
<li>On Windows, add
<code>IconExtWindows::from_resource_name</code>.</li>
<li>On Windows, add <code>CursorGrabMode::Locked</code>.</li>
<li>On Wayland, add <code>WindowExtWayland::xdg_toplevel</code>.</li>
</ul>
<h3>Changed</h3>
<ul>
<li>On macOS, no longer need control of the main
<code>NSApplication</code> class (which means you can now override it
yourself).</li>
<li>On iOS, remove custom application delegates. You are now allowed to
override the
application delegate yourself.</li>
<li>On iOS, no longer act as-if the application successfully open all
URLs. Override
<code>application:didFinishLaunchingWithOptions:</code> and provide the
desired behaviour yourself.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>On Windows, fixed ~500 ms pause when clicking the title bar during
continuous redraw.</li>
<li>On macOS, <code>WindowExtMacOS::set_simple_fullscreen</code> now
honors <code>WindowExtMacOS::set_borderless_game</code></li>
<li>On X11 and Wayland, fixed pump_events with
<code>Some(Duration::Zero)</code> blocking with <code>Wait</code>
polling mode</li>
<li>On Wayland, fixed a crash when consequently calling
<code>set_cursor_grab</code> without pointer focus.</li>
<li>On Wayland, ensure that external event loop is woken-up when using
pump_events and integrating via <code>FD</code>.</li>
<li>On Wayland, apply fractional scaling to custom cursors.</li>
<li>On macOS, fixed <code>run_app_on_demand</code> returning without
closing open windows.</li>
<li>On macOS, fixed <code>VideoMode::refresh_rate_millihertz</code> for
fractional refresh rates.</li>
<li>On macOS, store monitor handle to avoid panics after going in/out of
sleep.</li>
<li>On macOS, allow certain invalid monitor handles and return
<code>None</code> instead of panicking.</li>
<li>On Windows, fixed <code>Ime::Preedit</code> cursor offset
calculation.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2385410366"><code>2385410</code></a>
Winit version 0.30.10</li>
<li><a
href="6db1343c0b"><code>6db1343</code></a>
wayland: bump wayland-rs to avoid yanked release</li>
<li><a
href="a26899a75d"><code>a26899a</code></a>
windows: fix incorrect cursor_range calculation in Ime::Preedit</li>
<li><a
href="80bddda641"><code>80bddda</code></a>
macOS: Fix monitors connected via certain Thunderbolt hubs</li>
<li><a
href="5f1e9f6cc1"><code>5f1e9f6</code></a>
macOS: Store UUID in MonitorHandle instead of CGDirectDisplayID</li>
<li><a
href="57baf72741"><code>57baf72</code></a>
Allow the user to register the application delegate on iOS</li>
<li><a
href="da7a09658a"><code>da7a096</code></a>
fix: Support fractional refresh rates in video modes on macOS (<a
href="https://redirect.github.com/rust-windowing/winit/issues/4191">#4191</a>)</li>
<li><a
href="53321dc6f5"><code>53321dc</code></a>
Swizzle sendEvent: instead of subclassing NSApplication</li>
<li><a
href="6556cde246"><code>6556cde</code></a>
macOS: Close windows automatically when exiting</li>
<li><a
href="7672fd5657"><code>7672fd5</code></a>
wayland: support fractional scale for custom cursor</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-windowing/winit/compare/v0.30.9...v0.30.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=winit&package-manager=cargo&previous-version=0.30.9&new-version=0.30.10)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-30 17:43:44 +00:00
Simon Wülker
3d1dd482df
Include ChildrenList::last_visited in memory reports (#36772)
`MutNullableDom<Node>` is not in fact defined in `mozjs`.

Testing: This change compiles, so it works

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-30 15:39:47 +00:00
Kingsley Yung
5c5da6071e
Remove macro impl_rare_data (#36771)
This macro does not hide any complex or unsafe implementation details,
and, it's only used in two files (node.rs and element.rs). This patch
removes the macro, and move the implementation in place.

Moreover, the Element::rare_data_mut function in element.rs is called by
other functions, so the #[allow(dead_code)] annotation is removed. The
Node::rare_data_mut function in node.rs is not called anywhere, so it is
removed.

Testing: No test is needed for this cleaning up.
Fixes: #36767

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-04-30 15:19:30 +00:00
Simon Wülker
c98cf8b306
Don't explicitly restyle when updating <details> shadow tree (#36769)
I'm not sure why I added these calls in the first place, but they don't
seem to be necessary and seem to be the cause of crashes.

This PR also adds some spec comments that I added while investigating
the crash.


Testing: Covered by existing WPT tests
Fixes https://github.com/servo/servo/issues/36757
Fixes https://github.com/servo/servo/issues/36273

[try
run](4141588918)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-30 12:24:27 +00:00
Gregory Terzian
af5d665efa
MessagePort: implement disentanglement (#36654)
Implement
[disentangle](https://html.spec.whatwg.org/multipage/#disentangle)
Remove bespoke gc logic which now becomes unnecessary. 
Adds a wpt test that hits the "disentangle while in transfer" logic.
Updates streams code, fixing an error where disentanglement is
conditional on an error.

Test coverage: there are existing tests in
`/webmessaging/message-channels/close-event/explicitly-closed.tentative.window.js`
for the no transfer case, and the simple completed transfer case, and
this PR adds a test for the more complicated transfer in progress case.

Fix https://github.com/servo/servo/issues/36465

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-04-30 10:49:38 +00:00
Jonathan Schwender
c46402e222
Remove lock around tokio-rt handle (#36762)
It seems sub-optimal to to sequentialise execution by grabbing a lock,
each time we want to spawn a task onto the tokio runtime. We don't need
the lock either, so it makes sense to just remove it, which also
simplifies a bunch of the using code.

Testing: Covered by existing tests

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-30 07:09:38 +00:00
sagudev
955149b194
Split webgl into separate crate (#36718)
canvas crate was home for both webgl and 2dcanvas impl, but it makes
more sense to separate these two, by splitting webgl into standalone
crate (like we already have for webgpu).

Testing: Rust for fearless refactoring (but there are WPT tests just in
case)

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-30 05:27:44 +00:00
Fuguo
0c0ee04b8e
Improve inter-document focus handling (#36649)
*Describe the changes that this pull request makes here. This will be
the commit message.*
rewritten the PR #28571
Implement
[Window#focus](https://html.spec.whatwg.org/multipage/#dom-window-focus),
[Window#blur](https://html.spec.whatwg.org/multipage/#dom-window-blur)
Testing: WPT
Fixes: #8981 #9421

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
Co-authored-by: yvt <i@yvt.jp>
2025-04-30 04:37:53 +00:00
Euclid Ye
27570987fd
update doc for ScriptThread::relative_mouse_down_point (#36743)
update doc for `ScriptThread::relative_mouse_down_point` which was
missing in #36619

Testing: No need as just updating docs

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-04-29 21:11:27 +00:00
haval0
ec88b5d752
layout: Check if root before establishing containing block (#36360)
As per
[w3.org/TR/filter-effects-1#FilterProperty](https://www.w3.org/TR/filter-effects-1/#FilterProperty),
`filter` shouldn't make the root element establish a containing block
for absolute and fixed positioned descendants. `will-change: filter` has
matching behavior.

This PR adds a check for if we are the root element before establishing
such a block.

To know if we are the root element, we look at the `FragmentFlags`
passed in. Previously for our function, these were dummy flags, always
constructed as empty. Thus, this PR also makes sure the correct
FragmentFlags are passed down the chain to the function
`establishes_containing_block_for_all_descendants`.

Testing:
- `/css/filter-effects/filtered-html-is-not-container.html` now passes
- `/css/css-will-change/will-change-fixedpos-cb-003.html` now passes
- Manual tests are working

Fixes: #35391

---------

Signed-off-by: haval0 <56519858+haval0@users.noreply.github.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-04-29 19:19:31 +00:00
Fuguo
bab788f5d5
fix crash occurs when the focus element is adopted (#36608)
fix crash occurs when the focus element is adopted.

Testing: wpt dom/nodes/insertion-removing-steps/blur-event.window.html
not crash

Fixes:  #36607 #32972

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
2025-04-29 19:04:22 +00:00
Taym Haddadi
b6a89ae408
Fix BorrowMutError crash in form reset (#36726)
Fixes: #36724

Signed-off-by: Taym <haddadi.taym@gmail.com>
2025-04-29 18:59:50 +00:00
dependabot[bot]
e79520c25a
build(deps): bump bytemuck from 1.22.0 to 1.23.0 (#36754)
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.22.0 to
1.23.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Lokathor/bytemuck/blob/main/changelog.md">bytemuck's
changelog</a>.</em></p>
<blockquote>
<h1><code>bytemuck</code> changelog</h1>
<h2>1.23</h2>
<ul>
<li><code>impl_core_error</code> crate feature adds
<code>core::error::Error</code> impl.</li>
<li>More <code>ZeroableInOption</code> impls.</li>
</ul>
<h2>1.22</h2>
<ul>
<li>Add the <code>pod_saturating</code> feature, which adds
<code>Pod</code> impls for <code>Saturating&lt;T&gt;</code>
when <code>T</code> is already <code>Pod</code>.</li>
<li>A bump in the minimum <code>bytemuck_derive</code> dependency from
1.4.0 to 1.4.1 to
avoid a bug if you have a truly ancient <code>cargo.lock</code> file
sitting around.</li>
<li>Adds <code>Send</code> and <code>Sync</code> impls to
<code>BoxBytes</code>.</li>
</ul>
<h2>1.21</h2>
<ul>
<li>Implement <code>Pod</code> and <code>Zeroable</code> for
<code>core::arch::{x86, x86_64}::__m512</code>, <code>__m512d</code> and
<code>__m512i</code> without nightly.
Requires Rust 1.72, and is gated through the <code>avx512_simd</code>
cargo feature.</li>
<li>Allow the use of <code>must_cast_mut</code> and
<code>must_cast_slice_mut</code> in const contexts.
Requires Rust 1.83, and is gated through the
<code>must_cast_extra</code> cargo feature.</li>
<li>internal: introduced the <code>maybe_const_fn</code> macro that
allows defining some function
to be const depending upon some <code>cfg</code> predicate.</li>
</ul>
<h2>1.20</h2>
<ul>
<li>New functions to allocate zeroed <code>Arc</code> and
<code>Rc</code>. Requires Rust 1.82</li>
<li><code>TransparentWrapper</code> impls for
<code>core::cmp::Reverse</code> and
<code>core::num::Saturating</code>.</li>
<li>internal: Simplified the library's <code>fill_zeroes</code> calls to
<code>write_bytes</code></li>
</ul>
<h2>1.19</h2>
<ul>
<li>Adds the <code>#[track_caller]</code> attribute to functions which
may panic.</li>
</ul>
<h2>1.18</h2>
<ul>
<li>Adds the <code>latest_stable_rust</code> cargo feature, which is a
blanket feature that turns all other features on that are both sound and
compatible with Stable rust.</li>
</ul>
<h2>1.17.1</h2>
<ul>
<li>Adds <code>#[repr(C)]</code> to the <code>union Transmute&lt;A,
B&gt;</code> type that's used internally
for most of the transmutations.</li>
</ul>
<h2>1.17.0</h2>
<ul>
<li>Makes the <code>must_cast</code> versions of the by-value and by-ref
casts be <code>const</code>.
The mut ref cast is unaffected for now (mut references aren't yet stable
in <code>const fn</code>).
This increases the MSRV of using that particular feature from 1.57 to
1.64.</li>
</ul>
<h2>1.16.3</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="028ff3bec6"><code>028ff3b</code></a>
chore: Release bytemuck version 1.23.0</li>
<li><a
href="343f34ff9e"><code>343f34f</code></a>
changelog</li>
<li><a
href="90db36000f"><code>90db360</code></a>
Impl core's Error trait on Rust 1.81+ (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/311">#311</a>)</li>
<li><a
href="ede91413f7"><code>ede9141</code></a>
Set rust version for <code>bytemuck_derive</code> to 1.61 (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/310">#310</a>)</li>
<li><a
href="46d0910f3a"><code>46d0910</code></a>
Extend <a
href="https://redirect.github.com/Lokathor/bytemuck/issues/308">#308</a>
with <code>-unwind</code> support (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/309">#309</a>)</li>
<li><a
href="6751adc3e4"><code>6751adc</code></a>
Impl ZeroablInOption for several function types. (<a
href="https://redirect.github.com/Lokathor/bytemuck/issues/308">#308</a>)</li>
<li><a
href="66569e6cc7"><code>66569e6</code></a>
chore: Release bytemuck_derive version 1.9.2</li>
<li><a
href="5c301b1ddd"><code>5c301b1</code></a>
remove resolver from the Cargo.toml</li>
<li><a
href="3053413e55"><code>3053413</code></a>
update the .cargo/config.toml to use the &quot;stable rust&quot;
feature.</li>
<li><a
href="9b087bb7e5"><code>9b087bb</code></a>
chore: Release bytemuck_derive version 1.9.1</li>
<li>Additional commits viewable in <a
href="https://github.com/Lokathor/bytemuck/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=bytemuck&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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-29 17:22:42 +00:00
dependabot[bot]
830a850f10
build(deps): bump toml_edit from 0.22.25 to 0.22.26 (#36756)
Bumps [toml_edit](https://github.com/toml-rs/toml) from 0.22.25 to
0.22.26.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6922da374c"><code>6922da3</code></a>
chore: Release</li>
<li><a
href="fbf0a9298c"><code>fbf0a92</code></a>
docs: Update changelog</li>
<li><a
href="83588b3610"><code>83588b3</code></a>
Merge pull request <a
href="https://redirect.github.com/toml-rs/toml/issues/878">#878</a> from
epage/w1</li>
<li><a
href="eeb885ceb5"><code>eeb885c</code></a>
fix(serde): Skip fields with newtypes wrapping None</li>
<li><a
href="3c305c72fa"><code>3c305c7</code></a>
test(serde): Show NewType(None) behavior</li>
<li><a
href="7bd5eafbd7"><code>7bd5eaf</code></a>
test(serde): Group None tests</li>
<li><a
href="388cfa3856"><code>388cfa3</code></a>
chore(deps): Update toml-test (<a
href="https://redirect.github.com/toml-rs/toml/issues/877">#877</a>)</li>
<li><a
href="a025b84797"><code>a025b84</code></a>
refactor(edit): Change ser none tracking to mut field</li>
<li><a
href="54666ad0b2"><code>54666ad</code></a>
docs(write): Add guidance</li>
<li><a
href="13cf5185f9"><code>13cf518</code></a>
refactor(edit): Bypass a layer of abstraction in ser</li>
<li>Additional commits viewable in <a
href="https://github.com/toml-rs/toml/compare/v0.22.25...v0.22.26">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=toml_edit&package-manager=cargo&previous-version=0.22.25&new-version=0.22.26)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-29 17:14:23 +00:00
dependabot[bot]
263f4d575c
build(deps): bump wayland-backend from 0.3.8 to 0.3.9 (#36753)
Bumps [wayland-backend](https://github.com/smithay/wayland-rs) from
0.3.8 to 0.3.9.
<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 compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wayland-backend&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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-29 17:03:01 +00:00
dependabot[bot]
b695668e74
build(deps): bump chrono from 0.4.40 to 0.4.41 (#36752)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.40 to
0.4.41.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chronotope/chrono/releases">chrono's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.41</h2>
<h2>What's Changed</h2>
<ul>
<li>Add <code>subsec_micros</code> and <code>subsec_millis</code>
methods to <code>TimeDelta</code> by <a
href="https://github.com/ggoetz"><code>@​ggoetz</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1668">chronotope/chrono#1668</a></li>
<li>Deprecate <code>NaiveDateTime::UNIX_EPOCH</code> by <a
href="https://github.com/robertbastian"><code>@​robertbastian</code></a>
in <a
href="https://redirect.github.com/chronotope/chrono/pull/1670">chronotope/chrono#1670</a></li>
<li>Implement <code>as_seconds_f32</code> and
<code>as_seconds_f64</code> for <code>TimeDelta</code> by <a
href="https://github.com/ggoetz"><code>@​ggoetz</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1671">chronotope/chrono#1671</a></li>
<li>chore: fix some comments by <a
href="https://github.com/jimmycathy"><code>@​jimmycathy</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1677">chronotope/chrono#1677</a></li>
<li>Add <code>num_days_in_month</code> method to <code>Datelike</code>
trait by <a href="https://github.com/aslilac"><code>@​aslilac</code></a>
in <a
href="https://redirect.github.com/chronotope/chrono/pull/1673">chronotope/chrono#1673</a></li>
<li>add <code>WeekdaySet</code>, a collection of <code>Weekday</code>
that is <code>Copy</code> by <a
href="https://github.com/Kinrany"><code>@​Kinrany</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1676">chronotope/chrono#1676</a></li>
<li>WeekdaySet tweaks by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1680">chronotope/chrono#1680</a></li>
<li>Upgrade to windows-bindgen 0.61 by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1682">chronotope/chrono#1682</a></li>
<li>Implemented a consistent Eq trait for NaiveWeek by <a
href="https://github.com/Splashling1789"><code>@​Splashling1789</code></a>
in <a
href="https://redirect.github.com/chronotope/chrono/pull/1687">chronotope/chrono#1687</a></li>
<li>TimeZone::from_posix_tz: Treat empty TZ variable as UTC by <a
href="https://github.com/drinkcat"><code>@​drinkcat</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1691">chronotope/chrono#1691</a></li>
<li>Add support for lossy format strings by <a
href="https://github.com/Qelxiros"><code>@​Qelxiros</code></a> in <a
href="https://redirect.github.com/chronotope/chrono/pull/1693">chronotope/chrono#1693</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d1de1d95ea"><code>d1de1d9</code></a>
Bump version to 0.4.41</li>
<li><a
href="e2bd1d1d67"><code>e2bd1d1</code></a>
Add support for lenient format strings (<a
href="https://redirect.github.com/chronotope/chrono/issues/1693">#1693</a>)</li>
<li><a
href="2c95b0aca8"><code>2c95b0a</code></a>
Tweak expression to avoid repetition</li>
<li><a
href="ebeef99426"><code>ebeef99</code></a>
TimeZone::from_posix_tz: Treat empty TZ variable as UTC</li>
<li><a
href="dc068f0373"><code>dc068f0</code></a>
Tweak style on NaiveWeek fixes</li>
<li><a
href="b267a4fe90"><code>b267a4f</code></a>
Implemented consistent Hash and Eq trait for NaiveWeek</li>
<li><a
href="7c0bd136d6"><code>7c0bd13</code></a>
Apply suggestions from clippy 1.86</li>
<li><a
href="104cdc73cb"><code>104cdc7</code></a>
Bump MSRV to 1.62</li>
<li><a
href="6a853015b7"><code>6a85301</code></a>
Upgrade to windows-bindgen 0.61</li>
<li><a
href="265c79b2a5"><code>265c79b</code></a>
Tweak WeekdaySet method order</li>
<li>Additional commits viewable in <a
href="https://github.com/chronotope/chrono/compare/v0.4.40...v0.4.41">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.40&new-version=0.4.41)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-29 16:56:13 +00:00
Oriol Brufau
761d1af04e
build(deps): bump Stylo from 0eaeea3 to 03ffc85 (#36750)
0eaeea3dfd...03ffc85c45

- https://github.com/servo/stylo/pull/173
  Use web_atoms crate
- https://github.com/servo/stylo/pull/174
  servo_arc: make track_alloc_size feature a default feature

Testing: unneeded, no behavior change

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-29 14:49:54 +00:00
dependabot[bot]
01bbf02214
build(deps): bump webpki-roots from 0.26.8 to 0.26.9 (#36734)
Bumps [webpki-roots](https://github.com/rustls/webpki-roots) from 0.26.8
to 0.26.9.
<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>0.26.9</h2>
<p>The license of the <code>webpki-roots</code> and
<code>webpki-root-certs</code> crates changed from MPL-2.0 to
CDLA-Permissive-2.0. Thank you to the <a
href="https://redirect.github.com/mozilla/www.ccadb.org/issues/188">CCADB
maintainers for enabling us to make this change</a>.</p>
<h2>Upstream changes</h2>
<p><em>None</em></p>
<h2>What's Changed</h2>
<ul>
<li>Adjust license of mechnically-reformed crates by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/88">rustls/webpki-roots#88</a></li>
<li>Run CI on ubuntu-latest by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/91">rustls/webpki-roots#91</a></li>
<li>Support code-signing trust bit by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/93">rustls/webpki-roots#93</a></li>
<li><code>manual_ok_err</code> clippy fix by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/94">rustls/webpki-roots#94</a></li>
<li>webpki-(roots|root-certs): v0.26.8 -&gt; v0.26.9 by <a
href="https://github.com/ctz"><code>@​ctz</code></a> in <a
href="https://redirect.github.com/rustls/webpki-roots/pull/95">rustls/webpki-roots#95</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki-roots/compare/v/0.26.8...v/0.26.9">https://github.com/rustls/webpki-roots/compare/v/0.26.8...v/0.26.9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="575994bb51"><code>575994b</code></a>
webpki-(roots|root-certs): v0.26.8 -&gt; v0.26.9</li>
<li><a
href="f9f5789f47"><code>f9f5789</code></a>
<code>manual_ok_err</code> clippy fix</li>
<li><a
href="fce41f761a"><code>fce41f7</code></a>
Support code-signing trust bit</li>
<li><a
href="f19c83f0f6"><code>f19c83f</code></a>
Run CI on ubuntu-latest</li>
<li><a
href="90c48f3867"><code>90c48f3</code></a>
Adjust license of mechanically-reformed crates</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki-roots/compare/v/0.26.8...v/0.26.9">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=0.26.8&new-version=0.26.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-29 14:12:17 +00:00
Andrei Volykhin
6b2a755736
canvas: Apply large size limitations (#36445)
To prevent any potential crash/OOM issues with "canvas" element
from "rogue" applications let's apply large size limitations for context
canvas2d's draw target to Servo (similar approach in Firefox/Chromium -
they limits width and height to 32767/65535 pixels).

Fixes: #36155, #34117, #30164, #24710

--
- [x] ./mach build -d does not report any errors
- [x] ./mach test-tidy does not report any errors
- [x] There are tests for these changes

tests/wpt/tests/html/canvas/element/canvas-host/2d.canvas.host.size.large.html

tests/wpt/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html

tests/wpt/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-04-29 13:48:30 +00:00
Steven Novaryo
bd6928f3dc
layout: Account for transform in scrollable overflow (#36138)
In the scrollable overflow calcutation, apply CSS transforms to boxes
and scrollable overflow of the descendant. Clip unreachable scrollable
overflow according to it's block start and inline start scrolling
direction. And, renamed `Fragment::scrolling_overflow` to
`Fragment::scrolling_overflow_for_parent` as it was calculating the
scrolling overflow contribution from a child.

Add several WPT tests, testing the transform interaction `rotate`,
`scale`, and `skew` with scrollable overflow. There are several WPT test
that are testing the interaction that not expected from current browsers
implementation according to the spec.

Testing: Existing and new WPT. 
Fixes: #36031

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-04-29 09:37:27 +00:00
atbrakhi
b92542b756
Devtools: Support worker scripts in Debugger > Source panel (#36562)
This patch adds support for listing `worker scripts` in `debugger >
source` panel

For example:
```
<!-- test.html -->
<!doctype html><meta charset=utf-8>
<script>
    setTimeout(() => {
        console.log("inline classic");
        new Worker("worker.js");
        
        const blob = new Blob([`console.log("blob worker");`], { type: "text/javascript" });
        const blobURL = URL.createObjectURL(blob);
        new Worker(blobURL);
    }, 2000);
</script>
```

```
// worker.js
console.log("external classic worker");
```

```
./mach run --devtools=6080 http://127.0.0.1:3000/test.html
```

![file1](https://github.com/user-attachments/assets/84dd94b9-95d8-4087-b4bb-ab936fca0023)


Another example:
```
./mach run --devtools=6080 https://charming.daz.cat/ 
```


![blob](https://github.com/user-attachments/assets/a1341ee4-3a1c-4cca-ac04-658675cdcf39)


- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially implement #36027
- [x] These changes require tests, but they are blocked on
https://github.com/servo/servo/issues/36325

---------

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2025-04-29 08:27:42 +00:00
dependabot[bot]
107fd25465
build(deps): bump toml_datetime from 0.6.8 to 0.6.9 (#36733)
Bumps [toml_datetime](https://github.com/toml-rs/toml) from 0.6.8 to
0.6.9.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="40210818d7"><code>4021081</code></a>
chore: Release</li>
<li><a
href="33126988a3"><code>3312698</code></a>
chore: Release</li>
<li><a
href="b25da32148"><code>b25da32</code></a>
docs: Update changelog</li>
<li><a
href="884494977f"><code>8844949</code></a>
docs(write): Update base commit</li>
<li><a
href="5406815967"><code>5406815</code></a>
Merge pull request <a
href="https://redirect.github.com/toml-rs/toml/issues/875">#875</a> from
epage/w</li>
<li><a
href="c6479a246c"><code>c6479a2</code></a>
refactor(toml): Pull out ValueSerializer for easier comparison</li>
<li><a
href="8c43cf8903"><code>8c43cf8</code></a>
refactor(toml): Remove redundant non_exhaustive</li>
<li><a
href="268a1f82aa"><code>268a1f8</code></a>
Merge pull request <a
href="https://redirect.github.com/toml-rs/toml/issues/874">#874</a> from
epage/w</li>
<li><a
href="e406f94893"><code>e406f94</code></a>
refactor(toml): Split ser module</li>
<li><a
href="4d782f8cdf"><code>4d782f8</code></a>
refactor(edit): Rely on type alias in ser</li>
<li>Additional commits viewable in <a
href="https://github.com/toml-rs/toml/compare/toml_datetime-v0.6.8...toml_datetime-v0.6.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=toml_datetime&package-manager=cargo&previous-version=0.6.8&new-version=0.6.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-28 23:52:11 +00:00
dependabot[bot]
1606b31f7c
build(deps): bump toml_edit from 0.22.24 to 0.22.25 (#36736)
Bumps [toml_edit](https://github.com/toml-rs/toml) from 0.22.24 to
0.22.25.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="40210818d7"><code>4021081</code></a>
chore: Release</li>
<li><a
href="33126988a3"><code>3312698</code></a>
chore: Release</li>
<li><a
href="b25da32148"><code>b25da32</code></a>
docs: Update changelog</li>
<li><a
href="884494977f"><code>8844949</code></a>
docs(write): Update base commit</li>
<li><a
href="5406815967"><code>5406815</code></a>
Merge pull request <a
href="https://redirect.github.com/toml-rs/toml/issues/875">#875</a> from
epage/w</li>
<li><a
href="c6479a246c"><code>c6479a2</code></a>
refactor(toml): Pull out ValueSerializer for easier comparison</li>
<li><a
href="8c43cf8903"><code>8c43cf8</code></a>
refactor(toml): Remove redundant non_exhaustive</li>
<li><a
href="268a1f82aa"><code>268a1f8</code></a>
Merge pull request <a
href="https://redirect.github.com/toml-rs/toml/issues/874">#874</a> from
epage/w</li>
<li><a
href="e406f94893"><code>e406f94</code></a>
refactor(toml): Split ser module</li>
<li><a
href="4d782f8cdf"><code>4d782f8</code></a>
refactor(edit): Rely on type alias in ser</li>
<li>Additional commits viewable in <a
href="https://github.com/toml-rs/toml/compare/v0.22.24...v0.22.25">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=toml_edit&package-manager=cargo&previous-version=0.22.24&new-version=0.22.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-28 23:45:19 +00:00
dependabot[bot]
b862b16430
build(deps): bump quick-xml from 0.37.4 to 0.37.5 (#36738)
Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.37.4 to
0.37.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tafia/quick-xml/releases">quick-xml's
releases</a>.</em></p>
<blockquote>
<h2>v0.37.5 - BytesCData::decode()</h2>
<h2>What's Changed</h2>
<h3>New Features</h3>
<ul>
<li><a
href="https://redirect.github.com/tafia/quick-xml/issues/857">#857</a>:
Add <code>BytesCData::decode()</code>.</li>
</ul>
<p><a
href="https://redirect.github.com/tafia/quick-xml/issues/857">#857</a>:
<a
href="https://redirect.github.com/tafia/quick-xml/pull/857">tafia/quick-xml#857</a></p>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/mematthias"><code>@​mematthias</code></a> made
their first contribution in <a
href="https://redirect.github.com/tafia/quick-xml/pull/857">tafia/quick-xml#857</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tafia/quick-xml/compare/v0.37.4...v0.37.5">https://github.com/tafia/quick-xml/compare/v0.37.4...v0.37.5</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tafia/quick-xml/blob/master/Changelog.md">quick-xml's
changelog</a>.</em></p>
<blockquote>
<h2>0.37.5 -- 2025-04-27</h2>
<h3>New Features</h3>
<ul>
<li><a
href="https://redirect.github.com/tafia/quick-xml/issues/857">#857</a>:
Add <code>BytesCData::decode()</code>.</li>
</ul>
<p><a
href="https://redirect.github.com/tafia/quick-xml/issues/857">#857</a>:
<a
href="https://redirect.github.com/tafia/quick-xml/pull/857">tafia/quick-xml#857</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a018365abc"><code>a018365</code></a>
Release 0.37.5</li>
<li><a
href="a7cb878899"><code>a7cb878</code></a>
Merge pull request <a
href="https://redirect.github.com/tafia/quick-xml/issues/857">#857</a>
from mematthias/master</li>
<li><a
href="4acc194928"><code>4acc194</code></a>
Make BytesCData decode method pub</li>
<li>See full diff in <a
href="https://github.com/tafia/quick-xml/compare/v0.37.4...v0.37.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=quick-xml&package-manager=cargo&previous-version=0.37.4&new-version=0.37.5)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-28 23:40:12 +00:00
dependabot[bot]
67ec8bc8dd
build(deps): bump web_atoms from 0.1.0 to 0.1.1 (#36732)
Bumps [web_atoms](https://github.com/servo/html5ever) from 0.1.0 to
0.1.1.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="15d10bf716"><code>15d10bf</code></a>
v0.1.1</li>
<li><a
href="b57243cb76"><code>b57243c</code></a>
Auto merge of <a
href="https://redirect.github.com/servo/html5ever/issues/146">#146</a> -
servo:rustup, r=SimonSapin</li>
<li><a
href="4630ad8a95"><code>4630ad8</code></a>
Upgrade to rustc 1.2.0-nightly (2f5683913 2015-06-18)</li>
<li><a
href="395e39ce7b"><code>395e39c</code></a>
Merge pull request <a
href="https://redirect.github.com/servo/html5ever/issues/145">#145</a>
from kstep/patch-1</li>
<li><a
href="5f8d1e128e"><code>5f8d1e1</code></a>
add documentation link to cargo.toml</li>
<li><a
href="73d3f78e82"><code>73d3f78</code></a>
Auto merge of <a
href="https://redirect.github.com/servo/html5ever/issues/144">#144</a> -
servo:crates.io, r=metajack</li>
<li>See full diff in <a
href="https://github.com/servo/html5ever/compare/v0.1.0...v0.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=web_atoms&package-manager=cargo&previous-version=0.1.0&new-version=0.1.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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-28 20:36:04 +00:00
dependabot[bot]
77cceaed2f
build(deps): bump syn from 2.0.100 to 2.0.101 (#36735)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.100 to 2.0.101.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/syn/releases">syn's
releases</a>.</em></p>
<blockquote>
<h2>2.0.101</h2>
<ul>
<li>Improve TypeGenerics::as_turbofish to return longer-lived return
value (<a
href="https://redirect.github.com/dtolnay/syn/issues/1861">#1861</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="58336a3fb4"><code>58336a3</code></a>
Release 2.0.101</li>
<li><a
href="f1612cc7cc"><code>f1612cc</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/syn/issues/1861">#1861</a>
from JakobDegen/turbofish</li>
<li><a
href="d04eea1637"><code>d04eea1</code></a>
Fix lifetime on <code>as_turbofish</code></li>
<li><a
href="432b303bd4"><code>432b303</code></a>
Resolve renamed_and_removed_lints warning about match_on_vec_items</li>
<li><a
href="1353d60a3a"><code>1353d60</code></a>
Update test suite to nightly-2025-04-08</li>
<li><a
href="3980ff22bb"><code>3980ff2</code></a>
Improve wording of comment in advance_to implementation</li>
<li><a
href="8328b52319"><code>8328b52</code></a>
Update test suite to nightly-2025-04-05</li>
<li><a
href="1d2e2be40e"><code>1d2e2be</code></a>
Update test suite to nightly-2025-04-03</li>
<li><a
href="2400946a73"><code>2400946</code></a>
Update test suite to nightly-2025-04-02</li>
<li><a
href="114a629a7a"><code>114a629</code></a>
Update test suite to nightly-2025-03-27</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/syn/compare/2.0.100...2.0.101">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=2.0.100&new-version=2.0.101)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2025-04-28 18:48:48 +00:00
Astraea Quinn S
56882a3d5b
Propagate image resolution errors in layout context (#36692)
This commit modifies layout context to propagate any issues that occur
during image
resolution.

At the moment, when errors occur during image resolution we propagate
None upwards. This
hides any potential issues that may be actionable, for example, we may
want to avoid
trying to load an image that failed to load for whatever reason or has
an invalid url.

This commit instead propagates these errors upwards to consumers where
they may become
actionable. This is part of an investigation into #36679.

Signed-off-by: Astraea Quinn Skoutelli
<astraea.quinn.skoutelli@huawei.com>

Signed-off-by: Astraea Quinn Skoutelli <astraea.quinn.skoutelli@huawei.com>
2025-04-28 12:32:51 +00:00
Taym Haddadi
4d975e947b
Start adding support for transforms in readable and writable streams (#36470)
Start adding support for transforms in readable and writable streams.
Part of https://github.com/servo/servo/issues/34676
2025-04-28 11:02:55 +00:00
Xiaocheng Hu
02b38adf43
Rewrite node insertion algorithm to match the spec (#35999)
Per [spec](https://dom.spec.whatwg.org/#concept-node-insert), adoption
of new node should be done while inserting the node. This patch moves
the call site of `adopt` to inside `insert` to match it.

It also rewrites some existing code to better match the spec without any
behavioral changes.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

---------

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
2025-04-28 10:56:53 +00:00
Oriol Brufau
cf41012257
layout: Refactor establishes_containing_block_for_all_descendants() (#36725)
Instead of grouping all the `will-change` conditions together, move each
one of them next to the condition for the relevant property.

This avoids the need to call `is_transformable()` multiple times, and
will also be needed for #35391.

Testing: unneeded (no change in behavior)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-28 10:17:35 +00:00
elomscansio
b1d0b6a37b
htmlinputelement: Update radio group validity logic for disconnected trees (#36431)
This PR updates the validity state revalidation behavior for radio input
elements, ensuring consistent logic regardless of tree connectivity.

---

**What’s changed:**  
- we now always update the validity state.
- Handled more edge cases for disconnected trees, shadow roots, and
cross-tree movement.
- Ensured that radio group updates still trigger when a parent is moved
into a different root.
- Updated test expectations in
`radio-disconnected-group-owner.html.ini`.

---

**Why this matters:**  
The updated logic aligns better with the [HTML
specification](https://html.spec.whatwg.org/multipage/input.html#radio-button-group),
especially regarding radio group behavior in disconnected trees or
shadow DOM.

These changes improve validity propagation in scenarios like:
- Appending inputs into a disconnected form
- Shadow roots acting as radio group containers
- Cross-tree movement of radio buttons

---

**Tests:**  
- Modified `radio-disconnected-group-owner.html.ini`
  - Removed a test that now passes
- Added a failing test expectation caused by a spec bug: the fragment
parsing algorithm uses the connected tree for HTML set via `innerHTML`,
affecting radio group computation

---

**Spec reference:**  
https://html.spec.whatwg.org/multipage/input.html#radio-button-group

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report an errors
- [ ] These changes fix #

<!-- Either: -->
- [X] There are tests for these changes

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
2025-04-28 01:24:43 +00:00
Josh Matthews
2892e7924d
constellation: Move log inside relevant conditional. (#36713)
This message is logged when we don't actually act on it and is confusing
as a result. By moving it inside the conditional, we only log the
message when we actually notify webdriver that the load is complete.

Testing: Manual testing.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-27 20:44:52 +00:00
elomscansio
085ad9ea48
script_thread: HTML parser doesn't set relevant option (#36622)
This patch ensures that the Servo HTML parser uses the appropriate
`TreeBuilderOpts` settings
as specified by the HTML specification.

Changes:
- **iframe_srcdoc:** Detect if the parsed document's URL scheme is
`about:srcdoc`, and set the parser’s iframe_srcdoc option accordingly.
- **quirks_mode:** Use the associated Document's quirks mode to set the
parser’s quirks mode flag, improving fragment parsing behavior.
- **scripting_enabled:** Add a `scripting_enabled` method to Document,
based on whether it has a browsing context, and set this flag for the
parser.

These updates align Servo's parsing behavior more closely with the
specification:

https://html.spec.whatwg.org/multipage/parsing.html#the-initial-insertion-mode

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #35478

<!-- Either: -->
- [ ] There are tests for these changes

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
2025-04-27 20:23:22 +00:00
Taym Haddadi
989739316e
Determine if ResizeTo is allowed (#36704)
Spec says to check If target is not an auxiliary browsing context before
performing ResizeTo.


Fixes: #36701

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-04-27 10:43:05 +00:00
Servo WPT Sync
e22ce3988b
Sync WPT with upstream (27-04-2025) (#36708)
Automated downstream sync of changes from upstream as of 27-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-04-27 02:05:07 +00:00
Simon Wülker
902d2ad8f4
Use snapshot size instead of canvas size when converting canvas to blob (#36705)
The blob data is encoded asynchronously, therefore the canvas size may
have changed since it's data was saved to a snapshot. Using the canvas
size confuses the encoder, because the provided data does not match the
expected size anymore.

Testing: This change includes a new web platform test
Fixes https://github.com/servo/servo/issues/36702

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-26 19:44:12 +00:00