-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: Flatten and simplify Servo preferences #34966
Conversation
🔨 Triggering try run (#12749142047) for Linux WPT |
First off, apologies for the size of this change. The preferences are marbled through all of servo from servoshell down to the most basic crates. This change is hopefully the first step toward improving that. |
Test results for linux-wpt-layout-2020 from try job (#12749142047): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (10)
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a quick guide to this PR as it is quite large:
@@ -232,15 +234,22 @@ where | |||
)] | |||
#[allow(clippy::new_ret_no_self)] | |||
pub fn new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the big things to look at in this change. Here we are passing Opts
and Preferences
into the Servo instance instead of setting them globally from the embedder.
// TODO: Map more preferences onto their Servo values. | ||
Ok(match key { | ||
"dom.serviceWorkers.enabled" => { | ||
self.write_bool(pref!(dom_serviceworker_enabled), stream) | ||
}, | ||
_ => self.handle_missing_preference(msg_type, stream), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have had to rework this code a little. In practice the only setting devtools is reading now is the service worker setting, so this is the setting that is preserved here. Otherwise I've tidied up the rest of this code to increase code reuse when more settings are supported.
@@ -0,0 +1,55 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new derive macro that we use to generate setters and getters. It's considerably simpler than the one that was previously found in config_plugins
.
@@ -1,333 +0,0 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This testing code has mainly moved to servoshell as that is what handles setting preferences via JSON now.
}, | ||
PrefValue::Bool(value) => Ok(Self::Bool(value)), | ||
_ => Err(TryFromPrefValueError::UnmappedType), | ||
impl Preferences { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new way that preferences are set by default. I've taking these values from resources/prefs.json
. In some cases (like for layout_threads
) a default was defined in Servo but overridden by the resource file. I've used the one from the JSON in those cases.
// If we only want to reset some of the preferences. | ||
let mut new_preferences = prefs::get().clone(); | ||
let default_preferences = Preferences::default(); | ||
for key in parameters.prefs.iter() { | ||
new_preferences.set_value(key, default_preferences.get_value(key)) | ||
} | ||
|
||
let map = parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed because now preferences are all set at once.
opts: Opts, | ||
preferences: Preferences, | ||
servo_shell_preferences: ServoShellPreferences, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the three kinds of preferences that servoshell has now. My goal is to get this down to one in a followup by merging Opts
into Preferences
and then making Preferences
a member of ServoShellPreferences
.
|
||
pub fn main() { | ||
crate::crash_handler::install(); | ||
crate::init_tracing(); | ||
crate::init_crypto(); | ||
crate::resources::init(); | ||
|
||
// Parse the command line options and store them globally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All command-line argument parsing is now consolidated in servoshell's prefs.rs
.
if pref!(media.glvideo.enabled) { | ||
warn!("GL video rendering is not supported on headless windows."); | ||
set_pref!(media.glvideo.enabled, false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been moved to command-line argument processing as it's servoshell specific.
|
||
pub fn register_user_prefs(opts_matches: &Matches) { | ||
// Read user's prefs.json and then parse --pref command line args. | ||
pub(crate) struct ServoShellPreferences { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the libservo preferences that were specific to servoshell and shouldn't be part of libservo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really useful step forward! Thank you for pushing through it!
@@ -198,10 +204,12 @@ impl App { | |||
CompositeTarget::Window | |||
}; | |||
let mut servo = Servo::new( | |||
self.opts.clone(), | |||
self.preferences.clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The embedder's copy of the preferences will be out of date if they're updated at runtime, right? For example, via webdriver. I don't know that we need to solve that, just making sure that my mental model is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrobinson Would it make sense to have the pref accessor map .
to _
so that the pref strings can stay the same even though the structure is now flat? That would dramatically reduce the diff (and resolve issues with the changed format in stylo too).
That would only help with the ini and webidl files; the pref! macro would still use underscores. I'm on the fence about whether that would be too confusing. |
An underscore-based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really happy to see the change! And I also want to see the merge of Opts and Preference in the future!
68bec2d
to
f719de2
Compare
@Loirooriol suggested keeping the original Stylo preference names, so I've done that. It has required a bit more mapping of preferences in the DOM code generator, but it's probably true that Stylo should not be dependent on Servo's preference names anyway. It would be good to have an even cleaner solution for this that doesn't require mapping in two places, but I think that might require even more code generation -- which I guess we should avoid for now. |
Here are the new changes:diff --git a/Cargo.lock b/Cargo.lock
index 6cb72b4c92..68f54d8036 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1600,7 +1600,7 @@ dependencies = [
[[package]]
name = "dom"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"bitflags 2.6.0",
"malloc_size_of",
@@ -4332,7 +4332,7 @@ dependencies = [
[[package]]
name = "malloc_size_of"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"app_units",
"cssparser",
@@ -6312,7 +6312,7 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.26.0"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"bitflags 2.6.0",
"cssparser",
@@ -6600,7 +6600,7 @@ dependencies = [
[[package]]
name = "servo_arc"
version = "0.4.0"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"serde",
"stable_deref_trait",
@@ -6609,7 +6609,7 @@ dependencies = [
[[package]]
name = "servo_atoms"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"string_cache",
"string_cache_codegen",
@@ -6977,7 +6977,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "static_prefs"
version = "0.1.0"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
[[package]]
name = "strck"
@@ -7058,7 +7058,7 @@ dependencies = [
[[package]]
name = "style"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"app_units",
"arrayvec",
@@ -7116,7 +7116,7 @@ dependencies = [
[[package]]
name = "style_config"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"lazy_static",
]
@@ -7124,7 +7124,7 @@ dependencies = [
[[package]]
name = "style_derive"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"darling",
"proc-macro2",
@@ -7154,7 +7154,7 @@ dependencies = [
[[package]]
name = "style_traits"
version = "0.0.1"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"app_units",
"bitflags 2.6.0",
@@ -7549,7 +7549,7 @@ dependencies = [
[[package]]
name = "to_shmem"
version = "0.1.0"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"cssparser",
"servo_arc",
@@ -7562,7 +7562,7 @@ dependencies = [
[[package]]
name = "to_shmem_derive"
version = "0.1.0"
-source = "git+https://github.com/servo/stylo?rev=refs%2Fpull%2F108%2Fhead#4bf0c2e744837b66009cd65287744f72ffbb794b"
+source = "git+https://github.com/servo/stylo?branch=2025-01-02#dfed17bd04a713f5dce775176c3a28c39c934970"
dependencies = [
"darling",
"proc-macro2",
diff --git a/Cargo.toml b/Cargo.toml
index 015661d83f..474e25d920 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -110,25 +110,25 @@ rustls-pemfile = "2.0"
rustls-pki-types = "1.10"
script_layout_interface = { path = "components/shared/script_layout" }
script_traits = { path = "components/shared/script" }
-selectors = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head" }
+selectors = { git = "https://github.com/servo/stylo", branch = "2025-01-02" }
serde = "1.0.217"
serde_bytes = "0.11"
serde_json = "1.0"
servo-media = { git = "https://github.com/servo/media" }
servo-media-dummy = { git = "https://github.com/servo/media" }
servo-media-gstreamer = { git = "https://github.com/servo/media" }
-servo_arc = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head", features = ["servo"] }
-servo_atoms = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head" }
+servo_arc = { git = "https://github.com/servo/stylo", branch = "2025-01-02", features = ["servo"] }
+servo_atoms = { git = "https://github.com/servo/stylo", branch = "2025-01-02" }
smallbitvec = "2.5.3"
smallvec = "1.13"
static_assertions = "1.1"
string_cache = "0.8"
string_cache_codegen = "0.5"
-style = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head", features = ["servo"] }
-style_config = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head" }
-style_dom = { git = "https://github.com/servo/stylo", package = "dom", rev = "refs/pull/108/head" }
-style_traits = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head", features = ["servo"] }
-style_malloc_size_of = { package = "malloc_size_of", git = "https://github.com/servo/stylo", rev = "refs/pull/108/head", features = ["servo"] }
+style = { git = "https://github.com/servo/stylo", branch = "2025-01-02", features = ["servo"] }
+style_config = { git = "https://github.com/servo/stylo", branch = "2025-01-02" }
+style_dom = { git = "https://github.com/servo/stylo", package = "dom", branch = "2025-01-02" }
+style_traits = { git = "https://github.com/servo/stylo", branch = "2025-01-02", features = ["servo"] }
+style_malloc_size_of = { package = "malloc_size_of", git = "https://github.com/servo/stylo", branch = "2025-01-02", features = ["servo"] }
surfman = { git = "https://github.com/servo/surfman", rev = "300789ddbda45c89e9165c31118bf1c4c07f89f6", features = ["chains"] }
syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] }
synstructure = "0.13"
@@ -137,7 +137,7 @@ thin-vec = "0.2.13"
tikv-jemalloc-sys = "0.6.0"
tikv-jemallocator = "0.6.0"
time_03 = { package = "time", version = "0.3", features = ["large-dates", "local-offset", "serde"] }
-to_shmem = { git = "https://github.com/servo/stylo", rev = "refs/pull/108/head" }
+to_shmem = { git = "https://github.com/servo/stylo", branch = "2025-01-02" }
tokio = "1"
tokio-rustls = { version = "0.26", default-features = false, features = ["logging"] }
tower-service = "0.3"
diff --git a/components/config/prefs.rs b/components/config/prefs.rs
index d22562c483..9c4edf30e3 100644
--- a/components/config/prefs.rs
+++ b/components/config/prefs.rs
@@ -18,23 +18,25 @@ pub fn get() -> RwLockReadGuard<'static, Preferences> {
}
pub fn set(preferences: Preferences) {
- // TODO: Remove some preferences here that should always be on, such as the one for
- // flexbox and the one for transition-behavior.
- style_config::set_bool("layout_unimplemented", preferences.layout_unimplemented);
- style_config::set_i32("layout_threads", preferences.layout_threads as i32);
- style_config::set_bool("layout_flexbox_enabled", preferences.layout_flexbox_enabled);
- style_config::set_bool("layout_columns_enabled", preferences.layout_columns_enabled);
- style_config::set_bool("layout_grid_enabled", preferences.layout_grid_enabled);
+ // Map between Stylo preference names and Servo preference names as the This should be
+ // kept in sync with components/script/dom/bindings/codegen/run.py which generates the
+ // DOM CSS style accessors.
+ style_config::set_bool("layout.unimplemented", preferences.layout_unimplemented);
+ style_config::set_i32("layout.threads", preferences.layout_threads as i32);
+ style_config::set_bool("layout.legacy_layout", preferences.layout_legacy_layout);
+ style_config::set_bool("layout.flexbox.enabled", preferences.layout_flexbox_enabled);
+ style_config::set_bool("layout.columns.enabled", preferences.layout_columns_enabled);
+ style_config::set_bool("layout.grid.enabled", preferences.layout_grid_enabled);
style_config::set_bool(
- "layout_css_transition_behavior_enabled",
+ "layout.css.transition-behavior.enabled",
preferences.layout_css_transition_behavior_enabled,
);
style_config::set_bool(
- "layout_writing_mode_enabled",
+ "layout.writing-mode.enabled",
preferences.layout_writing_mode_enabled,
);
style_config::set_bool(
- "layout_container_queries_enabled",
+ "layout.container-queries.enabled",
preferences.layout_container_queries_enabled,
);
diff --git a/components/script/dom/bindings/codegen/run.py b/components/script/dom/bindings/codegen/run.py
index 2dee39814b..d60cff896d 100644
--- a/components/script/dom/bindings/codegen/run.py
+++ b/components/script/dom/bindings/codegen/run.py
@@ -89,10 +89,31 @@ def generate(config, name, filename):
def add_css_properties_attributes(css_properties_json, parser):
+ def map_preference_name(preference_name: str):
+ """Map between Stylo preference names and Servo preference names as the
+ `css-properties.json` file is generated by Stylo. This should be kept in sync with the
+ preference mapping done in `components/servo_config/prefs.rs`, which handles the runtime version of
+ these preferences."""
+ MAPPING = [
+ ["layout.unimplemented", "layout_unimplemented"],
+ ["layout.threads", "layout_threads"],
+ ["layout.legacy_layout", "layout_legacy_layout"],
+ ["layout.flexbox.enabled", "layout_flexbox_enabled"],
+ ["layout.columns.enabled", "layout_columns_enabled"],
+ ["layout.grid.enabled", "layout_grid_enabled"],
+ ["layout.css.transition-behavior.enabled", "layout_css_transition_behavior_enabled"],
+ ["layout.writing-mode.enabled", "layout_writing_mode_enabled"],
+ ["layout.container-queries.enabled", "layout_container_queries_enabled"],
+ ]
+ for mapping in MAPPING:
+ if mapping[0] == preference_name:
+ return mapping[1]
+ return preference_name
+
css_properties = json.load(open(css_properties_json, "rb"))
idl = "partial interface CSSStyleDeclaration {\n%s\n};\n" % "\n".join(
" [%sCEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString %s;" % (
- ('Pref="%s", ' % data["pref"] if data["pref"] else ""),
+ (f'Pref="{map_preference_name(data["pref"])}", ' if data["pref"] else ""),
attribute_name
)
for (kind, properties_list) in sorted(css_properties.items()) |
🔨 Triggering try run (#12766835791) for Android, OpenHarmony |
|
🔨 Triggering try run (#12767522303) for Android, OpenHarmony |
✨ Try run (#12767522303) succeeded. |
Flatten and simplify Servo's preferences code. In addition, have both preferences and options passed in as arguments to `Servo::new()` and make sure not to use the globally set preferences in `servoshell` (as much as possible now). Instead of a complex procedural macro to generate preferences, just expose a very simple derive macro that adds string based getters and setters. - All command-line parsing is moved to servoshell. - There is no longer the concept of a missing preference. - Preferences no longer have to be part of the resources bundle because they now have reasonable default values. - servoshell specific preferences are no longer part of the preferences exposed by the Servo API. Signed-off-by: Martin Robinson <[email protected]>
The python code set a preference that was renamed as part of servo#34966. This fixes MQ runs which currently all fail (https://github.com/servo/servo/actions/runs/12779051326/job/35623343302) Signed-off-by: Simon Wülker <[email protected]>
The python code set a preference that was renamed as part of #34966. This fixes MQ runs which currently all fail (https://github.com/servo/servo/actions/runs/12779051326/job/35623343302) Signed-off-by: Simon Wülker <[email protected]>
Flatten and simplify Servo's preferences code. In addition, have both
preferences and options passed in as arguments to
Servo::new()
andmake sure not to use the globally set preferences in
servoshell
(asmuch as possible now).
Instead of a complex procedural macro to generate preferences, just
expose a very simple derive macro that adds string based getters and
setters.
they now have reasonable default values.
exposed by the Servo API.
This is an implementation of the changes that were discussed on Zulip.
./mach build -d
does not report any errors./mach test-tidy
does not report any errors