diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-08-31 12:39:19 +0000 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-11-03 08:59:49 +0100 |
commit | a44db174320144f73a376a21e2ea18499fd558d7 (patch) | |
tree | e2e18b85c143de440e0455421f3adbbe5bf7cfdb /components/style/macros.rs | |
parent | 3fa76ff2e8e251317fbbb76b7d1c2eafe12cfe24 (diff) | |
download | servo-a44db174320144f73a376a21e2ea18499fd558d7.tar.gz servo-a44db174320144f73a376a21e2ea18499fd558d7.zip |
style: Move line-clamp out of mako and do some adjacent clean-up
No behavior change, but simplifies the following patch.
Differential Revision: https://phabricator.services.mozilla.com/D155180
Diffstat (limited to 'components/style/macros.rs')
-rw-r--r-- | components/style/macros.rs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/components/style/macros.rs b/components/style/macros.rs index 3084d33dd3d..5f3a1ea463b 100644 --- a/components/style/macros.rs +++ b/components/style/macros.rs @@ -65,46 +65,6 @@ macro_rules! try_match_ident_ignore_ascii_case { }} } -macro_rules! define_keyword_type { - ($name:ident, $css:expr) => { - #[allow(missing_docs)] - #[derive( - Animate, - Clone, - ComputeSquaredDistance, - Copy, - MallocSizeOf, - PartialEq, - SpecifiedValueInfo, - ToAnimatedValue, - ToAnimatedZero, - ToComputedValue, - ToCss, - ToResolvedValue, - ToShmem, - )] - pub struct $name; - - impl fmt::Debug for $name { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str($css) - } - } - - impl $crate::parser::Parse for $name { - fn parse<'i, 't>( - _context: &$crate::parser::ParserContext, - input: &mut ::cssparser::Parser<'i, 't>, - ) -> Result<$name, ::style_traits::ParseError<'i>> { - input - .expect_ident_matching($css) - .map(|_| $name) - .map_err(|e| e.into()) - } - } - }; -} - #[cfg(feature = "servo")] macro_rules! local_name { ($s:tt) => { |