Since indexeddb is now part of the experimental features list, we can
remove it from the "more experimental" features list.
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
In preparation for the next release, bump the version number to 0.1. 0.1
will be an LTS release, which receives extended support in terms of
security updates (e.g. spidermonkey security updates). Please keep in
mind that as always no specific guarantees or response times are given,
and any updated are provided on a best effort basis.
Previously some projects had a demo integration of servo based on some
version of servo, and then never or rarely updated it. Providing an LTS
release offers an option to embedders to integrate servo, while reducing
API churn and having a somewhat fixed schedule to adhere to in terms of
upgrades. Currently, the plan is for a new LTS release every 6 months,
with additional documentation regarding API changes and recommended
migration patterns (best-effort and subject to change).
Testing: No functional changes. Additional testing will be performed
post-merge on the newly created release branch.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This PR considers the following constraints:
- Resources must be available when building servo via a published
crates.io package (i.e. no `../../../resources/<file>` file references).
- Minimal setup when writing tests (`nextest` spawns each test in its
own process, so we don't want to explicitly initialize the resource
handler for every `#[test]` fn)
- Use local resources when developing locally
- Support loading the resources from a proper resource directory if the
embedder wishes so, including via a custom mechanism, not necessarily as
files
(File) Resources that are only accessed from servoshell are out of scope
of this PR, since it mainly focusses on unblocking publishing `libservo`
to crates.io.
Baking the resources into the binary by default simplifies the setup a
lot. We already supported that before, but only for testing purposes and
explicitly not for production builds.
Using [`inventory`](https://crates.io/crates/inventory) adds a simple
way for the embedder to replace the default baked in resources, while
also keeping the test usage of baked in resources simple.
rippy.png is also referenced from image_cache - We simply duplicate it,
since the image is small, to avoid adding unnecessarily complex
solutions like adding a dedicated crate.
Testing: Covered by existing tests. [mach try
full](https://github.com/jschwe/servo/actions/runs/23811669469)
Fixes: Part of #43145
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
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>
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>
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>
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>
This change adds support for a blinking text caret using WebRender
`DynamicProperties` updates. This ensures that text caret updates are as
lightweight as possible. As part of this change, the initial framework
for paint-side animations is added. Though this is driven by a timer for
now (in order to not have to run full speed animations for text carets),
the idea is that more animations can be driven by `Paint` in the future
(in order to avoid doing layouts during animations).
In addition, a preference is added which controls the caret blink speed.
This is used to disable caret blinking during WPT testing.
Testing: There are no tests for this change. We do not currently have a
good
way to test caret blinking as the caret is render only and fully testing
blinking would require well timed screenshot creation.
Fixes: #33237.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
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>
Fixes resuming after stepping.
Testing: Ran existing DevTools test
Part of: #36027
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This change implements listing all frames from youngest to oldest. This
is in order to send correct frame message from thread actor
This is needed for our upcoming work!
Testing: Current tests are passing + manual test
Fixes: #36027
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
Before we were creating a new frame actor each time we paused, even if
the frame object in debugger.js was the same. Now we avoid this by
reusing the same frame actor id.
This helps our upcoming work on onStep, onPop, and onEnterFrame hooks.
Testing: Ran `mach test-devtools` and manually check that it works
Part of: #36027
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
devtools: Make `why` attribute use `PauseReasons`
Currently we have why attribute hardcoded as per the event. In this PR
we introduce `PAUSE_REASON` and make sure `why` attribute is using
`PAUSE_REASONS`.
This is in order to support the upcoming work on `onStep`, `onPop`, and
`onEnterFrame` hook.
Testing: all existing tests are passing
Fixes: Part of #36027
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
We need a map between frame actor ids (from devtools) and frame objects
(from debugger.js) to implement stepping hooks in the future.
To achieve this, we register the frame actor with a call to the devtools
before entering the event loop when the debugger is paused. Instead of
creating the frame actor in `handle_debugger_pause`, we create it
before.
Testing: It passes existing devtools tests
Part of: #36027
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Remove the placeholder way of getting a debuggee in `eval` and finds the
correct one in the map. Another way of doing this would be to have two
maps, `debuggeesToPipelineIds` and `pipelineIdsToDebuggees`, I'm open to
both approaches. I think this might be fine since the reverse operation
is only used here, but if it becomes a performance issue we can change
it.
Testing: Ran mach test-devtools
Part of: #36027
cc @atbrakhi
Signed-off-by: eri <eri@igalia.com>
The pause debugger screen should be shown for both pausing manually
(interrupt) and hitting a breakpoint.
Reuse the logic for pausing breakpoints to pause the debugger when the
user manually clicks the pause button.
Rename the pause event to interrupt to match the language of the
DevTools client and to avoid confusion with paused frames, which can
happen on interrupt or on a breakpoint.
https://github.com/user-attachments/assets/ceb0007d-0e57-44d6-a159-55980ff8b517
Testing: New DevTools test and manual testing.
Part of: #36027
cc @atbrakhi
---------
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Similar to about:config from firefox. All preferences are editable;
editing them mid-runtime is not guaranteed to cause any effects. This is
separate from servo:preferences, which selectively groups and exposes
preferences. This probably would become more useful if/when preferences
become persistent.
<img width="1136" height="880" alt="Screenshot 2025-10-31 at 10 19
57 PM"
src="https://github.com/user-attachments/assets/2ef759d8-06a4-457f-b9df-331cc3525338"
/>
Followup work:
- Remove `getStringPreference`, `getIntPreference`, and
`getBoolPreference`. Using `getPreference` and `preferenceType` is more
flexible.
- Make more of these config options work on the fly.
- Allow for reverting config options.
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This version bump is a bit delayed, since I forgot to open the PR before
FOSDEM. The actual release will thus likely not be based on this commit,
but backported to the release branch, to stay in sync with our monthly
report.
There still has been no resolution on the `0.1` version bump situation,
hence another bump of the patch version.
Testing: Not required
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Debugger.js had many repetitive code, this change creates 2 helper
functions and renames some functions/variables to make it more clear.
Testing: This should not change any functionality
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Add an event listener for `clearBreakpoint` to `debugger.js` and the
necessary glue to access it from the `devtools` crate.
Testing: `./mach test-devtools` and manual testing.
Fixes: Part of: https://github.com/servo/servo/issues/36027
---------
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
The test harness attempts to reset preferences to default values when
running a test in which previously-set preferences are no longer set.
This leads to confusing interactions with any preference customizations
that are present, such as `--pref whatever` or `--prefs-file
something.json`, which are not considered when calculating the default.
This PR changes that: whatever preference values are present when the
webdriver server starts is treated as the default value.
Testing: This is a servo-specific webdriver extension, and we're fixing
an interaction with the test harness. I don't see another way to test
this besides observing the impact on our test results.
Fixes: #42043
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Add an event listener for `pause` to `debugger.js` and the necessary
glue to access it from the `devtools` crate. This returns important
information to know where we are paused, such as the source location and
frame state.
Fix frame and object actor encoding into messages. Use information from
`debugger.js` to correctly fill the fields.
Add a new `frames` list to the thread actor and handle the `frames`
message.
Fix `getEnvironment` reply in the frame actor. It is out of form (has a
`type` field but it doesn't require a followup empty message, it already
counts as a reply), so we need to handle it specially.
Note: For now we are focusing on the protocol side of the debugger, and
this patch only shows where the pause would happen. Pausing Servo itself
will happen in a followup.

Testing: `mach test-devtools` and manual testing. No errors (apart from
#42006).
Part of: #36027
---------
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Listen for `setBreakpoint` on `debugger.js` and add the relevant WebIDLs
and Servo counterparts to trigger this event and notify SpiderMonkey.
Implement `find_source` for `SourceManager` and `find_offset` for
`SourceActor`.
Testing: Manual testing and `./mach test-devtools` (note, the latter
seems to have some failing tests, we are investigating this, but this
patch doesn't add any new failure).
Fixes: Part of #36027
---------
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Add placeholder implementation of DOM `VisualViewport` according to the
spec https://drafts.csswg.org/cssom-view/#visualviewport. This is the
first step of implementing the interface and syncing it with the
`PinchZoom` struct that we had in the `Embedder`.
Since this interface's is not accurate and couldn't fulfill it's
purpose, it would be gated behind a preference
`dom_visual_viewport_enabled` and would be open after the interface had
been integrated with `PinchZoom`, viewport resizing, and viewport
scroll.
Testing: Existing WPT Test.
Part of: #41341
---------
Signed-off-by: Jo Steven Novaryo <steven.novaryo@gmail.com>
Turns out we can squeeze a bit more out of rippy.png, as well as a
single byte off the big logo with a few new tricks I found.
This PR also converts the new kebab menu icon in the Android app to webp
like all the others, for another 3kb saved.
Testing: Manual.
Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
As discussed in the tsc-channel, prepare for the next release by cutting
a version on the last day of the month.
Note: The actual release would happen ~ 2 weeks from now, when the blog
post for november is ready.
This commit was produced by running `./mach release 0.0.3`.
Testing: Not required. Additional pre-release testing will happen after
the version bump and before the release, with potential patches being
cherry-picked to a release branch.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
I did part of a refactor to address a review but didn't finish it. Fixes
white input/button in dark mode.
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Ran ./mach release 0.0.2 to update the version number and update the
license.html
This is in preperation for the v0.0.2 release with the next nightly, as
discussed on zulip.
Testing: Not tested
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Similar to about:license in firefox. Generated with `cargo-about`.
A few open questions:
- When/how should it be updated (the command I used was `cargo about
generate etc/about.hbs > resources/resource_protocol/license.html`, it
takes ~20 seconds)
- How should `about.toml` be kept in sync with `deny.toml`
- What about licenses for packages that are not crates (i.e. gstreamer)
Fixes: #40266
---------
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Instead of having the `ImageCache` return the broken image icon for
failed loads, have `HTMLImageElement` explicitly request it. This means
that the image is loaded on demand (reducing the usage of resources) and
also simplifying the interface of the `ImageCache` greatly.
In addition, the display of the broken image icon is improved, more
closely matching other browsers. A test for this display (which was
falsely passing before) is updated to reflect the new display of the
broken image icon.
Testing: There is a Servo-specific test for this change. Some WPT tests
start to fail as well. Before these were not properly loading the broken
image icon so they were failing before, just in a hidden way.
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Add IndexedDB preference to servo:preferences, making it easy to enable
at runtime for testing site compatibility
Fixes: #39792
Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
These changes add a custom servo:preferences URL that allows modifying
selected preferences at runtime. The goal of this work is to make it
easy to test pages while toggling experimental web platform features,
and support quickly changing the User-Agent header.
Testing: Manually verified that spacex.com loads correctly after
changing the user agent, and that https://polygon.io/ displays grid
elements correctly and no console errors with the experimental prefs
enabled.
Fixes: #35862
<img width="1136" height="880" alt="Screenshot 2025-07-18 at 1 06 23 AM"
src="https://github.com/user-attachments/assets/2d27c321-6ca0-43c3-a347-7bc4b55272df"
/>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>