style: Remove dependency on servo_config (was #31409) (#31411)

* Initial style_config crate

* Remove servo_config from style

* Remove servo_config from tests/unit/style

* Plumb servo prefs into stylo

* Clean up dependencies

* Fix formatting

* Add unit tests

* Add comment about avoiding clone

* Fix bug where getters acquire unnecessary write lock

* Remove stray dbg!()

* Plumb default prefs into Stylo as well

* Add comments about logging and mapping new pref types
This commit is contained in:
Delan Azabani 2024-02-23 16:40:54 +08:00 committed by GitHub
parent 9c0561536d
commit e078a99817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 188 additions and 15 deletions

11
Cargo.lock generated
View file

@ -5396,6 +5396,7 @@ dependencies = [
"servo_config_plugins",
"servo_geometry",
"servo_url",
"style_config",
"url",
]
@ -5781,12 +5782,12 @@ dependencies = [
"serde",
"servo_arc",
"servo_atoms",
"servo_config",
"smallbitvec",
"smallvec",
"static_assertions",
"static_prefs",
"string_cache",
"style_config",
"style_derive",
"style_traits",
"thin-vec",
@ -5802,6 +5803,13 @@ dependencies = [
"walkdir",
]
[[package]]
name = "style_config"
version = "0.0.1"
dependencies = [
"lazy_static",
]
[[package]]
name = "style_derive"
version = "0.0.1"
@ -5827,7 +5835,6 @@ dependencies = [
"serde_json",
"servo_arc",
"servo_atoms",
"servo_config",
"style",
"style_traits",
"url",