Bug 1039541 part 1 - Unprefix text-align-last. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Fri, 27 May 2016 16:21:25 +1000
changeset 372091 52c1c1a089c31d6da3c91590be023e9021281b71
parent 371874 a008708a1379e3e6b57982457fa281a486da5a67
child 372092 42a3bd68caa6fa318939a3bc3521326f5b4153d8
push id19435
push userxquan@mozilla.com
push dateFri, 27 May 2016 11:12:56 +0000
reviewersheycam
bugs1039541
milestone49.0a1
Bug 1039541 part 1 - Unprefix text-align-last. r?heycam MozReview-Commit-ID: 4Lj04tY8CqR
layout/base/nsLayoutUtils.h
layout/style/nsCSSPropAliasList.h
layout/style/nsCSSPropList.h
layout/style/nsComputedDOMStylePropertyList.h
layout/style/test/property_database.js
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -2319,17 +2319,17 @@ public:
 
   /**
    * Checks whether support for the CSS grid-template-{columns,rows} 'subgrid X'
    * value is enabled.
    */
   static bool IsGridTemplateSubgridValueEnabled();
 
   /**
-   * Checks whether support for the CSS text-align (and -moz-text-align-last)
+   * Checks whether support for the CSS text-align (and text-align-last)
    * 'true' value is enabled.
    */
   static bool IsTextAlignUnsafeValueEnabled();
 
   /**
    * Checks if CSS variables are currently enabled.
    */
   static bool CSSVariablesEnabled()
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -178,16 +178,20 @@ CSS_PROP_ALIAS(-moz-border-start-style,
 CSS_PROP_ALIAS(-moz-border-start-width,
                border_inline_start_width,
                MozBorderStartWidth,
                "")
 CSS_PROP_ALIAS(-moz-hyphens,
                hyphens,
                MozHyphens,
                "")
+CSS_PROP_ALIAS(-moz-text-align-last,
+               text_align_last,
+               MozTextAlignLast,
+               "")
 
 #define WEBKIT_PREFIX_PREF "layout.css.prefixes.webkit"
 
 // -webkit- prefixes
 CSS_PROP_ALIAS(-webkit-animation,
                animation,
                WebkitAnimation,
                WEBKIT_PREFIX_PREF)
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -3884,19 +3884,19 @@ CSS_PROP_TEXT(
     "",
     // When we support aligning on a string, we can parse text-align
     // as a string....
     VARIANT_HK /* | VARIANT_STRING */,
     kTextAlignKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_TEXT(
-    -moz-text-align-last,
+    text-align-last,
     text_align_last,
-    CSS_PROP_DOMPROP_PREFIXED(TextAlignLast),
+    TextAlignLast,
     CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_VALUE_PARSER_FUNCTION,
     "",
     VARIANT_HK,
     kTextAlignLastKTable,
     offsetof(nsStyleText, mTextAlignLast),
     eStyleAnimType_None)
 CSS_PROP_SVG(
     text-anchor,
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -214,16 +214,17 @@ COMPUTED_STYLE_PROP(scroll_snap_coordina
 COMPUTED_STYLE_PROP(scroll_snap_destination,       ScrollSnapDestination)
 COMPUTED_STYLE_PROP(scroll_snap_points_x,          ScrollSnapPointsX)
 COMPUTED_STYLE_PROP(scroll_snap_points_y,          ScrollSnapPointsY)
 COMPUTED_STYLE_PROP(scroll_snap_type_x,            ScrollSnapTypeX)
 COMPUTED_STYLE_PROP(scroll_snap_type_y,            ScrollSnapTypeY)
 //// COMPUTED_STYLE_PROP(size,                     Size)
 COMPUTED_STYLE_PROP(table_layout,                  TableLayout)
 COMPUTED_STYLE_PROP(text_align,                    TextAlign)
+COMPUTED_STYLE_PROP(text_align_last,               TextAlignLast)
 COMPUTED_STYLE_PROP(text_combine_upright,          TextCombineUpright)
 COMPUTED_STYLE_PROP(text_decoration,               TextDecoration)
 COMPUTED_STYLE_PROP(text_decoration_color,         TextDecorationColor)
 COMPUTED_STYLE_PROP(text_decoration_line,          TextDecorationLine)
 COMPUTED_STYLE_PROP(text_decoration_style,         TextDecorationStyle)
 //// COMPUTED_STYLE_PROP(text_emphasis,            TextEmphasis)
 COMPUTED_STYLE_PROP(text_emphasis_color,           TextEmphasisColor)
 COMPUTED_STYLE_PROP(text_emphasis_position,        TextEmphasisPosition)
@@ -286,17 +287,16 @@ COMPUTED_STYLE_PROP(image_region,       
 COMPUTED_STYLE_PROP(orient,                        Orient)
 COMPUTED_STYLE_PROP(osx_font_smoothing,            OsxFontSmoothing)
 COMPUTED_STYLE_PROP(_moz_outline_radius_bottomLeft, OutlineRadiusBottomLeft)
 COMPUTED_STYLE_PROP(_moz_outline_radius_bottomRight,OutlineRadiusBottomRight)
 COMPUTED_STYLE_PROP(_moz_outline_radius_topLeft,    OutlineRadiusTopLeft)
 COMPUTED_STYLE_PROP(_moz_outline_radius_topRight,   OutlineRadiusTopRight)
 COMPUTED_STYLE_PROP(stack_sizing,                  StackSizing)
 COMPUTED_STYLE_PROP(_moz_tab_size,                 TabSize)
-COMPUTED_STYLE_PROP(text_align_last,               TextAlignLast)
 COMPUTED_STYLE_PROP(text_size_adjust,              TextSizeAdjust)
 COMPUTED_STYLE_PROP(user_focus,                    UserFocus)
 COMPUTED_STYLE_PROP(user_input,                    UserInput)
 COMPUTED_STYLE_PROP(user_modify,                   UserModify)
 COMPUTED_STYLE_PROP(user_select,                   UserSelect)
 COMPUTED_STYLE_PROP(_moz_window_dragging,          WindowDragging)
 COMPUTED_STYLE_PROP(_moz_window_shadow,            WindowShadow)
 
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -3696,18 +3696,18 @@ var gCSSProperties = {
     domProp: "textAlign",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     // don't know whether left and right are same as start
     initial_values: [ "start" ],
     other_values: [ "center", "justify", "end", "match-parent" ],
     invalid_values: [ "true", "true true" ]
   },
-  "-moz-text-align-last": {
-    domProp: "MozTextAlignLast",
+  "text-align-last": {
+    domProp: "textAlignLast",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "auto" ],
     other_values: [ "center", "justify", "start", "end", "left", "right" ],
     invalid_values: []
   },
   "text-decoration": {
     domProp: "textDecoration",
@@ -4831,17 +4831,24 @@ var gCSSProperties = {
     subproperties: [ "font-language-override" ],
   },
   "-moz-hyphens": {
     domProp: "MozHyphens",
     inherited: true,
     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
     alias_for: "hyphens",
     subproperties: [ "hyphens" ],
-  }
+  },
+  "-moz-text-align-last": {
+    domProp: "MozTextAlignLast",
+    inherited: true,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "text-align-last",
+    subproperties: [ "text-align-last" ],
+  },
 }
 
 function logical_axis_prop_get_computed(cs, property)
 {
   // Use defaults for these two properties in case the vertical text
   // pref (which they live behind) is turned off.
   var writingMode = cs.getPropertyValue("writing-mode") || "horizontal-tb";
   var orientation = writingMode.substring(0, writingMode.indexOf("-"));