mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Further changes required by Servo
This commit is contained in:
parent
4d2ccaf445
commit
3024516019
2 changed files with 23 additions and 0 deletions
|
@ -289,7 +289,9 @@
|
||||||
% for p in subprops_for_value_info:
|
% for p in subprops_for_value_info:
|
||||||
${p}::collect_completion_keywords(f);
|
${p}::collect_completion_keywords(f);
|
||||||
% endfor
|
% endfor
|
||||||
|
% if engine == "gecko":
|
||||||
<SystemFont as SpecifiedValueInfo>::collect_completion_keywords(f);
|
<SystemFont as SpecifiedValueInfo>::collect_completion_keywords(f);
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</%helpers:shorthand>
|
</%helpers:shorthand>
|
||||||
|
|
|
@ -70,6 +70,7 @@ macro_rules! system_font_methods {
|
||||||
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem
|
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem
|
||||||
)]
|
)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
pub enum SystemFont {
|
pub enum SystemFont {
|
||||||
Caption,
|
Caption,
|
||||||
Icon,
|
Icon,
|
||||||
|
@ -91,6 +92,26 @@ pub enum SystemFont {
|
||||||
End, // Just for indexing purposes.
|
End, // Just for indexing purposes.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't parse system fonts in servo, but in the interest of not
|
||||||
|
// littering a lot of code with `if engine == "gecko"` conditionals,
|
||||||
|
// we have a dummy system font module that does nothing
|
||||||
|
|
||||||
|
#[derive(
|
||||||
|
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem
|
||||||
|
)]
|
||||||
|
#[allow(missing_docs)]
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
/// void enum for system font, can never exist
|
||||||
|
pub enum SystemFont {}
|
||||||
|
|
||||||
|
#[allow(missing_docs)]
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
impl SystemFont {
|
||||||
|
pub fn parse(_: &mut Parser) -> Result<Self, ()> {
|
||||||
|
Err(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const DEFAULT_SCRIPT_MIN_SIZE_PT: u32 = 8;
|
const DEFAULT_SCRIPT_MIN_SIZE_PT: u32 = 8;
|
||||||
const DEFAULT_SCRIPT_SIZE_MULTIPLIER: f64 = 0.71;
|
const DEFAULT_SCRIPT_SIZE_MULTIPLIER: f64 = 0.71;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue