Skip to content

servoshell: Add button to toggle experimental web platform features.#39125

Merged
jdm merged 1 commit intoservo:mainfrom
jdm:experimental-button
Sep 4, 2025
Merged

servoshell: Add button to toggle experimental web platform features.#39125
jdm merged 1 commit intoservo:mainfrom
jdm:experimental-button

Conversation

@jdm
Copy link
Copy Markdown
Member

@jdm jdm commented Sep 4, 2025

This makes it easier to experiment with the impact of experimental features when browsing around in servoshell. The toggle is global and causes all webviews to reload with the new preference values.

Testing: Manually tested; no UI testing for servoshell.

Not enabled:
Screenshot 2025-09-03 at 9 34 30 PM

Enabled:
Screenshot 2025-09-03 at 9 34 36 PM

@jdm jdm requested a review from atbrakhi as a code owner September 4, 2025 01:35
@jdm jdm force-pushed the experimental-button branch from 07613de to 91c5811 Compare September 4, 2025 01:45
Comment on lines +353 to +357
for pref in EXPERIMENTAL_PREFS {
state
.servo()
.set_preference(pref, PrefValue::Bool(enable));
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to batch update this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to create an API that accepts &[(&str, PrefValue)], yes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this later then. I see some use

pub fn set_value(&mut self, name: &str, value: PrefValue) {

individually, but some in batch.

Comment on lines +353 to +357
for pref in EXPERIMENTAL_PREFS {
state
.servo()
.set_preference(pref, PrefValue::Bool(enable));
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this later then. I see some use

pub fn set_value(&mut self, name: &str, value: PrefValue) {

individually, but some in batch.

@jdm jdm added this pull request to the merge queue Sep 4, 2025
Merged via the queue into servo:main with commit aac6aa6 Sep 4, 2025
22 checks passed
@jdm jdm deleted the experimental-button branch September 4, 2025 04:03
yezhizhen added a commit to yezhizhen/servo that referenced this pull request Sep 4, 2025
…ervo#39125) (wd)

{"fail_fast": false, "matrix": [{"name": "Linux (WPT)", "workflow": "linux", "wpt": true, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "build_args": "", "wpt_args": "./tests/wpt/tests/webdriver/tests/classic/ --processes 1", "number_of_wpt_chunks": 2}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants