Fix a panic when using layout 2020

This commit is contained in:
Anthony Ramine 2019-08-06 16:43:48 +02:00
parent ff3a9180a7
commit 8e6591b81b

View file

@ -505,8 +505,10 @@ impl NonCustomPropertyId {
% if engine == "gecko": % if engine == "gecko":
unsafe { structs::nsCSSProps_gPropertyEnabled[self.0] } unsafe { structs::nsCSSProps_gPropertyEnabled[self.0] }
% else: % else:
static PREF_NAME: [Option< &str>; ${len(data.longhands) + len(data.shorthands)}] = [ static PREF_NAME: [Option< &str>; ${
% for property in data.longhands + data.shorthands: 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"} attrs = {"servo-2013": "servo_2013_pref", "servo-2020": "servo_2020_pref"}
pref = getattr(property, attrs[engine]) pref = getattr(property, attrs[engine])