A LayoutBox typically has one LayoutBoxBase, or none in the case of
`LayoutBox::DisplayContents`. However, `LayoutBox::InlineLevel` can
contain multiple inline items, each one with its base. But since things
like the style or the fragment flags should be the same for all of them,
getting the first base is sometimes enough.
Testing: not needed, no change in behavior.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
When encountering such an ancestor, we were returning null instead of
skipping it.
Testing: Adding new subtest for this. And while I'm at it, another one
for the root element, unrelated to this fix.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Removes a test related to autoplay and sandboxing which will always
fail.
In https://github.com/servo/servo/pull/39079 I introduced a wpt to test
autoplay functionality, but the test was flawed in its approach -
shortly after merge, myself and @TimvdLippe found that this test would
simulataneously require scripts to be enabled, as well as disabled for
the test to pass.
This slipped past me becuase we hadn't correctly implemented whether
scripting was enabled yet in Servo.
Testing: Removes a single WPT - this test has not been merged upstream.
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
Bumps [windows-sys](https://github.com/microsoft/windows-rs) from 0.59.0
to 0.61.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/windows-rs/releases">windows-sys's
releases</a>.</em></p>
<blockquote>
<h2>61</h2>
<p>Major crate updates:</p>
<ul>
<li><code>windows</code> 0.59.0</li>
<li><code>windows-core</code> 0.59.0
<ul>
<li><code>windows-implement</code> 0.59.0</li>
<li><code>windows-interface</code> 0.59.0</li>
</ul>
</li>
<li><code>windows-targets</code> 0.53.0
<ul>
<li><code>windows_i686_msvc</code> 0.53.0</li>
<li><code>windows_x86_64_msvc</code> 0.53.0</li>
<li><code>windows_aarch64_msvc</code> 0.53.0</li>
<li><code>windows_i686_gnu</code> 0.53.0</li>
<li><code>windows_x86_64_gnu</code> 0.53.0</li>
<li><code>windows_i686_gnullvm</code> 0.53.0</li>
<li><code>windows_x86_64_gnullvm</code> 0.53.0</li>
<li><code>windows_aarch64_gnullvm</code> 0.53.0</li>
</ul>
</li>
<li><code>windows-bindgen</code> 0.59.0</li>
<li><code>windows-registry</code> 0.4.0</li>
<li><code>windows-result</code> 0.3.0</li>
<li><code>windows-strings</code> 0.3.0</li>
<li><code>cppwinrt</code> 0.2.0</li>
</ul>
<p>Minor crate updates:</p>
<ul>
<li><code>windows-version</code> 0.1.2</li>
</ul>
<p>Excluded:</p>
<ul>
<li><code>windows-sys</code> 0.59.0</li>
</ul>
<p>Things to keep in mind:</p>
<ul>
<li>
<p>The tag/release names no longer map directly to the crate versions,
so to <a
href="https://github.com/microsoft/windows-rs/tree/master/crates/samples">find
samples</a> for a particular release requires looking at <a
href="https://github.com/microsoft/windows-rs/releases">the releases</a>
page and finding the release that most recently updated a particular
crate.</p>
</li>
<li>
<p>The <code>windows-bindgen</code> crate includes the major code
generation overhaul that brings many improvements - be sure to check out
the PR description for more information. The resulting code gen depends
on the new version of <code>windows-core</code> and its dependencies,
unless you include the <code>--sys</code> option. <a
href="https://redirect.github.com/microsoft/windows-rs/issues/3359">#3359</a></p>
</li>
<li>
<p>The <code>cppwinrt</code> crate constitutes a major update due to
streamlining the error handling. <a
href="https://redirect.github.com/microsoft/windows-rs/issues/3415">#3415</a></p>
</li>
<li>
<p>The <code>windows-registry</code>, <code>windows-strings,</code> and
<code>windows-result</code> crates are also major version updates since
they include small breaking changes.</p>
</li>
<li>
<p>The <code>windows-targets</code> crate finally receives a major
version update, the first in over a year. This is due to <a
href="https://redirect.github.com/microsoft/windows-rs/issues/3359">#3359</a>
and <a
href="https://redirect.github.com/microsoft/windows-rs/issues/3342">#3342</a>
potentially introducing breaking changes. Although unlikely, these
updates introduced sufficient changes that make it hard to ensure that
the <code>windows-targets</code> libs don't break existing code. As
we're updating <code>windows-targets</code> anyway, I took the liberty
to bump the MSRV to 1.60 - to match the latest version of
<code>windows-sys</code> - and remove the old but unused doc macro
feature. Both remained for compatibility with very old dependents of the
<code>windows-targets</code> crate.</p>
</li>
<li>
<p>The <code>windows-version</code> crate receives a minor update to
update its dependency on the <code>windows-targets</code> crate.</p>
</li>
<li>
<p>Beyond these specifics, this update is the culmination of around 6
months worth of work on the <code>windows-rs</code> project. The biggest
improvements comes from the new code generation engine, but many other
improvements are now also available for production. This includes
support for many new lints, warnings, and suggestions provided by the
Rust toolchain; much smaller code gen thanks to deriving many more
traits; more efficient code gen; major improvements to WinRT type system
and implementation support; more robust and consistent error handling;
stock collection and async support; improved support for class
hierarchies; and much more!</p>
</li>
</ul>
<p>In addition to "what's changed" below, check out what's
changed for notes for <a
href="https://github.com/microsoft/windows-rs/releases/tag/0.60.0">0.60.0</a>
and <a
href="https://github.com/microsoft/windows-rs/releases/tag/0.59.0">0.59.0</a>
for additional changes that roll up to the crates published as part of
this release.</p>
<h2>What's Changed</h2>
<ul>
<li>Remove improper_ctypes workaround by <a
href="https://github.com/ChrisDenton"><code>@ChrisDenton</code></a> in
<a
href="https://redirect.github.com/microsoft/windows-rs/pull/3296">microsoft/windows-rs#3296</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5888c8c472"><code>5888c8c</code></a>
Release 0.61.0 (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3418">#3418</a>)</li>
<li><a
href="9911fee2a9"><code>9911fee</code></a>
Improve feature search UX, add dark mode, and update deps (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3422">#3422</a>)</li>
<li><a
href="eed74532cd"><code>eed7453</code></a>
Update GitHub Actions runners (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3423">#3423</a>)</li>
<li><a
href="284f18906a"><code>284f189</code></a>
Avoid <code>transmute</code> where possible (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3421">#3421</a>)</li>
<li><a
href="b35dfd1470"><code>b35dfd1</code></a>
Update web workflow to use external origin (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3420">#3420</a>)</li>
<li><a
href="3566fca8c5"><code>3566fca</code></a>
Fix provenance in direct32 sample (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3419">#3419</a>)</li>
<li><a
href="382ea566c2"><code>382ea56</code></a>
Use <code>track_caller</code> to make debugging <code>cppwinrt</code>
build script errors easier (#...</li>
<li><a
href="f09c13292a"><code>f09c132</code></a>
Shorten sample crate names (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3416">#3416</a>)</li>
<li><a
href="5e8ce09c70"><code>5e8ce09</code></a>
<code>cppwinrt</code> should consistently panic on failure (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3415">#3415</a>)</li>
<li><a
href="d02c977dc8"><code>d02c977</code></a>
Detect unsupported array parameters (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3402">#3402</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/windows-rs/compare/0.59.0...0.61.0">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>
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Euclid Ye <euclid.ye@huawei.com>
This includes some small refactoring and some small breaking changes as
listed below. Other than these I tried to keep the functionality exactly
the same but because in the old code the parsing and settings of
preferences was intermingled it was difficult to figure out.
Small Breaking:
- Size and resources-path were unused but appeared in the help.
- soft-fail and hard-fail: Soft-fail flag got removed because it is too
difficult to keep both. The default is now soft-fail and hard-fail can
be enabled.
- The help strings are obviously formatted differently now.
- -V does not work anymore but -v and --version.
Ideally, we want to have the ServoShellPreferences and Preferences be
directly the Argument structure but that needs a bit more discussion
because it would break backwards compatibility with the commandline.
This increases the binary size by ~280kb.
Testing: The testcases are still working but they do not cover much.
I added a unit test for the -p flag because it is the most difficult to
parse in general.
Fixes: This will fix a small number of various parsing misshaps. It will
also show if we are removing an option via unused lint.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
The current implementation of evaluate_key_path_on_value was translated
from gecko, and it is incomplete. The unimplemented part occurs many
crashes in WPT tests.
This PR re-implements it according to the spec. It should eliminate many
crashed WPT tests, and increase the code readability.
Testing: Update WPT test expectation
Fixes: #38817 partially, and #25325
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Few webdriver subtests are quite unstable. But it is an overkill to mark
the entire test as intermittent, as the CI would permit buggy PRs that
sabotage other stable subtests. This PR mark these subtests and closes
the related intermittent issues.
Fixes: #39158Fixes: #39117Fixes: #39121Fixes: #39154
---------
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This is in preparation of being able to do mime sniffing on the response
data. For that, we first need to introduce separate methods so that we
can decouple them from process_response. In doing so, we introduce a
NavigationParams which mimics what the spec intents. The spec stores
different data (policy container instead of csp list and response
instead of content-type), but it is similar enough.
Part of #14024
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Implements document's active sandboxing flags. These are currently
populated only from CSP-derived sandboxing flags for a new document,
when defined in the CSP.
Testing: 1 new pass, and some new wpt's are added to test points in the
spec where these flags influence behaviour.
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
Reduce the reliance on standalone helper functions for handling JWK
format. Instead, those functionalities are now integrated into the
`JsonWebKey` type generated by script_binding, via the local trait
`JsonWebKeyExt`, for internal use.
The `parse_jwk` function remains for now. It will be removed when once
we refactor `SubtleCrypto::ImportKey` to support a more generic approach
across different cryptographic algorithms.
Testing: Refactoring. Existing WPT tests should suffice.
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Accept the safe `JSContext` wraper to this function so that it can be
safe. Some callers also become safe as well.
Testing: This does not change behavior and is thus covered by existing
tests.
Fixes: #39129.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
In the wait-for-all algorithm of the IDL promise type, we need to queue
a microtask to perform successSteps given « » if total is 0.
This step was previously implemented in a workaround, which perform
successSteps immediately.
This patch properly queue the microtask, and remove the workaround.
Testing: Refactoring only. Existing tests are enough.
Fixes: #37259
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
There is no need to separate the two kinds of scrolling boxes into
`Element` and `Viewport` more than once. This also eliminates a
potentially panicking `unwrap()`.
Testing: This doesn't change behavior and is thus covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
While we don't perform any sniffing yet, it does now
check all relevant mime types. Before, we would only
check specific versions of specific mime types. However,
the specification is more elaborate, which MimeClassifier
already handles.
There are two new test failures, but they actually fail
in the same way in other browsers. These tests are still
being discussed what the correct behavior should be [1]
Part of #14024
[1]:
https://github.com/whatwg/mimesniff/issues/189#issuecomment-2081559661
---------
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
More small geometry fixes.
Testing: Covered by WPT
(css/geometry/DOMMatrix-invert-preserves-2d.html)
---------
Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
#39112 restricts accessibility for some font functions, exposing some
functions that haven't been used for a long time. Now it is detected by
Lint as dead code.
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
It more logically matches `MediaList`, and it allows us to
call this method with a document. This is required when
parsing Link headers, as they don't have an associated
element, but they do have a document.
Part of #35035
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This makes it easier to experiment with the impact of experimental
features when browsing around in servoshell. The toggle is global and
causes all webviews to reload with the new preference values.
Testing: Manually tested; no UI testing for servoshell.
Not enabled:
<img width="317" height="82" alt="Screenshot 2025-09-03 at 9 34 30 PM"
src="https://github.com/user-attachments/assets/ca521ad5-ce1b-434e-a0c3-ea1b75d76d53"
/>
Enabled:
<img width="320" height="82" alt="Screenshot 2025-09-03 at 9 34 36 PM"
src="https://github.com/user-attachments/assets/7b6529b5-1055-4ae0-924a-96d57e115714"
/>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.18.0 to 1.18.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uuid-rs/uuid/releases">uuid's
releases</a>.</em></p>
<blockquote>
<h2>v1.18.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Unsafe cleanup by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/841">uuid-rs/uuid#841</a></li>
<li>Prepare for 1.18.1 release by <a
href="https://github.com/KodrAus"><code>@KodrAus</code></a> in <a
href="https://redirect.github.com/uuid-rs/uuid/pull/842">uuid-rs/uuid#842</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/uuid-rs/uuid/compare/v1.18.0...v1.18.1">https://github.com/uuid-rs/uuid/compare/v1.18.0...v1.18.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="50d8e797ed"><code>50d8e79</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/842">#842</a> from
uuid-rs/cargo/v1.18.1</li>
<li><a
href="79485925e9"><code>7948592</code></a>
prepare for 1.18.1 release</li>
<li><a
href="6d847c79d0"><code>6d847c7</code></a>
Merge pull request <a
href="https://redirect.github.com/uuid-rs/uuid/issues/841">#841</a> from
uuid-rs/chore/unsafe-cleanup</li>
<li><a
href="675cccc829"><code>675cccc</code></a>
re-gate zerocopy behind unstable feature flag</li>
<li><a
href="4dd5828060"><code>4dd5828</code></a>
Remove some unsafe; stabilize zerocopy</li>
<li>See full diff in <a
href="https://github.com/uuid-rs/uuid/compare/v1.18.0...v1.18.1">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 [deranged](https://github.com/jhpratt/deranged) from 0.5.2 to
0.5.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/jhpratt/deranged/commits">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 change marks all items that are not used by other crates as
`pub(crate)` instead of `pub`.
Additionally, I've removed all code that turned out to be unused. I
think most of it was used only by `layout-2013`.
Testing: The correctness of these changes is verified by the compiler,
so no tests are needed.
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.46 to 4.5.47.
<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.47</h2>
<h2>[4.5.47] - 2025-09-02</h2>
<h3>Features</h3>
<ul>
<li>Added <code>impl FromArgMatches for ()</code></li>
<li>Added <code>impl Args for ()</code></li>
<li>Added <code>impl Subcommand for ()</code></li>
<li>Added <code>impl FromArgMatches for Infallible</code></li>
<li>Added <code>impl Subcommand for Infallible</code></li>
</ul>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Update runtime error text to match
<code>clap</code></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.47] - 2025-09-02</h2>
<h3>Features</h3>
<ul>
<li>Added <code>impl FromArgMatches for ()</code></li>
<li>Added <code>impl Args for ()</code></li>
<li>Added <code>impl Subcommand for ()</code></li>
<li>Added <code>impl FromArgMatches for Infallible</code></li>
<li>Added <code>impl Subcommand for Infallible</code></li>
</ul>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Update runtime error text to match
<code>clap</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f046ca6a2b"><code>f046ca6</code></a>
chore: Release</li>
<li><a
href="436949dde1"><code>436949d</code></a>
docs: Update changelog</li>
<li><a
href="1ddab84c32"><code>1ddab84</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5954">#5954</a>
from epage/tests</li>
<li><a
href="8a66dbf7c2"><code>8a66dbf</code></a>
test(complete): Add more native cases</li>
<li><a
href="76465cf223"><code>76465cf</code></a>
test(complete): Make things more consistent</li>
<li><a
href="232cedbe76"><code>232cedb</code></a>
test(complete): Remove redundant index</li>
<li><a
href="02244a69a3"><code>02244a6</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5949">#5949</a>
from krobelus/option-name-completions-after-positionals</li>
<li><a
href="2e13847533"><code>2e13847</code></a>
fix(complete): Missing options in multi-val arg</li>
<li><a
href="74388d784b"><code>74388d7</code></a>
test(complete): Multi-valued, unbounded positional</li>
<li><a
href="5b3d45f72c"><code>5b3d45f</code></a>
refactor(complete): Extract function for options</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.46...clap_complete-v4.5.47">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 [time](https://github.com/time-rs/time) from 0.3.42 to 0.3.43.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/time-rs/time/releases">time's
releases</a>.</em></p>
<blockquote>
<h2>v0.3.43</h2>
<p>See the <a
href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">time's
changelog</a>.</em></p>
<blockquote>
<h2>0.3.43 [2025-09-02]</h2>
<h3>Added</h3>
<ul>
<li>Support for <code>rand</code> 0.9</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>In the <code>convert</code> module, any use of <code>per</code> with
types that were not the same (such as
<code>Nanosecond::per(Second)</code>) would not compile due to a bug.
This has been fixed.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="45b9932e57"><code>45b9932</code></a>
v0.3.43 release</li>
<li><a
href="8cbf0dbff0"><code>8cbf0db</code></a>
Fix bug with <code>convert</code></li>
<li><a
href="3343e85826"><code>3343e85</code></a>
Add support for rand 0.9</li>
<li><a
href="afb2574f94"><code>afb2574</code></a>
Add note about MSRV</li>
<li>See full diff in <a
href="https://github.com/time-rs/time/compare/v0.3.42...v0.3.43">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>
Any RenderingContext/OffscreenRenderingContext type has readonly
"canvas" attribute
and associated native-code DOM context objects have reference to target
DOM canvas objects.
https://html.spec.whatwg.org/multipage/canvas.html#renderingcontexthttps://html.spec.whatwg.org/multipage/canvas.html#offscreenrenderingcontext
And currently the reference to DOM canvas object is the rooting pointer
on the stack,
which leads to the circular reference problem.
The SpiderMonkey's (SM) garbage collector will not be able to free the
DOM canvas and context
objects (unreacheble from JS) because of the rooting pointer on stack
(see STACK_ROOTS).
And these objects will be stored until the associated script
runtime/thread will be terminated.
SM -> JS Roots -> DOM Canvas* (on heap) -> DOM Context (on heap)
SM -> Rust Roots -> Dom Canvas* (on stack) <- as "canvas" member field
Let's replace the rooting pointer to the traceble pointer (DomRoot ->
Dom)
in the "canvas" member field of DOM context object, which allows to
broke circular referencing problem.
Testing: No changes in existed tests
Signed-off-by: Andrei Volykhin <volykhin.andrei@huawei.com>
Co-authored-by: Andrei Volykhin <volykhin.andrei@huawei.com>
This new API allows getting the element which establishes an element's
scroll container. This will be used to properly implement
`scrollIntoView`. There is still work to do for this API and
`offsetParent` to properly handle ancestors which are
closed-shadow-hidden from the original query element.
In addition, fix an issue where inline boxes were establishing scrolling
containers (they shouldn't do that).
Testing: There are tests for this change.
Fixes: #39096.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
FNV is faster for hashing less than 16 bytes of data and the
cryptographic properties of the default HashMap are not needed for the
various ids.
Testing: This does not change functionality.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This clarifies the units for scrolling:
- `f32` is used for internal Servo scrolling APIs as that is the unit
used in WebRender.
- `f64` is used for the web-exposed scrolling APIs as that is what the
WebIDL code generator gives us.
Conversions are done consistently at the boundaries of the two APIs.
In addition, web-exposed scrolling methods are refactored a bit to more
closely follow the specification text. In addition, specification text
is added to those methods so that it is clearer that we are following
it.
Testing: This should not change behavior and is thus covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
There were still some accesses to the inner BrowsingContextId from the
WebViewId. This changes it to completely rely on the From trait for
these methods. This also means we can make the field private.
For testing we add a way to create arbitrary WebViewIds.
Testing: Does not change functionality.
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
Implements more of calculate_box_size, ensuring that the proper
rectangle is returned when the border box is requested.
Testing: WPT
Fixes: Partially #38811
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Jo Steven Novaryo <65610990+stevennovaryo@users.noreply.github.com>
We were performing a structured clone but throwing away any serializable
DOM interfaces included in the result. We need to instead serialize the
full structured clone result so we can deserialize the DOM interfaces
when getting the data out of the object store.
Testing: Existing WPT coverage is sufficient.
Fixes: #38818Fixed: #38842
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
With incremental layout adding a restyle to a node isn't enough to force
its layout to update. We also need to explicitly mark the node as dirty
so that its contents are updated when layout is run. This change makes
this consistent for all node state changes. This might be a bit too
conservative as all node state may not affect layout, but should catch
issues in the future.
Testing: This is very hard to test as it requires moving the mouse over
the
WebView, and the moving it away, and then testing the rendered contents.
This
kind of coordination would be difficult to manage with unit tests.
Fixes: #38989.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The steps were incorrectly numbered, this PR fixes that and copies over
the description of each step.
Testing: None, just expanding on the comments/fixing the step numbering
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Since WebDriver is quite stable now, enable the `webdriver/classic`
tests on wpt CI.
---------
Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
Rework the flow of code in `Element:scroll_into_view_with_options` to
more closely follow the specification. This also simplifies the code a
bit and adds some TODOs about future improvements.
Testing: This should not change behavior and is thus covered by existing
tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
It was originally throwing a TypeError, which was making WPT fail.
Testing: Many happy WPT subtests
Fixes: #39050
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
Uses clipped time to convert dates that are stored as `f64`s into JS
values.
Testing: WPT
Fixes: #25327
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This makes future implementations easier where we will reuse most of
this code to parse Link headers.
Part of #35035
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Instead of panicking when doing a geometry script query on a node with
an uninvertible transform, return a zero-sized rectangle at the
untransformed position. This is similar to what Gecko and Blink do
(though it seems there are some differences in positioning this
zero-sized rectangle). Mostly importantly, do not panic.
Testing: This change adds a new WPT crash test.
Fixes: #38848.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This will complete the type annotation on `codegen.py` so we can safely
remove the ignore from `pyproject` configurataion
---------
Signed-off-by: Jerens Lensun <jerensslensun@gmail.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Move the construction of hit test items for scroll nodes to the display
list construction stage. This way they respect the `z-index` of their
originating fragments and stacking context ordering in general.
Testing: We currently do not have great testing for this as this tests
the combination of hit testing of input events and scrolling at that
point. The completion of WebDriver support should make this easier to
test.
Fixes: #38967
Signed-off-by: coding-joedow <ibluegalaxy_taoj@163.com>
Co-authored-by: kongbai1996 <1782765876@qq.com>
This PR **removes** `ScriptToConstellationMessage::ForwardToEmbedder`,
and replaces it with an explicit `ScriptToEmbedderChannel`. This new
channel is based on `GenericCallback` and in single-process mode will
directly send the message the to the embedder and wake it. In
multi-process mode, the message is routed via the ROUTER, since waking
is only possible from the same process currently. This means in
multi-process mode there are likely no direct perf benefits, since we
still need to hop the message over the ROUTER (instead of over the
constellation).
In single-process mode we can directly send the message to the embedder,
which should provide a noticable latency improvement in all cases where
script is blocked waiting on the embedder to reply.
This does not change the way the embedder receives messages - the
receiving end is unchanged.
## How was sending messages to the embedder working before?
1. Script wraps it's message to the embedder in
`ScriptToConstellationMessage::ForwardToEmbedder` and sends it to
constellation.
2. The [constellation event loop] receives the message in
[handle_request]
3. If deserialization fails, [an error is logged and the message is
ignored]
4. Since our message came from script, it is handle in
[handle_request_from_script]
5. The message is logged with trace log level
6. If the pipeline is closed, [a warning is logged and the message
ignored]
7. The wrapped `EmbedderMsg` [is forwarded to the embedder]. Sending the
message also invokes `wake()` on the embedder eventloop waker.
[constellation event loop]:
2e1b2e7260/components/constellation/constellation.rs (L755)
[handle request]:
2e1b2e7260/components/constellation/constellation.rs (L1182)
[an error is logged and the message is ignored]:
2e1b2e7260/components/constellation/constellation.rs (L1252)
[handle_request_from_script]:
https://github.com/servo/servo/blob/main/components/constellation/constellation.rs#L1590
[a warning is logged and the message ignored]:
2e1b2e7260/components/constellation/constellation.rs (L1599)
[is forwarded to the embedder]:
2e1b2e7260/components/constellation/constellation.rs (L1701)
Testing: Communication between Script and Embedder is extensive, so this
should be covered by existing tests.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>