From 770cb9a4b98947b5508278aeb7532d42fd973cae Mon Sep 17 00:00:00 2001 From: athenian200 Date: Tue, 27 Oct 2020 20:37:50 -0500 Subject: Issue #1673 - Part 4: Unprefix -moz-tab-size. While we do fail a couple of tests, the other mainstream browsers also fail them and I think our implementation of tab-size is good enough to be unprefixed at this point. Having this patch also makes testing easier. --- layout/style/nsCSSPropAliasList.h | 4 ++++ layout/style/nsCSSPropList.h | 6 +++--- layout/style/nsComputedDOMStylePropertyList.h | 2 +- layout/style/nsRuleNode.cpp | 2 +- layout/style/test/property_database.js | 11 +++++++++-- 5 files changed, 18 insertions(+), 7 deletions(-) (limited to 'layout/style') diff --git a/layout/style/nsCSSPropAliasList.h b/layout/style/nsCSSPropAliasList.h index 9ec71b2cf..334f3b1ac 100644 --- a/layout/style/nsCSSPropAliasList.h +++ b/layout/style/nsCSSPropAliasList.h @@ -223,6 +223,10 @@ CSS_PROP_ALIAS(-moz-columns, columns, MozColumns, "") +CSS_PROP_ALIAS(-moz-tab-size, + tab_size, + MozTabSize, + "") #define WEBKIT_PREFIX_PREF "layout.css.prefixes.webkit" diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 53bc84547..658ea68d7 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -3879,9 +3879,9 @@ CSS_PROP_FONT( eStyleAnimType_None) #endif // CSS_PROP_LIST_EXCLUDE_INTERNAL CSS_PROP_TEXT( - -moz-tab-size, - _moz_tab_size, - CSS_PROP_DOMPROP_PREFIXED(TabSize), + tab-size, + tab_size, + TabSize, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_VALUE_NONNEGATIVE, "", diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index 8d4d8e45e..6a18a7ad0 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -228,6 +228,7 @@ COMPUTED_STYLE_PROP(scroll_snap_type_x, ScrollSnapTypeX) COMPUTED_STYLE_PROP(scroll_snap_type_y, ScrollSnapTypeY) COMPUTED_STYLE_PROP(shape_outside, ShapeOutside) //// COMPUTED_STYLE_PROP(size, Size) +COMPUTED_STYLE_PROP(tab_size, TabSize) COMPUTED_STYLE_PROP(table_layout, TableLayout) COMPUTED_STYLE_PROP(text_align, TextAlign) COMPUTED_STYLE_PROP(text_align_last, TextAlignLast) @@ -295,7 +296,6 @@ 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_size_adjust, TextSizeAdjust) COMPUTED_STYLE_PROP(user_focus, UserFocus) COMPUTED_STYLE_PROP(user_input, UserInput) diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 739deaea1..58a99172a 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -4514,7 +4514,7 @@ struct LengthNumberCalcObj bool mIsNumber; }; -struct LengthNumberCalcOps : public css::FloatCoeffsAlreadyNormalizedOps +struct LengthNumberCalcOps : public css::NumbersAlreadyNormalizedOps { typedef LengthNumberCalcObj result_type; nsStyleContext* const mStyleContext; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 8624e17dd..6b1ef5602 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -2028,8 +2028,8 @@ var gCSSProperties = { other_values: [ "ignore" ], invalid_values: [] }, - "-moz-tab-size": { - domProp: "MozTabSize", + "tab-size": { + domProp: "TabSize", inherited: true, type: CSS_TYPE_LONGHAND, initial_values: [ "8" ], @@ -2038,6 +2038,13 @@ var gCSSProperties = { invalid_values: [ "9%", "calc(9% + 1px)", "calc(1 + 1em)", "-1", "-808", "auto" ] }, + "-moz-tab-size": { + domProp: "MozTabSize", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND + alias_for: "tab-size", + subproperties: [ "tab-size" ] + }, "-moz-text-size-adjust": { domProp: "MozTextSizeAdjust", inherited: true, -- cgit v1.2.3