Bug 1574148 - Cherry-pick some Servo build/formatting fixes.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 15 Aug 2019 13:31:36 +0000
changeset 488230 175608dbc5018b3563b85908578cc0ca038f7acb
parent 488229 9cd8a0091ff2f85659591ddc67c55db127d30430
child 488231 0fffa7c38535239a5b51cee44096e246de446856
push id113904
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:41:00 +0000
treeherdermozilla-inbound@b283a7ef186c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1574148
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1574148 - Cherry-pick some Servo build/formatting fixes. Differential Revision: https://phabricator.services.mozilla.com/D42128
servo/components/style/properties/longhands/inherited_text.mako.rs
servo/components/style/properties/properties.mako.rs
servo/components/style/rule_tree/mod.rs
--- a/servo/components/style/properties/longhands/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_text.mako.rs
@@ -190,17 +190,17 @@
     servo_2020_pref="layout.2020.unimplemented",
     extra_gecko_values="break-spaces -moz-pre-space"
     gecko_enum_prefix="StyleWhiteSpace"
     needs_conversion="True"
     animation_value_type="discrete"
     spec="https://drafts.csswg.org/css-text/#propdef-white-space"
     servo_restyle_damage="rebuild_and_reflow"
 >
-    % if engine == "servo-2013":
+    % if engine in ["servo-2013", "servo-2020"]:
     impl SpecifiedValue {
         pub fn allow_wrap(&self) -> bool {
             match *self {
                 SpecifiedValue::Nowrap |
                 SpecifiedValue::Pre => false,
                 SpecifiedValue::Normal |
                 SpecifiedValue::PreWrap |
                 SpecifiedValue::PreLine => true,
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -500,18 +500,20 @@ impl NonCustomPropertyId {
             "ALWAYS_ENABLED",
             lambda p: (not p.experimental(engine)) and p.enabled_in_content()
         )}
 
         let passes_pref_check = || {
             % 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])
                         %>
                         % if pref:
                             Some("${pref}"),
                         % else:
                             None,
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -966,17 +966,16 @@ mod gecko_leak_checking {
 
     /// Logs the destruction of a heap-allocated object to Gecko's leak-checking machinery.
     pub fn log_dtor(ptr: *const RuleNode) {
         let s = NAME as *const [u8] as *const u8 as *const c_char;
         unsafe {
             NS_LogDtor(ptr as *mut c_void, s, size_of::<RuleNode>() as u32);
         }
     }
-
 }
 
 #[inline(always)]
 fn log_new(_ptr: *const RuleNode) {
     #[cfg(feature = "gecko_refcount_logging")]
     gecko_leak_checking::log_ctor(_ptr);
 }