stylo: Support remaining display property values. draft
authorCameron McCormack <cam@mcc.id.au>
Mon, 05 Dec 2016 13:51:34 -1000
changeset 447562 9807fc7bc49cb16e34ce4dc9544fe2e738a5fd53
parent 447561 4d2d7ece9dafaf673d0cc7a7641003ab3fd98e51
child 539049 a0ea4f671b33228d7a6cdeb309ffcd1a6a9be464
push id38078
push userbmo:cam@mcc.id.au
push dateTue, 06 Dec 2016 02:29:31 +0000
milestone53.0a1
stylo: Support remaining display property values. MozReview-Commit-ID: HjLu7t2g7gF
servo/components/style/properties/gecko.mako.rs
servo/components/style/properties/longhand/box.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -1023,19 +1023,23 @@ fn static_assert() {
                           scroll-snap-type-y""" %>
 <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
 
     // We manually-implement the |display| property until we get general
     // infrastructure for preffing certain values.
     <% display_keyword = Keyword("display", "inline block inline-block table inline-table table-row-group " +
                                             "table-header-group table-footer-group table-row table-column-group " +
                                             "table-column table-cell table-caption list-item flex none " +
-                                            "-moz-box -moz-inline-box",
+                                            "inline-flex grid inline-grid ruby ruby-base ruby-base-container " +
+                                            "ruby-text ruby-text-container contents -webkit-box -webkit-inline-box " +
+                                            "-moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group " +
+                                            "-moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup " +
+                                            "-moz-groupbox",
                                             gecko_enum_prefix="StyleDisplay",
-                                            gecko_inexhaustive=True) %>
+                                            gecko_strip_moz_prefix=False) %>
     ${impl_keyword('display', 'mDisplay', display_keyword, True)}
 
     // overflow-y is implemented as a newtype of overflow-x, so we need special handling.
     // We could generalize this if we run into other newtype keywords.
     <% overflow_x = data.longhands_by_name["overflow-x"] %>
     pub fn set_overflow_y(&mut self, v: longhands::overflow_y::computed_value::T) {
         use properties::longhands::overflow_x::computed_value::T as BaseType;
         // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -17,17 +17,21 @@
     <%
         values = """inline block inline-block
             table inline-table table-row-group table-header-group table-footer-group
             table-row table-column-group table-column table-cell table-caption
             list-item flex
             none
         """.split()
         if product == "gecko":
-            values += "-moz-box -moz-inline-box".split()
+            values += """inline-flex grid inline-grid ruby ruby-base ruby-base-container
+                ruby-text ruby-text-container contents -webkit-box -webkit-inline-box
+                -moz-box -moz-inline-box -moz-grid -moz-inline-grid -moz-grid-group
+                -moz-grid-line -moz-stack -moz-inline-stack -moz-deck -moz-popup
+                -moz-groupbox""".split()
     %>
     pub use self::computed_value::T as SpecifiedValue;
     use values::computed::ComputedValueAsSpecified;
     use style_traits::ToCss;
     use values::NoViewportPercentage;
     impl NoViewportPercentage for SpecifiedValue {}
 
     pub mod computed_value {