зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1639905 - Derive parse for ShapeRadius. r=boris
Depends on D76331 Differential Revision: https://phabricator.services.mozilla.com/D76332
This commit is contained in:
Родитель
5b0a85dfc3
Коммит
f5e6a1beee
|
@ -270,6 +270,7 @@ pub struct Ellipse<H, V, NonNegativeLengthPercentage> {
|
|||
Copy,
|
||||
Debug,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToAnimatedValue,
|
||||
|
|
|
@ -263,22 +263,6 @@ impl Ellipse {
|
|||
}
|
||||
}
|
||||
|
||||
impl Parse for ShapeRadius {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(lp) = input.try(|i| NonNegativeLengthPercentage::parse(context, i)) {
|
||||
return Ok(generic::ShapeRadius::Length(lp));
|
||||
}
|
||||
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
"closest-side" => Ok(generic::ShapeRadius::ClosestSide),
|
||||
"farthest-side" => Ok(generic::ShapeRadius::FarthestSide),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for Polygon {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
|
|
Загрузка…
Ссылка в новой задаче