mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +01:00
Further changes required by Servo
This commit is contained in:
parent
2fb319ede2
commit
601de9049c
1 changed files with 14 additions and 0 deletions
|
@ -170,10 +170,12 @@ impl SupportsCondition {
|
|||
input.slice_from(pos).to_owned()
|
||||
)))
|
||||
},
|
||||
#[cfg(feature = "gecko")]
|
||||
"font-format" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
||||
let kw = FontFaceSourceFormatKeyword::parse(input)?;
|
||||
Ok(SupportsCondition::FontFormat(kw))
|
||||
},
|
||||
#[cfg(feature = "gecko")]
|
||||
"font-tech" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
||||
let flag = FontFaceSourceTechFlags::parse_one(input)?;
|
||||
Ok(SupportsCondition::FontTech(flag))
|
||||
|
@ -244,11 +246,13 @@ fn eval_moz_bool_pref(name: &CStr, cx: &ParserContext) -> bool {
|
|||
unsafe { bindings::Gecko_GetBoolPrefValue(name.as_ptr()) }
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn eval_font_format(kw: &FontFaceSourceFormatKeyword) -> bool {
|
||||
use crate::gecko_bindings::bindings;
|
||||
unsafe { bindings::Gecko_IsFontFormatSupported(*kw) }
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn eval_font_tech(flag: &FontFaceSourceTechFlags) -> bool {
|
||||
use crate::gecko_bindings::bindings;
|
||||
unsafe { bindings::Gecko_IsFontTechSupported(*flag) }
|
||||
|
@ -259,6 +263,16 @@ fn eval_moz_bool_pref(_: &CStr, _: &ParserContext) -> bool {
|
|||
false
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn eval_font_format(_: &FontFaceSourceFormatKeyword) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn eval_font_tech(_: &FontFaceSourceTechFlags) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// supports_condition | declaration
|
||||
/// <https://drafts.csswg.org/css-conditional/#dom-css-supports-conditiontext-conditiontext>
|
||||
pub fn parse_condition_or_declaration<'i, 't>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue