From d307b34be04293b23bdda73266c045215d419ef0 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Tue, 26 Jun 2018 08:51:13 +0900 Subject: [PATCH] style: Introduce a constant variable to represents the number of all animatable longhands. We will use this number to cap the pre-allocation AnimationValueMap in the next patch. Bug: 1418806 MozReview-Commit-ID: Iqq9plbD8Vl --- components/style/properties/properties.mako.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index b6a8879e106..b27527d0132 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -100,6 +100,7 @@ pub mod longhands { % for style_struct in data.style_structs: include!("${repr(os.path.join(OUT_DIR, 'longhands/{}.rs'.format(style_struct.name_lower)))[1:-1]}"); % endfor + pub const ANIMATABLE_PROPERTY_COUNT: usize = ${sum(1 for prop in data.longhands if prop.animatable)}; } macro_rules! unwrap_or_initial {