Commit graph

51119 commits

Author SHA1 Message Date
Martin Robinson
5f0f457ac3
compositing: Send CompositorDisplayListInfo as bytes to compositor (#36484)
`CompositorDisplayListInfo` is a large data structure that scales with
the size of the display list. Serializing it onto the Compositor's IPC
channel can cause deadlocks. This change serializes it with bincode and
sends it alongside the rest of the serialized display list information
on the IPC `bytes_channel`. This should prevent deadlocks when the
compositor API is unified.

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

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-12 20:01:22 +00:00
Martin Robinson
084fe007a1
libservo: Create a WebViewBuilder class to construct WebViews (#36483)
This exposes a new method of creating `WebView`s using the Rust builder
pattern. This will be more important as we add more kinds of
configuration options for `WebView` such as size and HiDPI scaling.

Testing: The API currently doesn't have tests, but functionality is
ensured by the fact that servoshell is the test harness.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-12 18:59:16 +00:00
Martin Robinson
2454e00a68
libservo: Add a very simple libservo API test (#36440)
libservo: Add a very simple `libservo` API test

This is the first step toward adding full testing for the `WebView` API.
The test added here simply starts up a Servo instance and verifies that
it does not crash when shutting down.

Testing: This change is a test, so there are tests for these changes.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-12 18:36:14 +00:00
Oriol Brufau
64fe52e918
layout: Enforce min-content min main size of flex-level tables (#36469)
Additionally to the minimum specified in min-width or min-height, tables
also enforce a `min-content` minimum.

This was handled in `Sizes::resolve()`, but flex items don't use that.
So this patch moves the logic into `Size::resolve_for_min()`.

Testing: Covered by WPT

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-12 14:22:37 +00:00
Martin Robinson
56e7c21fe7
layout: Store table parts in DOM layout data (#36447)
When laying out tables, store the boxes of non-anonymous table parts in
their respective DOM objects. This is going to be important for
incremental layout, but also for mapping from the DOM to the box tree
(and eventually the fragment tree).

For now, anonymous table parts are still lost to time and space, but
in a followup change we hope to store them somewhere.

Testing: This has no visible change to web rendering, so is covered by
existing
WPT.

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>
2025-04-12 14:13:23 +00:00
Martin Robinson
a4a308e434
layout: Box block_margins_collapsed_with_children member of BoxFragment (#36474)
This reduces the size of `BoxFragment` by around 20 bytes.

Testing: This just changes the layout of a data structure, so is
covered by existing WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-04-12 08:52:30 +00:00
webbeef
3c4ec17180
textinput: position the caret at the end when selecting input (#36478)
When clicking on a text input element, we currently position the caret
at the very beginning, even if there is already text present. That makes
is annoying when you want to add text, and doesn't match what other
browsers do.
Instead, this change positions the caret at the end of the current text.

Testing: Not covered by any wpt tests (rightly so I think).

Signed-off-by: webbeef <me@webbeef.org>
2025-04-11 20:24:16 +00:00
Oriol Brufau
fc2eb7bff2
Enable dom_svg_enabled on all tests (#36475)
This feature is part of --enable-experimental-web-platform-features, so
it should be enabled on all tests.

This causes some new failures, but mostly it's because the tests were
timing out instead of running the failing subtests.

This is part of #36315

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-11 18:46:00 +00:00
Sebastian C
2d2cfade36
fix: File to FormData not correctly handling name and lastModified (#36458)
Set File's lastModified when reconstructing from Blob for FormData
Remove special character replacement in fileName (spec removed this
step)

Testing: WPT tests exist
Fixes: #22744 (if I undertand the issue correctly the filename issue was
already fixed and now this fixes the lastModified part)

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-11 17:59:03 +00:00
dependabot[bot]
5c7cf7aed6
build(deps): bump cc from 1.2.18 to 1.2.19 (#36477)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.18 to 1.2.19.
<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.19</h2>
<h3>Other</h3>
<ul>
<li>Fix musl compilation: Add musl as a prefix fallback (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1455">#1455</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.18...cc-v1.2.19">1.2.19</a>
- 2025-04-11</h2>
<h3>Other</h3>
<ul>
<li>Fix musl compilation: Add musl as a prefix fallback (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1455">#1455</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d7d29fc4e3"><code>d7d29fc</code></a>
chore: release v1.2.19 (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1458">#1458</a>)</li>
<li><a
href="0f8834db20"><code>0f8834d</code></a>
Fix musl compilation: Add musl as a prefix fallback (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1455">#1455</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.2.18...cc-v1.2.19">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.18&new-version=1.2.19)](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-11 17:28:38 +00:00
dependabot[bot]
e965a15348
build(deps): bump hilog from 0.1.1 to 0.2.0 (#36476)
Bumps [hilog](https://github.com/openharmony-rs/hilog) from 0.1.1 to
0.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openharmony-rs/hilog/releases">hilog's
releases</a>.</em></p>
<blockquote>
<h2>v0.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Feature: allow dynamic filter swaps by <a
href="https://github.com/PartiallyUntyped"><code>@​PartiallyUntyped</code></a>
in <a
href="https://redirect.github.com/openharmony-rs/hilog/pull/4">openharmony-rs/hilog#4</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/PartiallyUntyped"><code>@​PartiallyUntyped</code></a>
made their first contribution in <a
href="https://redirect.github.com/openharmony-rs/hilog/pull/4">openharmony-rs/hilog#4</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/openharmony-rs/hilog/commits/v0.2.0">https://github.com/openharmony-rs/hilog/commits/v0.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/openharmony-rs/hilog/commits/v0.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hilog&package-manager=cargo&previous-version=0.1.1&new-version=0.2.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-11 17:14:38 +00:00
Sebastian C
87c40b4168
Manually concatenate ACRH headers to not include a space (#36455)
headers library will join values with `, ` (comma space) but
Access-Control-Request-Headers specifies that it does not use the normal
combining algorithm and values should be joined with `,` (comma).

Testing: WPT tests exist
Fixes: temporary fix for #36451 until hyperium/headers#207 is fixed

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-11 17:01:55 +00:00
Martin Robinson
0c8bb8287a
layout: Eliminate extra stored style on outside markers (#36471)
This is a duplicate of the style stored on the marker's `LayoutBoxBase`.

Testing: This is covered by existings WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-04-11 16:37:11 +00:00
Oriol Brufau
601517e3aa
Cleanup after #36461 (#36472)
This avoids some minor code duplication.

Testing: not needed (no behavior change)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-11 16:35:21 +00:00
Tim van der Lippe
0aa08042d5
Implement attribute and property lookup for Trusted Types (#36422)
These algorithms are used to check whether an attribute/property can
accept a Trusted Type.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-04-11 08:38:00 +00:00
Sebastian C
2c7aeca404
Handle HTTP Refresh header (#36393)
Move parsing of Refresh values to Document.
Send Refresh header to Document and have meta tags reuse the logic.

I transplanted the existing Regex and made some updates so that it
passed all the existing parser tests.
I added the comments that made sense but it is not very clean to add
many comments within the regex.

Testing: There are existing WPT tests

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-11 07:25:37 +00:00
JoeDow
80a6ba5e42
Implement WebviewDelegate.screen_geometry for OHOS (#36459)
[OHOS]Bugfix: unimplemented WebviewDelegate.sceen_geometry causes failed
page loading

this [PR 36223](https://github.com/servo/servo/pull/36223) causes that
some page can not be loaded on ohos platform. The newly added
WebviewDelegate.screen_geometry is unimplemented at ohos platform
Besides, this commit also fix the bug that failed to copy the prefs.json
to cache dir when the servo is started at the first time after an ohos
application is installed, due to the cache dir is not existed.

@mrobinson @jschwe 

Testing: the ohos platform test demo hap
Fixes: No issue exists i can find

Signed-off-by: coding-joedow <ibluegalaxy_taoj@163.com>
2025-04-11 06:52:07 +00:00
DK Liao
5df4c760d3
fix: Crashing due to input element hack (#36461)
This PR addresses a crash in text input element due to a hack to prevent
text input being trimmed.

The updated behavior will only add `zero width space` unicode character
to the node if there's no text content instead of adding it constantly.
Also by adding the same `zero width space` unicode character to text
area when there's no text content within will allow text area element to
properly display caret.

<img width="197" alt="截圖 2025-04-11 中午12 51 00"
src="https://github.com/user-attachments/assets/10bc7314-9aa3-49df-baac-ef26d39a96d8"
/>

This PR also addresses issues with multiple glyph runs:


https://github.com/user-attachments/assets/658db56f-b166-47ec-bc77-c6c13114d669

Testing: This PR is tested using:
- `./mach run -d 'data:text/html,<input id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`
- `./mach run -d 'data:text/html,<textarea id="input_element"
value="xxxxxxxxxxxxxxxxxxxx">'`

without causing crashes, while the results should be covered by WPT
tests

Fixes: https://github.com/servo/servo/issues/36449

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-04-11 06:51:52 +00:00
TIN TUN AUNG
972ca77ce1
dom: should change media element's currentSrc to children source element's src in resource selection algorithm. (#36408)
Set the `htmlmediaelement`'s `currenSrc` in
resource-selection-algorithm.
Change the `htmlsourceelement`'s src and srcset to USVString type.

According to
[Spec](https://html.spec.whatwg.org/multipage/media.html#concept-media-load-algorithm),
Step 9.3 for mode is children, should set the `currentSrc` to `src` of
children `htmlsourceelement`.
Also, In the `htmlsourceelement` [interface
definition](https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element),
the `src` and `srcset` attribute should be type `USVString`.

Testing: More WPT tests related to resource selection algorithm are
passing.
Fix: Some spec fix

[Try](1434753561)
cc @xiaochengh

Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-04-11 06:32:34 +00:00
Yerkebulan Tulibergenov
c8ecb57d97
add CanGc as argument to methods in Element (#36464)
add CanGc as argument to methods in Element

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

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2025-04-11 06:21:50 +00:00
Martin Robinson
3c5da6588d
layout: Add documentation for CacheableLayoutResultAndInputs (#36448)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-04-10 18:53:08 +00:00
Alex Touchet
820326873b
Replace bluetooth Readme with corrected version from devices repository (#36429)
This Readme is for a different crate located in
https://github.com/servo/servo/tree/main/third_party/blurmac. Was adding
it to the bluetooth directory in #30974 a mistake?

---------

Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
2025-04-10 18:02:45 +00:00
dependabot[bot]
a2437dee53
build(deps): bump rustls from 0.23.25 to 0.23.26 (#36450)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.25 to
0.23.26.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="88dccec476"><code>88dccec</code></a>
Prepare 0.23.26</li>
<li><a
href="0ab530f85d"><code>0ab530f</code></a>
Detect and error on faulty <code>io::Write::write_vectored</code></li>
<li><a
href="c5b9b10147"><code>c5b9b10</code></a>
Rework further tests to use encoding module</li>
<li><a
href="d71046e992"><code>d71046e</code></a>
Rework QUIC tests to use new encoding module</li>
<li><a
href="0f3c823f75"><code>0f3c823</code></a>
Rework SNI tests to use new test-only TLS encoder</li>
<li><a
href="99db311d7e"><code>99db311</code></a>
Replace hand-written encodings with <code>encoding</code> module</li>
<li><a
href="334760fb06"><code>334760f</code></a>
Invert working of <code>SignatureScheme::supported_in_tls13</code></li>
<li><a
href="68d6ef21eb"><code>68d6ef2</code></a>
Use tlswg name for draft-kwiatkowski-tls-ecdhe-mlkem</li>
<li><a
href="c1fc0f424c"><code>c1fc0f4</code></a>
Take semver-compatible updates</li>
<li><a
href="d3b810d6b6"><code>d3b810d</code></a>
build(deps): bump openssl from 0.10.71 to 0.10.72</li>
<li>Additional commits viewable in <a
href="https://github.com/rustls/rustls/compare/v/0.23.25...v/0.23.26">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-10 17:06:27 +00:00
Oriol Brufau
2d40fb7fe2
Implement disabled attribute for <link rel="stylesheet"> (#36446)
Adds support for both the content and the IDL attribute.
Note this doesn't cover dynamic updates to `document.styleSheets` and
the owner node of the sheet.

Testing: Covered by WPT
Fixes: #26739

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-10 16:28:01 +00:00
DK Liao
e62aecb103
feat: Implement display for text selection and caret (#35830)
This PR introduces an initial, straightforward implementation for
displaying text selection and the caret.

This is achieved by passing the selection range and insertion point
index down to `TextFragment`, along with the starting offset of each
`TextFragment` to determine the proper range for displaying the caret
and text selection. Additionally, the `selected_style` was passed into
`TextFragment` to specify the background color.

During the final build phase, although whitespace is typically ignored
when constructing glyphs, we still need to retrieve it to render both
the caret and text selection at the correct location. This ensures that
whitespace is not overlooked when the `TextFragment` contains an
insertion point or selection range.

There are several improvements yet to be made, including:

- The caret is static and does not flash.
- The caret is not rendered when the input field is empty. (I suppose
there should be an easy fix somewhere but I haven't found it yet)

**Working Examples**

macOS


https://github.com/user-attachments/assets/f3622cbe-9fa6-40c0-b2d8-b3a8f9842c28

Windows


https://github.com/user-attachments/assets/9b008a0d-0011-4c76-a2e2-0e35869a216c

Linux

[Screencast from 03-07-2025 11_05_41
AM.webm](https://github.com/user-attachments/assets/09a311ad-f975-4450-a66c-b20be525a5ed)



---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #33237 (But the cursor isn't blinking
yet)
- [x] These changes do not require tests because there's no behavior
change

Signed-off-by: DK Liao <dklassic@gmail.com>
2025-04-10 14:40:38 +00:00
Kingsley Yung
e6595619e1
Drop vergen_git2 dependency (#36439)
Manually call `git rev-parse --short HEAD` to retrieve the commit hash,
instead of using Emitter from vergen_git2. This helps remove
dependencies and shorten compile time.

Testing: It doesn't require tests because it is a refactoring for
removing dependencies
Fixes: #36435

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-04-10 10:39:44 +00:00
Josh Matthews
c16ca22970
Run all CSP tests in CI by default. (#36436)
Extending the original set from #36402 since there are additional tests
relevant to the work happening in #36409 and #36363.

Testing: New tests in CI.
Fixes: Part of https://github.com/servo/servo/issues/4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-10 08:09:23 +00:00
Barigbue Nbira
a0730d7154
refactor: use is_zero() instead of comparing with Au::Zero() (#36347)
Use `is_zero()` instead of comparing with `Au::Zero()` for zero checks. 

Testing: This change does not cause behaviour change, a test is not
necessary.
Fixes: #36300

---------

Signed-off-by: Barigbue <barigbuenbira@gmail.com>
2025-04-09 22:57:55 +00:00
Martin Robinson
2fe57cc2a2
libservo: Move animation tracking from WindowMethods to delegates (#36400)
This changes removes animation tracking from the `WindowMethods` trait
and moves it to `ServoDelegate` and `WebViewDelegate`.

- Animation changes per-`WebView` are now triggered in the compositor
  only when the value is updated there, rather than right after ticking
  animations.
- Both `WebView` and `Servo` now expose an `animation()` method, so
  tracking animation state actually becomes unecessary in many cases,
  such as that of desktop servoshell, which can just read the value
  when the event loop spins.

Testing: No tests necessary as the API layer is still untested. Later,
tests will be added for the `WebView` API and this can be tested then.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-09 19:41:53 +00:00
dependabot[bot]
935db71183
build(deps): bump vergen from 9.0.4 to 9.0.6 (#36424)
Bumps [vergen](https://github.com/rustyhorde/vergen) from 9.0.4 to
9.0.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustyhorde/vergen/releases">vergen's
releases</a>.</em></p>
<blockquote>
<h2>vergen 9.0.6</h2>
<h2>What's Changed</h2>
<ul>
<li>Updated MSRV to 1.78.0 by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/388">rustyhorde/vergen#388</a></li>
<li>Fixed broken tests by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/389">rustyhorde/vergen#389</a></li>
<li>Removed unnecessary hashes in string literals by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/390">rustyhorde/vergen#390</a></li>
<li>removed coverage_attribute as it is now supported by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/391">rustyhorde/vergen#391</a></li>
<li>Added coverage_attribute feature to support llvm-cov by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/392">rustyhorde/vergen#392</a></li>
<li>Dependency updates by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/394">rustyhorde/vergen#394</a></li>
<li>Added back coverage_attribute feature for coverage by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/396">rustyhorde/vergen#396</a></li>
<li>Bump library dependencies by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/397">rustyhorde/vergen#397</a></li>
<li>Updated to latest deps to clear rustsec from gix by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/401">rustyhorde/vergen#401</a></li>
<li>Removed lint by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/403">rustyhorde/vergen#403</a></li>
<li>Fixed lint issues by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/404">rustyhorde/vergen#404</a></li>
<li>Lint fixes, fixed macos builds by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/407">rustyhorde/vergen#407</a></li>
<li>gitcl: log output of failed <code>git</code> commands. by <a
href="https://github.com/aznashwan"><code>@​aznashwan</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/409">rustyhorde/vergen#409</a></li>
<li>Dependency updates by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/419">rustyhorde/vergen#419</a></li>
<li>git: Ensure no backend ever takes an index lock by <a
href="https://github.com/bgw"><code>@​bgw</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/406">rustyhorde/vergen#406</a></li>
<li>Fix lint issues with new mtime tests by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/420">rustyhorde/vergen#420</a></li>
<li>Implement dirty for gix by <a
href="https://github.com/yodaldevoid"><code>@​yodaldevoid</code></a> in
<a
href="https://redirect.github.com/rustyhorde/vergen/pull/412">rustyhorde/vergen#412</a></li>
<li>Fixed lint issues in gix by <a
href="https://github.com/CraZySacX"><code>@​CraZySacX</code></a> in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/421">rustyhorde/vergen#421</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/aznashwan"><code>@​aznashwan</code></a>
made their first contribution in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/409">rustyhorde/vergen#409</a></li>
<li><a href="https://github.com/bgw"><code>@​bgw</code></a> made their
first contribution in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/406">rustyhorde/vergen#406</a></li>
<li><a
href="https://github.com/yodaldevoid"><code>@​yodaldevoid</code></a>
made their first contribution in <a
href="https://redirect.github.com/rustyhorde/vergen/pull/412">rustyhorde/vergen#412</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustyhorde/vergen/compare/vergen_pretty_0.3.6...vergen_9.0.6">https://github.com/rustyhorde/vergen/compare/vergen_pretty_0.3.6...vergen_9.0.6</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rustyhorde/vergen/commits/vergen_9.0.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vergen&package-manager=cargo&previous-version=9.0.4&new-version=9.0.6)](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-09 17:35:34 +00:00
dependabot[bot]
e7011b3fc9
build(deps): bump xml-rs from 0.8.25 to 0.8.26 (#36425)
Bumps [xml-rs](https://github.com/kornelski/xml-rs) from 0.8.25 to
0.8.26.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="250211cffc"><code>250211c</code></a>
Bump</li>
<li><a
href="7eebb96e87"><code>7eebb96</code></a>
DRY</li>
<li><a
href="f444155cc7"><code>f444155</code></a>
Never buffer more than 4 bytes for broken encodings</li>
<li><a
href="17225aa476"><code>17225aa</code></a>
Warn about io::Read overhead</li>
<li><a
href="20e0318f14"><code>20e0318</code></a>
Clarify the error is intentional</li>
<li>See full diff in <a
href="https://github.com/kornelski/xml-rs/compare/0.8.25...0.8.26">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 17:04:05 +00:00
Gae24
64b401696a
script: Correctly convert a jsval to a Promise (#36403)
Fixes an oversight of #36097, in which converting to a Promise would
fail if the value passed wasn't actually a Promise, while in binding
code we actually call `Promise::new_resolved` on the value.

Testing: There are wpt tests that should pass now

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2025-04-09 16:35:35 +00:00
Martin Robinson
3b41a16fcf
libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420)
Now that `webxr` is integrated into the Servo directory, `webxr` can
depend on `embedder_traits` instead of having it re-export this type
conditionally (and sometimes duplicating it).

Testing: This just moves a data type, so no tests are necessary.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-04-09 14:19:33 +00:00
dependabot[bot]
f8db2d2e86
build(deps): bump gilrs-core from 0.6.1 to 0.6.4 (#36386)
Bumps [gilrs-core](https://gitlab.com/gilrs-project/gilrs) from 0.6.1 to
0.6.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d66688c571"><code>d66688c</code></a>
Prepare for gilrs-core 0.6.4</li>
<li><a
href="e5131234ca"><code>e513123</code></a>
core: Expand <code>windows</code> version range to include
<code>0.61</code> release</li>
<li><a
href="5bc62a555a"><code>5bc62a5</code></a>
Prepare for gilrs-core 0.6.3</li>
<li><a
href="634c36805c"><code>634c368</code></a>
Update docs to reflect switch to Windows Gaming Input and include some
useful...</li>
<li><a
href="cb93e0425a"><code>cb93e04</code></a>
Fix some differences between readme and crate docs</li>
<li><a
href="21853a82b1"><code>21853a8</code></a>
Fix panic on MacOS</li>
<li><a
href="aa64e7c6cc"><code>aa64e7c</code></a>
ci: Generate Cargo.lock with MSRV-aware resolver</li>
<li><a
href="ab717edb2d"><code>ab717ed</code></a>
core: Expand <code>windows</code> version range to include
<code>0.60</code> release</li>
<li><a
href="d63f407458"><code>d63f407</code></a>
Prepare for gilrs-core 0.6.2 release</li>
<li><a
href="0bf02ceeaf"><code>0bf02ce</code></a>
Don’t unwrap result of NonRoamableId</li>
<li>Additional commits viewable in <a
href="https://gitlab.com/gilrs-project/gilrs/compare/gilrs-core-v0.6.1...gilrs-core-v0.6.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gilrs-core&package-manager=cargo&previous-version=0.6.1&new-version=0.6.4)](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-09 14:03:46 +00:00
Martin Robinson
2d001e2c85
layout: Enable using cached fragments when there is a BoxTree update point (#36404)
This starts to enable the fragment cache for all layout modes, except
grid. The main tricky bit here is that update points are absolutes and
these need to be laid out again in their containing blocks. We punt a
little bit on this, by forcing ancestors of update points to rebuild
their Fragments. This is just the first step.

Testing: We do not currently have layout performance tests, but will try
to run some tests manually later. Behavior is covered by the WPT.

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>
2025-04-09 13:32:07 +00:00
sagudev
15cac97ada
mach try: Add wpt alias for linux-wpt (#36416)
Add `wpt` alias for `linux-wpt` in try_parser, because that's the what I
have in muscle memory.

Testing: Tested with new try_parser unit tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-09 11:23:27 +00:00
Oriol Brufau
9c29acd6d8
Add serde and wgsl features to wgpu-core (#36411)
This fixes errors when running `./mach clippy -r -p layout_2020` and
`./mach clippy -r -p script`.

Also addressing an unused import warning when running the latter.

Testing: These changes do not require tests because it's just a compile
error fix.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-09 10:09:13 +00:00
dependabot[bot]
a04b648421
build(deps): bump miniz_oxide from 0.8.7 to 0.8.8 (#36415)
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.8.7 to
0.8.8.
<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.7..0.8.8">0.8.8</a>
- 2025-04-08</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>(inflate)</strong> fix possible <code>attempt to subtract
with overflow</code> (<a
href="https://redirect.github.com/Frommi/miniz_oxide/issues/172">#172</a>)
- (<a
href="db85297b64">db85297</a>)
- Tymoteusz Kubicz</li>
<li><strong>(inflate)</strong> use wrapping instead of saturating in
transfer and add test cate for overflow panic in debug mode - (<a
href="4ed4535230">4ed4535</a>)
- oyvindln</li>
<li>disable a bunch more stuff that is not used when compiled as part of
rustc - (<a
href="bf3cca66bf">bf3cca6</a>)
- oyvindln</li>
<li>add fuzz target for running via flate2 - (<a
href="adadb9f538">adadb9f</a>)
- oyvindln</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f177ab233c"><code>f177ab2</code></a>
bump version and changelog</li>
<li><a
href="f1082df11e"><code>f1082df</code></a>
add flate2 fuzz target code</li>
<li><a
href="adadb9f538"><code>adadb9f</code></a>
fix: add fuzz target for running via flate2</li>
<li><a
href="bf3cca66bf"><code>bf3cca6</code></a>
fix: disable a bunch more stuff that is not used when compiled as part
of rustc</li>
<li><a
href="4ed4535230"><code>4ed4535</code></a>
fix(inflate): use wrapping instead of saturating in transfer and add
test cat...</li>
<li><a
href="db85297b64"><code>db85297</code></a>
fix(inflate): fix possible <code>attempt to subtract with
overflow</code> (<a
href="https://redirect.github.com/Frommi/miniz_oxide/issues/172">#172</a>)</li>
<li>See full diff in <a
href="https://github.com/Frommi/miniz_oxide/compare/0.8.7...0.8.8">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.7&new-version=0.8.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 09:13:08 +00:00
Oriol Brufau
13fa943e34
build(deps): bump crossbeam-channel from 0.5.14 to 0.5.15 (#36412)
Version 0.5.14 has been yanked because it could trigger a double free.

https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-09 07:26:13 +00:00
sagudev
4d4f94936f
script: copy include! files from script_bindings to script's OUT_DIR (#36384)
copy generated `include!`d files from script_bindings's OUT_DIR, to
script's OUT_DIR to allow Rust Analyzer to load them.
This is done to bypass limitation of Rust Analyzer:
https://github.com/rust-lang/rust-analyzer/issues/17040

Also build script will now be rerun only when there are actual changes
to concrete bindings due to emitted `cargo::rerun-if-changed` (not for
each change in script crate).

Testing: It compiles so it works, I tested manually and RA now works as
expected (although we need to from type alias to concrete union-types
definitions)
Fixes:
https://servo.zulipchat.com/#narrow/channel/263398-general/topic/rust-analyzer.20failed.20to.20include.20codes.20in.20script_bindings

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-04-08 19:22:24 +00:00
Barigbue Nbira
7fd004adce
Remove unsafe annotation add to unsafe blocks (#36399)
Remove the `unsafe` annotation from the `cross_origin_get` function and
add `unsafe` blocks around unsafe code within the function

Testing: Testing is not required as this change does not alter
behaviour.
Fixes: #36358

---------

Signed-off-by: Barigbue <barigbuenbira@gmail.com>
2025-04-08 18:39:47 +00:00
dependabot[bot]
867711c6b9
build(deps): bump winnow from 0.7.4 to 0.7.6 (#36407)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.7.4 to 0.7.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md">winnow's
changelog</a>.</em></p>
<blockquote>
<h2>[0.7.6] - 2025-04-07</h2>
<h3>Features</h3>
<ul>
<li>Add <code>TokenSlice::previous_tokens</code></li>
</ul>
<h2>[0.7.5] - 2025-04-07</h2>
<h3>Features</h3>
<ul>
<li>Add <code>Stream::next_slice_unchecked</code> and
<code>Stream::peek_slice_unchecked</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1c31fde9d4"><code>1c31fde</code></a>
chore: Release</li>
<li><a
href="9b42e02de6"><code>9b42e02</code></a>
docs: Update changelog</li>
<li><a
href="35f6c04aed"><code>35f6c04</code></a>
Merge pull request <a
href="https://redirect.github.com/winnow-rs/winnow/issues/765">#765</a>
from epage/prev</li>
<li><a
href="0055561a03"><code>0055561</code></a>
feat(stream): Add access to previous tokens</li>
<li><a
href="85cef7e0f8"><code>85cef7e</code></a>
chore: Release</li>
<li><a
href="5886515d13"><code>5886515</code></a>
docs: Update changelog</li>
<li><a
href="582d253875"><code>582d253</code></a>
Merge pull request <a
href="https://redirect.github.com/winnow-rs/winnow/issues/764">#764</a>
from epage/unchecked</li>
<li><a
href="3b13a4ffce"><code>3b13a4f</code></a>
feat(stream): Allow unchecked slicing</li>
<li><a
href="38458d280e"><code>38458d2</code></a>
refactor(stream): Simplify peek_slice</li>
<li><a
href="a5345d58c5"><code>a5345d5</code></a>
Merge pull request <a
href="https://redirect.github.com/winnow-rs/winnow/issues/760">#760</a>
from epage/repeat</li>
<li>Additional commits viewable in <a
href="https://github.com/winnow-rs/winnow/compare/v0.7.4...v0.7.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=winnow&package-manager=cargo&previous-version=0.7.4&new-version=0.7.6)](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-08 17:47:44 +00:00
dependabot[bot]
44acdf0b82
build(deps): bump jiff from 0.2.5 to 0.2.6 (#36406)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [jiff](https://github.com/BurntSushi/jiff) from 0.2.5 to 0.2.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md">jiff's
changelog</a>.</em></p>
<blockquote>
<h1>0.2.6 (TBD)</h1>
<p>TODO</p>
<p>Enhancements:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/315">#315</a>:
Add support for automatically finding the tzdb on Illumos.</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/305">#305</a>:
Fixed <code>Zoned</code> rounding on days with DST time zone
transitions.</li>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/309">#309</a>:
Fixed bug where <code>TimeZone::preceding</code> could omit historical
time zone
transitions for time zones that have eliminated DST in the present.</li>
<li><a
href="https://redirect.github.com/BurntSushi/jiff/issues/312">#312</a>:
Fixed <code>nth_weekday_in_month</code>, where it would sometimes
incorrectly return an
error.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0bdb3b0207"><code>0bdb3b0</code></a>
0.2.6</li>
<li><a
href="6c1cd0e1b0"><code>6c1cd0e</code></a>
changelog: 0.2.6</li>
<li><a
href="2bd7148090"><code>2bd7148</code></a>
tz: add <code>/usr/share/lib/zoneinfo</code></li>
<li><a
href="7bbe21a6cb"><code>7bbe21a</code></a>
civil: fix <code>Date::nth_weekday_of_month</code></li>
<li><a
href="f41d586445"><code>f41d586</code></a>
shared: remove pointless <code>as_ref</code></li>
<li><a
href="9aeb3f1328"><code>9aeb3f1</code></a>
changelog: add entry for <a
href="https://redirect.github.com/BurntSushi/jiff/issues/309">#309</a></li>
<li><a
href="9259f79099"><code>9259f79</code></a>
tz: fix retrieval of past time zone transitions for
<code>America/Sao_Paulo</code></li>
<li><a
href="2b84020287"><code>2b84020</code></a>
zoned: fix rounding to &quot;days&quot; when near a time zone
transition</li>
<li><a
href="a22abc7617"><code>a22abc7</code></a>
bench: add benchmarks for constructing a timestamp type</li>
<li><a
href="ef5ee45a1b"><code>ef5ee45</code></a>
span: avoid cloning when rounding</li>
<li>Additional commits viewable in <a
href="https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.5...jiff-static-0.2.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jiff&package-manager=cargo&previous-version=0.2.5&new-version=0.2.6)](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-08 17:14:33 +00:00
dependabot[bot]
50fe1b17b5
build(deps): bump half from 2.5.0 to 2.6.0 (#36405)
Bumps [half](https://github.com/VoidStarKat/half-rs) from 2.5.0 to
2.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/VoidStarKat/half-rs/releases">half's
releases</a>.</em></p>
<blockquote>
<h2>2.6.0</h2>
<h3>Changed</h3>
<ul>
<li>Fixed some incorrect minimum supported versions of dependencies that
weren't caught due to
improper <code>Cargo.lock</code>:
<ul>
<li><code>num-traits</code> 0.2.14 -&gt; 0.2.16</li>
<li><code>zerocopy</code> 0.8.0 -&gt; 0.8.23</li>
<li><code>arbitrary</code> 1.3.2 -&gt; 1.4.1</li>
</ul>
</li>
</ul>
<h3>Added</h3>
<ul>
<li><code>f16</code> and <code>bf16</code> now implement
<code>Immutable</code> and <code>KnownLayout</code> for
<code>zerocopy</code> crate. By [<a
href="https://github.com/usamoi"><code>@​usamoi</code></a>].</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/VoidStarKat/half-rs/blob/main/CHANGELOG.md">half's
changelog</a>.</em></p>
<blockquote>
<h2>[2.6.0] - 2024-04-08 <!-- raw HTML omitted --><!-- raw HTML omitted
--></h2>
<h3>Changed</h3>
<ul>
<li>Fixed some incorrect minimum supported versions of dependencies that
weren't caught due to
improper <code>Cargo.lock</code>:
<ul>
<li><code>num-traits</code> 0.2.14 -&gt; 0.2.16</li>
<li><code>zerocopy</code> 0.8.0 -&gt; 0.8.23</li>
<li><code>arbitrary</code> 1.3.2 -&gt; 1.4.1</li>
</ul>
</li>
</ul>
<h3>Added</h3>
<ul>
<li><code>f16</code> and <code>bf16</code> now implement
<code>Immutable</code> and <code>KnownLayout</code> for
<code>zerocopy</code> crate. By [<a
href="https://github.com/usamoi"><code>@​usamoi</code></a>].</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1894e9550"><code>b1894e9</code></a>
Bump version to 2.6.0</li>
<li><a
href="ec91af59c8"><code>ec91af5</code></a>
Fix min dependency versions</li>
<li><a
href="bee721b27a"><code>bee721b</code></a>
update changelog</li>
<li><a
href="2ba131f218"><code>2ba131f</code></a>
Merge pull request <a
href="https://redirect.github.com/VoidStarKat/half-rs/issues/125">#125</a>
from tensorchord/2.5.0-zerocopy</li>
<li><a
href="55c36c1b2c"><code>55c36c1</code></a>
Update unmaintained/outdated CI actions</li>
<li><a
href="7580fd6ed1"><code>7580fd6</code></a>
Update repository link</li>
<li><a
href="9dc2559e95"><code>9dc2559</code></a>
derive Immutable and KnownLayout for f16 and bf16</li>
<li>See full diff in <a
href="https://github.com/VoidStarKat/half-rs/compare/v2.5.0...v2.6.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=half&package-manager=cargo&previous-version=2.5.0&new-version=2.6.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-08 17:11:54 +00:00
Simon Wülker
9af9507920
Unify the way html5ever and xml5ever block on script elements (#36284)
Companion PR for https://github.com/servo/html5ever/pull/591

Testing: Covered by WPT
Part of https://github.com/servo/servo/issues/6414,
https://github.com/servo/servo/issues/24898, preparation for
https://github.com/servo/html5ever/pull/590

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-08 16:40:14 +00:00
Josh Matthews
ce4ca9ee98
Run subset of CSP tests by default. (#36402)
This will establish a baseline for the changes from #36363.

Testing: New tests in CI.
Fixes: Part of #4577

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-04-08 14:46:25 +00:00
delan azabani
95eedb997a
Devtools: initial Debugger > Sources panel (#36164)
This patch adds support for listing scripts in the Sources panel.
Classic scripts, both external and inline, are implemented, but worker
scripts and imported module scripts are not yet implemented.

For example:

```html
<!-- sources.html -->
<!doctype html><meta charset=utf-8>
<script src="classic.js"></script>
<script>
    console.log("inline classic");
    new Worker("worker.js");
</script>
<script type="module">
    import module from "./module.js";
    console.log("inline module");
</script>
<script src="https://servo.org/js/load-table.js"></script>
```

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

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

```js
// module.js
export default 1;
console.log("external module");
```


![image](https://github.com/user-attachments/assets/2f1d8d7c-501f-4fe5-bd07-085c95e504f2)

---
<!-- 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 partially implement #36027

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes require tests, but they are blocked on #36325

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-04-08 09:22:53 +00:00
Yerkebulan Tulibergenov
40655cc06c
add CanGc as argument to methods in DissimilarOriginWindow, DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap (#36395)
add CanGc as argument to methods in DissimilarOriginWindow,
DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap

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-08 02:33:21 +00:00
Yerkebulan Tulibergenov
76e0b8ec06
refactor: add CanGc as argument to methods in Document (#36392)
Add CanGc as arguments in methods in Document

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-07 23:15:23 +00:00
Sebastian C
9bdc46d66b
fix: meta referrer updating to follow spec (#36390)
Previously the referrer policy used tree order but the spec only cares
about the most-recently-updated or most-recently-added meta referrer.

Testing: change has existing WPT tests

---------

Signed-off-by: Sebastian C <sebsebmc@gmail.com>
2025-04-07 22:29:12 +00:00