mirror of
https://github.com/lexmount/moli.git
synced 2026-10-08 08:01:01 +00:00
fix(css): enable starting-style parsing
This commit is contained in:
@@ -777,6 +777,27 @@ fn grouping_rule_css_text_uses_stylo_rule_view_serialization() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn starting_style_rule_accepts_an_empty_prelude_and_rejects_nonempty_preludes() {
|
||||
crate::style_engine::ensure_stylo_browser_compat_prefs();
|
||||
|
||||
assert_eq!(
|
||||
parsed_top_level_rule_texts("@starting-style {}"),
|
||||
["@starting-style {\n}"]
|
||||
);
|
||||
for css_text in [
|
||||
"@starting-style div {}",
|
||||
"@starting-style () {}",
|
||||
"@starting-style ( {}",
|
||||
"@starting-style }{}",
|
||||
] {
|
||||
assert!(
|
||||
parsed_top_level_rule_texts(css_text).is_empty(),
|
||||
"unexpectedly accepted {css_text:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn grouping_rule_css_text_uses_stylo_page_rule_child_serialization() {
|
||||
let css_text =
|
||||
|
||||
@@ -1119,6 +1119,7 @@ pub(crate) fn ensure_stylo_browser_compat_prefs() {
|
||||
stylo_static_prefs::set_pref!("layout.css.content.alt-text.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.margin-rules.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.scroll-driven-animations.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.starting-style-at-rules.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.style-queries.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.tree-counting-functions.enabled", true);
|
||||
stylo_static_prefs::set_pref!("layout.css.zoom.enabled", true);
|
||||
|
||||
Reference in New Issue
Block a user