aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports/geckolib/properties.mako.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs
index 951cb24c14a..fa694551d2c 100644
--- a/ports/geckolib/properties.mako.rs
+++ b/ports/geckolib/properties.mako.rs
@@ -387,8 +387,6 @@ impl Debug for ${style_struct.gecko_struct_name} {
force_stub += ["font-kerning", "font-stretch", "font-variant"]
# These have unusual representations in gecko.
force_stub += ["list-style-type", "text-overflow"]
- # Enum class instead of NS_STYLE_...
- force_stub += ["box-sizing"]
# These are booleans.
force_stub += ["page-break-after", "page-break-before"]
@@ -554,7 +552,7 @@ fn static_assert() {
<% skip_position_longhands = " ".join(x.ident for x in SIDES) %>
<%self:impl_trait style_struct_name="Position"
- skip_longhands="${skip_position_longhands} z-index">
+ skip_longhands="${skip_position_longhands} z-index box-sizing">
% for side in SIDES:
<% impl_split_style_coord("%s" % side.ident,
@@ -569,11 +567,24 @@ fn static_assert() {
T::Number(n) => self.gecko.mZIndex.set_int(n),
}
}
+
fn copy_z_index_from(&mut self, other: &Self) {
debug_assert_unit_is_safe_to_copy(self.gecko.mZIndex.mUnit);
self.gecko.mZIndex.mUnit = other.gecko.mZIndex.mUnit;
self.gecko.mZIndex.mValue = other.gecko.mZIndex.mValue;
}
+
+ fn set_box_sizing(&mut self, v: longhands::box_sizing::computed_value::T) {
+ use style::computed_values::box_sizing::T;
+ use gecko_bindings::structs::StyleBoxSizing;
+ // TODO: guess what to do with box-sizing: padding-box
+ self.gecko.mBoxSizing = match v {
+ T::content_box => StyleBoxSizing::Content,
+ T::border_box => StyleBoxSizing::Border
+ }
+ }
+ ${impl_simple_copy('box_sizing', 'mBoxSizing')}
+
</%self:impl_trait>
<% skip_outline_longhands = " ".join("outline-color outline-style outline-width".split() +