Bug 649142 - Part 3: Convert logical padding properties. r=dbaron

Here we convert the logical padding properties into their new resolved-at-
cascade-time implementations.  This involves:

* converting -moz-padding-{start,end} into logical longhand properties
* adding padding-inline-{start,end} aliases for -moz-padding-{start,end}
* converting padding-{left,right} into longhand properties
* removing padding-{left,right}-value and
  padding-{left,right}-{ltr,rtl}-source internal properties

The CSS parser and various tests are simplified a bit as a result.
This commit is contained in:
Cameron McCormack 2015-01-17 15:16:02 +11:00
parent db33433252
commit 80230ebf84
15 changed files with 127 additions and 248 deletions

View File

@ -192,15 +192,11 @@ LayoutView.prototype = {
paddingBottom: {selector: ".padding.bottom > span",
property: "padding-bottom",
value: undefined},
// padding-left behaves the same as margin-left
paddingLeft: {selector: ".padding.left > span",
property: "padding-left",
realProperty: "padding-left-value",
value: undefined},
// padding-right behaves the same as margin-left
paddingRight: {selector: ".padding.right > span",
property: "padding-right",
realProperty: "padding-right-value",
value: undefined},
borderTop: {selector: ".border.top > span",
property: "border-top-width",

View File

@ -854,12 +854,12 @@ MapInheritedTableAttributesIntoRule(const nsMappedAttributes* aAttributes,
// don't have any set.
nsCSSValue padVal(float(value->GetIntegerValue()), eCSSUnit_Pixel);
nsCSSValue* paddingLeft = aData->ValueForPaddingLeftValue();
nsCSSValue* paddingLeft = aData->ValueForPaddingLeft();
if (paddingLeft->GetUnit() == eCSSUnit_Null) {
*paddingLeft = padVal;
}
nsCSSValue* paddingRight = aData->ValueForPaddingRightValue();
nsCSSValue* paddingRight = aData->ValueForPaddingRight();
if (paddingRight->GetUnit() == eCSSUnit_Null) {
*paddingRight = padVal;
}

View File

@ -23,11 +23,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1006595
var paddingSubProps = utils.getSubpropertiesForCSSProperty("padding");
arraysEqual(paddingSubProps,
[ "padding-top",
"padding-right-value",
"padding-right",
"padding-bottom",
"padding-left-value",
"padding-left-ltr-source", "padding-left-rtl-source",
"padding-right-ltr-source", "padding-right-rtl-source" ],
"padding-left" ],
"'padding' subproperties");
var displaySubProps = utils.getSubpropertiesForCSSProperty("color");

View File

@ -400,10 +400,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
case eCSSProperty_margin_right:
case eCSSProperty_margin_start:
case eCSSProperty_margin_end:
case eCSSProperty_padding_left:
case eCSSProperty_padding_right:
case eCSSProperty_padding_start:
case eCSSProperty_padding_end:
case eCSSProperty_border_left_color:
case eCSSProperty_border_left_style:
case eCSSProperty_border_left_width:

View File

@ -175,6 +175,12 @@ EnsurePhysicalProperty(nsCSSProperty& aProperty, nsRuleData* aRuleData)
bool ltr = direction == NS_STYLE_DIRECTION_LTR;
switch (aProperty) {
case eCSSProperty_padding_end:
aProperty = ltr ? eCSSProperty_padding_right : eCSSProperty_padding_left;
break;
case eCSSProperty_padding_start:
aProperty = ltr ? eCSSProperty_padding_left : eCSSProperty_padding_right;
break;
default:
NS_ABORT_IF_FALSE(nsCSSProps::PropHasFlags(aProperty,
CSS_PROPERTY_LOGICAL),

View File

@ -9899,18 +9899,6 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
return ParseOverflow();
case eCSSProperty_padding:
return ParsePadding();
case eCSSProperty_padding_end:
return ParseDirectionalBoxProperty(eCSSProperty_padding_end,
NS_BOXPROP_SOURCE_LOGICAL);
case eCSSProperty_padding_left:
return ParseDirectionalBoxProperty(eCSSProperty_padding_left,
NS_BOXPROP_SOURCE_PHYSICAL);
case eCSSProperty_padding_right:
return ParseDirectionalBoxProperty(eCSSProperty_padding_right,
NS_BOXPROP_SOURCE_PHYSICAL);
case eCSSProperty_padding_start:
return ParseDirectionalBoxProperty(eCSSProperty_padding_start,
NS_BOXPROP_SOURCE_LOGICAL);
case eCSSProperty_quotes:
return ParseQuotes();
case eCSSProperty_size:
@ -13077,20 +13065,11 @@ CSSParserImpl::ParsePadding()
{
static const nsCSSProperty kPaddingSideIDs[] = {
eCSSProperty_padding_top,
eCSSProperty_padding_right_value,
eCSSProperty_padding_right,
eCSSProperty_padding_bottom,
eCSSProperty_padding_left_value
};
static const nsCSSProperty kPaddingSources[] = {
eCSSProperty_padding_left_ltr_source,
eCSSProperty_padding_left_rtl_source,
eCSSProperty_padding_right_ltr_source,
eCSSProperty_padding_right_rtl_source,
eCSSProperty_UNKNOWN
eCSSProperty_padding_left
};
// do this now, in case 4 values weren't specified
InitBoxPropsAsPhysical(kPaddingSources);
return ParseBoxProperties(kPaddingSideIDs);
}

View File

@ -139,3 +139,11 @@ CSS_PROP_ALIAS(-moz-text-decoration-style,
text_decoration_style,
MozTextDecorationStyle,
"")
CSS_PROP_ALIAS(padding-inline-end,
padding_end,
PaddingInlineEnd,
"layout.css.vertical-text.enabled")
CSS_PROP_ALIAS(padding-inline-start,
padding_start,
PaddingInlineStart,
"layout.css.vertical-text.enabled")

View File

@ -2758,158 +2758,76 @@ CSS_PROP_PADDING(
nullptr,
offsetof(nsStylePadding, mPadding),
eStyleAnimType_Sides_Bottom)
CSS_PROP_SHORTHAND(
CSS_PROP_LOGICAL(
-moz-padding-end,
padding_end,
CSS_PROP_DOMPROP_PREFIXED(PaddingEnd),
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
padding-end-value,
padding_end_value,
PaddingEndValue,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_STORES_CALC,
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
CSS_PROPERTY_LOGICAL,
"",
VARIANT_HLP | VARIANT_CALC, // for internal use
VARIANT_HLP | VARIANT_CALC,
nullptr,
Padding,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
CSS_PROP_SHORTHAND(
CSS_PROP_LOGICAL(
-moz-padding-start,
padding_start,
CSS_PROP_DOMPROP_PREFIXED(PaddingStart),
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
CSS_PROPERTY_LOGICAL,
"",
VARIANT_HLP | VARIANT_CALC,
nullptr,
Padding,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_PADDING(
padding-left,
padding_left,
PaddingLeft,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
padding-left-value,
padding_left_value,
PaddingLeftValue,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
"",
VARIANT_HLP | VARIANT_CALC, // for internal use
VARIANT_HLP | VARIANT_CALC,
nullptr,
offsetof(nsStylePadding, mPadding),
eStyleAnimType_Sides_Left)
CSS_PROP_PADDING(
padding-left-ltr-source,
padding_left_ltr_source,
PaddingLeftLTRSource,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_DIRECTIONAL_SOURCE,
"",
0,
kBoxPropSourceKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_PADDING(
padding-left-rtl-source,
padding_left_rtl_source,
PaddingLeftRTLSource,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_DIRECTIONAL_SOURCE,
"",
0,
kBoxPropSourceKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
CSS_PROP_SHORTHAND(
padding-right,
padding_right,
PaddingRight,
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
padding-right-value,
padding_right_value,
PaddingRightValue,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
CSS_PROPERTY_STORES_CALC |
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
"",
VARIANT_HLP | VARIANT_CALC, // for internal use
VARIANT_HLP | VARIANT_CALC,
nullptr,
offsetof(nsStylePadding, mPadding),
eStyleAnimType_Sides_Right)
CSS_PROP_PADDING(
padding-right-ltr-source,
padding_right_ltr_source,
PaddingRightLTRSource,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_DIRECTIONAL_SOURCE,
"",
0,
kBoxPropSourceKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_PADDING(
padding-right-rtl-source,
padding_right_rtl_source,
PaddingRightRTLSource,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_DIRECTIONAL_SOURCE,
"",
0,
kBoxPropSourceKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
CSS_PROP_SHORTHAND(
-moz-padding-start,
padding_start,
CSS_PROP_DOMPROP_PREFIXED(PaddingStart),
CSS_PROPERTY_PARSE_FUNCTION,
"")
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
CSS_PROP_PADDING(
padding-start-value,
padding_start_value,
PaddingStartValue,
CSS_PROPERTY_PARSE_INACCESSIBLE |
CSS_PROPERTY_VALUE_NONNEGATIVE |
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
// This is required by the UA stylesheet and can't be overridden.
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
CSS_PROPERTY_STORES_CALC,
"",
VARIANT_HLP | VARIANT_CALC, // for internal use
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
#endif
CSS_PROP_PADDING(
padding-top,
padding_top,

View File

@ -578,10 +578,6 @@ nsCSSProps::OtherNameFor(nsCSSProperty aProperty)
return eCSSProperty_margin_left;
case eCSSProperty_margin_right_value:
return eCSSProperty_margin_right;
case eCSSProperty_padding_left_value:
return eCSSProperty_padding_left;
case eCSSProperty_padding_right_value:
return eCSSProperty_padding_right;
default:
NS_ABORT_IF_FALSE(false, "bad caller");
}
@ -2703,46 +2699,9 @@ static const nsCSSProperty gOverflowSubpropTable[] = {
static const nsCSSProperty gPaddingSubpropTable[] = {
// Code relies on these being in top-right-bottom-left order.
eCSSProperty_padding_top,
eCSSProperty_padding_right_value,
eCSSProperty_padding_right,
eCSSProperty_padding_bottom,
eCSSProperty_padding_left_value,
// extras:
eCSSProperty_padding_left_ltr_source,
eCSSProperty_padding_left_rtl_source,
eCSSProperty_padding_right_ltr_source,
eCSSProperty_padding_right_rtl_source,
eCSSProperty_UNKNOWN
};
static const nsCSSProperty gPaddingLeftSubpropTable[] = {
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
eCSSProperty_padding_left_value,
eCSSProperty_padding_left_ltr_source,
eCSSProperty_padding_left_rtl_source,
eCSSProperty_UNKNOWN
};
static const nsCSSProperty gPaddingRightSubpropTable[] = {
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
eCSSProperty_padding_right_value,
eCSSProperty_padding_right_ltr_source,
eCSSProperty_padding_right_rtl_source,
eCSSProperty_UNKNOWN
};
static const nsCSSProperty gPaddingStartSubpropTable[] = {
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
eCSSProperty_padding_start_value,
eCSSProperty_padding_left_ltr_source,
eCSSProperty_padding_right_rtl_source,
eCSSProperty_UNKNOWN
};
static const nsCSSProperty gPaddingEndSubpropTable[] = {
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
eCSSProperty_padding_end_value,
eCSSProperty_padding_right_ltr_source,
eCSSProperty_padding_left_rtl_source,
eCSSProperty_padding_left,
eCSSProperty_UNKNOWN
};

View File

@ -77,7 +77,7 @@ struct nsRuleData
"calling nsRuleData::ValueFor on property not in mSIDs");
NS_ABORT_IF_FALSE(sid != eStyleStruct_BackendOnly &&
indexInStruct != size_t(-1),
"backend-only property");
"backend-only or logical property");
return mValueStorage + mValueOffsets[sid] + indexInStruct;
}

View File

@ -7010,28 +7010,13 @@ nsRuleNode::ComputePaddingData(void* aStartStruct,
{
COMPUTE_START_RESET(Padding, (), padding, parentPadding)
// padding: length, percent, inherit
nsStyleCoord coord;
nsCSSRect ourPadding;
ourPadding.mTop = *aRuleData->ValueForPaddingTop();
ourPadding.mRight = *aRuleData->ValueForPaddingRightValue();
ourPadding.mBottom = *aRuleData->ValueForPaddingBottom();
ourPadding.mLeft = *aRuleData->ValueForPaddingLeftValue();
AdjustLogicalBoxProp(aContext,
*aRuleData->ValueForPaddingLeftLTRSource(),
*aRuleData->ValueForPaddingLeftRTLSource(),
*aRuleData->ValueForPaddingStartValue(),
*aRuleData->ValueForPaddingEndValue(),
NS_SIDE_LEFT, ourPadding, canStoreInRuleTree);
AdjustLogicalBoxProp(aContext,
*aRuleData->ValueForPaddingRightLTRSource(),
*aRuleData->ValueForPaddingRightRTLSource(),
*aRuleData->ValueForPaddingEndValue(),
*aRuleData->ValueForPaddingStartValue(),
NS_SIDE_RIGHT, ourPadding, canStoreInRuleTree);
// padding: length, percent, calc, inherit
const nsCSSProperty* subprops =
nsCSSProps::SubpropertyEntryFor(eCSSProperty_padding);
nsStyleCoord coord;
NS_FOR_CSS_SIDES(side) {
nsStyleCoord parentCoord = parentPadding->mPadding.Get(side);
if (SetCoord(ourPadding.*(nsCSSRect::sides[side]),
if (SetCoord(*aRuleData->ValueFor(subprops[side]),
coord, parentCoord,
SETCOORD_LPH | SETCOORD_INITIAL_ZERO | SETCOORD_STORE_CALC |
SETCOORD_UNSET_INITIAL,
@ -9509,11 +9494,9 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
static const nsCSSProperty paddingValues[] = {
eCSSProperty_padding_top,
eCSSProperty_padding_right_value,
eCSSProperty_padding_right,
eCSSProperty_padding_bottom,
eCSSProperty_padding_left_value,
eCSSProperty_padding_start_value,
eCSSProperty_padding_end_value,
eCSSProperty_padding_left,
};
static const nsCSSProperty textShadowValues[] = {

View File

@ -140,14 +140,6 @@ const char *gInaccessibleProperties[] = {
"margin-left-rtl-source",
"margin-right-ltr-source",
"margin-right-rtl-source",
"padding-end-value",
"padding-left-value",
"padding-right-value",
"padding-start-value",
"padding-left-ltr-source",
"padding-left-rtl-source",
"padding-right-ltr-source",
"padding-right-rtl-source",
"-moz-control-character-visibility",
"-moz-script-level", // parsed by UA sheets only
"-moz-script-size-multiplier",

View File

@ -4,8 +4,4 @@ var gShorthandPropertiesLikeLonghand = [
{ name: "margin-right", prop: "marginRight"},
{ name: "-moz-margin-start", prop: "MozMarginStart"},
{ name: "overflow", prop: "overflow"},
{ name: "-moz-padding-end", prop: "MozPaddingEnd"},
{ name: "padding-left", prop: "paddingLeft"},
{ name: "padding-right", prop: "paddingRight"},
{ name: "-moz-padding-start", prop: "MozPaddingStart"},
];

View File

@ -1566,7 +1566,8 @@ var gCSSProperties = {
"-moz-padding-end": {
domProp: "MozPaddingEnd",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_LONGHAND,
logical: true,
get_computed: logical_box_prop_get_computed,
/* no subproperties */
initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
@ -1582,7 +1583,8 @@ var gCSSProperties = {
"-moz-padding-start": {
domProp: "MozPaddingStart",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_LONGHAND,
logical: true,
get_computed: logical_box_prop_get_computed,
/* no subproperties */
initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
@ -3136,8 +3138,7 @@ var gCSSProperties = {
"padding-left": {
domProp: "paddingLeft",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
/* no subproperties */
type: CSS_TYPE_LONGHAND,
initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
other_values: [ "1px", "2em", "5%",
"calc(2px)",
@ -3152,8 +3153,7 @@ var gCSSProperties = {
"padding-right": {
domProp: "paddingRight",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
/* no subproperties */
type: CSS_TYPE_LONGHAND,
initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
other_values: [ "1px", "2em", "5%",
"calc(2px)",
@ -4536,13 +4536,27 @@ var gCSSProperties = {
function logical_box_prop_get_computed(cs, property)
{
if (! /^-moz-/.test(property))
var ltr = cs.getPropertyValue("direction") == "ltr";
if (/^-moz-/.test(property)) {
property = property.substring(5);
if (ltr) {
property = property.replace("-start", "-left")
.replace("-end", "-right");
} else {
property = property.replace("-start", "-right")
.replace("-end", "-left");
}
} else if (/-inline-(start|end)/.test(property)) {
if (ltr) {
property = property.replace("-inline-start", "-left")
.replace("-inline-end", "-right");
} else {
property = property.replace("-inline-start", "-right")
.replace("-inline-end", "-left");
}
} else {
throw "Unexpected property";
property = property.substring(5);
if (cs.getPropertyValue("direction") == "ltr")
property = property.replace("-start", "-left").replace("-end", "-right");
else
property = property.replace("-start", "-right").replace("-end", "-left");
}
return cs.getPropertyValue(property);
}
@ -4613,7 +4627,39 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0",
"digits 12", "none 3", "digits 3.1415", "digits3", "digits 1",
"digits 3 all", "digits foo", "digits all", "digits 3.0" ]
}
},
"padding-inline-end": {
domProp: "paddingInlineEnd",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "-moz-padding-end",
get_computed: logical_box_prop_get_computed,
initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
other_values: [ "1px", "2em", "5%",
"calc(2px)",
"calc(50%)",
"calc(3*25px)",
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
},
"padding-inline-start": {
domProp: "paddingInlineStart",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "-moz-padding-start",
get_computed: logical_box_prop_get_computed,
initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
other_values: [ "1px", "2em", "5%",
"calc(2px)",
"calc(50%)",
"calc(3*25px)",
"calc(25px*3)",
"calc(3*25px + 50%)",
],
invalid_values: [ ],
},
};
for (var prop in verticalTextProperties) {
gCSSProperties[prop] = verticalTextProperties[prop];

View File

@ -75,6 +75,8 @@ var gBadComputedNoFrame = {
"min-width": [ "calc(-1%)" ],
"padding": [ "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ],
"padding-bottom": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],
"padding-inline-end": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],
"padding-inline-start": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],
"padding-left": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],
"padding-right": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],
"padding-top": [ "0%", "calc(0% + 0px)", "calc(-1%)" ],