ported from UXP: Issue #1673 - Part 4: Unprefix -moz-tab-size. (73730695)

This commit is contained in:
2022-04-18 13:45:48 +08:00
parent 75f9d9728b
commit 138d95b4dd
6 changed files with 37 additions and 9 deletions
+19 -2
View File
@@ -1222,7 +1222,7 @@ exports.CSS_PROPERTIES = {
"-moz-tab-size": {
"isInherited": true,
"subproperties": [
"-moz-tab-size"
"tab-size"
],
"supports": [
6,
@@ -3032,7 +3032,7 @@ exports.CSS_PROPERTIES = {
"stroke-opacity",
"stroke-width",
"-x-system-font",
"-moz-tab-size",
"tab-size",
"table-layout",
"text-align",
"text-align-last",
@@ -8574,6 +8574,23 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"tab-size": {
"isInherited": true,
"subproperties": [
"tab-size"
],
"supports": [
6,
7
],
"values": [
"-moz-calc",
"calc",
"inherit",
"initial",
"unset"
]
},
"table-layout": {
"isInherited": false,
"subproperties": [
+4
View File
@@ -219,6 +219,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"
+3 -3
View File
@@ -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,
"",
@@ -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(_moz_stack_sizing, StackSizing)
COMPUTED_STYLE_PROP(_moz_tab_size, TabSize)
COMPUTED_STYLE_PROP(_moz_text_size_adjust, TextSizeAdjust)
COMPUTED_STYLE_PROP(_moz_user_focus, UserFocus)
COMPUTED_STYLE_PROP(_moz_user_input, UserInput)
+9 -2
View File
@@ -1918,14 +1918,21 @@ 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" ],
other_values: [ "0", "2.5", "3", "99", "12000", "0px", "1em", "calc(1px + 1em)", "calc(1px - 2px)", "calc(1 + 1)", "calc(-2.5)" ],
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,
+1 -1
View File
@@ -31,7 +31,7 @@ nsHtml5ViewSourceUtils::NewBodyAttributes()
int32_t tabSize = mozilla::Preferences::GetInt("view_source.tab_size", 4);
if (tabSize > 0) {
nsString style;
style.AssignASCII("-moz-tab-size: ");
style.AssignASCII("tab-size: ");
style.AppendInt(tabSize);
bodyAttrs->addAttribute(
nsHtml5AttributeName::ATTR_STYLE, nsHtml5String::FromString(style), -1);