mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Further changes required by Servo
This commit is contained in:
parent
d103785c4b
commit
9273921fd3
2 changed files with 5 additions and 4 deletions
|
@ -161,6 +161,7 @@ pub enum GenericSize<LengthPercent> {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[animation(error)]
|
#[animation(error)]
|
||||||
MozAvailable,
|
MozAvailable,
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
#[animation(error)]
|
#[animation(error)]
|
||||||
#[css(function = "fit-content")]
|
#[css(function = "fit-content")]
|
||||||
FitContentFunction(LengthPercent)
|
FitContentFunction(LengthPercent)
|
||||||
|
@ -218,6 +219,7 @@ pub enum GenericMaxSize<LengthPercent> {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[animation(error)]
|
#[animation(error)]
|
||||||
MozAvailable,
|
MozAvailable,
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
#[animation(error)]
|
#[animation(error)]
|
||||||
#[css(function = "fit-content")]
|
#[css(function = "fit-content")]
|
||||||
FitContentFunction(LengthPercent),
|
FitContentFunction(LengthPercent),
|
||||||
|
|
|
@ -1251,11 +1251,8 @@ macro_rules! parse_size_non_length {
|
||||||
fn is_fit_content_function_enabled() -> bool {
|
fn is_fit_content_function_enabled() -> bool {
|
||||||
static_prefs::pref!("layout.css.fit-content-function.enabled")
|
static_prefs::pref!("layout.css.fit-content-function.enabled")
|
||||||
}
|
}
|
||||||
#[cfg(feature = "servo")]
|
|
||||||
fn is_fit_content_function_enabled() -> bool {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
macro_rules! parse_fit_content_function {
|
macro_rules! parse_fit_content_function {
|
||||||
($size:ident, $input:expr, $context:expr, $allow_quirks:expr) => {
|
($size:ident, $input:expr, $context:expr, $allow_quirks:expr) => {
|
||||||
if is_fit_content_function_enabled() {
|
if is_fit_content_function_enabled() {
|
||||||
|
@ -1279,6 +1276,7 @@ impl Size {
|
||||||
allow_quirks: AllowQuirks,
|
allow_quirks: AllowQuirks,
|
||||||
) -> Result<Self, ParseError<'i>> {
|
) -> Result<Self, ParseError<'i>> {
|
||||||
parse_size_non_length!(Size, input, "auto" => Auto);
|
parse_size_non_length!(Size, input, "auto" => Auto);
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
parse_fit_content_function!(Size, input, context, allow_quirks);
|
parse_fit_content_function!(Size, input, context, allow_quirks);
|
||||||
|
|
||||||
let length = NonNegativeLengthPercentage::parse_quirky(context, input, allow_quirks)?;
|
let length = NonNegativeLengthPercentage::parse_quirky(context, input, allow_quirks)?;
|
||||||
|
@ -1312,6 +1310,7 @@ impl MaxSize {
|
||||||
allow_quirks: AllowQuirks,
|
allow_quirks: AllowQuirks,
|
||||||
) -> Result<Self, ParseError<'i>> {
|
) -> Result<Self, ParseError<'i>> {
|
||||||
parse_size_non_length!(MaxSize, input, "none" => None);
|
parse_size_non_length!(MaxSize, input, "none" => None);
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
parse_fit_content_function!(MaxSize, input, context, allow_quirks);
|
parse_fit_content_function!(MaxSize, input, context, allow_quirks);
|
||||||
|
|
||||||
let length = NonNegativeLengthPercentage::parse_quirky(context, input, allow_quirks)?;
|
let length = NonNegativeLengthPercentage::parse_quirky(context, input, allow_quirks)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue