mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Reformat recent changes.
This commit is contained in:
parent
9a8cee2800
commit
5aeab7adb1
17 changed files with 70 additions and 53 deletions
|
@ -652,7 +652,12 @@ impl ClipRect {
|
|||
left = parse_argument(context, input, allow_quirks)?;
|
||||
}
|
||||
|
||||
Ok(ClipRect { top, right, bottom, left })
|
||||
Ok(ClipRect {
|
||||
top,
|
||||
right,
|
||||
bottom,
|
||||
left,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
use crate::parser::{Parse, ParserContext};
|
||||
use crate::values::generics::svg as generic;
|
||||
use crate::values::specified::AllowQuirks;
|
||||
use crate::values::specified::color::Color;
|
||||
use crate::values::specified::url::SpecifiedUrl;
|
||||
use crate::values::specified::AllowQuirks;
|
||||
use crate::values::specified::LengthPercentage;
|
||||
use crate::values::specified::{NonNegativeLengthPercentage, Opacity};
|
||||
use crate::values::CustomIdent;
|
||||
|
@ -52,10 +52,9 @@ macro_rules! parse_svg_length {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(lp) = input.try(|i| {
|
||||
<$lp>::parse_quirky(context, i, AllowQuirks::Always)
|
||||
}) {
|
||||
return Ok(generic::SVGLength::LengthPercentage(lp))
|
||||
if let Ok(lp) = input.try(|i| <$lp>::parse_quirky(context, i, AllowQuirks::Always))
|
||||
{
|
||||
return Ok(generic::SVGLength::LengthPercentage(lp));
|
||||
}
|
||||
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
|
@ -65,7 +64,7 @@ macro_rules! parse_svg_length {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
parse_svg_length!(SVGLength, LengthPercentage);
|
||||
|
@ -78,11 +77,7 @@ impl Parse for SVGStrokeDashArray {
|
|||
) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(values) = input.try(|i| {
|
||||
CommaWithSpace::parse(i, |i| {
|
||||
NonNegativeLengthPercentage::parse_quirky(
|
||||
context,
|
||||
i,
|
||||
AllowQuirks::Always,
|
||||
)
|
||||
NonNegativeLengthPercentage::parse_quirky(context, i, AllowQuirks::Always)
|
||||
})
|
||||
}) {
|
||||
return Ok(generic::SVGStrokeDashArray::Values(values));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue