From 8e6591b81b00e0a7897ef2f2c5f2d4974b9dbfef Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 6 Aug 2019 16:43:48 +0200 Subject: [PATCH] Fix a panic when using layout 2020 --- components/style/properties/properties.mako.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 6915e19dde8..c16de38f204 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -505,8 +505,10 @@ impl NonCustomPropertyId { % if engine == "gecko": unsafe { structs::nsCSSProps_gPropertyEnabled[self.0] } % else: - static PREF_NAME: [Option< &str>; ${len(data.longhands) + len(data.shorthands)}] = [ - % for property in data.longhands + data.shorthands: + static PREF_NAME: [Option< &str>; ${ + len(data.longhands) + len(data.shorthands) + len(data.all_aliases()) + }] = [ + % for property in data.longhands + data.shorthands + data.all_aliases(): <% attrs = {"servo-2013": "servo_2013_pref", "servo-2020": "servo_2020_pref"} pref = getattr(property, attrs[engine])