mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 649142 - Part 5: Convert logical border properties. r=dbaron
This commit is contained in:
parent
1fe81c8426
commit
c99b3f741d
@ -165,7 +165,7 @@ HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
borderTopWidth->SetFloatValue(sizePerSide, eCSSUnit_Pixel);
|
||||
}
|
||||
if (allSides) {
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidth();
|
||||
if (borderRightWidth->GetUnit() == eCSSUnit_Null) {
|
||||
borderRightWidth->SetFloatValue(sizePerSide, eCSSUnit_Pixel);
|
||||
}
|
||||
@ -173,7 +173,7 @@ HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
if (borderBottomWidth->GetUnit() == eCSSUnit_Null) {
|
||||
borderBottomWidth->SetFloatValue(sizePerSide, eCSSUnit_Pixel);
|
||||
}
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidth();
|
||||
if (borderLeftWidth->GetUnit() == eCSSUnit_Null) {
|
||||
borderLeftWidth->SetFloatValue(sizePerSide, eCSSUnit_Pixel);
|
||||
}
|
||||
@ -185,7 +185,7 @@ HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
eCSSUnit_Enumerated);
|
||||
}
|
||||
if (allSides) {
|
||||
nsCSSValue* borderRightStyle = aData->ValueForBorderRightStyleValue();
|
||||
nsCSSValue* borderRightStyle = aData->ValueForBorderRightStyle();
|
||||
if (borderRightStyle->GetUnit() == eCSSUnit_Null) {
|
||||
borderRightStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID,
|
||||
eCSSUnit_Enumerated);
|
||||
@ -195,7 +195,7 @@ HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
borderBottomStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID,
|
||||
eCSSUnit_Enumerated);
|
||||
}
|
||||
nsCSSValue* borderLeftStyle = aData->ValueForBorderLeftStyleValue();
|
||||
nsCSSValue* borderLeftStyle = aData->ValueForBorderLeftStyle();
|
||||
if (borderLeftStyle->GetUnit() == eCSSUnit_Null) {
|
||||
borderLeftStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID,
|
||||
eCSSUnit_Enumerated);
|
||||
|
@ -121,10 +121,10 @@ HTMLIFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
if (NS_STYLE_FRAME_0 == frameborder ||
|
||||
NS_STYLE_FRAME_NO == frameborder ||
|
||||
NS_STYLE_FRAME_OFF == frameborder) {
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidth();
|
||||
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidth();
|
||||
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderRightWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
|
||||
|
@ -768,10 +768,10 @@ HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
nscolor color;
|
||||
if (value && presContext->UseDocumentColors() &&
|
||||
value->GetColorValue(color)) {
|
||||
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColorValue();
|
||||
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColor();
|
||||
if (borderLeftColor->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftColor->SetColorValue(color);
|
||||
nsCSSValue* borderRightColor = aData->ValueForBorderRightColorValue();
|
||||
nsCSSValue* borderRightColor = aData->ValueForBorderRightColor();
|
||||
if (borderRightColor->GetUnit() == eCSSUnit_Null)
|
||||
borderRightColor->SetColorValue(color);
|
||||
nsCSSValue* borderTopColor = aData->ValueForBorderTopColor();
|
||||
@ -792,10 +792,10 @@ HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
borderThickness = borderValue->GetIntegerValue();
|
||||
|
||||
// by default, set all border sides to the specified width
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidth();
|
||||
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidth();
|
||||
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderRightWidth->SetFloatValue((float)borderThickness, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
|
||||
|
@ -1517,39 +1517,39 @@ nsGenericHTMLElement::MapImageBorderAttributeInto(const nsMappedAttributes* aAtt
|
||||
if (value->Type() == nsAttrValue::eInteger)
|
||||
val = value->GetIntegerValue();
|
||||
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidthValue();
|
||||
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidth();
|
||||
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftWidth->SetFloatValue((float)val, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
|
||||
if (borderTopWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderTopWidth->SetFloatValue((float)val, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidthValue();
|
||||
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidth();
|
||||
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderRightWidth->SetFloatValue((float)val, eCSSUnit_Pixel);
|
||||
nsCSSValue* borderBottomWidth = aData->ValueForBorderBottomWidth();
|
||||
if (borderBottomWidth->GetUnit() == eCSSUnit_Null)
|
||||
borderBottomWidth->SetFloatValue((float)val, eCSSUnit_Pixel);
|
||||
|
||||
nsCSSValue* borderLeftStyle = aData->ValueForBorderLeftStyleValue();
|
||||
nsCSSValue* borderLeftStyle = aData->ValueForBorderLeftStyle();
|
||||
if (borderLeftStyle->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderTopStyle = aData->ValueForBorderTopStyle();
|
||||
if (borderTopStyle->GetUnit() == eCSSUnit_Null)
|
||||
borderTopStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderRightStyle = aData->ValueForBorderRightStyleValue();
|
||||
nsCSSValue* borderRightStyle = aData->ValueForBorderRightStyle();
|
||||
if (borderRightStyle->GetUnit() == eCSSUnit_Null)
|
||||
borderRightStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderBottomStyle = aData->ValueForBorderBottomStyle();
|
||||
if (borderBottomStyle->GetUnit() == eCSSUnit_Null)
|
||||
borderBottomStyle->SetIntValue(NS_STYLE_BORDER_STYLE_SOLID, eCSSUnit_Enumerated);
|
||||
|
||||
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColorValue();
|
||||
nsCSSValue* borderLeftColor = aData->ValueForBorderLeftColor();
|
||||
if (borderLeftColor->GetUnit() == eCSSUnit_Null)
|
||||
borderLeftColor->SetIntValue(NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderTopColor = aData->ValueForBorderTopColor();
|
||||
if (borderTopColor->GetUnit() == eCSSUnit_Null)
|
||||
borderTopColor->SetIntValue(NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderRightColor = aData->ValueForBorderRightColorValue();
|
||||
nsCSSValue* borderRightColor = aData->ValueForBorderRightColor();
|
||||
if (borderRightColor->GetUnit() == eCSSUnit_Null)
|
||||
borderRightColor->SetIntValue(NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR, eCSSUnit_Enumerated);
|
||||
nsCSSValue* borderBottomColor = aData->ValueForBorderBottomColor();
|
||||
|
@ -349,8 +349,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
for (const nsCSSProperty** subprops = subproptables,
|
||||
**subprops_end = ArrayEnd(subproptables);
|
||||
subprops < subprops_end; ++subprops) {
|
||||
// Check only the first four subprops in each table, since the
|
||||
// others are extras for dimensional box properties.
|
||||
const nsCSSValue *firstSide = data->ValueFor((*subprops)[0]);
|
||||
for (int32_t side = 1; side < 4; ++side) {
|
||||
const nsCSSValue *otherSide =
|
||||
@ -377,9 +375,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(aProperty);
|
||||
NS_ABORT_IF_FALSE(StringEndsWith(nsCSSProps::GetStringValue(subprops[2]),
|
||||
NS_LITERAL_CSTRING("-color")) ||
|
||||
StringEndsWith(nsCSSProps::GetStringValue(subprops[2]),
|
||||
NS_LITERAL_CSTRING("-color-value")),
|
||||
NS_LITERAL_CSTRING("-color")),
|
||||
"third subprop must be the color property");
|
||||
const nsCSSValue *colorValue = data->ValueFor(subprops[2]);
|
||||
bool isMozUseTextColor =
|
||||
@ -396,25 +392,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case eCSSProperty_border_left_color:
|
||||
case eCSSProperty_border_left_style:
|
||||
case eCSSProperty_border_left_width:
|
||||
case eCSSProperty_border_right_color:
|
||||
case eCSSProperty_border_right_style:
|
||||
case eCSSProperty_border_right_width:
|
||||
case eCSSProperty_border_start_color:
|
||||
case eCSSProperty_border_start_style:
|
||||
case eCSSProperty_border_start_width:
|
||||
case eCSSProperty_border_end_color:
|
||||
case eCSSProperty_border_end_style:
|
||||
case eCSSProperty_border_end_width: {
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(aProperty);
|
||||
NS_ABORT_IF_FALSE(subprops[3] == eCSSProperty_UNKNOWN,
|
||||
"not box property with physical vs. logical cascading");
|
||||
AppendValueToString(subprops[0], aValue, aSerialization);
|
||||
break;
|
||||
}
|
||||
case eCSSProperty_background: {
|
||||
// We know from above that all subproperties were specified.
|
||||
// However, we still can't represent that in the shorthand unless
|
||||
|
@ -2927,8 +2927,8 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
GetComputedBorder().side_); \
|
||||
break;
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_bottom_width, bottom)
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_left_width_value, left)
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_right_width_value, right)
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_left_width, left)
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_right_width, right)
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_top_width, top)
|
||||
#undef BORDER_WIDTH_CASE
|
||||
|
||||
@ -2942,11 +2942,11 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
ExtractBorderColor(aStyleContext, styleStruct, NS_SIDE_BOTTOM,
|
||||
aComputedValue);
|
||||
break;
|
||||
case eCSSProperty_border_left_color_value:
|
||||
case eCSSProperty_border_left_color:
|
||||
ExtractBorderColor(aStyleContext, styleStruct, NS_SIDE_LEFT,
|
||||
aComputedValue);
|
||||
break;
|
||||
case eCSSProperty_border_right_color_value:
|
||||
case eCSSProperty_border_right_color:
|
||||
ExtractBorderColor(aStyleContext, styleStruct, NS_SIDE_RIGHT,
|
||||
aComputedValue);
|
||||
break;
|
||||
|
@ -187,6 +187,30 @@ EnsurePhysicalProperty(nsCSSProperty& aProperty, nsRuleData* aRuleData)
|
||||
case eCSSProperty_padding_start:
|
||||
aProperty = ltr ? eCSSProperty_padding_left : eCSSProperty_padding_right;
|
||||
break;
|
||||
case eCSSProperty_border_end_color:
|
||||
aProperty = ltr ? eCSSProperty_border_right_color :
|
||||
eCSSProperty_border_left_color;
|
||||
break;
|
||||
case eCSSProperty_border_end_style:
|
||||
aProperty = ltr ? eCSSProperty_border_right_style :
|
||||
eCSSProperty_border_left_style;
|
||||
break;
|
||||
case eCSSProperty_border_end_width:
|
||||
aProperty = ltr ? eCSSProperty_border_right_width :
|
||||
eCSSProperty_border_left_width;
|
||||
break;
|
||||
case eCSSProperty_border_start_color:
|
||||
aProperty = ltr ? eCSSProperty_border_left_color :
|
||||
eCSSProperty_border_right_color;
|
||||
break;
|
||||
case eCSSProperty_border_start_style:
|
||||
aProperty = ltr ? eCSSProperty_border_left_style :
|
||||
eCSSProperty_border_right_style;
|
||||
break;
|
||||
case eCSSProperty_border_start_width:
|
||||
aProperty = ltr ? eCSSProperty_border_left_width :
|
||||
eCSSProperty_border_right_width;
|
||||
break;
|
||||
default:
|
||||
NS_ABORT_IF_FALSE(nsCSSProps::PropHasFlags(aProperty,
|
||||
CSS_PROPERTY_LOGICAL),
|
||||
|
@ -6614,9 +6614,6 @@ static const nsCSSProperty kBorderTopIDs[] = {
|
||||
eCSSProperty_border_top_color
|
||||
};
|
||||
static const nsCSSProperty kBorderRightIDs[] = {
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_right_color
|
||||
@ -6627,25 +6624,16 @@ static const nsCSSProperty kBorderBottomIDs[] = {
|
||||
eCSSProperty_border_bottom_color
|
||||
};
|
||||
static const nsCSSProperty kBorderLeftIDs[] = {
|
||||
eCSSProperty_border_left_width_value,
|
||||
eCSSProperty_border_left_style_value,
|
||||
eCSSProperty_border_left_color_value,
|
||||
eCSSProperty_border_left_width,
|
||||
eCSSProperty_border_left_style,
|
||||
eCSSProperty_border_left_color
|
||||
};
|
||||
static const nsCSSProperty kBorderStartIDs[] = {
|
||||
eCSSProperty_border_start_width_value,
|
||||
eCSSProperty_border_start_style_value,
|
||||
eCSSProperty_border_start_color_value,
|
||||
eCSSProperty_border_start_width,
|
||||
eCSSProperty_border_start_style,
|
||||
eCSSProperty_border_start_color
|
||||
};
|
||||
static const nsCSSProperty kBorderEndIDs[] = {
|
||||
eCSSProperty_border_end_width_value,
|
||||
eCSSProperty_border_end_style_value,
|
||||
eCSSProperty_border_end_color_value,
|
||||
eCSSProperty_border_end_width,
|
||||
eCSSProperty_border_end_style,
|
||||
eCSSProperty_border_end_color
|
||||
@ -9458,21 +9446,21 @@ CSSParserImpl::ParseBoxCornerRadii(const nsCSSProperty aPropIDs[])
|
||||
// These must be in CSS order (top,right,bottom,left) for indexing to work
|
||||
static const nsCSSProperty kBorderStyleIDs[] = {
|
||||
eCSSProperty_border_top_style,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_bottom_style,
|
||||
eCSSProperty_border_left_style_value
|
||||
eCSSProperty_border_left_style
|
||||
};
|
||||
static const nsCSSProperty kBorderWidthIDs[] = {
|
||||
eCSSProperty_border_top_width,
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_bottom_width,
|
||||
eCSSProperty_border_left_width_value
|
||||
eCSSProperty_border_left_width
|
||||
};
|
||||
static const nsCSSProperty kBorderColorIDs[] = {
|
||||
eCSSProperty_border_top_color,
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_color,
|
||||
eCSSProperty_border_bottom_color,
|
||||
eCSSProperty_border_left_color_value
|
||||
eCSSProperty_border_left_color
|
||||
};
|
||||
static const nsCSSProperty kBorderRadiusIDs[] = {
|
||||
eCSSProperty_border_top_left_radius,
|
||||
@ -9738,17 +9726,13 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
|
||||
case eCSSProperty_border_bottom:
|
||||
return ParseBorderSide(kBorderBottomIDs, false);
|
||||
case eCSSProperty_border_end:
|
||||
return ParseDirectionalBorderSide(kBorderEndIDs,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_left:
|
||||
return ParseDirectionalBorderSide(kBorderLeftIDs,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_right:
|
||||
return ParseDirectionalBorderSide(kBorderRightIDs,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
return ParseBorderSide(kBorderEndIDs, false);
|
||||
case eCSSProperty_border_start:
|
||||
return ParseDirectionalBorderSide(kBorderStartIDs,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
return ParseBorderSide(kBorderStartIDs, false);
|
||||
case eCSSProperty_border_left:
|
||||
return ParseBorderSide(kBorderLeftIDs, false);
|
||||
case eCSSProperty_border_right:
|
||||
return ParseBorderSide(kBorderRightIDs, false);
|
||||
case eCSSProperty_border_top:
|
||||
return ParseBorderSide(kBorderTopIDs, false);
|
||||
case eCSSProperty_border_bottom_colors:
|
||||
@ -9768,42 +9752,6 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
|
||||
return ParseBorderImage();
|
||||
case eCSSProperty_border_width:
|
||||
return ParseBorderWidth();
|
||||
case eCSSProperty_border_end_color:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_end_color,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_left_color:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_left_color,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_right_color:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_right_color,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_start_color:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_start_color,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_end_width:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_end_width,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_left_width:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_left_width,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_right_width:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_right_width,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_start_width:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_start_width,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_end_style:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_end_style,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_left_style:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_left_style,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_right_style:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_right_style,
|
||||
NS_BOXPROP_SOURCE_PHYSICAL);
|
||||
case eCSSProperty_border_start_style:
|
||||
return ParseDirectionalBoxProperty(eCSSProperty_border_start_style,
|
||||
NS_BOXPROP_SOURCE_LOGICAL);
|
||||
case eCSSProperty_border_radius:
|
||||
return ParseBoxCornerRadii(kBorderRadiusIDs);
|
||||
case eCSSProperty__moz_outline_radius:
|
||||
@ -10848,16 +10796,6 @@ bool CSSParserImpl::ParseBackgroundSizeValues(nsCSSValuePair &aOut)
|
||||
bool
|
||||
CSSParserImpl::ParseBorderColor()
|
||||
{
|
||||
static const nsCSSProperty kBorderColorSources[] = {
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
// do this now, in case 4 values weren't specified
|
||||
InitBoxPropsAsPhysical(kBorderColorSources);
|
||||
return ParseBoxProperties(kBorderColorIDs);
|
||||
}
|
||||
|
||||
@ -11164,24 +11102,6 @@ CSSParserImpl::ParseBorderSide(const nsCSSProperty aPropIDs[],
|
||||
}
|
||||
|
||||
if (aSetAllSides) {
|
||||
static const nsCSSProperty kBorderSources[] = {
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
InitBoxPropsAsPhysical(kBorderSources);
|
||||
|
||||
// Parsing "border" shorthand; set all four sides to the same thing
|
||||
for (int32_t index = 0; index < 4; index++) {
|
||||
NS_ASSERTION(numProps == 3, "This code needs updating");
|
||||
@ -11267,32 +11187,12 @@ CSSParserImpl::ParseDirectionalBorderSide(const nsCSSProperty aPropIDs[],
|
||||
bool
|
||||
CSSParserImpl::ParseBorderStyle()
|
||||
{
|
||||
static const nsCSSProperty kBorderStyleSources[] = {
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
// do this now, in case 4 values weren't specified
|
||||
InitBoxPropsAsPhysical(kBorderStyleSources);
|
||||
return ParseBoxProperties(kBorderStyleIDs);
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseBorderWidth()
|
||||
{
|
||||
static const nsCSSProperty kBorderWidthSources[] = {
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
// do this now, in case 4 values weren't specified
|
||||
InitBoxPropsAsPhysical(kBorderWidthSources);
|
||||
return ParseBoxProperties(kBorderWidthIDs);
|
||||
}
|
||||
|
||||
|
@ -155,3 +155,35 @@ CSS_PROP_ALIAS(margin-inline-start,
|
||||
margin_start,
|
||||
MarginInlineStart,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-end,
|
||||
border_end,
|
||||
BorderInlineEnd,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-end-color,
|
||||
border_end_color,
|
||||
BorderInlineEndColor,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-end-style,
|
||||
border_end_style,
|
||||
BorderInlineEndStyle,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-end-width,
|
||||
border_end_width,
|
||||
BorderInlineEndWidth,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-start,
|
||||
border_start,
|
||||
BorderInlineStart,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-start-color,
|
||||
border_start_color,
|
||||
BorderInlineStartColor,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-start-style,
|
||||
border_start_style,
|
||||
BorderInlineStartStyle,
|
||||
"layout.css.vertical-text.enabled")
|
||||
CSS_PROP_ALIAS(border-inline-start-width,
|
||||
border_start_width,
|
||||
BorderInlineStartWidth,
|
||||
"layout.css.vertical-text.enabled")
|
||||
|
@ -744,70 +744,6 @@ CSS_PROP_SHORTHAND(
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
|
||||
"")
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-end,
|
||||
border_end,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEnd),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-end-color,
|
||||
border_end_color,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndColor),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-end-color-value,
|
||||
border_end_color_value,
|
||||
BorderEndColorValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HCK, // used only internally
|
||||
kBorderColorKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-end-style,
|
||||
border_end_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndStyle),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-end-style-value,
|
||||
border_end_style_value,
|
||||
BorderEndStyleValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HK, // used only internally
|
||||
kBorderStyleKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-end-width,
|
||||
border_end_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndWidth),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-end-width-value,
|
||||
border_end_width_value,
|
||||
BorderEndWidthValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
border-image,
|
||||
border_image,
|
||||
@ -870,60 +806,119 @@ CSS_PROP_BORDER(
|
||||
kBorderImageRepeatKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-end,
|
||||
border_end,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEnd),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-end-color,
|
||||
border_end_color,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndColor),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HCK,
|
||||
kBorderColorKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-end-style,
|
||||
border_end_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndStyle),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kBorderStyleKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-end-width,
|
||||
border_end_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderEndWidth),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-start,
|
||||
border_start,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStart),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-start-color,
|
||||
border_start_color,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartColor),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HCK,
|
||||
kBorderColorKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-start-style,
|
||||
border_start_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartStyle),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kBorderStyleKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_LOGICAL(
|
||||
-moz-border-start-width,
|
||||
border_start_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartWidth),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_LOGICAL,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
Border,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
border-left,
|
||||
border_left,
|
||||
BorderLeft,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_SHORTHAND(
|
||||
CSS_PROP_BORDER(
|
||||
border-left-color,
|
||||
border_left_color,
|
||||
BorderLeftColor,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-left-color-value,
|
||||
border_left_color_value,
|
||||
BorderLeftColorValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
VARIANT_HCK, // used only internally
|
||||
VARIANT_HCK,
|
||||
kBorderColorKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-color-ltr-source,
|
||||
border_left_color_ltr_source,
|
||||
BorderLeftColorLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-color-rtl-source,
|
||||
border_left_color_rtl_source,
|
||||
BorderLeftColorRTLSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_BORDER(
|
||||
-moz-border-left-colors,
|
||||
border_left_colors,
|
||||
@ -936,151 +931,50 @@ CSS_PROP_BORDER(
|
||||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
CSS_PROP_BORDER(
|
||||
border-left-style,
|
||||
border_left_style,
|
||||
BorderLeftStyle,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"") // on/off will need reflow
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-left-style-value,
|
||||
border_left_style_value,
|
||||
BorderLeftStyleValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HK, // used only internally
|
||||
VARIANT_HK,
|
||||
kBorderStyleKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-style-ltr-source,
|
||||
border_left_style_ltr_source,
|
||||
BorderLeftStyleLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-style-rtl-source,
|
||||
border_left_style_rtl_source,
|
||||
BorderLeftStyleRTLSource,
|
||||
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(
|
||||
border-left-width,
|
||||
border_left_width,
|
||||
BorderLeftWidth,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-left-width-value,
|
||||
border_left_width_value,
|
||||
BorderLeftWidthValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-width-ltr-source,
|
||||
border_left_width_ltr_source,
|
||||
BorderLeftWidthLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-left-width-rtl-source,
|
||||
border_left_width_rtl_source,
|
||||
BorderLeftWidthRTLSource,
|
||||
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(
|
||||
border-right,
|
||||
border_right,
|
||||
BorderRight,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_SHORTHAND(
|
||||
CSS_PROP_BORDER(
|
||||
border-right-color,
|
||||
border_right_color,
|
||||
BorderRightColor,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-right-color-value,
|
||||
border_right_color_value,
|
||||
BorderRightColorValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_HASHLESS_COLOR_QUIRK |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
VARIANT_HCK, // used only internally
|
||||
VARIANT_HCK,
|
||||
kBorderColorKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-color-ltr-source,
|
||||
border_right_color_ltr_source,
|
||||
BorderRightColorLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-color-rtl-source,
|
||||
border_right_color_rtl_source,
|
||||
BorderRightColorRTLSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_BORDER(
|
||||
-moz-border-right-colors,
|
||||
border_right_colors,
|
||||
@ -1093,97 +987,31 @@ CSS_PROP_BORDER(
|
||||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
CSS_PROP_BORDER(
|
||||
border-right-style,
|
||||
border_right_style,
|
||||
BorderRightStyle,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"") // on/off will need reflow
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-right-style-value,
|
||||
border_right_style_value,
|
||||
BorderRightStyleValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HK, // used only internally
|
||||
VARIANT_HK,
|
||||
kBorderStyleKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-style-ltr-source,
|
||||
border_right_style_ltr_source,
|
||||
BorderRightStyleLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-style-rtl-source,
|
||||
border_right_style_rtl_source,
|
||||
BorderRightStyleRTLSource,
|
||||
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(
|
||||
border-right-width,
|
||||
border_right_width,
|
||||
BorderRightWidth,
|
||||
CSS_PROPERTY_PARSE_FUNCTION |
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-right-width-value,
|
||||
border_right_width_value,
|
||||
BorderRightWidthValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_REPORT_OTHER_NAME,
|
||||
CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
|
||||
CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-width-ltr-source,
|
||||
border_right_width_ltr_source,
|
||||
BorderRightWidthLTRSource,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
|
||||
CSS_PROPERTY_DIRECTIONAL_SOURCE,
|
||||
"",
|
||||
0,
|
||||
kBoxPropSourceKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_BORDER(
|
||||
border-right-width-rtl-source,
|
||||
border_right_width_rtl_source,
|
||||
BorderRightWidthRTLSource,
|
||||
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_TABLEBORDER(
|
||||
border-spacing,
|
||||
border_spacing,
|
||||
@ -1196,70 +1024,6 @@ CSS_PROP_TABLEBORDER(
|
||||
nullptr,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-start,
|
||||
border_start,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStart),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-start-color,
|
||||
border_start_color,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartColor),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-start-color-value,
|
||||
border_start_color_value,
|
||||
BorderStartColorValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HCK, // used only internally
|
||||
kBorderColorKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-start-style,
|
||||
border_start_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartStyle),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-start-style-value,
|
||||
border_start_style_value,
|
||||
BorderStartStyleValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HK, // used only internally
|
||||
kBorderStyleKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-border-start-width,
|
||||
border_start_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(BorderStartWidth),
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
||||
CSS_PROP_BORDER(
|
||||
border-start-width-value,
|
||||
border_start_width_value,
|
||||
BorderStartWidthValue,
|
||||
CSS_PROPERTY_PARSE_INACCESSIBLE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
|
||||
"",
|
||||
VARIANT_HKL | VARIANT_CALC,
|
||||
kBorderWidthKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#endif
|
||||
CSS_PROP_SHORTHAND(
|
||||
border-style,
|
||||
border_style,
|
||||
|
@ -561,22 +561,7 @@ nsCSSProps::GetStringValue(nsCSSCounterDesc aCounterDesc)
|
||||
nsCSSProperty
|
||||
nsCSSProps::OtherNameFor(nsCSSProperty aProperty)
|
||||
{
|
||||
switch (aProperty) {
|
||||
case eCSSProperty_border_left_color_value:
|
||||
return eCSSProperty_border_left_color;
|
||||
case eCSSProperty_border_left_style_value:
|
||||
return eCSSProperty_border_left_style;
|
||||
case eCSSProperty_border_left_width_value:
|
||||
return eCSSProperty_border_left_width;
|
||||
case eCSSProperty_border_right_color_value:
|
||||
return eCSSProperty_border_right_color;
|
||||
case eCSSProperty_border_right_style_value:
|
||||
return eCSSProperty_border_right_style;
|
||||
case eCSSProperty_border_right_width_value:
|
||||
return eCSSProperty_border_right_width;
|
||||
default:
|
||||
NS_ABORT_IF_FALSE(false, "bad caller");
|
||||
}
|
||||
NS_ABORT_IF_FALSE(false, "bad caller");
|
||||
return eCSSProperty_UNKNOWN;
|
||||
}
|
||||
|
||||
@ -2267,29 +2252,17 @@ static const nsCSSProperty gBackgroundSubpropTable[] = {
|
||||
|
||||
static const nsCSSProperty gBorderSubpropTable[] = {
|
||||
eCSSProperty_border_top_width,
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_bottom_width,
|
||||
eCSSProperty_border_left_width_value,
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_left_width,
|
||||
eCSSProperty_border_top_style,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_bottom_style,
|
||||
eCSSProperty_border_left_style_value,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_left_style,
|
||||
eCSSProperty_border_top_color,
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_border_right_color,
|
||||
eCSSProperty_border_bottom_color,
|
||||
eCSSProperty_border_left_color_value,
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_left_color,
|
||||
eCSSProperty_border_top_colors,
|
||||
eCSSProperty_border_right_colors,
|
||||
eCSSProperty_border_bottom_colors,
|
||||
@ -2303,7 +2276,7 @@ static const nsCSSProperty gBorderSubpropTable[] = {
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderBottomSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// Declaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_bottom_width,
|
||||
eCSSProperty_border_bottom_style,
|
||||
@ -2318,161 +2291,59 @@ static const nsCSSProperty gBorderColorSubpropTable[] = {
|
||||
// Code relies on these being in top-right-bottom-left order.
|
||||
// Code relies on these matching the NS_SIDE_* constants.
|
||||
eCSSProperty_border_top_color,
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_color,
|
||||
eCSSProperty_border_bottom_color,
|
||||
eCSSProperty_border_left_color_value,
|
||||
// extras:
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderEndColorSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_end_color_value,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderLeftColorSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_left_color_value,
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderRightColorSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderStartColorSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_start_color_value,
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_border_left_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderEndSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp output the subproperties in this order.
|
||||
// Declaration.cpp output the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_end_width_value,
|
||||
eCSSProperty_border_end_style_value,
|
||||
eCSSProperty_border_end_color_value,
|
||||
// extras:
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_end_width,
|
||||
eCSSProperty_border_end_style,
|
||||
eCSSProperty_border_end_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderLeftSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// Declaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_left_width_value,
|
||||
eCSSProperty_border_left_style_value,
|
||||
eCSSProperty_border_left_color_value,
|
||||
// extras:
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_left_color_rtl_source,
|
||||
eCSSProperty_border_left_width,
|
||||
eCSSProperty_border_left_style,
|
||||
eCSSProperty_border_left_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderRightSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// Declaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_color_value,
|
||||
// extras:
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_border_right_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_right_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderStartSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// Declaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_start_width_value,
|
||||
eCSSProperty_border_start_style_value,
|
||||
eCSSProperty_border_start_color_value,
|
||||
// extras:
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_border_left_color_ltr_source,
|
||||
eCSSProperty_border_right_color_rtl_source,
|
||||
eCSSProperty_border_start_width,
|
||||
eCSSProperty_border_start_style,
|
||||
eCSSProperty_border_start_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderStyleSubpropTable[] = {
|
||||
// Code relies on these being in top-right-bottom-left order.
|
||||
eCSSProperty_border_top_style,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_bottom_style,
|
||||
eCSSProperty_border_left_style_value,
|
||||
// extras:
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderLeftStyleSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_left_style_value,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderRightStyleSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderStartStyleSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_start_style_value,
|
||||
eCSSProperty_border_left_style_ltr_source,
|
||||
eCSSProperty_border_right_style_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderEndStyleSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_end_style_value,
|
||||
eCSSProperty_border_right_style_ltr_source,
|
||||
eCSSProperty_border_left_style_rtl_source,
|
||||
eCSSProperty_border_left_style,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderTopSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// Declaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty_border_top_width,
|
||||
eCSSProperty_border_top_style,
|
||||
@ -2483,46 +2354,9 @@ static const nsCSSProperty gBorderTopSubpropTable[] = {
|
||||
static const nsCSSProperty gBorderWidthSubpropTable[] = {
|
||||
// Code relies on these being in top-right-bottom-left order.
|
||||
eCSSProperty_border_top_width,
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_bottom_width,
|
||||
eCSSProperty_border_left_width_value,
|
||||
// extras:
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderLeftWidthSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_left_width_value,
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderRightWidthSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderStartWidthSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_start_width_value,
|
||||
eCSSProperty_border_left_width_ltr_source,
|
||||
eCSSProperty_border_right_width_rtl_source,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gBorderEndWidthSubpropTable[] = {
|
||||
// nsCSSParser::ParseDirectionalBoxProperty depends on this order
|
||||
eCSSProperty_border_end_width_value,
|
||||
eCSSProperty_border_right_width_ltr_source,
|
||||
eCSSProperty_border_left_width_rtl_source,
|
||||
eCSSProperty_border_left_width,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
|
@ -6642,27 +6642,12 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
|
||||
}
|
||||
|
||||
// border-width, border-*-width: length, enum, inherit
|
||||
nsStyleCoord coord;
|
||||
nsCSSRect ourBorderWidth;
|
||||
ourBorderWidth.mTop = *aRuleData->ValueForBorderTopWidth();
|
||||
ourBorderWidth.mRight = *aRuleData->ValueForBorderRightWidthValue();
|
||||
ourBorderWidth.mBottom = *aRuleData->ValueForBorderBottomWidth();
|
||||
ourBorderWidth.mLeft = *aRuleData->ValueForBorderLeftWidthValue();
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderLeftWidthLTRSource(),
|
||||
*aRuleData->ValueForBorderLeftWidthRTLSource(),
|
||||
*aRuleData->ValueForBorderStartWidthValue(),
|
||||
*aRuleData->ValueForBorderEndWidthValue(),
|
||||
NS_SIDE_LEFT, ourBorderWidth, canStoreInRuleTree);
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderRightWidthLTRSource(),
|
||||
*aRuleData->ValueForBorderRightWidthRTLSource(),
|
||||
*aRuleData->ValueForBorderEndWidthValue(),
|
||||
*aRuleData->ValueForBorderStartWidthValue(),
|
||||
NS_SIDE_RIGHT, ourBorderWidth, canStoreInRuleTree);
|
||||
{ // scope for compilers with broken |for| loop scoping
|
||||
nsStyleCoord coord;
|
||||
{
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_width);
|
||||
NS_FOR_CSS_SIDES(side) {
|
||||
const nsCSSValue &value = ourBorderWidth.*(nsCSSRect::sides[side]);
|
||||
const nsCSSValue& value = *aRuleData->ValueFor(subprops[side]);
|
||||
NS_ASSERTION(eCSSUnit_Percent != value.GetUnit(),
|
||||
"Percentage borders not implemented yet "
|
||||
"If implementing, make sure to fix all consumers of "
|
||||
@ -6705,26 +6690,11 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
|
||||
}
|
||||
|
||||
// border-style, border-*-style: enum, inherit
|
||||
nsCSSRect ourBorderStyle;
|
||||
ourBorderStyle.mTop = *aRuleData->ValueForBorderTopStyle();
|
||||
ourBorderStyle.mRight = *aRuleData->ValueForBorderRightStyleValue();
|
||||
ourBorderStyle.mBottom = *aRuleData->ValueForBorderBottomStyle();
|
||||
ourBorderStyle.mLeft = *aRuleData->ValueForBorderLeftStyleValue();
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderLeftStyleLTRSource(),
|
||||
*aRuleData->ValueForBorderLeftStyleRTLSource(),
|
||||
*aRuleData->ValueForBorderStartStyleValue(),
|
||||
*aRuleData->ValueForBorderEndStyleValue(),
|
||||
NS_SIDE_LEFT, ourBorderStyle, canStoreInRuleTree);
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderRightStyleLTRSource(),
|
||||
*aRuleData->ValueForBorderRightStyleRTLSource(),
|
||||
*aRuleData->ValueForBorderEndStyleValue(),
|
||||
*aRuleData->ValueForBorderStartStyleValue(),
|
||||
NS_SIDE_RIGHT, ourBorderStyle, canStoreInRuleTree);
|
||||
{ // scope for compilers with broken |for| loop scoping
|
||||
{
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_style);
|
||||
NS_FOR_CSS_SIDES(side) {
|
||||
const nsCSSValue &value = ourBorderStyle.*(nsCSSRect::sides[side]);
|
||||
const nsCSSValue& value = *aRuleData->ValueFor(subprops[side]);
|
||||
nsCSSUnit unit = value.GetUnit();
|
||||
NS_ABORT_IF_FALSE(eCSSUnit_None != unit,
|
||||
"'none' should be handled as enumerated value");
|
||||
@ -6804,27 +6774,12 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
|
||||
}
|
||||
|
||||
// border-color, border-*-color: color, string, enum, inherit
|
||||
bool foreground;
|
||||
nsCSSRect ourBorderColor;
|
||||
ourBorderColor.mTop = *aRuleData->ValueForBorderTopColor();
|
||||
ourBorderColor.mRight = *aRuleData->ValueForBorderRightColorValue();
|
||||
ourBorderColor.mBottom = *aRuleData->ValueForBorderBottomColor();
|
||||
ourBorderColor.mLeft = *aRuleData->ValueForBorderLeftColorValue();
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderLeftColorLTRSource(),
|
||||
*aRuleData->ValueForBorderLeftColorRTLSource(),
|
||||
*aRuleData->ValueForBorderStartColorValue(),
|
||||
*aRuleData->ValueForBorderEndColorValue(),
|
||||
NS_SIDE_LEFT, ourBorderColor, canStoreInRuleTree);
|
||||
AdjustLogicalBoxProp(aContext,
|
||||
*aRuleData->ValueForBorderRightColorLTRSource(),
|
||||
*aRuleData->ValueForBorderRightColorRTLSource(),
|
||||
*aRuleData->ValueForBorderEndColorValue(),
|
||||
*aRuleData->ValueForBorderStartColorValue(),
|
||||
NS_SIDE_RIGHT, ourBorderColor, canStoreInRuleTree);
|
||||
{ // scope for compilers with broken |for| loop scoping
|
||||
{
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_color);
|
||||
bool foreground;
|
||||
NS_FOR_CSS_SIDES(side) {
|
||||
const nsCSSValue &value = ourBorderColor.*(nsCSSRect::sides[side]);
|
||||
const nsCSSValue& value = *aRuleData->ValueFor(subprops[side]);
|
||||
if (eCSSUnit_Inherit == value.GetUnit()) {
|
||||
canStoreInRuleTree = false;
|
||||
if (parentContext) {
|
||||
@ -9456,21 +9411,15 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
|
||||
eCSSProperty_border_top_color,
|
||||
eCSSProperty_border_top_style,
|
||||
eCSSProperty_border_top_width,
|
||||
eCSSProperty_border_right_color_value,
|
||||
eCSSProperty_border_right_style_value,
|
||||
eCSSProperty_border_right_width_value,
|
||||
eCSSProperty_border_right_color,
|
||||
eCSSProperty_border_right_style,
|
||||
eCSSProperty_border_right_width,
|
||||
eCSSProperty_border_bottom_color,
|
||||
eCSSProperty_border_bottom_style,
|
||||
eCSSProperty_border_bottom_width,
|
||||
eCSSProperty_border_left_color_value,
|
||||
eCSSProperty_border_left_style_value,
|
||||
eCSSProperty_border_left_width_value,
|
||||
eCSSProperty_border_start_color_value,
|
||||
eCSSProperty_border_start_style_value,
|
||||
eCSSProperty_border_start_width_value,
|
||||
eCSSProperty_border_end_color_value,
|
||||
eCSSProperty_border_end_style_value,
|
||||
eCSSProperty_border_end_width_value,
|
||||
eCSSProperty_border_left_color,
|
||||
eCSSProperty_border_left_style,
|
||||
eCSSProperty_border_left_width,
|
||||
eCSSProperty_border_top_left_radius,
|
||||
eCSSProperty_border_top_right_radius,
|
||||
eCSSProperty_border_bottom_right_radius,
|
||||
|
@ -1030,9 +1030,9 @@ nsStyleContext::GetVisitedDependentColor(nsCSSProperty aProperty)
|
||||
NS_ASSERTION(aProperty == eCSSProperty_color ||
|
||||
aProperty == eCSSProperty_background_color ||
|
||||
aProperty == eCSSProperty_border_top_color ||
|
||||
aProperty == eCSSProperty_border_right_color_value ||
|
||||
aProperty == eCSSProperty_border_right_color ||
|
||||
aProperty == eCSSProperty_border_bottom_color ||
|
||||
aProperty == eCSSProperty_border_left_color_value ||
|
||||
aProperty == eCSSProperty_border_left_color ||
|
||||
aProperty == eCSSProperty_outline_color ||
|
||||
aProperty == eCSSProperty__moz_column_rule_color ||
|
||||
aProperty == eCSSProperty_text_decoration_color ||
|
||||
|
@ -108,30 +108,6 @@ const char *gInaccessibleProperties[] = {
|
||||
"-x-span",
|
||||
"-x-system-font",
|
||||
"-x-text-zoom",
|
||||
"border-end-color-value",
|
||||
"border-end-style-value",
|
||||
"border-end-width-value",
|
||||
"border-left-color-value",
|
||||
"border-left-color-ltr-source",
|
||||
"border-left-color-rtl-source",
|
||||
"border-left-style-value",
|
||||
"border-left-style-ltr-source",
|
||||
"border-left-style-rtl-source",
|
||||
"border-left-width-value",
|
||||
"border-left-width-ltr-source",
|
||||
"border-left-width-rtl-source",
|
||||
"border-right-color-value",
|
||||
"border-right-color-ltr-source",
|
||||
"border-right-color-rtl-source",
|
||||
"border-right-style-value",
|
||||
"border-right-style-ltr-source",
|
||||
"border-right-style-rtl-source",
|
||||
"border-right-width-value",
|
||||
"border-right-width-ltr-source",
|
||||
"border-right-width-rtl-source",
|
||||
"border-start-color-value",
|
||||
"border-start-style-value",
|
||||
"border-start-width-value",
|
||||
"-moz-control-character-visibility",
|
||||
"-moz-script-level", // parsed by UA sheets only
|
||||
"-moz-script-size-multiplier",
|
||||
|
@ -697,7 +697,8 @@ var gCSSProperties = {
|
||||
"-moz-border-end-color": {
|
||||
domProp: "MozBorderEndColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
initial_values: [ "currentColor" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
@ -706,7 +707,8 @@ var gCSSProperties = {
|
||||
"-moz-border-end-style": {
|
||||
domProp: "MozBorderEndStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
@ -716,7 +718,8 @@ var gCSSProperties = {
|
||||
"-moz-border-end-width": {
|
||||
domProp: "MozBorderEndWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
prerequisites: { "-moz-border-end-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
@ -940,7 +943,8 @@ var gCSSProperties = {
|
||||
"-moz-border-start-color": {
|
||||
domProp: "MozBorderStartColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
initial_values: [ "currentColor" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
@ -949,7 +953,8 @@ var gCSSProperties = {
|
||||
"-moz-border-start-style": {
|
||||
domProp: "MozBorderStartStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
@ -959,7 +964,8 @@ var gCSSProperties = {
|
||||
"-moz-border-start-width": {
|
||||
domProp: "MozBorderStartWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
logical: true,
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
prerequisites: { "-moz-border-start-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
@ -2144,7 +2150,7 @@ var gCSSProperties = {
|
||||
"border-left-color": {
|
||||
domProp: "borderLeftColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "color": "black" },
|
||||
initial_values: [ "currentColor", "-moz-use-text-color" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
@ -2154,7 +2160,7 @@ var gCSSProperties = {
|
||||
"border-left-style": {
|
||||
domProp: "borderLeftStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
|
||||
@ -2163,7 +2169,7 @@ var gCSSProperties = {
|
||||
"border-left-width": {
|
||||
domProp: "borderLeftWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "border-left-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
other_values: [ "thin", "thick", "1px", "2em",
|
||||
@ -2191,7 +2197,7 @@ var gCSSProperties = {
|
||||
"border-right-color": {
|
||||
domProp: "borderRightColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "color": "black" },
|
||||
initial_values: [ "currentColor", "-moz-use-text-color" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
@ -2201,7 +2207,7 @@ var gCSSProperties = {
|
||||
"border-right-style": {
|
||||
domProp: "borderRightStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
|
||||
@ -2210,7 +2216,7 @@ var gCSSProperties = {
|
||||
"border-right-width": {
|
||||
domProp: "borderRightWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "border-right-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
other_values: [ "thin", "thick", "1px", "2em",
|
||||
@ -4628,6 +4634,108 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
|
||||
"digits 12", "none 3", "digits 3.1415", "digits3", "digits 1",
|
||||
"digits 3 all", "digits foo", "digits all", "digits 3.0" ]
|
||||
},
|
||||
"border-inline-end": {
|
||||
domProp: "borderInlineEnd",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_TRUE_SHORTHAND,
|
||||
alias_for: "-moz-border-end",
|
||||
subproperties: [ "border-inline-end-color", "border-inline-end-style", "border-inline-end-width" ],
|
||||
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
|
||||
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
|
||||
invalid_values: [ "5%", "5", "5 green none" ]
|
||||
},
|
||||
"border-inline-end-color": {
|
||||
domProp: "borderInlineEndColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-end-color",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
initial_values: [ "currentColor" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
|
||||
},
|
||||
"border-inline-end-style": {
|
||||
domProp: "borderInlineEndStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-end-style",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"border-inline-end-width": {
|
||||
domProp: "borderInlineEndWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-end-width",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
prerequisites: { "border-inline-end-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
other_values: [ "thin", "thick", "1px", "2em",
|
||||
"calc(2px)",
|
||||
"calc(-2px)",
|
||||
"calc(0em)",
|
||||
"calc(0px)",
|
||||
"calc(5em)",
|
||||
"calc(3*25px)",
|
||||
"calc(25px*3)",
|
||||
"calc(3*25px + 5em)",
|
||||
],
|
||||
invalid_values: [ "5%", "5" ]
|
||||
},
|
||||
"border-inline-start": {
|
||||
domProp: "borderInlineStart",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_TRUE_SHORTHAND,
|
||||
alias_for: "-moz-border-start",
|
||||
subproperties: [ "border-inline-start-color", "border-inline-start-style", "border-inline-start-width" ],
|
||||
initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
|
||||
other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
|
||||
invalid_values: [ "5%", "5", "5 green solid" ]
|
||||
},
|
||||
"border-inline-start-color": {
|
||||
domProp: "borderInlineStartColor",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-start-color",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
initial_values: [ "currentColor" ],
|
||||
other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
|
||||
invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
|
||||
},
|
||||
"border-inline-start-style": {
|
||||
domProp: "borderInlineStartStyle",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-start-style",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
/* XXX hidden is sometimes the same as initial */
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"border-inline-start-width": {
|
||||
domProp: "borderInlineStartWidth",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
|
||||
alias_for: "-moz-border-start-width",
|
||||
get_computed: logical_box_prop_get_computed,
|
||||
prerequisites: { "border-inline-start-style": "solid" },
|
||||
initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
|
||||
other_values: [ "thin", "thick", "1px", "2em",
|
||||
"calc(2px)",
|
||||
"calc(-2px)",
|
||||
"calc(0em)",
|
||||
"calc(0px)",
|
||||
"calc(5em)",
|
||||
"calc(3*25px)",
|
||||
"calc(25px*3)",
|
||||
"calc(3*25px + 5em)",
|
||||
],
|
||||
invalid_values: [ "5%", "5" ]
|
||||
},
|
||||
"margin-inline-end": {
|
||||
domProp: "marginInlineEnd",
|
||||
inherited: false,
|
||||
|
Loading…
Reference in New Issue
Block a user