summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-10-27 20:37:50 -0500
committerathenian200 <athenian200@outlook.com>2020-10-28 14:17:51 -0500
commit9ffc5e6c924d2fce78b7aad9727c608077b26ff4 (patch)
tree1c49face93690476affa058028767af76dfb104f
parenta2c26490b4ad94336a7940e691d17f7aef040fa2 (diff)
downloaduxp-9ffc5e6c924d2fce78b7aad9727c608077b26ff4.tar.gz
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.
-rw-r--r--devtools/shared/css/generated/properties-db.js21
-rw-r--r--layout/style/nsCSSPropAliasList.h4
-rw-r--r--layout/style/nsCSSPropList.h6
-rw-r--r--layout/style/nsComputedDOMStylePropertyList.h2
-rw-r--r--layout/style/nsRuleNode.cpp2
-rw-r--r--layout/style/test/property_database.js11
-rw-r--r--parser/html/nsHtml5ViewSourceUtils.cpp2
7 files changed, 38 insertions, 10 deletions
diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js
index 01358a033d..d149995d9e 100644
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -1233,7 +1233,7 @@ exports.CSS_PROPERTIES = {
"-moz-tab-size": {
"isInherited": true,
"subproperties": [
- "-moz-tab-size"
+ "tab-size"
],
"supports": [
7
@@ -3052,7 +3052,7 @@ exports.CSS_PROPERTIES = {
"stroke-opacity",
"stroke-width",
"-x-system-font",
- "-moz-tab-size",
+ "tab-size",
"table-layout",
"text-align",
"text-align-last",
@@ -8650,6 +8650,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": [
diff --git a/layout/style/nsCSSPropAliasList.h b/layout/style/nsCSSPropAliasList.h
index 7025a25b5c..4f2a6e6b6d 100644
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -222,6 +222,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 53bc845476..658ea68d7a 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 8d4d8e45e2..6a18a7ad0a 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 6a6407e8f5..ffde071d6a 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -4513,7 +4513,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 5182dd89c1..635431e8fb 100644
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -2027,8 +2027,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" ],
@@ -2037,6 +2037,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,
diff --git a/parser/html/nsHtml5ViewSourceUtils.cpp b/parser/html/nsHtml5ViewSourceUtils.cpp
index b2f635bffe..910a6691e2 100644
--- a/parser/html/nsHtml5ViewSourceUtils.cpp
+++ b/parser/html/nsHtml5ViewSourceUtils.cpp
@@ -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);