Commit graph

51119 commits

Author SHA1 Message Date
dependabot[bot]
bfbe464eba
build(deps): bump smallvec from 1.14.0 to 1.15.0 (#36387)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.14.0 to
1.15.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/servo/rust-smallvec/releases">smallvec's
releases</a>.</em></p>
<blockquote>
<h2>v1.15.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix typos by <a
href="https://github.com/waywardmonkeys"><code>@​waywardmonkeys</code></a>
in <a
href="https://redirect.github.com/servo/rust-smallvec/pull/373">servo/rust-smallvec#373</a></li>
<li>Implement bincode2 encode/decode support for smallvec v1 by <a
href="https://github.com/markbt"><code>@​markbt</code></a> in <a
href="https://redirect.github.com/servo/rust-smallvec/pull/375">servo/rust-smallvec#375</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/markbt"><code>@​markbt</code></a> made
their first contribution in <a
href="https://redirect.github.com/servo/rust-smallvec/pull/375">servo/rust-smallvec#375</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/servo/rust-smallvec/compare/v1.14.0...v1.15.0">https://github.com/servo/rust-smallvec/compare/v1.14.0...v1.15.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7c4d350f5e"><code>7c4d350</code></a>
Versoin 1.15.0</li>
<li><a
href="aeceb0a5b1"><code>aeceb0a</code></a>
Temporarily disable broken fuzzing in CI</li>
<li><a
href="a2fb430411"><code>a2fb430</code></a>
Pin honggfuzz binary version</li>
<li><a
href="35e7ffeede"><code>35e7ffe</code></a>
Add support for bincode encode and decode</li>
<li><a
href="0d019cd54a"><code>0d019cd</code></a>
Rename bincode dev-dependency to bincode1</li>
<li><a
href="6c8751df6a"><code>6c8751d</code></a>
Merge pull request <a
href="https://redirect.github.com/servo/rust-smallvec/issues/373">#373</a>
from waywardmonkeys/v1-fix-typos</li>
<li><a
href="36317fa17f"><code>36317fa</code></a>
Fix typos</li>
<li>See full diff in <a
href="https://github.com/servo/rust-smallvec/compare/v1.14.0...v1.15.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=smallvec&package-manager=cargo&previous-version=1.14.0&new-version=1.15.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-07 21:19:45 +00:00
Simon Wülker
f10640199d
Split up the URLPattern implementation (#36391)
The current implementation is already rather large at ~2.5k lines (~2k
LoC). There is still quite a lot of functionality left to implement, so
let's split it up while it's still manageable.

Testing: Covered by existing web platform tests

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 19:48:05 +00:00
dependabot[bot]
d6255249a3
build(deps): bump indexmap from 2.8.0 to 2.9.0 (#36388)
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.8.0 to
2.9.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md">indexmap's
changelog</a>.</em></p>
<blockquote>
<h2>2.9.0 (2025-04-04)</h2>
<ul>
<li>Added a <code>get_disjoint_mut</code> method to
<code>IndexMap</code>, matching Rust 1.86's
<code>HashMap</code> method.</li>
<li>Added a <code>get_disjoint_indices_mut</code> method to
<code>IndexMap</code> and <code>map::Slice</code>,
matching Rust 1.86's <code>get_disjoint_mut</code> method on
slices.</li>
<li>Deprecated the <code>borsh</code> feature in favor of their own
<code>indexmap</code> feature,
solving a cyclic dependency that occured via
<code>borsh-derive</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1818d4140d"><code>1818d41</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/387">#387</a>
from cuviper/release-2.9.0</li>
<li><a
href="9f4998341b"><code>9f49983</code></a>
Release 2.9.0</li>
<li><a
href="582a90fda3"><code>582a90f</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/386">#386</a>
from cuviper/de-borsh</li>
<li><a
href="90117397b6"><code>9011739</code></a>
Deprecate the &quot;borsh&quot; feature</li>
<li><a
href="0a836e8648"><code>0a836e8</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/238">#238</a>
from NiklasJonsson/get_many_mut</li>
<li><a
href="434d7ac6d1"><code>434d7ac</code></a>
Avoid let-else for MSRV's sake</li>
<li><a
href="5be552d557"><code>5be552d</code></a>
Implement additional suggestions from review</li>
<li><a
href="4e1d8cef47"><code>4e1d8ce</code></a>
Address review feedback</li>
<li><a
href="5aec9ec674"><code>5aec9ec</code></a>
Implement get_disjoint_mut for arrays of keys</li>
<li><a
href="d10de30e74"><code>d10de30</code></a>
Merge pull request <a
href="https://redirect.github.com/indexmap-rs/indexmap/issues/385">#385</a>
from iajoiner/docs/macros</li>
<li>Additional commits viewable in <a
href="https://github.com/indexmap-rs/indexmap/compare/2.8.0...2.9.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=indexmap&package-manager=cargo&previous-version=2.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-07 18:56:18 +00:00
dependabot[bot]
ca37cd77d5
build(deps): bump prettyplease from 0.2.31 to 0.2.32 (#36389)
Bumps [prettyplease](https://github.com/dtolnay/prettyplease) from
0.2.31 to 0.2.32.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/prettyplease/releases">prettyplease's
releases</a>.</em></p>
<blockquote>
<h2>0.2.32</h2>
<ul>
<li>Forbid block comments that end in a slash (<a
href="https://redirect.github.com/dtolnay/prettyplease/issues/113">#113</a>,
thanks <a
href="https://github.com/arkeet"><code>@​arkeet</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81c6daa38b"><code>81c6daa</code></a>
Release 0.2.32</li>
<li><a
href="9e7423e889"><code>9e7423e</code></a>
Reorder block comment logic to consider bytes in order</li>
<li><a
href="3cf820b4d8"><code>3cf820b</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/prettyplease/issues/113">#113</a>
from arkeet/block-comment-slash</li>
<li><a
href="7c441be880"><code>7c441be</code></a>
Forbid block comments that end in a slash.</li>
<li>See full diff in <a
href="https://github.com/dtolnay/prettyplease/compare/0.2.31...0.2.32">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettyplease&package-manager=cargo&previous-version=0.2.31&new-version=0.2.32)](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-07 18:54:47 +00:00
Simon Wülker
8f1c23692e
Create a parser for URLPatterns (#36382)
This change implements the pattern parser, completing the "parsing
pipeline" for URL patterns.

Testing: Primarily `urlpattern/urlpattern-hasregexpgroups.any.js`, some
other subtests start to pass too.

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 18:08:22 +00:00
Martin Robinson
2b63e60e8f
layout: Add initial support for the ::marker pseudo-element (#36317)
This change adds support for the `::marker` pseudo-element and ensure
that
markers are cached into the box tree. This is only initial support,
there are a few
things missing such as animations, transitions, and support the
`content` CSS
property.

Testing: There are WPT tests for this change.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-07 17:49:05 +00:00
Gregory Terzian
a5c547259f
Streams: add an underlying sink type (#36385)
Introduces the concept of different types of underlying sinks for the
writable controller, and a minor fix to the abort algorithm.

The dead code is already used in the wip at
https://github.com/servo/servo/pull/36181/, and will also be used in a
another wip in parallel to implement transform stream, so the concept is
introduced here with dead code to facilitate the work in parallel and
prevent too much merge conflicts down the road.

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-04-07 16:48:42 +00:00
Manuel Rego
777b74252a
wpt: Unskip acid folder as most tests are passing (#36340)
Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2025-04-07 15:46:41 +00:00
Usman Yahaya Baba
8c6dc3fee1
Remove trailing space in CSSStyleSheet::AddRule() (#36383)
-Remove trailing space in CSSStyleSheet::AddRule()

Testing: The change made does not require testing
Fixes: https://github.com/servo/servo/issues/36380

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
2025-04-07 15:20:39 +00:00
Euclid Ye
3242592f34
Fix transition toggle & cancellation & delay (#35978)
More details in Stylo PR: https://github.com/servo/stylo/pull/145

---
<!-- 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 
- fixes https://github.com/servo/servo/issues/35833
- fixes https://github.com/servo/servo/issues/35982

<!-- Either: -->
- [x] There are new passing test: `css/css-logical/animation-004.html:
Transitions from physical to logical update when the direction is
changed`

Created new test files as well: 

1. `css-transitions/transition-remove-and-change-immediate.html`
2.  `css-transitions/transition-zero-duration-with-delay.html`
3. `css-transitions/transitioncancel-003.html`

<!-- 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. -->

cc @Asun0204  @xiaochengh @stevennovaryo

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-04-07 14:51:32 +00:00
ToBinio
4f41354349
layout: Scale images in image_set by their specified resolution (#36374)
This PR makes it so the `resolution` factor in `image-set` also affects
the image size.
For instance, in the example below:

```css
background-image: image-set("./small.png" 1x, "./large.png" 2x);
```

if `large.png` is used, an image which is 32x32 will be rendered as
16x16. This is specified
in <https://drafts.csswg.org/css-images-4/#image-set-notation>.

Testing:
 - `css/css-images/image-set/image-set-resolution-002.html`

---------

Signed-off-by: tobinio <Tobias.frischmann1@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-07 13:54:29 +00:00
Oriol Brufau
3e249c9bc4
Enable layout_container_queries_enabled on all WPT tests (#36348)
This feature is part of --enable-experimental-web-platform-features, so
it should be enabled on all tests.

It's not really implemented beyond parsing, but it should be safe to
enable. It mostly changes test results from ERROR to FAIL.

This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-07 11:43:11 +00:00
Mukilan Thiyagarajan
3c4a4d53dd
ci: use Ubuntu 22.04 for nightly jobs (#36377)
The upstream PR (web-platform-tests/wpt#51084) to update the WPT.fyi
docker image to 22.04 landed a few days back. No new issues have been
discovered so far in wpt.fyi, so it should be safe for us to move to
22.04 for the nightly builds.

Fixes #35747.

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2025-04-07 11:32:32 +00:00
Simon Wülker
0a4174ad0e
Add a tokenizer for URLPatterns (#36362)
Not a lot of new tests start to pass because the actual parser is still
missing, so we're only passing tests for invalid inputs. The parser will
be added in the next PR.

This is part 3 of upstreaming the changes in
https://github.com/simonwuelker/servo/tree/urlpattern

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 06:25:32 +00:00
Gae24
d1243a1867
dom: Implement ClipboardItem (#36336)
implement the `ClipboardItem` interface

Testing: covered by existing wpt tests

part of #36084

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-04-06 23:47:57 +00:00
Yerkebulan Tulibergenov
33b00dbe40
Add CanGc as arguments in methods in devtools.rs, CharacterData, CSSStyleRule, CSSStyleSheet (#36375)
Add CanGc as arguments in methods in devtools.rs, CharacterData,
CSSStyleRule, CSSStyleSheet

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

---------

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-06 23:44:58 +00:00
elomscansio
1f558a0d49
Fix radio group validity update when removing or selecting an input (#36252)
This PR fixes an issue where radio inputs in the same group failed to
correctly update their `validity.valueMissing` state when:

- A **checked radio button was removed** from the DOM.
- A **different radio button was selected** by user interaction.

This behavior caused mismatches with how browsers like Firefox handle
radio group validation.

---

### Changes in This PR

#### Radio group revalidation on DOM removal
- Updated `unbind_from_tree()` to revalidate other radio buttons in the
same group when a checked input is removed.
- Uses `UnbindContext::parent` as the DOM root to ensure the correct
context is used during traversal.

#### New helper: `find_related_radios()`
- Encapsulates logic for finding other inputs in the same group.
- Used during both removal and attribute changes for consistency.

#### Validation on `checked`/`value` updates
- Introduced `update_related_validity_states()` to revalidate all group
members when a radio's `checked` or `value` is changed.

#### Web Platform Test (WPT) coverage
- Created a new WPT file: `radio-group-valueMissing.html`.
- Tests follow recommended `test()` pattern:
  - **Precondition**: Assert initial `valueMissing`.
  - **Action**: Remove or select a radio.
  - **Postcondition**: Assert expected `valueMissing`.

#### Manifest updated
- The WPT manifest now includes the new test.

---
<!-- 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 #36110

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

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
2025-04-06 23:26:15 +00:00
Martin Robinson
0caa271176
compositing: Combine webrender_traits and compositing_traits (#36372)
These two traits both exposed different parts of the compositing API,
but now that the compositor doesn't depend directly on `script` any
longer and the `script_traits` crate has been split into the
`constellation_traits` crate, this can be finally be cleaned up without
causing circular dependencies. In addition, some unit tests for the
`IOPCompositor`'s scroll node tree are also moved into
`compositing_traits` as well.

Testing: This just combines two crates, so no new tests are necessary.
Fixes: #35984.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-06 17:34:18 +00:00
Usman Yahaya Baba
e74a042efd
Remove unsafe from cross_origin_property_fallback (#36373)
Remove unsafe from cross_origin_property_fallback
- Refactors `cross_origin_property_fallback` to remove the `unsafe`
annotation from the function signature, as it now uses safe wrappers
instead of raw pointers
- Adds an `unsafe` block around `MutableHandle::from_raw`

Testing: Changes does not require test
Fixes: https://github.com/servo/servo/issues/36359

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
2025-04-06 15:46:32 +00:00
Usman Yahaya Baba
fab5e02972
Process colorSchemeSimulation in TargetConfigurationActor (#36297)
Implements Steps 1,4&6 of https://github.com/servo/servo/issues/35867:
- Adds `pub simulate_color_scheme` to `BrowsingContextActor` using
`script_chan`.
- Processes `colorSchemeSimulation` flag in `TargetConfigurationActor`’s
`updateConfiguration`.
- Routes `colorSchemeSimulation` from `RootActor` via
`TabDescriptorActor` to `BrowsingContextActor`.

Testing: Compiles and lints clean.
Fixes: https://github.com/servo/servo/issues/35867

---------

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
2025-04-06 14:19:42 +00:00
Usman Yahaya Baba
9d07416163
Remove unsafe from maybe_cross_origin_get_prototype (#36366)
Remove unsafe from maybe_cross_origin_get_prototype

-Refactors `maybe_cross_origin_get_prototype` to remove the `unsafe`
annotation from the function signature and `get_proto_object` argument
-Adds `unsafe` blocks around calls `D::GlobalScope::from_context` and
`MutableHandleObject::from_raw`

Testing: Changes does not require test
Fixes: https://github.com/servo/servo/issues/36357

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
2025-04-06 06:29:16 +00:00
Yerkebulan Tulibergenov
6898eae61e
Add CanGc as arguments in methods in Attr and Node (#36371)
Add CanGc as argument to methods in `Attr` and `Node`.

Addressed part of https://github.com/servo/servo/issues/34573.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are a refactor.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-06 06:27:59 +00:00
Servo WPT Sync
bd43b78735
Sync WPT with upstream (06-04-2025) (#36369)
Automated downstream sync of changes from upstream as of 06-04-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-04-06 04:11:16 +00:00
saku
b4fd9ebb0e
Fix: Add support for stylesheet MIME type quirk in quirks mode (#36338)
This PR implements the HTML spec quirk for stylesheets:
https://html.spec.whatwg.org/multipage/#link-type-stylesheet

The implementation adds a check in `stylesheet_loader.rs` to handle this
quirk condition correctly, and adds a new WPT test to verify that
same-origin non-CSS MIME type resources are properly treated as CSS in
quirks mode.

Testing: Added a new WPT test (`quirk-origin-check-positive.html`) that
verifies the positive case for this quirk.
Fixes: https://github.com/servo/servo/issues/36324

---------

Signed-off-by: saku-1101 <sakupi1101@outlook.jp>
2025-04-06 00:28:35 +00:00
Martin Robinson
6031a12fd1
Move ScriptToConstellationMsg to constellation_traits (#36364)
This is the last big change necessary to create the
`constellation_traits` crate. This moves the data structure for messages
that originate from the `ScriptThread` and are sent to the
`Contellation` to `constellation_traits`, effectively splitting
`script_traits` in half. Before, `script_traits` was responsible for
exposing the API of both the `ScriptThread` and the `Constellation` to
the rest of Servo.

- Data structures that are used by `ScriptToConstellationMsg` are moved
  to `constellation_traits`. The dependency graph looks a bit like this:
  `script_layout_interface` depends on `script_traits` depends on
  `constellation_traits` depends on `embedder_traits`.
- Data structures that are used in the embedding layer
  (`UntrustedNodeAddress`, `CompositorHitTestResult`, `TouchEventResult`
  and `AnimationState`) are moved to embedder_traits, to avoid a
  dependency cycle between `webrender_traits` and
  `constellation_traits`.
- Types dealing with MessagePorts and serialization are moved to
  `constellation_traits::message_port`.

Testing: This is covered by existing tests as it just moves types
around.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-05 22:13:29 +00:00
kaushikashok45
a67409fb25
Refactor:Refactors report_cross_origin_denial method to use unsafe block (#36365)
The method report_cross_origin_denial was marked as unsafe, have instead
moved the unsafe code within the method into an unsafe block within the
method and removed the unsafe marking for the method.

Testing: No testing needed
Fixes: This PR resolves #36356.
Signed-off-by : Ashok Kaushik kaushikashok45@gmail.com

---------

Signed-off-by: ashok.kaushik <ashok.kaushik@zohocorp.com>
Co-authored-by: ashok.kaushik <ashok.kaushik@zohocorp.com>
2025-04-05 19:06:48 +00:00
Tim van der Lippe
b87bf0b806
Stub out Trusted Types interfaces (#36355)
Some methods are implemented fully, while others are implemented
partly. With these implementations, there are no observed crashes
when running the trusted-types web-platform-tests.

Most notably, the tests/wpt/tests/trusted-types/idlharness.window.js
is now fully passing.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-05 13:08:56 +00:00
Kingsley Yung
3f24b44e15
structuredclone::read throws a DataClone error on failure (#36361)
In the structured clone writing API, the read function should throw a
DataClone error on failure, just like the write function.

Testing: It doesn't require tests.
Fixes: #36217

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-04-05 08:38:02 +00:00
webbeef
aef8537d75
Make the memory reporting multi-process aware (#35863)
So far the memory reporter aggregates reports from all processes, and
runs the system reporter only in the main process. Instead it is
desirable to have per-process reports. We do so by:
- creating a ProcessReports struct that holds includes the pid in
addition to the reports themselves.
- running the system memory reporter also in content processes.
- updating the about:memory page to create one report per process, and
add useful information like the pid and the urls loaded in a given
process.

<!-- Please describe your changes on the following line: -->


---
<!-- 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


![image](https://github.com/user-attachments/assets/0bafe140-539d-4d6a-8316-639309a22d4a)

Signed-off-by: webbeef <me@webbeef.org>
2025-04-05 05:42:12 +00:00
Sebastian C
76edcff202
Check all ancestor navigable trustworthiness for mixed content (#36157)
Propagate through documents a flag that represents if any of the
ancestor navigables has a potentially trustworthy origin.

The "potentially trustworthy origin" concept appears to have gotten
confused in a couple of places and we were instead testing if a URL had
"potentially trustworthy" properties.

The main test for the ancestor navigables is
[mixed-content/nested-iframes](https://github.com/web-platform-tests/wpt/blob/master/mixed-content/nested-iframes.window.js)

---
<!-- 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 #36108 

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

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-05 05:38:24 +00:00
Simon Wülker
478e876f6d
script: Implement input preprocessing for URLPatterns (#36225)
Implements https://urlpattern.spec.whatwg.org/#process-a-urlpatterninit
and the component canonicalization functions. These handle
percent-encoding and such for the components of a `URLPattern`.

No new tests pass, because the tokenizer and parser are still missing.

This is part 2 of upstreaming the changes in
https://github.com/simonwuelker/servo/tree/urlpattern

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-04 23:42:28 +00:00
Josh Matthews
944e795606
constellation: Only return focused browsing contexts that exist. (#36330)
The webdriver server relies on the constellation to report which
browsing context is focused, and assumes that a focused context is ready
for interaction. However, new browsing contexts exist in a weird state
where they are not tracked by the constellation until the initial load
is complete, which leads to the constellation rejecting attempts to
navigate a browsing context right after it's created. These changes
ensure the constellation does not report a browsing context as focused
until it's actually created and ready for interaction.

Testing: Run `./mach test-wpt --product servodriver
tests/wpt/mozilla/tests/mozilla/DOMParser.html`, which now runs to
completion.
Fixes: #34551
Fixes: #36328

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-04 21:41:14 +00:00
Tim van der Lippe
ad95a602f8
Run Trusted Types tests (#36354)
To set a baseline of test expectations prior to implementation.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-04 21:02:16 +00:00
Sebastian C
d93dad7f49
Implement TestUtils (#36301)
Implement the TestUtils namespace from
https://testutils.spec.whatwg.org/.
This should make the `js/builtins/weakrefs` tests run faster and more
consistently.

This change will enable other WPT tests but no tests exist currently for
TestUtils itself.
Fixes: #36290

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-04 19:42:28 +00:00
Martin Robinson
5a35e1faec
constellation: Rename messages sent to the Constellation (#36341)
Messages that are sent to the `Constellation` have pretty ambiguous
names.
This change does two renames:

- `ConstellationMsg` → `EmbedderToConstellationMessage`
- `ScriptMsg` → `ScriptToConstellationMessage`

This naming reflects that the `Constellation` stands in between the
embedding layer and the script layer and can receive messages from both.
Soon both of these message types will live in `constellation_traits`,
reflecting the idea that the `_traits` variant for a crate is
responsible for exposing the API for that crate.

Testing: No new tests are necessary here as this just renames two enums.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 19:39:38 +00:00
webbeef
c7a7862574
Prevent zombie processes in multi-process mode. (#36329)
This introduces a process manager that holds for each process a
"lifeline": this is the receiving end of a ipc channel that is not used
to send anything, but only to monitor the process presence. We turn that
ipc receiver into a crossbeam one to integrate the monitoring into the
constellation run loop. The sender side is made part of the initial
"UnprivilegedContent" data structure sent to the new process, both for
content and for service worker processes.
When a process dies we currently wait() on it to let the OS do a clean
shutdown.

Signed-off-by: webbeef <me@webbeef.org>
2025-04-04 19:39:13 +00:00
Martin Robinson
c09c31ef85
script: Remove code dealing with CompositorUntrustedNode (#36343)
There used to be two kinds of untrusted nodes, but these have been
unified, so the duplicate methods dealing with them in `script` can be
removed.

Testing: This is covered by existing tests as it shouldn't change
any behavior.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 18:55:05 +00:00
dependabot[bot]
54bf13de43
build(deps): bump cc from 1.2.17 to 1.2.18 (#36345)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.17 to 1.2.18.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.2.18</h2>
<h3>Other</h3>
<ul>
<li>Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1450">#1450</a>)</li>
<li>Use <code>std:🧵:available_parallelism</code> for determining
the default number of jobs (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1447">#1447</a>)</li>
<li>Fix mips64-openwrt-linux-musl parsing (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1449">#1449</a>)</li>
<li>Use compiler prefix <code>x86_64-linux-musl</code> (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1443">#1443</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.17...cc-v1.2.18">1.2.18</a>
- 2025-04-04</h2>
<h3>Other</h3>
<ul>
<li>Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1450">#1450</a>)</li>
<li>Use <code>std:🧵:available_parallelism</code> for determining
the default number of jobs (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1447">#1447</a>)</li>
<li>Fix mips64-openwrt-linux-musl parsing (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1449">#1449</a>)</li>
<li>Use compiler prefix <code>x86_64-linux-musl</code> (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1443">#1443</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5f55b012f5"><code>5f55b01</code></a>
chore: release v1.2.18 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1451">#1451</a>)</li>
<li><a
href="e3aa653d5f"><code>e3aa653</code></a>
Regenerate target info (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1450">#1450</a>)</li>
<li><a
href="41f7c2eb2f"><code>41f7c2e</code></a>
Use <code>std:🧵:available_parallelism</code> for determining the
default number o...</li>
<li><a
href="654a6c67c5"><code>654a6c6</code></a>
Fix mips64-openwrt-linux-musl parsing (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1449">#1449</a>)</li>
<li><a
href="59578addda"><code>59578ad</code></a>
Use compiler prefix <code>x86_64-linux-musl</code> (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1443">#1443</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.17...cc-v1.2.18">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cc&package-manager=cargo&previous-version=1.2.17&new-version=1.2.18)](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-04 17:24:49 +00:00
dependabot[bot]
217dadfa09
build(deps): bump errno from 0.3.10 to 0.3.11 (#36344)
Bumps [errno](https://github.com/lambda-fairy/rust-errno) from 0.3.10 to
0.3.11.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/lambda-fairy/rust-errno/blob/main/CHANGELOG.md">errno's
changelog</a>.</em></p>
<blockquote>
<h1>[0.3.11] - 2025-04-04</h1>
<ul>
<li>
<p>Add VxWorks support
<a
href="https://redirect.github.com/lambda-fairy/rust-errno/pull/105">#105</a></p>
</li>
<li>
<p>Add cygwin support
<a
href="https://redirect.github.com/lambda-fairy/rust-errno/pull/106">#106</a></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="afcb78b592"><code>afcb78b</code></a>
Release 0.3.11. (<a
href="https://redirect.github.com/lambda-fairy/rust-errno/issues/109">#109</a>)</li>
<li><a
href="11eb48516a"><code>11eb485</code></a>
Add <a
href="https://github.com/sunfishcode"><code>@​sunfishcode</code></a> as
author (<a
href="https://redirect.github.com/lambda-fairy/rust-errno/issues/107">#107</a>)</li>
<li><a
href="9fd1bbc2e4"><code>9fd1bbc</code></a>
Add cygwin support (<a
href="https://redirect.github.com/lambda-fairy/rust-errno/issues/106">#106</a>)</li>
<li><a
href="b1ff60fe35"><code>b1ff60f</code></a>
Add VxWorks support (<a
href="https://redirect.github.com/lambda-fairy/rust-errno/issues/105">#105</a>)</li>
<li><a
href="57d0c0d594"><code>57d0c0d</code></a>
Switch to target wasm-wasip2 (<a
href="https://redirect.github.com/lambda-fairy/rust-errno/issues/104">#104</a>)</li>
<li>See full diff in <a
href="https://github.com/lambda-fairy/rust-errno/compare/v0.3.10...v0.3.11">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot 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-04 17:20:57 +00:00
dependabot[bot]
7555ed0eb1
build(deps): bump miniz_oxide from 0.8.5 to 0.8.7 (#36342)
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.8.5 to
0.8.7.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md">miniz_oxide's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/Frommi/miniz_oxide/compare/0.8.6..0.8.7">0.8.7</a>
- 2025-04-03</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>(inflate)</strong> make block boundary function a feature
since it breaks semver and add to test - (<a
href="862fb2c2b8">862fb2c</a>)
- oyvindln</li>
</ul>
<hr />
<h2><a
href="https://github.com/Frommi/miniz_oxide/compare/0.8.5..0.8.6">0.8.6</a>
- 2025-04-03</h2>
<p>Yanked as it broke semver due to adding an enum variant - fixed in
0.8.7 by adding the new functionality as an optional feature for
now.</p>
<h3>Bug Fixes</h3>
<ul>
<li><strong>(deflate)</strong> help the compiler evade two bounds checks
to improve compression performance a little - (<a
href="633e59fd7e">633e59f</a>)
- oyvindln</li>
<li><strong>(deflate)</strong> further deflate performance improvements
especially on fast mode - (<a
href="5a651048f3">5a65104</a>)
- oyvindln</li>
<li><strong>(docs)</strong> update miniz_oxide readme a bit - (<a
href="743ae50656">743ae50</a>)
- oyvindln</li>
<li><strong>(inflate)</strong> don't use bit reverse lookup table when
not using alloc and make it smaller - (<a
href="8e331bbcca">8e331bb</a>)
- oyvindln</li>
<li><strong>(inflate)</strong> correctly return MZError::buf from
inflate on incomplete stream - (<a
href="061069eed8">061069e</a>)
- oyvindln</li>
<li><strong>(inflate)</strong> improve inflate perf in some cases when
using wrapping buffer - (<a
href="44a3e1b682">44a3e1b</a>)
- oyvindln</li>
<li><strong>(inflate)</strong> evade more bounds checks in inflate and
disable stop on block boundary code when compiled as dep of rustc - (<a
href="953a54d692">953a54d</a>)
- oyvindln</li>
<li><strong>(inflate)</strong> skip stream module when compiling as part
of rustc std as it's not used there - (<a
href="073160c5f9">073160c</a>)
- oyvindln</li>
<li>rename serde feature, separate serde test - (<a
href="eee6524fbb">eee6524</a>)
- oyvindln</li>
<li>remoe unused serde BigArray implementation sizes and update Readme -
(<a
href="f73670a193">f73670a</a>)
- oyvindln</li>
<li>Block boundary test and cleanup (<a
href="https://redirect.github.com/Frommi/miniz_oxide/issues/171">#171</a>)
- (<a
href="82ada74738">82ada74</a>)
- Philip Taylor</li>
</ul>
<h3>Features</h3>
<ul>
<li>add derive(Serialize, Deserialize) to DecompressorOxide (<a
href="https://redirect.github.com/Frommi/miniz_oxide/issues/166">#166</a>)
- (<a
href="c9e5996da3">c9e5996</a>)
- dishmaker</li>
<li>Add API to support random access at block boundaries (<a
href="https://redirect.github.com/Frommi/miniz_oxide/issues/170">#170</a>)
- (<a
href="240bcdde45">240bcdd</a>)
- Philip Taylor</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="81526b9416"><code>81526b9</code></a>
bump version and changelog</li>
<li><a
href="d78d8a9f78"><code>d78d8a9</code></a>
fix CI</li>
<li><a
href="c5c0cc66a3"><code>c5c0cc6</code></a>
remove block boundary enum option in c api so it compiles</li>
<li><a
href="862fb2c2b8"><code>862fb2c</code></a>
fix(inflate): make block boundary function a feature since it breaks
semver a...</li>
<li><a
href="a2b8edb336"><code>a2b8edb</code></a>
fix: add missing test data</li>
<li><a
href="ace80a138c"><code>ace80a1</code></a>
fix(inflate): fix overflow crash introduced due to accidentally using |
inste...</li>
<li><a
href="4afbb3d771"><code>4afbb3d</code></a>
bump version and changelog</li>
<li><a
href="4982644516"><code>4982644</code></a>
update readme</li>
<li><a
href="073160c5f9"><code>073160c</code></a>
fix(inflate): skip stream module when compiling as part of rustc std as
it's ...</li>
<li><a
href="953a54d692"><code>953a54d</code></a>
fix(inflate): evade more bounds checks in inflate and disable stop on
block b...</li>
<li>Additional commits viewable in <a
href="https://github.com/Frommi/miniz_oxide/compare/0.8.5...0.8.7">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot 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-04 17:18:58 +00:00
Martin Robinson
fb344ba4e9
constellation: Stop assuming that the viewport is shared by all WebViews (#36312)
The `Constellation` previously held a `window_size` member, but this
assumes that all `WebView`s have the same size. This change removes that
assumption as well as making sure that all `WebView`s pass their size
and HiDIP scaling to the `Constellation` when they are created.

In addition

- `WindowSizeData` is renamed to `ViewportDetails`, as it was
holding more than just the size and it didn't necessarily correspond to
  a "window." It's used for tracking viewport data, whether for an
  `<iframe>` or the main `WebView` viewport.
- `ViewportDetails` is stored more consistently so that conceptually an
  `<iframe>` can also have its own HiDPI scaling. This isn't something
  we necessarily want, but it makes everything conceptually simpler.

The goal with this change is to work toward allowing per-`WebView` HiDPI
scaling and sizing. There are still some corresponding changes in the
compositor to make that happen, but they will in a subsequent change.

Testing: This is covered by existing tests. There should be no behavior
changes.
Fixes: This is part of #36232.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 17:06:34 +00:00
Oriol Brufau
7c89e24f34
Remove layout_writing_mode_enabled from experimental features (#36339)
Running tests with --enable-experimental-web-platform-features would
make so many of them fail asserts because of this feature.

Testing: No need to test since
`--enable-experimental-web-platform-features` isn't used by default
This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-04 15:33:58 +00:00
Manuel Rego
b4c1cdd3e7
wpt: Unskip webaudio tests as most are passing (#36334)
Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2025-04-04 14:12:40 +00:00
Martin Robinson
49d48b897a
script: Remove dependency on webgpu (#36332)
After #36320, `script` only depends on `webgpu` for its type aliases to
`wgpu_core` and `wgpu_types`. This change removes the dependency on
`webgpu` in favor of depending directly on the upstream crates. This
makes it so that you can change `webgpu` without recompiling `script`.

Testing: This change is covered by existing WebGPU tests and is mainly
just changing the way dependencies are accessed.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 11:52:58 +00:00
Manuel Rego
1f928252e3
wpt: Unskip old-tests/ folder as most tests are passing (#36333)
Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2025-04-04 11:05:24 +00:00
Oriol Brufau
202cac900d
layout: Restrict stretch alignment to flex items with computed auto size (#36288)
We were allowing `align-self: stretch` to stretch flex items whose cross
size behaves as `auto`, including cyclic percentages.

However, https://github.com/w3c/csswg-drafts/issues/4525 resolved that
stretching should only happen when the cross size computes to `auto`.

So this patch exposes this information in `ContentBoxSizesAndPBM`, and
refactors the flexbox stretching logic.

Fixes: #36285

Testing:
 - `/css/css-flexbox/quirks-auto-block-size-with-percentage-item.html`
 - `/css/css-flexbox/stretch-requires-computed-auto-size.html`

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-04 10:15:40 +00:00
Manuel Rego
c19c7b2ed8
wpt: Unskip css/css-text/i18n as many tests are passing there (#36314)
This patch unskips `css/css-text/i18n` WPT tests as many tests on that
folder are already passing in Servo.

Signed-off-by: Manuel Rego Casasnovas <rego@igalia.com>
2025-04-04 08:37:46 +00:00
Jonathan Schwender
d6d610ef6d
mach: Fix cross-compiling from windows to non windows (#36070)
Since we switched to using `aws-lc-rs` instead of `ring`,
cross-compiling on windows (to non-windows) had been broken. Using the
default MSVC Generator results in CMake erroneously being configured for
the host platform, with failing compiler checks. Switching to Ninja
fixes that issue.

The CMake build rules of aws-lc-rs also make use of `tr` and assume it
is installed, hence we provide a helpful error message suggesting to try
using mach from `git bash` which does provide the `tr` command.

<!-- Please describe your changes on the following line: -->


---
<!-- 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 cross-compiling servo on windows hosts to
non-windows targets
- [x] These changes do not require tests because: We don't test
cross-compiling from windows hosts in CI. These changes were manually
tested by compiling for OpenHarmony on windows.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-04-04 08:07:32 +00:00
Martin Robinson
0d693114ad
webgpu: Add a webgpu_traits crate (#36320)
This breaks the `script_traits` dependency  on `webgpu`. In general, the
`traits` crates shouldn't depend on Servo non-`traits` crates. This is
necessary to move "script to constellation" messages to the
`constellation_traits` crate, making it the entire API for talking to
the
constellation. This will break a circular dependency when that happens.

Testing: Successfully building is enough of a test for this one as
it is mainly moving types around.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-04 08:06:07 +00:00
Shubham Gupta
df9efde1c3
Separate WebviewManager from Webview in compositor and constellation (#36302)
Create a separate file for `WebviewManager` to improve clarity.

Testing: This change is just a refactor, so no new tests are needed.

Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
2025-04-04 07:34:19 +00:00