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>
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>
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>
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>
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 />
[](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>
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>
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>
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>
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>
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>
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>
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>
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>
This is the final step of #1799, where the majority of the generated
code for the JS bindings is now compiled as part of the script_bindings
build step. The remaining pieces in script must live there because they
refer to concrete DOM types; all code in script_bindings is generic over
the
[DomTypes](https://doc.servo.org/script/dom/bindings/codegen/DomTypes/trait.DomTypes.html)
trait.
My testing with incremental builds shows me a 12 second reduction in
build times on my 2024 M4 Macbook Pro when modifying code in the script
crate after these changes. Before this PR those changes took 20 seconds
to rebuild Servo, and now they take 8 seconds.
Testing: Existing WPT tests ensure no regressions.
Fixes: #1799
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This change makes the wdspec configuration match our other browser
configurations to account for #30080.
Testing: Tested locally, since we don't run webdriver conformance tests
in CI yet. The STR from the issue do not reproduce the same problem any
longer.
Fixes: #36326.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This change ensures that `display: inline-grid` is considered an atomic
inline
- Add `is_atomic_inline_level()` logic to `box_fragment.rs` to improve
accuracy.
- Update `stacking_context.rs` to use the new `is_atomic_inline_level()`
method instead of the one from stylo.
- Update `repeat-auto-fill-005.html` test expectation.
- Remove .ini expectations for tests that are no longer failing.
Testing: covered by WPT
Fixes: #35310
---------
Signed-off-by: Barigbue <barigbuenbira@gmail.com>
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#35390
- [X] There are tests for these changes
[Successful WPT
run](https://github.com/reesmichael1/servo/actions/runs/14097679625)
(which includes the new test files)
(I didn't make the formatting changes intentionally--those came from
`mach format` following `mach test-tidy`.)
---------
Signed-off-by: Michael Rees <mrees@noeontheend.com>
This imports the following changes from Blitz:
- Map position:sticky to relative rather than absolute position
16a7c16544
- Map left and right alignment from Stylo
c71cc681d8
- Improve mapping of align-items/self
7bf2a25e75Fixes: #35998
Testing:
-
`/css/css-grid/alignment/grid-align-justify-margin-border-padding.html`
- `/css/css-grid/alignment/grid-align.html`
-
`/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html`
- `/css/css-grid/alignment/grid-gutters-and-alignment.html`
-
`/css/css-grid/alignment/grid-item-alignment-with-orthogonal-flows.html`
-
`/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html`
- `/css/css-grid/alignment/grid-self-alignment.html`
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
https://github.com/user-attachments/assets/9aba75ff-4190-4a85-89ed-d3f3aa53d3b0
Among other things this adds a new `EmbedderMsg::ShowSelectElementMenu`
to tell the embedder to display a select popup at the given location.
This is a draft because some small style adjustments need to be made:
* the select element should always have the width of the largest option
* the border should be part of the shadow tree
Apart from that, it's mostly ready for review.
<details><summary>HTML for demo video</summary>
```html
<html>
<body>
<select id="c" name="choice">
<option value="first">First Value</option>
<option value="second">Second Value</option>
<option value="third">Third Value</option>
</select>
</body>
</html>
```
</details>
---
<!-- 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] Part of https://github.com/servo/servo/issues/3551
- [ ] 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: Simon Wülker <simon.wuelker@arcor.de>
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.34 to 4.5.35.
<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.35</h2>
<h2>[4.5.35] - 2025-04-01</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Align positionals and flags when put in the same
<code>help_heading</code></li>
<li><em>(help)</em> Don't leave space for shorts if there are none</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.35] - 2025-04-01</h2>
<h3>Fixes</h3>
<ul>
<li><em>(help)</em> Align positionals and flags when put in the same
<code>help_heading</code></li>
<li><em>(help)</em> Don't leave space for shorts if there are none</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="55a18f518b"><code>55a18f5</code></a>
chore: Release</li>
<li><a
href="3b0563580d"><code>3b05635</code></a>
fix(complete): Ensure new enough clap is used</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.34...clap_complete-v4.5.35">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.11.7
to 0.11.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-cli/env_logger/releases">env_logger's
releases</a>.</em></p>
<blockquote>
<h2>v0.11.8</h2>
<h2>[0.11.8] - 2025-04-01</h2>
<h3>Compatibility</h3>
<ul>
<li><em>(kv)</em> Deprecate the <code>unstable-kv</code> feature which
may be removed in a future patch release</li>
</ul>
<h3>Features</h3>
<ul>
<li><em>(kv)</em> Stabilize key-value support behind the <code>kv</code>
feature</li>
<li>Expose <code>ConfigurableFormat</code> to build custom
[<code>Builder::format</code>]s that leverage this</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's
changelog</a>.</em></p>
<blockquote>
<h2>[0.11.8] - 2025-04-01</h2>
<h3>Compatibility</h3>
<ul>
<li><em>(kv)</em> Deprecate the <code>unstable-kv</code> feature which
may be removed in a future patch release</li>
</ul>
<h3>Features</h3>
<ul>
<li><em>(kv)</em> Stabilize key-value support behind the <code>kv</code>
feature</li>
<li>Expose <code>ConfigurableFormat</code> to build custom
[<code>Builder::format</code>]s that leverage this</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f0443b26fe"><code>f0443b2</code></a>
chore: Release</li>
<li><a
href="d8b5e1e884"><code>d8b5e1e</code></a>
docs: Update changelog</li>
<li><a
href="3ca671fe6d"><code>3ca671f</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/360">#360</a>
from epage/format</li>
<li><a
href="bc02d61e0a"><code>bc02d61</code></a>
feat(fmt): Expose ConfigurableFormat</li>
<li><a
href="c567fdee73"><code>c567fde</code></a>
refactor(fmt): Pull out format logic</li>
<li><a
href="ce25c73961"><code>ce25c73</code></a>
refactor(fmt): Make DefaultFormats name more specific</li>
<li><a
href="739ebb1d37"><code>739ebb1</code></a>
refactor(fmt): Pull out logger's builder methods</li>
<li><a
href="3acb571daa"><code>3acb571</code></a>
refactor(fmt): Delegate formatting to DefaultFormat</li>
<li><a
href="e351bcb92d"><code>e351bcb</code></a>
refactor(fmt): Reduce duplication in DefaultFormatWriter</li>
<li><a
href="3c9e6ff528"><code>3c9e6ff</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-cli/env_logger/issues/359">#359</a>
from epage/kv</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-cli/env_logger/compare/v0.11.7...v0.11.8">compare
view</a></li>
</ul>
</details>
<br />
[](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>
…Window-only constructors
<!-- 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#36118 (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: richarddushime <mudaherarich@gmail.com>
Signed-off-by: Richard Dushime <45734838+richarddushime@users.noreply.github.com>
This new `CSSStyleOwner` variant is used when the pseudo-element
argument fails to parse properly or is for some unknown or unsupported
pseudo-element.
Testing: There are tests for this change. Various tests start to pass
and some start to
fail. New failures are due to partial or fully missing support for
pseudo-elements such
as:
- `::selection`
- `::first-letter` and `::first-line`
- `::marker`
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
According to CSS2, the bottom margin of a block container can collapse
with the bottom margin of its last in-flow child if `height` computes to
`auto`.
However, according to CSS Sizing, that was "legacy spec prose" and
should be interpreted as "behaves as `auto`".
Therefore, cyclic percentages and intrinsic keywords like `min-content`
shouldn't prevent margin collapse, because they behave as `auto`.
This change aligns Servo with Gecko and Blink, but diverges from WebKit.
https://www.w3.org/TR/CSS22/box.html#collapsing-marginshttps://www.w3.org/TR/css-sizing/#behave-auto
Testing:
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-001.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-002.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-003.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-004.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-005.html`
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
`WindowMethods` is used by the embedding layer to get information from
the embedder. This change moves the functionality for getting screen
size and `WebView` offsets to `WebViewDelegate`.
This is important because `WebView`s might be on different screens or
have different offsets on the screen itself, so it makes sense for this
to be per-`WebView` and not global to the embedder. HiDPI and animation
state functionality will move to the embedder in subsequent changes.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
<!-- 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 do not require tests because they just modify the
`WebView` API surface a bit.
<!-- 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: Martin Robinson <mrobinson@igalia.com>
This PR fixes the broken unit-test after
[#35662](https://github.com/servo/servo/pull/35662)
Testing: Verified locally and CI confirms too.
Fixes: Migrate the test to use new API
cc: @xiaochengh
Signed-off-by: Shubham Gupta <shubham13297@gmail.com>
- Remove `EmbedderMethods::get_user_agent_string`. This is now part of
the `Preferences` data structure, which should allow it to be
per-`WebView` in the future.
- Remove `EmbedderMethods::get_version_string`. This was used to include
some data along with WebRender captures about the Servo version. This
isn't really necessary and it was done to replace code in the past
that output the WebRender version, so also isn't what the original
code did. I think we can just remove this entirely.
The idea with these changes is that `EmbedderMethods` can be removed
in a followup and the rest of the methods can be added to
`ServoDelegate`. These two methods are ones that cannot be added to a
delegate as they are used during `Servo` initialization.
Testing: There is currently no testing for libservo. These changes are
meant
as preparation for adding a suite of `WebView` unit tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
These tests were related to the legacy layout engine which has been
removed.
Therefore, they are considered leftover and can be removed.
Fixes#36277
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Note that `StyleRule` may not have the `CssRules` readily available,
they may need to be created. So the previous approach of providing
`CSSGroupingRule` with the `CssRules` is no good: it would require
writing them in advance, just in case they end up being used.
Therefore, this removes the `CSSGroupingRule::rules` field. Instead,
they are lazily obtained in `CSSGroupingRule::rulelist()` by downcasting
and calling the appropriate method for the subclass.
Testing: covered by WPT
Fixes: #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Bumps [quick-xml](https://github.com/tafia/quick-xml) from 0.37.3 to
0.37.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tafia/quick-xml/releases">quick-xml's
releases</a>.</em></p>
<blockquote>
<h2>v0.37.4 - Derive more traits for readers</h2>
<h2>What's Changed</h2>
<h3>Misc Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/tafia/quick-xml/issues/852">#852</a>:
Add <code>Debug</code> impl for <code>NsReader</code> and
<code>Reader</code> and <code>Clone</code> impl for
<code>NsReader</code></li>
</ul>
<p><a
href="https://redirect.github.com/tafia/quick-xml/issues/852">#852</a>:
<a
href="https://redirect.github.com/tafia/quick-xml/pull/852">tafia/quick-xml#852</a></p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/lukasfri"><code>@lukasfri</code></a>
made their first contribution in <a
href="https://redirect.github.com/tafia/quick-xml/pull/852">tafia/quick-xml#852</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/tafia/quick-xml/compare/v0.37.3...v0.37.4">https://github.com/tafia/quick-xml/compare/v0.37.3...v0.37.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tafia/quick-xml/blob/master/Changelog.md">quick-xml's
changelog</a>.</em></p>
<blockquote>
<h2>0.37.4 -- 2025-04-01</h2>
<h3>Misc Changes</h3>
<ul>
<li><a
href="https://redirect.github.com/tafia/quick-xml/issues/852">#852</a>:
Add <code>Debug</code> impl for <code>NsReader</code> and
<code>Reader</code> and <code>Clone</code> impl for
<code>NsReader</code></li>
</ul>
<p><a
href="https://redirect.github.com/tafia/quick-xml/issues/852">#852</a>:
<a
href="https://redirect.github.com/tafia/quick-xml/pull/852">tafia/quick-xml#852</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a81bac74d6"><code>a81bac7</code></a>
Release 0.37.4</li>
<li><a
href="cbcf835776"><code>cbcf835</code></a>
Add some standard derives for Debug and Clone on Reader and
NsReader.</li>
<li>See full diff in <a
href="https://github.com/tafia/quick-xml/compare/v0.37.3...v0.37.4">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [hyper-util](https://github.com/hyperium/hyper-util) from 0.1.10
to 0.1.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper-util/releases">hyper-util's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(client): Fix <code>HTTP/2</code> websocket request by <a
href="https://github.com/0x676e67"><code>@0x676e67</code></a> in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/165">hyperium/hyper-util#165</a></li>
<li>builder: expose methods for determining if HTTP/1.1 or HTTP/2
support are enabled by <a
href="https://github.com/tobz"><code>@tobz</code></a> in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/164">hyperium/hyper-util#164</a></li>
<li>feat(server): support <code>auto_date_header</code>,
<code>max_local_error_reset_streams</code>, and
<code>ignore_invalid_headers</code>. by <a
href="https://github.com/finnbear"><code>@finnbear</code></a> in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/161">hyperium/hyper-util#161</a></li>
<li>fix(tracing): propagate span context by <a
href="https://github.com/alpeb"><code>@alpeb</code></a> in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/166">hyperium/hyper-util#166</a></li>
<li>feat(rt/tokio): additive tokio and hyper i/o adaptors by <a
href="https://github.com/cratelyn"><code>@cratelyn</code></a> in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/170">hyperium/hyper-util#170</a></li>
<li>feat(client): implement Connection for UnixStream and
NamedPipeClient by <a
href="https://github.com/seanmonstar"><code>@seanmonstar</code></a> in
<a
href="https://redirect.github.com/hyperium/hyper-util/pull/177">hyperium/hyper-util#177</a></li>
<li>enable <code>HttpConnector::interface</code> on macOS and Solarish
systems by <a href="https://github.com/hawkw"><code>@hawkw</code></a>
in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/176">hyperium/hyper-util#176</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jlizen"><code>@jlizen</code></a> made
their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/159">hyperium/hyper-util#159</a></li>
<li><a href="https://github.com/linyihai"><code>@linyihai</code></a>
made their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/160">hyperium/hyper-util#160</a></li>
<li><a href="https://github.com/tobz"><code>@tobz</code></a> made their
first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/164">hyperium/hyper-util#164</a></li>
<li><a href="https://github.com/finnbear"><code>@finnbear</code></a>
made their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/161">hyperium/hyper-util#161</a></li>
<li><a href="https://github.com/alpeb"><code>@alpeb</code></a> made
their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/166">hyperium/hyper-util#166</a></li>
<li><a href="https://github.com/cratelyn"><code>@cratelyn</code></a>
made their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/168">hyperium/hyper-util#168</a></li>
<li><a href="https://github.com/hawkw"><code>@hawkw</code></a> made
their first contribution in <a
href="https://redirect.github.com/hyperium/hyper-util/pull/176">hyperium/hyper-util#176</a></li>
</ul>
<h2>Thanks</h2>
<ul>
<li><a href="https://github.com/tottoto"><code>@tottoto</code></a></li>
<li><a
href="https://github.com/gretchenfrage"><code>@gretchenfrage</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md">hyper-util's
changelog</a>.</em></p>
<blockquote>
<h1>0.1.11 (2025-03-31)</h1>
<ul>
<li>Add <code>tracing</code> crate feature with support in
<code>TokioExecutor</code>.</li>
<li>Add <code>HttpConnector::interface()</code> support for macOS and
Solarish systems.</li>
<li>Add <code>rt::WithHyperIo</code> and <code>rt::WithTokioIo</code>
combinators.</li>
<li>Add <code>auto_date_header()</code> for auto server builder.</li>
<li>Add <code>max_local_error_reset_streams()</code> for auto server
builder.</li>
<li>Add <code>ignore_invalid_headers()</code> for auto server
builder.</li>
<li>Add methods to determine if auto server is configured for HTTP/1 or
HTTP/2.</li>
<li>Implement <code>Connection</code> for <code>UnixStream</code> and
<code>NamedPipeClient</code>.</li>
<li>Fix HTTP/2 websocket requests sent through
<code>legacy::Client</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4c4e0622aa"><code>4c4e062</code></a>
v0.1.11</li>
<li><a
href="486e3b6bb4"><code>486e3b6</code></a>
bump license year</li>
<li><a
href="5831ace168"><code>5831ace</code></a>
feat(client): enable <code>HttpConnector::interface</code> on macOS and
Solarish systems...</li>
<li><a
href="dc03ad4134"><code>dc03ad4</code></a>
feat(client): implement Connection for UnixStream and NamedPipeClient
(<a
href="https://redirect.github.com/hyperium/hyper-util/issues/177">#177</a>)</li>
<li><a
href="94afd503b4"><code>94afd50</code></a>
feat(rt/tokio): additive tokio and hyper i/o adaptors (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/170">#170</a>)</li>
<li><a
href="ef35d8ab08"><code>ef35d8a</code></a>
chore: pin once-cell on msrv ci job (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/175">#175</a>)</li>
<li><a
href="d51318df34"><code>d51318d</code></a>
chore(client/legacy): remove unused <code>PoolClient::is_closed()</code>
(<a
href="https://redirect.github.com/hyperium/hyper-util/issues/169">#169</a>)</li>
<li><a
href="1290685fbb"><code>1290685</code></a>
chore(tokio): warn on dead code (<a
href="https://redirect.github.com/hyperium/hyper-util/issues/168">#168</a>)</li>
<li><a
href="b90ff7d882"><code>b90ff7d</code></a>
feat(rt): add <code>tracing</code> feature that will propagate span
context in TokioExec...</li>
<li><a
href="46826ea758"><code>46826ea</code></a>
feat(server): support <code>auto_date_header</code>,
<code>max_local_error_reset_streams</code>, an...</li>
<li>Additional commits viewable in <a
href="https://github.com/hyperium/hyper-util/compare/v0.1.10...v0.1.11">compare
view</a></li>
</ul>
</details>
<br />
[](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>
This is the CSSOM interface that represents a nested declarations rule.
https://drafts.csswg.org/css-nesting/#the-cssnestrule
Testing: `/_mozilla/mozilla/interfaces.https.html`. And once
`CSSStyleRule` becomes a `CSSGroupingRule` subclass, this will be
further covered by `/css/css-nestting/`.
This is part of #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Devtools clients need a `browserId`, `browsingContextID`, and
`outerWindowID`, which correspond to WebViewId, BrowsingContextId, and
PipelineId in Servo. These u32 values were previously derived from our
sharded (u32,u32) id values by taking only the `index` (second u32) and
ignoring the `namespace_id` (first u32), leading to collisions.
This patch fixes that by mapping those Servo ids to sequential u32
values.
---
<!-- 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#35954
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Ensure there is an active realm when dispatching the `activation` DOM
event to the ServiceWorker global.
Testing: Existing WPT coverage.
Fixes: #36114Fixes: #36235Fixes: #36231
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Changed `RegExpFlag_Unicode` to `RegExpFlag_UnicodeSets` in all
instances.
Testing: Ran `./mach test-wpt
tests/wpt/tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html`
and all tests passed successfully.
Fixes: #36075
---------
Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com>
Implements Steps 2-3 of #35867:
- Adds `SimulateColorScheme` to `DevtoolScriptControlMsg` for light/dark
mode simulation.
- Handles it in `ScriptThread` with `handle_theme_change` to toggle
themes.
Testing: This PR does not require testing because it only adds
infrastructure (command and handler) but doesn’t yet integrate with
devtools actors.
Fixes: Part of #35867 (https://github.com/servo/servo/issues/35867)
---------
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
The indirection through ServoParser::parse_sync does nothing, so the
method can simply be called directly.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>