Commit graph

51119 commits

Author SHA1 Message Date
Jonathan Schwender
94a9588bcc
uv: Use native-tls (#36564)
uv by default uses baked in webpki certificates.
Using the system certificates is preferable for multiple reasons:

- OS updates will automatically update the certificates (including
revoking)
- Supports custom certificates installed on the system (corporate
networks)

uv does not enable this option by default, because it has a performance
overhead on macos.
In our scenarios, with long-running commands, the overhead is basically
not measurable.
I've been using the option on my mac for around 1 month now, without
noticing any degradation.

See also the previous discussion in
https://github.com/servo/book/issues/53 for some background.

Testing: We use `uv` in all our tests

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-16 11:47:49 +00:00
Martin Robinson
6bad65a5a1
libservo: Allow running more than one Servo test in a run (#36532)
A `Servo` instance can only be constructed once per program execution
and cannot be passed between threads. This change adds a special thread
to run `Servo` unit tests. This will allow creating suites of `WebView`
unit tests.

Testing: This change includes a new test.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-16 07:54:54 +00:00
Josh Matthews
9aa09d73b5
Fix crash when setting custom property on Location (#36494)
The JS engine uses types like `Handle<Maybe<PropertyDescriptor>>` in
various places and our automated bindings are not able to handle the
Maybe type. We have hand-written bindings that use outparams to indicate
a PropertyDescriptor value is actually the Nothing type, but that data
was getting lost when we passed the property descriptor to
SetPropertyIgnoringNamedGetter, which assumed that the property
descriptor was always valid.

Depends on https://github.com/servo/mozjs/pull/579.

Testing: Manual testing on testcase from
https://github.com/servo/servo/issues/34709, and new crashtest added.
Fixes: #34709

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-16 06:52:48 +00:00
TIN TUN AUNG
f5e6eb289a
media element: support seekable attribute (#36541)
support seekable attribute in `htmlmediaelement`, modify `seek`
algorithm to use `seekable` attribute.

related
[specs](https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable)
Testing: Run WPT Test
Fixes: https://github.com/servo/servo/issues/22297

Will wait for https://github.com/servo/media/pull/435 before turning
this to ready for review.
cc @jdm @xiaochengh

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-04-16 05:52:19 +00:00
Kenzie Raditya Tirtarahardja
15199ba2ef
Implement GetComputedRole in wd (#36552)
Implement Webdriver Get Computed Role.

[spec](https://w3c.github.io/webdriver/#get-computed-role)

Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
2025-04-16 03:55:15 +00:00
Kenzie Raditya Tirtarahardja
cef7aa58ec
Refactor retrieving element container in webdriver into function (#36467)
Refactor getting an element's container. Previously this is inlined and
only done for `HTMLOptionElement`.

[Try](1439948227)

Fixes: #24106

Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>
2025-04-16 03:54:33 +00:00
Martin Robinson
da4ea0f096
compositing: Remove compositing_traits::MouseWindowEvent (#36550)
This data structure is unused.

Testing: No tests as this just removes dead code.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-15 19:54:43 +00:00
Siddhant N Trivedi
745a437fb1
build(deps): bump stylo from c756a21 to 0eaeea3 (#36545)
This PR bumps stylo from
[c756a21](c756a21864)
to
[0eaeea3](0eaeea3dfd).

Signed-off-by: Siddhant N. Trivedi <sidntrivedi012@gmail.com>
2025-04-15 19:09:08 +00:00
Martin Robinson
e9daec7d42
compositor: Unify the cross process and in-process API (#36543)
Because there used to be two traits exposing messages to the compositor,
there were two kinds of messages that could be sent:

1. In-process messages from the `Constellation`
2. Cross-process messages from other parts of Servo

Now these two types of messages can be unified into one type.

This is a reland of #36443, which caused regressions due to the fact
that messages to the compositor were no longer triggering the event loop
waker. This version of the PR splits out just the bits that unify the
two APIs, leaving the cleanup of routes in the constellation for another
PR.

Testing: This is covered by existing WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-15 18:31:46 +00:00
dependabot[bot]
980a42d7f7
build(deps): bump content-security-policy from babd99e to be68d50 (#36548)
Bumps
[content-security-policy](https://github.com/servo/rust-content-security-policy)
from `babd99e` to `be68d50`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="be68d50b79"><code>be68d50</code></a>
Make URL serializable with <code>serde</code></li>
<li><a
href="b4a07f7644"><code>b4a07f7</code></a>
Fix effective directive for inline checks</li>
<li>See full diff in <a
href="babd99e8fb...be68d50b79">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 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-15 17:48:50 +00:00
dependabot[bot]
bb6ecdcfb9
build(deps): bump libc from 0.2.171 to 0.2.172 (#36547)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.171 to 0.2.172.
<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.172</h2>
<h3>Added</h3>
<ul>
<li>Android: Add <code>getauxval</code> for 32-bit targets (<a
href="https://redirect.github.com/rust-lang/libc/pull/4338">#4338</a>)</li>
<li>Android: Add <code>if_tun.h</code> ioctls (<a
href="https://redirect.github.com/rust-lang/libc/pull/4379">#4379</a>)</li>
<li>Android: Define <code>SO_BINDTOIFINDEX</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4391">#4391</a>)</li>
<li>Cygwin: Add <code>posix_spawn_file_actions_add[f]chdir[_np]</code>
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4387">#4387</a>)</li>
<li>Cygwin: Add new socket options (<a
href="https://redirect.github.com/rust-lang/libc/pull/4350">#4350</a>)</li>
<li>Cygwin: Add statfs &amp; fcntl (<a
href="https://redirect.github.com/rust-lang/libc/pull/4321">#4321</a>)</li>
<li>FreeBSD: Add <code>filedesc</code> and <code>fdescenttbl</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4327">#4327</a>)</li>
<li>Glibc: Add unstable support for _FILE_OFFSET_BITS=64 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4345">#4345</a>)</li>
<li>Hermit: Add <code>AF_UNSPEC</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Hermit: Add <code>AF_VSOCK</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Illumos, NetBSD: Add <code>timerfd</code> APIs (<a
href="https://redirect.github.com/rust-lang/libc/pull/4333">#4333</a>)</li>
<li>Linux: Add <code>_IO</code>, <code>_IOW</code>, <code>_IOR</code>,
<code>_IOWR</code> to the exported API (<a
href="https://redirect.github.com/rust-lang/libc/pull/4325">#4325</a>)</li>
<li>Linux: Add <code>tcp_info</code> to uClibc bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/4347">#4347</a>)</li>
<li>Linux: Add further BPF program flags (<a
href="https://redirect.github.com/rust-lang/libc/pull/4356">#4356</a>)</li>
<li>Linux: Add missing INPUT_PROP_XXX flags from
<code>input-event-codes.h</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4326">#4326</a>)</li>
<li>Linux: Add missing TLS bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/4296">#4296</a>)</li>
<li>Linux: Add more constants from <code>seccomp.h</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4330">#4330</a>)</li>
<li>Linux: Add more glibc <code>ptrace_sud_config</code> and related
<code>PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG</code>. (<a
href="https://redirect.github.com/rust-lang/libc/pull/4386">#4386</a>)</li>
<li>Linux: Add new netlink flags (<a
href="https://redirect.github.com/rust-lang/libc/pull/4288">#4288</a>)</li>
<li>Linux: Define ioctl codes on more architectures (<a
href="https://redirect.github.com/rust-lang/libc/pull/4382">#4382</a>)</li>
<li>Linux: Add missing <code>pthread_attr_setstack</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4349">#4349</a>)</li>
<li>Musl: Add missing <code>utmpx</code> API (<a
href="https://redirect.github.com/rust-lang/libc/pull/4332">#4332</a>)</li>
<li>Musl: Enable <code>getrandom</code> on all platforms (<a
href="https://redirect.github.com/rust-lang/libc/pull/4346">#4346</a>)</li>
<li>NuttX: Add more signal constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/4353">#4353</a>)</li>
<li>QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs (<a
href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li>
<li>QNX: Add support for alternative Neutrino network stack
<code>io-sock</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li>
<li>Redox: Add more <code>sys/socket.h</code> and <code>sys/uio.h</code>
definitions (<a
href="https://redirect.github.com/rust-lang/libc/pull/4388">#4388</a>)</li>
<li>Solaris: Temporarily define <code>O_DIRECT</code> and
<code>SIGINFO</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4348">#4348</a>)</li>
<li>Solarish: Add <code>secure_getenv</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4342">#4342</a>)</li>
<li>VxWorks: Add missing <code>d_type</code> member to
<code>dirent</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li>
<li>VxWorks: Add missing signal-related constsants (<a
href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li>
<li>VxWorks: Add more error codes (<a
href="https://redirect.github.com/rust-lang/libc/pull/4337">#4337</a>)</li>
</ul>
<h3>Deprecated</h3>
<ul>
<li>FreeBSD: Deprecate <code>TCP_PCAP_OUT</code> and
<code>TCP_PCAP_IN</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4381">#4381</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Cygwin: Fix member types of <code>statfs</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4324">#4324</a>)</li>
<li>Cygwin: Fix tests (<a
href="https://redirect.github.com/rust-lang/libc/pull/4357">#4357</a>)</li>
<li>Hermit: Make <code>AF_INET = 3</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Musl: Fix the syscall table on RISC-V-32 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li>
<li>Musl: Fix the value of <code>SA_ONSTACK</code> on RISC-V-32 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li>
<li>VxWorks: Fix a typo in the <code>waitpid</code> parameter name (<a
href="https://redirect.github.com/rust-lang/libc/pull/4334">#4334</a>)</li>
</ul>
<h3>Removed</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/libc/blob/0.2.172/CHANGELOG.md">libc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/libc/compare/0.2.171...0.2.172">0.2.172</a>
- 2025-04-14</h2>
<h3>Added</h3>
<ul>
<li>Android: Add <code>getauxval</code> for 32-bit targets (<a
href="https://redirect.github.com/rust-lang/libc/pull/4338">#4338</a>)</li>
<li>Android: Add <code>if_tun.h</code> ioctls (<a
href="https://redirect.github.com/rust-lang/libc/pull/4379">#4379</a>)</li>
<li>Android: Define <code>SO_BINDTOIFINDEX</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4391">#4391</a>)</li>
<li>Cygwin: Add <code>posix_spawn_file_actions_add[f]chdir[_np]</code>
(<a
href="https://redirect.github.com/rust-lang/libc/pull/4387">#4387</a>)</li>
<li>Cygwin: Add new socket options (<a
href="https://redirect.github.com/rust-lang/libc/pull/4350">#4350</a>)</li>
<li>Cygwin: Add statfs &amp; fcntl (<a
href="https://redirect.github.com/rust-lang/libc/pull/4321">#4321</a>)</li>
<li>FreeBSD: Add <code>filedesc</code> and <code>fdescenttbl</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4327">#4327</a>)</li>
<li>Glibc: Add unstable support for _FILE_OFFSET_BITS=64 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4345">#4345</a>)</li>
<li>Hermit: Add <code>AF_UNSPEC</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Hermit: Add <code>AF_VSOCK</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Illumos, NetBSD: Add <code>timerfd</code> APIs (<a
href="https://redirect.github.com/rust-lang/libc/pull/4333">#4333</a>)</li>
<li>Linux: Add <code>_IO</code>, <code>_IOW</code>, <code>_IOR</code>,
<code>_IOWR</code> to the exported API (<a
href="https://redirect.github.com/rust-lang/libc/pull/4325">#4325</a>)</li>
<li>Linux: Add <code>tcp_info</code> to uClibc bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/4347">#4347</a>)</li>
<li>Linux: Add further BPF program flags (<a
href="https://redirect.github.com/rust-lang/libc/pull/4356">#4356</a>)</li>
<li>Linux: Add missing INPUT_PROP_XXX flags from
<code>input-event-codes.h</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4326">#4326</a>)</li>
<li>Linux: Add missing TLS bindings (<a
href="https://redirect.github.com/rust-lang/libc/pull/4296">#4296</a>)</li>
<li>Linux: Add more constants from <code>seccomp.h</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4330">#4330</a>)</li>
<li>Linux: Add more glibc <code>ptrace_sud_config</code> and related
<code>PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG</code>. (<a
href="https://redirect.github.com/rust-lang/libc/pull/4386">#4386</a>)</li>
<li>Linux: Add new netlink flags (<a
href="https://redirect.github.com/rust-lang/libc/pull/4288">#4288</a>)</li>
<li>Linux: Define ioctl codes on more architectures (<a
href="https://redirect.github.com/rust-lang/libc/pull/4382">#4382</a>)</li>
<li>Linux: Add missing <code>pthread_attr_setstack</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4349">#4349</a>)</li>
<li>Musl: Add missing <code>utmpx</code> API (<a
href="https://redirect.github.com/rust-lang/libc/pull/4332">#4332</a>)</li>
<li>Musl: Enable <code>getrandom</code> on all platforms (<a
href="https://redirect.github.com/rust-lang/libc/pull/4346">#4346</a>)</li>
<li>NuttX: Add more signal constants (<a
href="https://redirect.github.com/rust-lang/libc/pull/4353">#4353</a>)</li>
<li>QNX: Add QNX 7.1-iosock and 8.0 to list of additional cfgs (<a
href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li>
<li>QNX: Add support for alternative Neutrino network stack
<code>io-sock</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4169">#4169</a>)</li>
<li>Redox: Add more <code>sys/socket.h</code> and <code>sys/uio.h</code>
definitions (<a
href="https://redirect.github.com/rust-lang/libc/pull/4388">#4388</a>)</li>
<li>Solaris: Temporarily define <code>O_DIRECT</code> and
<code>SIGINFO</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4348">#4348</a>)</li>
<li>Solarish: Add <code>secure_getenv</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4342">#4342</a>)</li>
<li>VxWorks: Add missing <code>d_type</code> member to
<code>dirent</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li>
<li>VxWorks: Add missing signal-related constsants (<a
href="https://redirect.github.com/rust-lang/libc/pull/4352">#4352</a>)</li>
<li>VxWorks: Add more error codes (<a
href="https://redirect.github.com/rust-lang/libc/pull/4337">#4337</a>)</li>
</ul>
<h3>Deprecated</h3>
<ul>
<li>FreeBSD: Deprecate <code>TCP_PCAP_OUT</code> and
<code>TCP_PCAP_IN</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4381">#4381</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Cygwin: Fix member types of <code>statfs</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4324">#4324</a>)</li>
<li>Cygwin: Fix tests (<a
href="https://redirect.github.com/rust-lang/libc/pull/4357">#4357</a>)</li>
<li>Hermit: Make <code>AF_INET = 3</code> (<a
href="https://redirect.github.com/rust-lang/libc/pull/4344">#4344</a>)</li>
<li>Musl: Fix the syscall table on RISC-V-32 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li>
<li>Musl: Fix the value of <code>SA_ONSTACK</code> on RISC-V-32 (<a
href="https://redirect.github.com/rust-lang/libc/pull/4335">#4335</a>)</li>
<li>VxWorks: Fix a typo in the <code>waitpid</code> parameter name (<a
href="https://redirect.github.com/rust-lang/libc/pull/4334">#4334</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a5eab581f9"><code>a5eab58</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/libc/issues/4410">#4410</a>
from tgross35/release-libc</li>
<li><a
href="481eca7cc3"><code>481eca7</code></a>
chore: release libc 0.2.172</li>
<li><a
href="ce2edbbaa9"><code>ce2edbb</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/libc/issues/4399">#4399</a>
from tgross35/backport-triagebot-branch-warn</li>
<li><a
href="31b3200907"><code>31b3200</code></a>
Suggest stable-nominated in the PR template</li>
<li><a
href="3bffe1d58a"><code>3bffe1d</code></a>
Make triagebot warn on non-default branches</li>
<li><a
href="03e6ffc8c4"><code>03e6ffc</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/libc/issues/4396">#4396</a>
from tgross35/backport-serrano</li>
<li><a
href="f9a47ac811"><code>f9a47ac</code></a>
Define SO_BINDTOIFINDEX on Android</li>
<li><a
href="a358dae479"><code>a358dae</code></a>
Add missing utmpx apis for linux musl</li>
<li><a
href="1ff2f2181a"><code>1ff2f21</code></a>
adding linux glibc ptrace_sud_config and related
PTRACE_*ET_SYSCALL_USER_DISP...</li>
<li><a
href="55c58c956d"><code>55c58c9</code></a>
Add more redox sys/socket.h and sys/uio.h definitions</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/libc/compare/0.2.171...0.2.172">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.171&new-version=0.2.172)](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-15 17:34:49 +00:00
webbeef
98884a5081
Switch to data_url::mime for document content type (#36522)
The data_url Mime parser has a more conformant behavior in most cases,
including dealing with charsets.

Testing: wpt expectations with new passes are updated.

Signed-off-by: webbeef <me@webbeef.org>
2025-04-15 17:12:48 +00:00
Jonathan Schwender
32d59cfff4
Fix git failure on macos (#36544)
Fixes the following warning:
```

warning: servoshell@0.0.1: Could not generate git version information: "dyld[59398]: Symbol not found: _libintl_setlocale\n  Referenced from: <CB4FE7B2-A5DC-34F0-8247-A96F45D664E8> /opt/homebrew/Cellar/git/2.48.1/bin/git\n  Expected in:     <0DA2D46D-7A17-3860-809D-71FD05B785FA> /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libintl.8.dylib\n"
```

This was discussed in
https://github.com/servo/servo/issues/36435#issuecomment-2794224073.

mach sets DYLD_LIBRARY_PATH, which is currently necessary for our unit
tests, but causes git to fail in the build script. Simply unsetting the
environment variable before invoking git works around this problem.

Testing: Tested manually on macos and verified the warning does not
occur anymore.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-15 14:55:37 +00:00
Andrei Volykhin
6b38289584
canvas: Add "EnforceRange" attribute to CanvasImageData interface (#36546)
Add missing "EnforceRange" attribute to interface methods
https://html.spec.whatwg.org/multipage/canvas.html#canvasimagedata

--
- [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/pixel-manipulation/2d.imageData*
tests/wpt/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData*

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-04-15 14:44:44 +00:00
Oriol Brufau
10f6f50c61
script: Implement CSSStyleSheet constructor (#36521)
https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssstylesheet

Testing: covered by WPT
This is part of #36162

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-15 14:05:13 +00:00
Simon Wülker
372fd04b23
Remove two outdated TODO comments in HTMLScriptElement (#36540)
We support both the "referrerpolicy" and the "nonce" attribute on script
elements, just not where the spec tells us to do it.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-15 13:44:48 +00:00
Kingsley Yung
dacd951c9f
Make DOMException serializable (#36535)
Follow the implementation of making DOMPoint and DOMPointReadOnly
serializable in PR #35989

Testing: Passed a test previously expected to fail.
Fixes: #36463

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-04-15 13:25:31 +00:00
Oriol Brufau
cc04caa8ce
Unify media query and media query list parsing (#36520)
Several places were using identical logic in order to parse a media
queries or media query lists.

This patch centralizes the logic into 2 new helper methods in MediaList.

Testing: not needed (no behavior change)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-15 11:48:01 +00:00
Astraea Quinn S
064f82d0a3
[OHOS] Allow setting the log-filter via cli arguments (#36444)
This PR allows setting the log-filter according to the env_filter spec
via CLI arguments.
Testing is currently in progress, will be done on machines running OHOS.

---------

Signed-off-by: Astraea Quinn Skoutelli <astraea.quinn.skoutelli@huawei.com>
Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-15 10:19:13 +00:00
Jonathan Schwender
1ea80c4335
touch: Fix panic with -Zconvert-mouse-to-touch (#36531)
- We previously converted all mouse move events to touch events, but we
should only be doing that while a mouse button is pressed (a finger
always does touch-down -> move -> up / cancel)
- Only consider Left mouse button for mouse-to-touch. We currently
already hardcode TouchId 0, which we would need to change in order to
properly support Multi-touch. Since we don't have any Multi-touch
gestures at the moment, we leave this unimplemented and simply only
evaluate the left mouse button.

Testing:  Manual testing. We don't have servodriver support yet.
Fixes: #36526

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-15 09:59:30 +00:00
Martin Robinson
fe4306fc30
Revert "compositor: Unify the cross process and in-process API (#36443)" (#36533)
This reverts commit 4c55104b36.

This commit introduced an issue where messages from script to the
compositor no longer woke up the embedder. There is a larger issue
here, but this change exacerbated it.

Fixes #36528.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-15 09:15:14 +00:00
Gregory Terzian
f8b6b9f7b6
Transfer ReadableStream (#36181)
<!-- Please describe your changes on the following line: -->

Add transfer support to ReadableStream. Part of
https://github.com/servo/servo/issues/34676

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

<!-- Either: -->
- [ ] 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: gterzian <2792687+gterzian@users.noreply.github.com>
2025-04-15 07:39:26 +00:00
webbeef
c9489ca04f
Remove unused pref: dom_forcetouch_enabled (#36524)
This is a leftover from e7c754fb64

Testing: removing unused pref, no testing needed.

Signed-off-by: webbeef <me@webbeef.org>
2025-04-15 02:18:11 +00:00
Oriol Brufau
7171d18e96
Run all tests with --enable-experimental-web-platform-features (#36335)
Fixes: #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 23:14:47 +00:00
Oriol Brufau
428e8f7dd8
Enable all experimental web platform features on all testsuites (#36519)
This affects the following testsuites:
 - tests/wpt/tests/
 - tests/wpt/mozilla/tests/
 - tests/wpt/webgl/tests/
 - tests/wpt/webgpu/tests/

Testing: Several tests improve
This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 18:33:38 +00:00
Oriol Brufau
c7502a99f0
layout: Floor the max-content size by the min-content size (#36518)
It's typically a given that the min-content size can't exceed the
max-content size. However, it was possible to break that assumption when
an inline formatting context had contents with a negative outer size
(due to margins). This could lead to assert failures.

This patch avoids the problem by flooring the max-content size to not be
smaller than the min-content size. Note there is no interoperability:
https://github.com/w3c/csswg-drafts/issues/12076

Testing: adding new reftest and crashtest
Fixes: #36481

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 18:00:32 +00:00
dependabot[bot]
7b2fd52992
build(deps): bump clap from 4.5.35 to 4.5.36 (#36517)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.35 to 4.5.36.
<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.5.36</h2>
<h2>[4.5.36] - 2025-04-11</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Revert 4.5.35's &quot;Don't leave space for shorts
if there are none&quot; for now</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.5.36] - 2025-04-11</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Revert 4.5.35's &quot;Don't leave space for shorts
if there are none&quot; for now</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7a6475e3c1"><code>7a6475e</code></a>
chore: Release</li>
<li><a
href="0266c4197f"><code>0266c41</code></a>
docs: Update changelog</li>
<li><a
href="6ec0b43448"><code>6ec0b43</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5791">#5791</a>
from okapia/zsh-default-fallback</li>
<li><a
href="e40168c2fd"><code>e40168c</code></a>
fix(zsh): Use _default as zsh completion fallback</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.36">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.5.35&new-version=4.5.36)](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-14 17:45:09 +00:00
dependabot[bot]
ad6009d3e3
build(deps): bump anyhow from 1.0.97 to 1.0.98 (#36516)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.97 to 1.0.98.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/anyhow/releases">anyhow's
releases</a>.</em></p>
<blockquote>
<h2>1.0.98</h2>
<ul>
<li>Add <a
href="https://docs.rs/anyhow/1/anyhow/struct.Error.html#method.into_boxed_dyn_error"><code>self.into_boxed_dyn_error()</code></a>
and <a
href="https://docs.rs/anyhow/1/anyhow/struct.Error.html#method.reallocate_into_boxed_dyn_error_without_backtrace"><code>self.reallocate_into_boxed_dyn_error_without_backtrace()</code></a>
methods for anyhow::Error (<a
href="https://redirect.github.com/dtolnay/anyhow/issues/415">#415</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="709fe86f04"><code>709fe86</code></a>
Release 1.0.98</li>
<li><a
href="cbc1ad2b16"><code>cbc1ad2</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/415">#415</a>
from dtolnay/intodyn</li>
<li><a
href="e1a2017668"><code>e1a2017</code></a>
Add 2 different conversions to Box&lt;dyn Error + Send + Sync +
'static&gt;</li>
<li><a
href="29f2eddd15"><code>29f2edd</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/416">#416</a>
from dtolnay/oldnostd</li>
<li><a
href="2244db872f"><code>2244db8</code></a>
Omit unused object_boxed from vtable in old no-std rustc</li>
<li><a
href="213a9c2e6c"><code>213a9c2</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/414">#414</a>
from dtolnay/nightly</li>
<li><a
href="02aa6b6faa"><code>02aa6b6</code></a>
Make all nightly go through the module that was probed</li>
<li>See full diff in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.97...1.0.98">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.97&new-version=1.0.98)](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-14 17:32:33 +00:00
dependabot[bot]
a1364a9538
build(deps): bump jiff from 0.2.6 to 0.2.8 (#36515)
Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.6 to 0.2.8.
<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.8 (2025-04-13)</h1>
<p>This release fixes a bug where the constructors on
<code>SignedDuration</code>
for floating point durations could panic (in debug mode) or produce
incorrect results (in release mode). This bug only impacts users of
the <code>try_from_secs_{f32,f64}</code> and
<code>from_secs_{f32,f64}</code> methods on
<code>SignedDuration</code>.</p>
<p>Enhancements:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/pull/326">#326</a>:
Add an alternate <code>Debug</code> impl for <code>SignedDuration</code>
that only shows its second
and nanosecond components (while using only one component when the other
is
zero).</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/324">#324</a>:
Fix a bug that could produce a panic or incorrect results in
<code>SignedDuration::(try_)?from_secs_{f32,f64}</code>.</li>
</ul>
<h1>0.2.7 (2025-04-13)</h1>
<p>This release includes a bug fix that changes how an empty but set
<code>TZ</code>
environment variable is interpreted (as indistinguishable from
<code>TZ=UTC</code>).
This also includes a new enabled by default create feature,
<code>perf-inline</code>,
which allows toggling Jiff's use of <code>inline(always)</code>. This
may help improve
compile times or decrease binary size.</p>
<p>Enhancements:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/pull/320">#320</a>:
Remove some internal uses of generics to mildly improve compile
times.</li>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/pull/321">#321</a>:
Add <code>perf-inline</code> crate feature for controlling
<code>inline(always)</code> annotations.</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/311">#311</a>:
Make <code>TZ=</code> indistinguishable from <code>TZ=UTC</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d27af19fe2"><code>d27af19</code></a>
0.2.8</li>
<li><a
href="d1921a8fb7"><code>d1921a8</code></a>
changelog: 0.2.8</li>
<li><a
href="093d6b9475"><code>093d6b9</code></a>
signed_duration: add alternate <code>Debug</code> implementation</li>
<li><a
href="c939baaea6"><code>c939baa</code></a>
signed_duration: fix panic in
<code>SignedDuration::try_from_secs_f64</code></li>
<li><a
href="3e32e71ac8"><code>3e32e71</code></a>
0.2.7</li>
<li><a
href="01e241431c"><code>01e2414</code></a>
changelog: 0.2.7</li>
<li><a
href="06b94b52ae"><code>06b94b5</code></a>
jiff-static: add <code>perf-inline</code> feature to
<code>jiff-static</code></li>
<li><a
href="cd4b25e0fb"><code>cd4b25e</code></a>
vim: remove most linked projects</li>
<li><a
href="058c317405"><code>058c317</code></a>
jiff-cli: re-generate <code>shared</code> code in
<code>jiff-static</code></li>
<li><a
href="32c4b9337c"><code>32c4b93</code></a>
changelog: add recent changes</li>
<li>Additional commits viewable in <a
href="https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.6...jiff-static-0.2.8">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.6&new-version=0.2.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 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-14 17:32:05 +00:00
dependabot[bot]
aee06b1cf4
build(deps): bump data-encoding from 2.8.0 to 2.9.0 (#36514)
Bumps [data-encoding](https://github.com/ia0/data-encoding) from 2.8.0
to 2.9.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4fce77c46b"><code>4fce77c</code></a>
Release 2.9.0 (<a
href="https://redirect.github.com/ia0/data-encoding/issues/138">#138</a>)</li>
<li><a
href="d81616352a"><code>d816163</code></a>
Add encode_mut_str to guarantee UTF-8 for safe callers (<a
href="https://redirect.github.com/ia0/data-encoding/issues/137">#137</a>)</li>
<li><a
href="ec53217669"><code>ec53217</code></a>
Update doc badge in README.md (<a
href="https://redirect.github.com/ia0/data-encoding/issues/135">#135</a>)</li>
<li>See full diff in <a
href="https://github.com/ia0/data-encoding/compare/v2.8.0...v2.9.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=data-encoding&package-manager=cargo&previous-version=2.8.0&new-version=2.9.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-14 17:19:51 +00:00
Tim van der Lippe
4e1ea81992
Implement CSP check for Trusted Types (#36363)
The algorithm [1] is implemented in the content-security-policy
package.

Requires
https://github.com/rust-ammonia/rust-content-security-policy/pull/56
This is part of #36258

[1]:
https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-should-trusted-type-policy-creation-be-blocked-by-content-security-policy

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-14 16:44:50 +00:00
Martin Robinson
d46a17a487
layout: Add a LayoutBoxBase to inline boxes (#36513)
`LayoutBoxBase` will soon contain laid out `Fragment`s of a box tree
node in order to facilitate incremental layout and also layout queries.
This is currently missing for inline boxes, so this change adds a
`LayoutBoxBase` to them.

Testing: This should not change any observable behavior, so existing
WPT suites should suffice for testing.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 16:02:37 +00:00
Tim van der Lippe
440739090f
Gate window.trustedTypes behind flag (#36511)
This was missed in #36355 and should have also been gated by the flag.
With these, the wpt.fyi tests should now no longer pass, as the flag
hasn't been removed yet.

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-14 14:19:59 +00:00
Gae24
2bab5d8d52
async clipboard: implement writeText (#36498)
Implement enough of the Clipboard API to have a working `writeText`.

Testing: Unfortunately many clipboard-apis tests require testdriver, so
only idlharness ones will pass now.

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-04-14 13:49:43 +00:00
Martin Robinson
c6dc7c83a8
libservo: Make zooming and HiDPI scaling work per-WebView (#36419)
libservo: Make zooming and HiDPI scaling work per-`WebView`

This change moves all zooming and HiDPI scaling to work per-`WebView` in
both libservo and Compositor. This means that you can pinch zoom one
`WebView` and it should now work independently of other `WebView`s.
This is accomplished by making each `WebView` in the WebRender scene
have its own scaling reference frame.

All WebViews are now expected to manage their HiDPI scaling factor and
this can be set independently of other WebViews. Perhaps in the future
this will become a Servo-wide setting.

This allows full removal of the `WindowMethods` trait from Servo.

Testing: There are not yet any tests for the WebView API, but I hope
to add those soon.

Co-authored-by: Shubham Gupta <shubham13297@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Shubham Gupta <shubham13297@gmail.com>
2025-04-14 12:01:49 +00:00
Oriol Brufau
f1417c4e75
layout: Let getComputedStyle resolve auto min size as 0px when needed (#36430)
The initial value of `min-width` and `min-height` was 0px in CSS2.
However, CSS3 changed it to `auto`, so for backwards compatibility,
`getComputedStyle` needs to resolve it to 0px in a bunch of cases.

Testing: covered by WPT

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 10:31:48 +00:00
Martin Robinson
fbe1f0ef6d
compositing: Remove IOCompositor::zoom_time and IOCompositor::zoom_action (#36509)
It seems that these two members are completely unused.

Testing: These changes are untested as they simply removed dead code.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-14 10:09:43 +00:00
Martin Robinson
d1c4b1be76
libservo: Remove the unused multiview feature (#36485)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-14 07:46:07 +00:00
Simon Wülker
ca5e0c160e
Remove HTMLStyleElement::line_number (#36507)
This field is unused.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-14 04:10:06 +00:00
Tim van der Lippe
85e4a2b5c7
Update FetchTaskTarget to propagate CSP violations. (#36409)
It also updates the FetchResponseListener to process CSP violations to
ensure that iframe elements (amongst others) properly generate the CSP
events. These iframe elements are used in the Trusted Types tests
themselves and weren't propagating the violations before.

However, the tests themselves are still not passing since they also use
Websockets, which currently aren't using the fetch machinery itself.
That is fixed as part of [1].

[1]: https://github.com/servo/servo/issues/35028

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-13 20:54:59 +00:00
Yerkebulan Tulibergenov
5d84acc06e
add CanGc as argument to methods in HTMLInputElement, HTMLLinkElement (#36504)
add CanGc as argument to methods in HTMLInputElement, HTMLLinkElement

Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-13 20:42:52 +00:00
Jerens Lensun
d5284dfad9
Support optional message for dataclone error (#36308)
- [x] our [DataClone
error](d733abfca0/components/script/dom/bindings/error.rs (L80))
needs to support an optional message
- [x] we need to add support to our DOMException implementation to allow
an optional message to replace the default message
- [x] we need to create a new struct used by both StructuredDataReader
and StructuredDataWriter for storing the error message in the
report_error_callback
- [x] report_error_callback needs to cast the closure pointer to the new
struct
- [x] the code that [throws a DataClone
error](5d1c64dba9/components/script/dom/bindings/structuredclone.rs (L542))
needs to use the stored error message if it's available

Testing: *Describe how this pull request is tested or why it doesn't
require tests*
Fixes: #36191

---------

Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
2025-04-13 18:10:04 +00:00
Josh Matthews
740a94ef20
Fix typo in tracing code. (#36501)
Presumably this was an autocomplete mistake.

Testing: ran Servo with RUST_LOG enabled. No panic any more.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-13 16:42:14 +00:00
Yerkebulan Tulibergenov
3babf74986
add CanGc as argument to methods in HTMLCollection, HTMLDataListElement, HTMLDialogElement, HTMLElement, HTMLFieldSetElement, HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement (#36495)
add CanGc as argument to methods in HTMLCollection, HTMLDataListElement,
HTMLDialogElement, HTMLElement, HTMLFieldSetElement,
HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement

Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-13 07:10:00 +00:00
chocolate-pie
06f86f88a2
script: Clean up CSP management code (#36493)
Current implementation takes arguments for specifying values of
violation report, but is difficult to understand which value should be
passed. These changes create new builder for violation report to address
the issue.

Testing: These changes do not require tests because they just refactor
current code

Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
2025-04-13 06:04:24 +00:00
Yerkebulan Tulibergenov
70c0faa0e9
add CanGc as argument to methods in ElementInternals, GlobalScope, HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement (#36492)
add CanGc as argument to methods in ElementInternals, GlobalScope,
HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement

Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-13 05:15:07 +00:00
Tim van der Lippe
dcc88b53aa
Implement "Create a Trusted Type" algorithm (#36454)
This algorithm is quite straightforward written in the specification,
but leads to some type awkwardness in Rust. Most notably, the callbacks
have different types and cannot be unified easily. They also return
different string types. Similarly, the returning objects are all unique
types and don't have a common denominator.

Therefore, rather than implementing it in 1-to-1 fashion with the
specification text, it instead uses callbacks to instruct the type
system of what to call when.

This is further complicated by the fact that the callback can exist
or not, as well as return a value or not. This requires multiple
unwrangling, combined with the fact that the algorithm should throw
or not.

All in all, the number of lines is relatively low compared to the
specification algorithm and the Rust compiler does a lot of heavy
lifting figuring out which type is what.

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

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-13 03:55:23 +00:00
Servo WPT Sync
0c045fc247
Sync WPT with upstream (13-04-2025) (#36488)
Automated downstream sync of changes from upstream as of 13-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-04-13 02:52:15 +00:00
Sebastian C
85bd0918f2
Update ProgressEvent to use doubles (#36487)
See: https://github.com/whatwg/xhr/pull/394

Testing: WPT tests exist for this

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-13 01:41:39 +00:00
Martin Robinson
4c55104b36
compositor: Unify the cross process and in-process API (#36443)
Because there used to be two traits exposing messages to the compositor,
there were two kinds of messages that could be sent:

1. In-process messages from the `Constellation`
2. Cross-process messages from other parts of Servo

Now these two types of messages can be unified into one type. With that
done the compositor can simply keep a single `IpcReceiver` for all
messages, instead of having to set up a route for the cross-process
messsages. This decreases overhead of cross proceses messages a bit, but
more importantly solves an issue where Servo would rely on the
compositor's cross-process message route after the `Constellation` had
called `ROUTER.shutdown()`.

This is part of #36442.

Testing: This is covered by existing WPT tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-12 21:38:22 +00:00