Commit Graph

55469 Commits

Author SHA1 Message Date
sagudev
7190d9a274 fixup requirements
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-03-31 07:29:27 +02:00
Servo WPT Sync
8530b8b02a Update web-platform-tests to revision b'0132c620b681ab085bffb45ad74040e61090e1ba'
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-03-31 07:29:27 +02:00
Sam
242cec5770 chore: relax mozlog version requirement (#43749)
Having strict versions here prevents WPT imports. Because we resolve our
deps together with WPT deps:
c32b720ca4/pyproject.toml (L9)
we will effectively use pinned version from WPT (which will work in
upgrades).

Testing: None
Fixes:
https://servo.zulipchat.com/#narrow/channel/263398-general/topic/WPT.20import.20failed.20today

Signed-off-by: Sam <16504129+sagudev@users.noreply.github.com>
2026-03-29 11:34:33 +00:00
Abbas Olanrewaju Sarafa
be1468f279 devtools: Rename StyleSheetsActor variable names (#43729)
Renamed StyleSheetsActor variable names in browsing_context

Testing: Ran `./mach test-devtools` locally.
Fixes: Part of #43606

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 10:49:00 +00:00
Abbas Olanrewaju Sarafa
c32b720ca4 devtools: Rename RootActor variable names (#43731)
Renamed RootActor variable names in root, watcher, tab & lib.rs

Testing: No testing required.
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 06:49:34 +00:00
Euclid Ye
db719abced script: Add TODO for Computed Role (#43736)
Beginning of #43734.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-29 03:12:34 +00:00
Euclid Ye
209c99198c net: Enable fetch and http_loader unit tests for Windows (#43738)
fetch and http_loader module were completely disabled for Windows. 
I ran them locally for a few rounds, and there's nothing abnormal.

Testing: [Windows Try with
UT](https://github.com/servo/servo/actions/runs/23687830144/job/69010191251)

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-28 21:31:46 +00:00
Martin Robinson
1f6e1d2004 layout: Add support for background-blend-mode (#43666)
This change adds support for `background-blend-mode` to Servo by
creating one stacking context per blend and a single stacking context to
serve as the blend container. This matches the approach that Gecko
takes.

Stylo PR: servo/stylo#344
Testing: This change causes some WPT tests to start passing. In general
this feature
is not well exercised by tests. I suspect that blending is hard to test
properly.
Fixes: #43621

Signed-off-by: Martin Robinson <mrobinson@fastmail.fm>
Co-authored-by: Martin Robinson <mrobinson@fastmail.fm>
2026-03-28 20:52:27 +00:00
Tim van der Lippe
fe5c905760 net: Update reported CSP urls for websockets (#43645)
Per the spec discussion [1], we should report `http(s)` URLs rather than
the original `ws(s)` URLs. The WPT tests are updated to reflect what the
spec says and are reviewed by other browser engineers in the WPT PR.

[1]: https://github.com/w3c/webappsec-csp/issues/735

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-03-28 15:15:40 +00:00
dependabot[bot]
099b8e0b80 build: bump cryptography from 46.0.5 to 46.0.6 (#43735)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.5
to 46.0.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst">cryptography's
changelog</a>.</em></p>
<blockquote>
<p>46.0.6 - 2026-03-25</p>
<pre><code>
* **SECURITY ISSUE**: Fixed a bug where name constraints were not
applied
  to peer names during verification when the leaf certificate contains a
wildcard DNS SAN. Ordinary X.509 topologies are not affected by this
bug,
including those used by the Web PKI. Credit to **Oleh Konko (1seal)**
for
  reporting the issue. **CVE-2026-34073**
<p>.. _v46-0-5:<br />
</code></pre></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91d728897b"><code>91d7288</code></a>
Cherry-pick <a
href="https://redirect.github.com/pyca/cryptography/issues/14542">#14542</a>
(<a
href="https://redirect.github.com/pyca/cryptography/issues/14543">#14543</a>)</li>
<li>See full diff in <a
href="https://github.com/pyca/cryptography/compare/46.0.5...46.0.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cryptography&package-manager=uv&previous-version=46.0.5&new-version=46.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 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)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/servo/servo/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 10:35:18 +00:00
Josh Matthews
6526ee532a script: Use result of determining the origin in more cases. (#43732)
We were previously conflating the concept of a navigation request's
origin with the origin of the resulting document. These changes ensure
that the navigation request's origin is based on the navigation
initiator's origin, and the document's origin is not computed until
after the navigation response is received.

The most visible effect of these changes is that documents in sandboxed
iframes now correctly have an opaque origin.

Testing: Lots of new passing tets.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-03-28 10:03:12 +00:00
Tim van der Lippe
6656061fc3 script: Implement frame-ancestors CSP check (#43630)
Requires communication between the script thread and the constellation
to be able to retrieve the origin of a cross-origin document. However,
in the fast-path where the document resides in the same script-thread,
we use the `frame_element` instead.

If no CSP list is active, then we skip all this logic, to have a minimal
impact on document navigation.

Part of #4577
Fixes #36468

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-03-28 08:54:17 +00:00
Martin Robinson
bc9a86f7bd script: Use the containing node as the activable element for UA widgets (#43722)
UA widgets (such as textual `<input>`) create a shadow DOM to contain
their various parts. When clicking on these parts (such as the text node
of the widget contents), we should use the root node of the widget as
the activable node. This means that wehen you click on the inside of an
`<input>` element, the input matches the `:active` pseudo-selector.

Testing: This improves WPT tests.
Fixes: #41102

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2026-03-27 21:38:15 +00:00
Tim van der Lippe
f7876c3db8 script: Pass &mut JSContext to navigate (#43713)
Also move the related `navigate_to_fragment` method next to it.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-27 17:11:22 +00:00
Abbas Olanrewaju Sarafa
9dbe608558 devtools: Rename NetworkEventActor variable concerned files (#43675)
Renamed NetworkEventActor variables in network_handler & lib.rs

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-27 14:48:00 +00:00
Martin Robinson
8acfe7ad48 script: Implement AnimationTimeline and DocumentTimeline from Web Animations (#43711)
This is the first step toward implementing the Web Animations
specification. It adds support for the `AnimationTimeline` and
`DocumentTimeline` specification concepts. Note that there was already
an `AnimationTimeline`, but it did not implement the specification.

Testing: Various WPT start to pass or no longer error / timeout.

Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
Co-authored-by: Martin Robinson <mrobinson@abandonedwig.info>
2026-03-27 14:26:23 +00:00
Sharan Poojari
6dd427683c script: React correctly to selected attributes changes in for <option> (#43582)
Fixes: #43522

Signed-off-by: SharanRP <z8903830@gmail.com>
2026-03-27 14:25:54 +00:00
Euclid Ye
f80eab7018 canvas: Don't include text run without string or font when build_unshaped_text_runs (#43717)
As titled. The `Vec<UnshapedTextRun>` produced by `fn
build_unshaped_text_runs`
is only used by `into_shaped_text_run`, which filters out those without
string or font.

It is better to not allocate them in the first place.

Testing: [Try](https://github.com/servo/servo/actions/runs/23642089615).
Added a Servo-specific crash test to ensure we will not have empty
font/string in a text run.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-27 13:54:32 +00:00
Tim van der Lippe
0df9b39af9 script: move element interfaces into element/ (#43714)
It moves `Element.rs` into a subdirectory and turns on dead code
detection (found 4 methods that could be removed). Then it also extracts
the first attribute-related method into a separate file, to reduce the
file size of `Element` and add more structure as part of #43709.

Part of #38901
Part of #43709

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-27 12:59:13 +00:00
Martin Robinson
4c961cdc40 tidy: Run uv with --frozen when running flake8 (#43716)
This prevents unintended updates the `uv.lock` file which must be
reverted locally.

Testing: As this just fixes a runtime issue when running `test-tidy`,
this
probably doesn't deserve a test.

Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
Co-authored-by: Martin Robinson <mrobinson@abandonedwig.info>
2026-03-27 12:20:09 +00:00
Luke Warlow
563dd06e52 script: Implement shadow tree for file input (#43498)
script: Implement shadow tree for file input

File inputs also now support ::file-selector-button

Testing: Existing WPTs
Fixes: https://github.com/servo/servo/issues/39565

Stylo PR: https://github.com/servo/stylo/pull/341

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Vasiluță Mihai-Alexandru <alexv@siluta.me>
2026-03-27 12:15:50 +00:00
Tim van der Lippe
442c63e2d9 net: Fix header parsing for empty strings (#43708)
If there are multiple header values and one of them is empty, we should
append the empty string rather than skipping it. The algorithm was
incorrectly advancing the operation and continuing the loop, rather than
appending and later returning the `values`.

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-27 09:45:32 +00:00
Babalola Taiwo J
ed8b28b642 script: Merge Window::load_url with ScriptThread::navigate (#43668)
Both `Window::load_url` and `ScriptThread::navigate` implement parts of
the same navigate algorithm from the HTML spec
(https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate).
`ScriptThread::navigate` had only one caller: `Window::load_url`.

This merges both methods into a single `navigate` function in
`navigation.rs`, which is the appropriate home for navigation logic. All
previous callers of `Window::load_url` now call `navigation::navigate`
directly.

Testing: This is a pure refactor with no behaviour changes, so no new
tests are needed. Existing tests cover the navigation paths affected.
Fixes: #43494

---------

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
2026-03-27 08:38:43 +00:00
Abbas Olanrewaju Sarafa
b707a59117 devtools: Rename BrowsingContextActor variable names (#43655)
Renamed BrowsingContext in tab, network_event, watcher actors & lib.rs

Testing: No testing required - only renaming done
Fixes: Part o #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-27 07:20:04 +00:00
elomscansio
7fe875ac36 constellation: Convert constellation's EmbedderProxy to GenericEmbedderProxy (#43646)
Refactor Constellation module to use GenericEmbedderProxy
- [X] create the new enum in components/<component>
- [X] for each use of EmbedderMsg::<something> in
components/<component>, extract that enum variant into the new enum
- [X] replace uses of EmbedderProxy in components/<component> with
GenericEmbedderProxy<<component>ToEmbedderMsg>
- [X] create a new instance of the generic embedder proxy in
[Servo::new](c023d8edc7/components/servo/servo.rs (L755-L756));
store the receiver in a new field in Servo and pass the sender to the
appropriate code that instantiates the component
- [X] add a new variant to the
[Message](c023d8edc7/components/servo/servo.rs (L137))
enum for the new component enum type
- [X] update
[receive_one_message](c023d8edc7/components/servo/servo.rs (L224))
to use the new receiver and return the new enum variant
- [X] extract the code from
[handle_embedder_message](c023d8edc7/components/servo/servo.rs (L345))
that handles the component-specific variants into a new method

Testing: Just a refactor shouldn't need any testing
Fixes: #42097

---------

Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
Signed-off-by: elomscansio <163124154+elomscansio@users.noreply.github.com>
Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2026-03-27 06:59:50 +00:00
dependabot[bot]
627f2dfe7f build: bump cmake from 0.1.57 to 0.1.58 (#43699)
Bumps [cmake](https://github.com/rust-lang/cmake-rs) from 0.1.57 to
0.1.58.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cmake-rs/releases">cmake's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.58</h2>
<h3>Fixed</h3>
<ul>
<li>Fix i686-windows system import (<a
href="https://redirect.github.com/rust-lang/cmake-rs/pull/276">#276</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cmake-rs/blob/main/CHANGELOG.md">cmake's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cmake-rs/compare/v0.1.57...v0.1.58">0.1.58</a>
- 2026-03-26</h2>
<h3>Fixed</h3>
<ul>
<li>Fix i686-windows system import (<a
href="https://redirect.github.com/rust-lang/cmake-rs/pull/276">#276</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6319069719"><code>6319069</code></a>
chore: release v0.1.58 (<a
href="https://redirect.github.com/rust-lang/cmake-rs/issues/269">#269</a>)</li>
<li><a
href="fa894569a9"><code>fa89456</code></a>
Fix i686-windows system import (<a
href="https://redirect.github.com/rust-lang/cmake-rs/issues/276">#276</a>)</li>
<li><a
href="511160ffce"><code>511160f</code></a>
Switch to main (<a
href="https://redirect.github.com/rust-lang/cmake-rs/issues/266">#266</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cmake-rs/compare/v0.1.57...v0.1.58">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cmake&package-manager=cargo&previous-version=0.1.57&new-version=0.1.58)](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 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>
2026-03-27 01:17:08 +00:00
eri
2ee93de65d devtools: Rework debugger value structure (#43587)
The WebIDLs for values were duplicated in PropertyDescriptor and
EvalResultValue, with duplicated handlers across the code.

General cleanup of how debugger values are passed from debugger.js and
how the conversion from JS and to JSON happens.

There shouldn't be a behaviour change.

Testing: Existing devtools tests and manual testing
Part of: #36027

---------

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-03-26 20:18:12 +00:00
Abbas Olanrewaju Sarafa
190844378b devtools: Renamed WorkerActor variables in affected files (#43678)
Renamed WorkerActor variables in watcher, console, root and lib.rs

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-26 19:47:37 +00:00
Veer Pratap
235a3577f3 script: Use encoding-parsed URLs in EventSource constructor (#43634)
Fixes #43629.

The `EventSource` constructor was resolving input URLs with
`api_base_url().join(...)`, which is not the same as the HTML spec’s
encoding-parsing step for URLs relative to the relevant settings object.

This change updates `components/script/dom/eventsource.rs` to use
`global.encoding_parse_a_url(&url.str())` when constructing the
`EventSource` request URL. That makes the constructor follow the spec
more
closely while keeping the existing failure behavior of returning
`Error::Syntax(None)` when parsing fails.

Using `GlobalScope::encoding_parse_a_url` also reuses the existing
parsing
path for both window and worker globals, instead of handling
`EventSource`
URL resolution through `api_base_url().join(...)` directly.

Testing:
* Ran ./mach check
* Ran ./mach test-wpt tests/wpt/tests/eventsource/
* Checked relevant coverage under
tests/wpt/tests/html/infrastructure/urls/resolving-urls/query-encoding/

---------

Signed-off-by: veercodeprog <veerpratap945050@gmail.com>
2026-03-26 19:20:55 +00:00
Tim van der Lippe
dd89609429 script: Fire input events when executing commands (#43087)
For any enabled command, we should fire corresponding
beforeinput and input events.

Also update a WPT test to make it clearer what the
expected behavior is. None of the test expect a
beforeinput event. Before, it would fail with
"expected undefined, but got", which is not descriptive
as a failure to what's happening.

We are failing these tests, since this behavior is
currently unspecced and also requires changes in
the input element to work with text edits.

Part of #25005

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-26 18:41:36 +00:00
Tim van der Lippe
f340042c1d script: Pass &mut JSContext to FetchResponseListener::process_response_chunk (#43657)
Fixes #42841

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-26 18:05:24 +00:00
Euclid Ye
12b8f5794b webdriver: Improve error reporting for Cookie Addition (#43690)
Improve the error reporting for [cookie
addition](https://w3c.github.io/webdriver/#add-cookie).
Most notably, when
- expiry time exceeds maximum safe integer
- cookie domain is not equal to session's current browsing context's
active document's domain

There is a bug with spec:
https://github.com/servo/servo/pull/43690#discussion_r2994771111.
We fix spec in https://github.com/w3c/webdriver/pull/1955 and
make sure Servo behaves consistently with other browsers.

Testing: Added one test for invalid expiry time. New passing with
existing.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-26 17:38:30 +00:00
Shubham Gupta
ff69105712 wpt: Enable css-device-adapt tests (#43694)
Add one more directory of tests

Testing: More Tests passing.

Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
2026-03-26 15:15:22 +00:00
shuppy
3f746481a2 libservo: Set up graft node in AccessKit trees for webviews (#43556)
in #43029, we defined an accessibility tree for each webview. we create
those trees when accessibility is activated for that webview, then the
embedder can graft it into their main accessibility tree. at the time,
this accessibility tree was empty, but we ultimately want it to contain
the accessibility tree of the documents loaded in the webview at any
given time. to do that, we need to graft the active top-level pipeline’s
accessibility tree into the webview accessibility tree. we should be
able to ignore nested documents inside iframes here, and leave it to
their parent documents to graft those in as part of layout
accessibility.

this patch hooks into the moment in the constellation where we detect
that the top-level document has changed (#43013), and notifies libservo
of the new AccessKit TreeId for the webview-to-pipeline graft node. this
moment covers navigating to a new top-level document and navigating back
or forward, but not the initial document loaded in the webview, so we
also hook into the moment a ConstellationWebView is created, and do the
same for that initial document. now the accessibility tree for a webview
with accessibility activated should look like this:

- embedder’s main tree
  - graft node for webview tree → webview tree
    - ~~graft node for document back in history~~
    - graft node for active top-level document → (nothing yet)
    - ~~graft node for document forward in history~~

Testing: this patch updates the relevant accessibility test in libservo
Fixes: part of #4344, extracted from our work in #42338

---------

Signed-off-by: Alice Boxhall <alice@igalia.com>
Signed-off-by: delan azabani <dazabani@igalia.com>
Co-authored-by: Alice Boxhall <alice@igalia.com>
2026-03-26 14:48:56 +00:00
CynthiaOketch
9af19158f3 devtools: Show service workers in Firefox DevTools about:debugging (#43659)
This update makes service workers properly show up in DevTools and
behave more like dedicated workers.

- Added an is_service_worker field to DevtoolsPageInfo so the devtools
server can tell service workers apart from dedicated workers
- Triggered a NewGlobal message when a service worker is created in
serviceworker_manager.rs, similar to what already happens for dedicated
workers
- Routed service workers to root.service_workers so they appear under
"Service Workers" in about:debugging instead of "Other Workers"
- Implemented listServiceWorkerRegistrations with the expected response
format (activeWorker, installingWorker, waitingWorker, evaluatingWorker)
to match Firefox’s LegacyServiceWorkersWatcher
- Added support for getPushSubscription in WorkerActor, currently
returning subscription: null
Enabled the service_worker target type in the watcher’s SessionContext
and handled watchTargets("service_worker")

Testing

Start Servo with:

`RUST_LOG="error,devtools=debug" ./mach run --
--pref=dom_serviceworker_enabled --devtools=6080
"https://mdn.github.io/dom-examples/service-worker/simple-service-worker/"
`

In Firefox, go to about:debugging and connect to localhost:6080
Confirm the service worker shows up under "Service Workers"



Fixes #43574

---------

Signed-off-by: CynthiaOketch <cynthiaoketch6@gmail.com>
2026-03-26 13:53:29 +00:00
Luke Warlow
087c50657f script: Refactors HTMLInputElement.rs into type specific files (#43325)
Refactors HTMLInputElement.rs to split lots of type specific input code
into their own files. These SpecificInputTypes are responsible for their
own shadow trees and also for element specific data such as
FileInputType's filelist.

Testing: Covered by WPTs
Fixes: https://github.com/servo/servo/issues/38263
Fixes: https://github.com/servo/servo/issues/43351

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2026-03-26 11:59:22 +00:00
Mukilan Thiyagarajan
75d6338825 embedder_traits: Update docs for the public API of input_event module (#43681)
These are mostly formatting changes to make them consistent.

Testing: Not required as there are no code changes.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2026-03-26 11:37:24 +00:00
Sayd Mateen
12756512ba devtools: Standardize EnvironmentActor variables (#43679)
Standardize EnvironmentActor variables

Testing: Ran `test-devtools` and all tests passed
Fixes: Part of https://github.com/servo/servo/issues/43606

Signed-off-by: Sayd Mateen <32889475+saydmateen@users.noreply.github.com>
2026-03-26 11:04:03 +00:00
Jayanta Pradhan
302b719ea3 devtools: Rename PageStyleActor variable names (#43684)
Rename page_style in inspector .

Testing: ran `./mach test-devtools`.

Fixes: Part of #43606

Signed-off-by: Jayanta Pradhan <pradhanjayanta91@gmail.com>
2026-03-26 09:45:06 +00:00
Brent Schroeter
c94722d3da devtools: wrap TcpStream to synchronize network operations (#43472)
Introduces a new type `DevtoolsConnection`, which implements the
`JsonPacketStream` trait with proper coordination of I/O across threads.
This replaces the implementation of `JsonPacketStream` for raw
`TcpStream`s, which was susceptible to interleaving writes when cloned
across threads.

`DevtoolsConnection` also defensively synchronizes read operations.
These are less likely to cause issues: in practice actors should never
independently pull incoming messages without centralized coordination.

Testing: No new tests, as interleaving writes are difficult to evoke
deterministically. Removing the `JsonPacketStream` implementation for
`TcpStream` should discourage regressions due to improper use of raw
streams.

---------

Signed-off-by: Brent Schroeter <contact@brentsch.com>
Co-authored-by: eri <eri@igalia.com>
2026-03-26 08:43:04 +00:00
Jambong Ralpher
7e6323595a devtools: Rename DeviceActor variables for consistency (#43676)
Rename `DeviceActor` local variable in `root.rs` from `device` to
`device_actor` for naming consistency across the devtools crate.

This follows the convention discussed in #43557:
- `{}_actor` for variables holding the actor 
- `{}_name` for variables holding the actor name string

The `device_actor` field in the `GlobalActors` struct was not renamed,
as it is part of a `#[derive(Serialize)]` struct used for devtools
message serialization.

Testing: `./mach test-devtools` all 60 tests pass (6 expected failures).
One unrelated flaky test
(`test_breakpoint_at_invalid_entry_point_does_not_crash`) occasionally
fails due to a race condition tracked separately. opened an isssue for
it at #43667
 

fixes part of #43606

Signed-off-by: staysafe020 <jambongralpher@gmail.com>
2026-03-26 08:36:14 +00:00
Abbas Olanrewaju Sarafa
b22ef1eadd devtools: Rename TabDescriptorActor variable names (#43664)
Renamed TabDescriptorActor variable names in browsing_context, root &
target_configuration

Cleaned up a few more names as suggested by eerii

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-26 08:24:01 +00:00
Euclid Ye
959ab5ad4d wdspec: tagName IDL attribute should be upper case when in html (#43673)
[Spec for
`tagName`](https://dom.spec.whatwg.org/#element-html-uppercased-qualified-name).

The expectation should use upper case here, as the test document is
definitely in HTML:

bc62b7475c/tests/wpt/tests/webdriver/tests/support/fixtures.py (L149)


bc62b7475c/tests/wpt/tests/webdriver/tests/support/inline.py (L33-L34)


Testing: New passing WPT.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-26 08:16:46 +00:00
Jayanta Pradhan
ec782e7264 Devtool: rename NetworkParentActor variable names. (#43672)
Rename NetworkParent  in watcher actors.

Testing: ran `./mach test-devtools`.

Fixes: Part of #43606

---------

Signed-off-by: Jayanta Pradhan <pradhanjayanta91@gmail.com>
2026-03-26 07:42:55 +00:00
Josh Matthews
db3daa4324 script: Align javascript: URL evaluation closer to the spec. (#43496)
The commit contains several related changes:
* iframes that load javascript: URLs as part of the initial insertion
(ie. `<iframe src='javascript:...'>`) get a synchronous load event
dispatched
* javascript: URL evaluation that does not result in a string no longer
treated like a 204 response
* iframes that perform a javascript: URL navigation that does not result
in a new document no longer block the parent document load event

Testing: Lots of new tests passing.
Fixes: #24901

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2026-03-26 03:10:38 +00:00
Domenico Rizzo
bc62b7475c webgl: Remove manual Drop implementation for WebGLSampler (#43631)
Moves the cleanup logic to a separate helper struct to comply with the
prohibition of manual `Drop` implementations for DOM types.

Testing: WebGL tests cover these cases
Fixes: Partially #26488

Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
2026-03-26 02:12:34 +00:00
Tim van der Lippe
a6722b0d1d script: Report CSP violations for child navigations in parent page (#43652)
There were two issues here:
1. We weren't firing the `load` event when we would show an error page
because of a CSP failure. This is to avoid web pages knowing wheter a
page has failed because of CSP.
2. We were reporting the violations in the wrong global. We shouldn't
fire these in the global of the child, but instead in the parent.

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2026-03-26 02:11:11 +00:00
Jayanta Pradhan
b3329fb764 devtools: Rename console_actor and console in actors (#43644)
Rename console_actor and console in  actors.

Testing: ran `./mach test-devtools`.

Fixes: Part of #43606

---------

Signed-off-by: Jayanta Pradhan <pradhanjayanta91@gmail.com>
2026-03-25 20:36:08 +00:00
Euclid Ye
40d616c01b canvas: Support all Unicode variation selectors in text runs (#43449)
Initially I just want to update the legacy comment, since raqote backend
is gone.

This also enforces other variation selectors properly: see anchor 
below,
which ignored our text selector previously.

Fixes: https://github.com/servo/servo/issues/43448
Fixes: https://github.com/servo/servo/issues/43650
Testing: Added a test that all other browsers pass as well.

| Before | After |
|----------|----------|
| <img width="483" height="211" alt="image"
src="https://github.com/user-attachments/assets/436493bc-ec42-4641-bcf8-c39afac6cfdc"
/> | <img width="461" height="186" alt="image"
src="https://github.com/user-attachments/assets/348375a8-45a4-4fde-aea6-9657cac211d3"
/> |
| <img width="669" height="449" alt="image"
src="https://github.com/user-attachments/assets/c791e840-9791-43b6-9147-1c250ea37721"
/> | <img width="653" height="433" alt="image"
src="https://github.com/user-attachments/assets/4fd06581-ac62-48f1-8135-d3c287e898cf"
/> |

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-25 18:13:57 +00:00
minghuaw
13029a9deb font: Filter out downloaded web fonts before starting to download another web font (#43382)
Checks the web font sources and filter out the ones that are already
downloaded in the `FontContext` before starting to load new ones

Testing: Existing WPT tests.

---------

Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
2026-03-25 17:59:15 +00:00