Skip to content
Permalink
Browse files

style: Avoid some signed -> unsigned conversions for box-ordinal-group.

This is consistent with the `order` property anyhow, and allows to simplify some
code.

Negatives are still not parsed, but rust uses a similar representation for all
CSS <integer> values and so should C++.

Differential Revision: https://phabricator.services.mozilla.com/D42912
  • Loading branch information...
emilio committed Aug 21, 2019
1 parent 7c4dc9e commit 14c7e133ade82a463277f788c9839f33e6d8dcb6
Showing with 1 addition and 13 deletions.
  1. +1 −13 components/style/properties/gecko.mako.rs
@@ -3040,19 +3040,7 @@ clip-path
${impl_simple_type_with_conversion("_moz_force_broken_image_icon", "mForceBrokenImageIcon")}
</%self:impl_trait>

<%self:impl_trait style_struct_name="XUL"
skip_longhands="-moz-box-ordinal-group">
#[allow(non_snake_case)]
pub fn set__moz_box_ordinal_group(&mut self, v: i32) {
self.gecko.mBoxOrdinal = v as u32;
}

${impl_simple_copy("_moz_box_ordinal_group", "mBoxOrdinal")}

#[allow(non_snake_case)]
pub fn clone__moz_box_ordinal_group(&self) -> i32 {
self.gecko.mBoxOrdinal as i32
}
<%self:impl_trait style_struct_name="XUL">
</%self:impl_trait>

% for style_struct in data.style_structs:

0 comments on commit 14c7e13

Please sign in to comment.
You can’t perform that action at this time.