Bug 243412. Enable unprefixed 'box-sizing'. r=dbaron
authorMs2ger <ms2ger@gmail.com>
Fri, 17 Jan 2014 17:13:22 -0700
changeset 181231 36dfbfb486f50b51e24c52765f9bf0c2188c5ad4
parent 181230 800f377f716ef4c35156d8d1276cc55dc0dc8d30
child 181232 78f00eacf00a35d2b13517ca8d12e5cc5bcac5ff
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs243412
milestone29.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 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,