From 224550f818b60da6eec744db625d0f2fdcccf779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 21 May 2020 18:43:12 +0000 Subject: [PATCH] style: Derive parse for ShapeRadius. Depends on D76331 Differential Revision: https://phabricator.services.mozilla.com/D76332 --- components/style/values/generics/basic_shape.rs | 1 + components/style/values/specified/basic_shape.rs | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/components/style/values/generics/basic_shape.rs b/components/style/values/generics/basic_shape.rs index 745d6e07bbf..60619b46e2c 100644 --- a/components/style/values/generics/basic_shape.rs +++ b/components/style/values/generics/basic_shape.rs @@ -270,6 +270,7 @@ pub struct Ellipse { Copy, Debug, MallocSizeOf, + Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, diff --git a/components/style/values/specified/basic_shape.rs b/components/style/values/specified/basic_shape.rs index b1782c5b294..135ac85d330 100644 --- a/components/style/values/specified/basic_shape.rs +++ b/components/style/values/specified/basic_shape.rs @@ -263,22 +263,6 @@ impl Ellipse { } } -impl Parse for ShapeRadius { - fn parse<'i, 't>( - context: &ParserContext, - input: &mut Parser<'i, 't>, - ) -> Result> { - 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,