Bug 243412. Enable unprefixed 'box-sizing'. r=dbaron
authorMs2ger <ms2ger@gmail.com>
Fri, 17 Jan 2014 17:13:22 -0700
changeset 165203 36dfbfb486f5
parent 165202 800f377f716e
child 165204 78f00eacf00a
push id38920
push userdgottwald@mozilla.com
push date2014-01-25 16:16 +0000
treeherdermozilla-inbound@36dfbfb486f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs243412
milestone29.0a1
Bug 243412. Enable unprefixed 'box-sizing'. r=dbaron
layout/style/nsCSSPropAliasList.h
layout/style/nsCSSPropList.h
layout/style/nsComputedDOMStylePropertyList.h
layout/style/test/property_database.js
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -50,10 +50,11 @@ CSS_PROP_ALIAS(-moz-animation, animation
 CSS_PROP_ALIAS(-moz-animation-delay, animation_delay, MozAnimationDelay, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-direction, animation_direction, MozAnimationDirection, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-duration, animation_duration, MozAnimationDuration, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-fill-mode, animation_fill_mode, MozAnimationFillMode, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-iteration-count, animation_iteration_count, MozAnimationIterationCount, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-name, animation_name, MozAnimationName, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-play-state, animation_play_state, MozAnimationPlayState, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-timing-function, animation_timing_function, MozAnimationTimingFunction, "layout.css.prefixes.animations")
+CSS_PROP_ALIAS(-moz-box-sizing, box_sizing, MozBoxSizing, "")
 CSS_PROP_ALIAS(font-feature-settings, font_feature_settings, FontFeatureSettings, "layout.css.font-features.enabled")
 CSS_PROP_ALIAS(font-language-override, font_language_override, FontLanguageOverride, "layout.css.font-features.enabled")
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1375,25 +1375,25 @@ CSS_PROP_BORDER(
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
         // NOTE: some components must be nonnegative
     "",
     0,
     kBoxShadowTypeKTable,
     offsetof(nsStyleBorder, mBoxShadow),
     eStyleAnimType_Shadow)
 CSS_PROP_POSITION(
-    -moz-box-sizing,
+    box-sizing,
     box_sizing,
-    CSS_PROP_DOMPROP_PREFIXED(BoxSizing),
+    BoxSizing,
     CSS_PROPERTY_PARSE_VALUE,
     "",
     VARIANT_HK,
     kBoxSizingKTable,
     CSS_PROP_NO_OFFSET,
-    eStyleAnimType_None) // XXX bug 3935
+    eStyleAnimType_None)
 CSS_PROP_TABLEBORDER(
     caption-side,
     caption_side,
     CaptionSide,
     CSS_PROPERTY_PARSE_VALUE,
     "",
     VARIANT_HK,
     kCaptionSideKTable,
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -91,16 +91,17 @@ COMPUTED_STYLE_PROP(border_spacing,     
 COMPUTED_STYLE_PROP(border_top_color,              BorderTopColor)
 COMPUTED_STYLE_PROP(border_top_left_radius,        BorderTopLeftRadius)
 COMPUTED_STYLE_PROP(border_top_right_radius,       BorderTopRightRadius)
 COMPUTED_STYLE_PROP(border_top_style,              BorderTopStyle)
 COMPUTED_STYLE_PROP(border_top_width,              BorderTopWidth)
 //// COMPUTED_STYLE_PROP(border_width,             BorderWidth)
 COMPUTED_STYLE_PROP(bottom,                        Bottom)
 COMPUTED_STYLE_PROP(box_shadow,                    BoxShadow)
+COMPUTED_STYLE_PROP(box_sizing,                    BoxSizing)
 COMPUTED_STYLE_PROP(caption_side,                  CaptionSide)
 COMPUTED_STYLE_PROP(clear,                         Clear)
 COMPUTED_STYLE_PROP(clip,                          Clip)
 COMPUTED_STYLE_PROP(color,                         Color)
 COMPUTED_STYLE_PROP(content,                       Content)
 COMPUTED_STYLE_PROP(counter_increment,             CounterIncrement)
 COMPUTED_STYLE_PROP(counter_reset,                 CounterReset)
 COMPUTED_STYLE_PROP(cursor,                        Cursor)
@@ -223,17 +224,16 @@ COMPUTED_STYLE_PROP(border_left_colors, 
 COMPUTED_STYLE_PROP(border_right_colors,           BorderRightColors)
 COMPUTED_STYLE_PROP(border_top_colors,             BorderTopColors)
 COMPUTED_STYLE_PROP(box_align,                     BoxAlign)
 COMPUTED_STYLE_PROP(box_direction,                 BoxDirection)
 COMPUTED_STYLE_PROP(box_flex,                      BoxFlex)
 COMPUTED_STYLE_PROP(box_ordinal_group,             BoxOrdinalGroup)
 COMPUTED_STYLE_PROP(box_orient,                    BoxOrient)
 COMPUTED_STYLE_PROP(box_pack,                      BoxPack)
-COMPUTED_STYLE_PROP(box_sizing,                    BoxSizing)
 COMPUTED_STYLE_PROP(_moz_column_count,             ColumnCount)
 COMPUTED_STYLE_PROP(_moz_column_fill,              ColumnFill)
 COMPUTED_STYLE_PROP(_moz_column_gap,               ColumnGap)
 //// COMPUTED_STYLE_PROP(_moz_column_rule,         ColumnRule)
 COMPUTED_STYLE_PROP(_moz_column_rule_color,        ColumnRuleColor)
 COMPUTED_STYLE_PROP(_moz_column_rule_style,        ColumnRuleStyle)
 COMPUTED_STYLE_PROP(_moz_column_rule_width,        ColumnRuleWidth)
 COMPUTED_STYLE_PROP(_moz_column_width,             ColumnWidth)
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -490,20 +490,30 @@ var gCSSProperties = {
 	"-moz-box-pack": {
 		domProp: "MozBoxPack",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "start" ],
 		other_values: [ "center", "end", "justify" ],
 		invalid_values: []
 	},
+	"box-sizing": {
+		domProp: "boxSizing",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "content-box" ],
+		other_values: [ "border-box", "padding-box" ],
+		invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
+	},
 	"-moz-box-sizing": {
 		domProp: "MozBoxSizing",
 		inherited: false,
-		type: CSS_TYPE_LONGHAND,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "box-sizing",
+		subproperties: [ "box-sizing" ],
 		initial_values: [ "content-box" ],
 		other_values: [ "border-box", "padding-box" ],
 		invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
 	},
 	"-moz-columns": {
 		domProp: "MozColumns",
 		inherited: false,
 		type: CSS_TYPE_TRUE_SHORTHAND,