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
This commit is contained in:
Hiroyuki Ikezoe 2018-06-26 08:51:13 +09:00 committed by Emilio Cobos Álvarez
parent fa7d9bf74a
commit d307b34be0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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 {