Commit Graph

494 Commits

Author SHA1 Message Date
niya
05946163f2 devtools: Rename PauseActor Variable Names (#43820)
- `PauseActor` is passed as a generic for only `new_name`
- Update the variable `pause` to `pause_name`

**Testing**: Tested locally with `mach test-devtools`

```
Ran 60 tests in 74.781s

OK (expected failures=6)
```

**Fixes**: A part of #43606

Signed-off-by: Niya Gupta <niyabits@disroot.org>
Co-authored-by: Niya Gupta <niyabits@disroot.org>
2026-04-01 06:03:17 +00:00
eri
a2980c07fa devtools: Replace new with register for PreferenceActor (#43801)
Testing: Compilation is enough
Part of: #43800

Signed-off-by: eri <eri@igalia.com>
2026-03-31 14:52:50 +00:00
Abbas Olanrewaju Sarafa
6e799ca694 devtools: Rename FrameActor variable names (#43767)
Renamed FrameActor variable names to match standards in thread & lib.rs

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 09:58:29 +00:00
Abbas Olanrewaju Sarafa
07a4335f4c devtools: Rename ThreadConfigurationActor variable names (#43765)
Renamed ThreadConfigurationActor variable names in watcher.rs.

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:21:31 +00:00
Abbas Olanrewaju Sarafa
906679a8c1 devtools: Rename ThreadActor variable names (#43723)
Renamed ThreadActor variable names in breakpoint, browsing_context,
watcher, worker & lib.rs.

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:14:12 +00:00
Abbas Olanrewaju Sarafa
134e4c7db1 devtools: Rename InspectorActor variable names (#43724)
Renamed InspectorActor variable names in browsing_context, inspector &
lib.rs

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 07:12:01 +00:00
Abbas Olanrewaju Sarafa
40fc2b8176 devtools: Rename CssPropertiesActor variable names (#43745)
Renamed CssPropertiesActor variable names in browsing_context

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-30 00:44:06 +00:00
Abbas Olanrewaju Sarafa
4b0f1a7c8b devtools: Rename ProcessActor variable names (#43752)
Renamed ProcessActor variable names in root.rs.

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-03-29 16:05:07 +00:00
Abbas Olanrewaju Sarafa
5054ca087b devtools: Rename HighlighterActor variable names (#43747)
Renamed HighlighterActor variable names in inspector.rs.

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 16:00:11 +00:00
Abbas Olanrewaju Sarafa
4f71c0cef9 devtools: Rename LayoutInspectorActor variable names (#43748)
Renamed LayoutInspectorActor variable names in walker.rs

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 15:55:50 +00:00
Abbas Olanrewaju Sarafa
5adddd7af4 devtools: Rename PreferenceActor variable names (#43751)
Renamed PreferenceActor variable names in root.rs.

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 14:36:11 +00:00
Abbas Olanrewaju Sarafa
1c7f16b10e devtools: Rename AccessibilityActor variable names (#43740)
Renamed AccessibilityActor variable names in browsing_context

Testing: No testing required
Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 14:28:54 +00:00
Abbas Olanrewaju Sarafa
4eb332251f devtools: Rename WatcherActor variable names (#43728)
Renamed WatcherActor variable names in browsing_context,
network_handler, network_event, tab, watcher & lib.rs

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

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-29 13:06:45 +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
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
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
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
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
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
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
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
Abubakar Abdulazeez Usman
0d0b392565 devtools: Rename ReflowActor variables in browsing context actor (#43656)
Renamed ReflowActor in browsing_context actor.

Testing: `./mach test-devtools`, All test passed.
Fixes: Part of #43606

Signed-off-by: arabson99 <arabiusman99@gmail.com>
2026-03-25 16:09:11 +00:00
Abbas Olanrewaju Sarafa
4820941cab devtools: Refactored ActorRegistry variables in lib.rs (#43623)
Refactored the lib.rs file to replace ``actors``` & ```self.actors```
variables with ```registry``` and ```self.registry```

No testing required, compiles successfully.

Part o the #43605

---------

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-25 08:02:34 +00:00
Abbas Olanrewaju Sarafa
02a2d45c30 devtools: Renamed BrowsingContext in inspector & its actors (#43642)
Renamed BrowsingContext in inspector, highlighter, page_style,
style_rule & walker actors

Testing: No testing required.

Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-25 06:36:07 +00:00
Abbas Olanrewaju Sarafa
0d2b91a9d1 devtools: Rename registry in source, node, & network_handler (#43619)
Renamed actors to registry in source, node, & network_handler.

Testing: No tests were required, however compilation was successful
Part of #43605

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-25 06:33:53 +00:00
Abbas Olanrewaju Sarafa
9e2d033047 devtools: Renamed BrowsingContext in breakpoint, console & thread actors (#43641)
Renamed BrowsingContext in breakpoint, console & thread actors

Testing: No testing required.

Fixes: Part of #43606

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-25 05:33:29 +00:00
Abbas Olanrewaju Sarafa
beafb08ae8 devtools: Rename registry in tab, watcher and browsing_context (#43614)
Renamed `actors` to `registry` in `actors/tab.rs`, `actors/watcher.rs`
and `actors/browsing_context.rs`.

Testing: No tests were required, however compilation was successful
Part of: #43605

Signed-off-by: Sabb <sarafaabbas@gmail.com>
2026-03-24 16:20:11 +00:00
eri
de4a79facf devtools: Rename PropertyPreview to PropertyDescriptor (#43566)
Rename `PropertyPreview` to `PropertyDescriptor`

Testing: Internal refactor
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-03-23 15:27:44 +00:00
Euclid Ye
cae0752676 cargo: Rename workspace-local library starting with b to servo_* (#43552)
Follow up of #43526. This addresses Nico's comment:
https://github.com/servo/servo/pull/43526#issuecomment-4104953308

- `bluetooth_traits` -> `servo_bluetooth_traits`
- `base` -> `servo_base`
- `bluetooth` -> `servo_bluetooth`
- `background_hang_monitor` -> `servo_background_hang_monitor`

Testing: This should not change any behaviour.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-23 08:26:49 +00:00
Euclid Ye
317e5ee7de cargo: Rename Workspace-local dependencies starting with b to servo-* (#43526)
Also reorders alphabetically for the corresponding user .toml.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-22 11:19:21 +00:00
Euclid Ye
e573557554 cargo: Use kebab case consistenly for those already starting with servo- (#43516)
Continues what @jschwe has been doing.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-21 10:57:22 +00:00
atbrakhi
2d3900317a devtools: Implement initial support for ArrayPreviewer (#43456)
Previously arrays were falling back to Object previewer which was
showing indices as properties- which was not correct. This PR implements
dedicated `ArrayPreviewer` that follows Firefox's `ArrayLike` pattern.
Currently array preview support only length display, it does not
implement showing array items yet.

Now(Correct and follows Firefox pattern, Array items coming in a
follow-up PR):
<img width="510" height="167" alt="image"
src="https://github.com/user-attachments/assets/a51f04d4-333c-4d7c-8159-18121c967670"
/>


Before(We shouldn't see these values- it's incorrect):
<img width="1294" height="721" alt="image"
src="https://github.com/user-attachments/assets/2218a622-c791-4436-958e-1a5553de7864"
/>




Testing: Current tests are passing.
Fixes: Part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-03-20 08:10:37 +00:00
Jonathan Schwender
eac6ff8509 Metadata: Add missing repository information (#43451)
This fixes a warning of `cargo publish`: 

```
warning: manifest has no description, documentation, homepage or repository
```

Testing: Compiling. Manual testing of `cargo publish --dry-run` (with
some additional patches, and until the next error, shows this warning
has been fixed)

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-19 08:54:18 +00:00
atbrakhi
d3ca63c514 devtools: Implement object and function property preview (#43356)
Implement property preview for the debugger popup. When hovering over
variables while paused at a breakpoint, users can now see object
properties and function metadata

Testing: Current tests are passing. Manual testing.
Fixes: Part of #36027 

<img width="1507" height="876" alt="image"
src="https://github.com/user-attachments/assets/31c95010-dab9-4b2c-a9b1-da6a29aa0de1"
/>

<img width="360" height="365" alt="image"
src="https://github.com/user-attachments/assets/50d19979-c0b2-4278-b19b-85c0c0318ab4"
/>
<img width="370" height="365" alt="image"
src="https://github.com/user-attachments/assets/3b74ef26-055b-4e49-848e-e7758f8d1de6"
/>

---------

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-03-18 09:23:26 +00:00
atbrakhi
3ca83edb56 devtools: Implement PropertyIteratorActor boilerplate (#43319)
Implement `PropertyIteratorActor` boilerplate

This is prerequisite for implementing object property enumeration in the
debugger. It is part of popup preview work in debugger.

Testing: Should not change behavior 
Fixes: part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-03-17 10:05:41 +00:00
atbrakhi
821db2c2fc devtools: Implement initial support for showing scope variables (#43232)
This change implements showing scope variable in Debugger tab. This is
still early and we have more work to do.

Next step is building correct data structure and showing different types
of variables.

Testing: Manual as well as current tests are passing.
Fixes: part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
2026-03-16 13:02:09 +00:00
webbeef
1be2b7ad8d chore: replace references to servo_url by servo-url (#43273)
It was decided to keep the kebab-case version.

Testing: Successful compilation is enough

Signed-off-by: webbeef <me@webbeef.org>
2026-03-14 19:29:05 +00:00
Jonathan Schwender
363ba0ccd1 Use workspace deps consistently and add version requirement (#43243)
In order to prepare for publishing this PR does the following steps (see
commits):

- Move all `path` dependencies to the workspace Cargo.toml, and
reference that.
- Move all path dependencies in the workspace Cargo.toml into a
dedicated section, to make bumping version numbers easier later.
- Add the version requirement. Note that we currently only version bump
servoshell. There was agreement to version everything with the same
version as servoshell, but that be done in a follow-up. The diff is
already large enough as is.
- Add a tidy lint to catch `path` usages outside the root Cargo.toml. I
switched to [`tomllib`] (which was added to the python stdlib in 3.11),
since the third-party `toml` library failed to parse Cargo.toml files
with `workspace.version` (did not like the `.` in a `key`).


[`tomllib`]: https://docs.python.org/3/library/tomllib.html

Testing: Should be covered by regular CI testing.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-03-14 06:51:33 +00:00
eri
5c30339efc devtools: Remove reply_unchecked in favour of mark_handled (#43236)
`reply_unchecked` was added in #42007 since `getEnvironment` from the
frame actor has a `type` field but it already counts as a final reply,
unlike every other message like it. Since it is only used there, we can
revert the `reply_unchecked` change and use the new `mark_handled`
instead.

Depends on: #43230
Testing: DevTools tests

Signed-off-by: eri <eri@igalia.com>
2026-03-13 14:05:18 +00:00
Brent Schroeter
69a1f99bd2 devtools: Add support for one-way protocol messages (#43230)
Some Remote Debugging Protocol message types are specified as `oneway`,
meaning that they expect no reply. Sending anything—including an
error—in response to these messages throws the devtools client and actor
out of sync.

As noted in the `ClientRequest` docstring, most client messages expect
exactly one reply, so `ClientRequest::handle()` includes a fail-safe
that automatically sends an error message if none of the `reply()`,
`reply_unchecked()`, or `reply_final()` methods have been called.

This change introduces an additional method,
`ClientRequest::mark_handled()`, which allows the actor handling the
request to disarm the fail-safe without sending a reply over the wire,
and it adds handling logic for 3 one-way message types that are
frequently emitted by the Firefox Toolbox.

Testing: This change introduces no new tests. Unless we take the unusual
step of enumerating all supported one-way message types and validating
each, automated tests provide little assurance of correctness.
Meaningfully testing this feature would be cumbersome, and it would
likely hamper future development more than it would help.

Signed-off-by: Brent Schroeter <contact@brentsch.com>
2026-03-13 10:45:15 +00:00
Brent Schroeter
890ef58052 devtools: Use active pipeline and script channel in inspector actors (#43153)
The `InspectorActor` and its children now query the
`BrowsingContextActor` for the active pipeline ID and script sender
instead of storing their own copies, which become outdated on
navigation. Previously, the inspector remained permanently stuck to the
pipeline that was active upon launch. Now, connecting a fresh devtools
client session after navigation allows inspection of each
`BrowsingContext`'s active DOM.

Navigation within a continuous remote debugging session still breaks the
Firefox inspector panel. This is due to multiple compatibility issues
with the protocol implementation, which will be addressed in separate
PRs.

This PR does not touch `TimelineActor` or `FramerateActor`. These are
theoretically affected by the same issue as the `InspectorActor`, but in
practice neither is ever instantiated. It seems both have been
effectively unreachable code since 1aab10f2 and will require more
extensive work and testing that is beyond the scope of this change.

Testing: Updates to the `WalkerActor` and `BrowsingContextActor` are
unit tested via the new `test_walker_observes_new_dom_after_nav` case in
`devtools_tests.py`. There are no existing unit tests to reference for
the highlighter and style actors; these have been tested manually but
this PR does not introduce further automated tests. This PR also
improves handling of `tabNavigated` messages to simplify the unit test
written for 4c69d85.

---------

Signed-off-by: Brent Schroeter <contact@brentsch.com>
2026-03-13 10:13:55 +00:00
Simon Wülker
c0ff7c1fc9 Everywhere: Remove instances of clippy::redundant-clone (#43212)
This change fixes all instances where
[`clippy::redundant-clone`](https://rust-lang.github.io/rust-clippy/master/index.html?groups=complexity%2Ccorrectness%2Cnursery%2Csuspicious&levels=allow#redundant_clone)
would trigger. It's allowed by default

I've also changed the lint to warn-by-default for servo.

Testing: Covered by WPT

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2026-03-12 13:28:21 +00:00
eri
f53a259216 devtools: Handle getEnvironment message (#43167)
Initial work to support scopes in the debugger. They don't show at the
moment since we are not processing variables yet. Depends on #43166.

Testing: Ran `mach test-devtools` and manual testing.
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-03-12 13:13:03 +00:00
eri
948859b2fe devtools: Allow registering environment actor from debugger.js (#43166)
This functionality will be used in a follow up patch to implement the
getEnvironment message.

Testing: Check `mach test-devtools` and manual test
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2026-03-11 15:45:35 +00:00