mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +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()
|
input.slice_from(pos).to_owned()
|
||||||
)))
|
)))
|
||||||
},
|
},
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
"font-format" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
"font-format" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
||||||
let kw = FontFaceSourceFormatKeyword::parse(input)?;
|
let kw = FontFaceSourceFormatKeyword::parse(input)?;
|
||||||
Ok(SupportsCondition::FontFormat(kw))
|
Ok(SupportsCondition::FontFormat(kw))
|
||||||
},
|
},
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
"font-tech" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
"font-tech" if static_prefs::pref!("layout.css.font-tech.enabled") => {
|
||||||
let flag = FontFaceSourceTechFlags::parse_one(input)?;
|
let flag = FontFaceSourceTechFlags::parse_one(input)?;
|
||||||
Ok(SupportsCondition::FontTech(flag))
|
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()) }
|
unsafe { bindings::Gecko_GetBoolPrefValue(name.as_ptr()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
fn eval_font_format(kw: &FontFaceSourceFormatKeyword) -> bool {
|
fn eval_font_format(kw: &FontFaceSourceFormatKeyword) -> bool {
|
||||||
use crate::gecko_bindings::bindings;
|
use crate::gecko_bindings::bindings;
|
||||||
unsafe { bindings::Gecko_IsFontFormatSupported(*kw) }
|
unsafe { bindings::Gecko_IsFontFormatSupported(*kw) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
fn eval_font_tech(flag: &FontFaceSourceTechFlags) -> bool {
|
fn eval_font_tech(flag: &FontFaceSourceTechFlags) -> bool {
|
||||||
use crate::gecko_bindings::bindings;
|
use crate::gecko_bindings::bindings;
|
||||||
unsafe { bindings::Gecko_IsFontTechSupported(*flag) }
|
unsafe { bindings::Gecko_IsFontTechSupported(*flag) }
|
||||||
|
@ -259,6 +263,16 @@ fn eval_moz_bool_pref(_: &CStr, _: &ParserContext) -> bool {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
fn eval_font_format(_: &FontFaceSourceFormatKeyword) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
fn eval_font_tech(_: &FontFaceSourceTechFlags) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
/// supports_condition | declaration
|
/// supports_condition | declaration
|
||||||
/// <https://drafts.csswg.org/css-conditional/#dom-css-supports-conditiontext-conditiontext>
|
/// <https://drafts.csswg.org/css-conditional/#dom-css-supports-conditiontext-conditiontext>
|
||||||
pub fn parse_condition_or_declaration<'i, 't>(
|
pub fn parse_condition_or_declaration<'i, 't>(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue