mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Further changes required by Servo
This commit is contained in:
parent
d86e449e8c
commit
fd41056ca5
4 changed files with 10 additions and 1 deletions
|
@ -127,6 +127,7 @@ stroke-opacity
|
||||||
storage
|
storage
|
||||||
submit
|
submit
|
||||||
suspend
|
suspend
|
||||||
|
system-ui
|
||||||
tel
|
tel
|
||||||
text
|
text
|
||||||
time
|
time
|
||||||
|
|
|
@ -1387,6 +1387,8 @@ fn to_font_kit_family(font_family: &font::SingleFontFamily) -> FamilyName {
|
||||||
font::GenericFontFamily::Monospace => FamilyName::Monospace,
|
font::GenericFontFamily::Monospace => FamilyName::Monospace,
|
||||||
font::GenericFontFamily::Fantasy => FamilyName::Fantasy,
|
font::GenericFontFamily::Fantasy => FamilyName::Fantasy,
|
||||||
font::GenericFontFamily::Cursive => FamilyName::Cursive,
|
font::GenericFontFamily::Cursive => FamilyName::Cursive,
|
||||||
|
// TODO: There is no FontFamily::SystemUi.
|
||||||
|
font::GenericFontFamily::SystemUi => unreachable!("system-ui should be disabled"),
|
||||||
font::GenericFontFamily::None => unreachable!("Shouldn't appear in computed values"),
|
font::GenericFontFamily::None => unreachable!("Shouldn't appear in computed values"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -569,6 +569,7 @@ impl<'a> From<&'a SingleFontFamily> for FontFamilyName {
|
||||||
GenericFontFamily::Monospace => atom!("monospace"),
|
GenericFontFamily::Monospace => atom!("monospace"),
|
||||||
GenericFontFamily::Cursive => atom!("cursive"),
|
GenericFontFamily::Cursive => atom!("cursive"),
|
||||||
GenericFontFamily::Fantasy => atom!("fantasy"),
|
GenericFontFamily::Fantasy => atom!("fantasy"),
|
||||||
|
GenericFontFamily::SystemUi => atom!("system-ui"),
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,7 +387,10 @@ pub enum SingleFontFamily {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn system_ui_enabled(_: &ParserContext) -> bool {
|
fn system_ui_enabled(_: &ParserContext) -> bool {
|
||||||
static_prefs::pref!("layout.css.system-ui.enabled")
|
#[cfg(feature = "gecko")]
|
||||||
|
return static_prefs::pref!("layout.css.system-ui.enabled");
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A generic font-family name.
|
/// A generic font-family name.
|
||||||
|
@ -501,6 +504,7 @@ impl SingleFontFamily {
|
||||||
atom!("cursive") => return SingleFontFamily::Generic(GenericFontFamily::Cursive),
|
atom!("cursive") => return SingleFontFamily::Generic(GenericFontFamily::Cursive),
|
||||||
atom!("fantasy") => return SingleFontFamily::Generic(GenericFontFamily::Fantasy),
|
atom!("fantasy") => return SingleFontFamily::Generic(GenericFontFamily::Fantasy),
|
||||||
atom!("monospace") => return SingleFontFamily::Generic(GenericFontFamily::Monospace),
|
atom!("monospace") => return SingleFontFamily::Generic(GenericFontFamily::Monospace),
|
||||||
|
atom!("system-ui") => return SingleFontFamily::Generic(GenericFontFamily::SystemUi),
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,6 +514,7 @@ impl SingleFontFamily {
|
||||||
"cursive" => return SingleFontFamily::Generic(GenericFontFamily::Cursive),
|
"cursive" => return SingleFontFamily::Generic(GenericFontFamily::Cursive),
|
||||||
"fantasy" => return SingleFontFamily::Generic(GenericFontFamily::Fantasy),
|
"fantasy" => return SingleFontFamily::Generic(GenericFontFamily::Fantasy),
|
||||||
"monospace" => return SingleFontFamily::Generic(GenericFontFamily::Monospace),
|
"monospace" => return SingleFontFamily::Generic(GenericFontFamily::Monospace),
|
||||||
|
"system-ui" => return SingleFontFamily::Generic(GenericFontFamily::SystemUi),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue