mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #2857 - Implement inset-block and inset-inline CSS shorthand (5a832a6e)
This commit is contained in:
@@ -6994,6 +6994,26 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"inset-block": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"inset-block-start",
|
||||
"inset-block-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"auto",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"revert",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"inset-block-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
@@ -7032,6 +7052,26 @@ exports.CSS_PROPERTIES = {
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"inset-inline": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
"inset-inline-start",
|
||||
"inset-inline-end"
|
||||
],
|
||||
"supports": [
|
||||
6,
|
||||
8
|
||||
],
|
||||
"values": [
|
||||
"-moz-calc",
|
||||
"auto",
|
||||
"calc",
|
||||
"inherit",
|
||||
"initial",
|
||||
"revert",
|
||||
"unset"
|
||||
]
|
||||
},
|
||||
"inset-inline-end": {
|
||||
"isInherited": false,
|
||||
"subproperties": [
|
||||
|
||||
@@ -1559,6 +1559,8 @@ Declaration::GetPropertyValueInternal(
|
||||
}
|
||||
MOZ_FALLTHROUGH;
|
||||
}
|
||||
case eCSSProperty_inset_block:
|
||||
case eCSSProperty_inset_inline:
|
||||
case eCSSProperty_margin_block:
|
||||
case eCSSProperty_margin_inline:
|
||||
case eCSSProperty_padding_block:
|
||||
|
||||
@@ -1077,6 +1077,8 @@ protected:
|
||||
bool ParseFontSrcFormat(InfallibleTArray<nsCSSValue>& values);
|
||||
bool ParseFontRanges(nsCSSValue& aValue);
|
||||
bool ParseInset();
|
||||
bool ParseInsetBlock();
|
||||
bool ParseInsetInline();
|
||||
bool ParseListStyle();
|
||||
bool ParseListStyleType(nsCSSValue& aValue);
|
||||
bool ParseMargin();
|
||||
@@ -12673,6 +12675,10 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSPropertyID aPropID)
|
||||
return ParseJustifyItems();
|
||||
case eCSSProperty_inset:
|
||||
return ParseInset();
|
||||
case eCSSProperty_inset_block:
|
||||
return ParseInsetBlock();
|
||||
case eCSSProperty_inset_inline:
|
||||
return ParseInsetInline();
|
||||
case eCSSProperty_list_style:
|
||||
return ParseListStyle();
|
||||
case eCSSProperty_margin:
|
||||
@@ -16202,6 +16208,24 @@ CSSParserImpl::ParseInset()
|
||||
return ParseBoxProperties(kInsetSideIDs);
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseInsetBlock()
|
||||
{
|
||||
return ParseBoxPairProperties(VARIANT_AUTO | VARIANT_INHERIT,
|
||||
VARIANT_AUTO | VARIANT_LPCALC,
|
||||
eCSSProperty_inset_block_start,
|
||||
eCSSProperty_inset_block_end);
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseInsetInline()
|
||||
{
|
||||
return ParseBoxPairProperties(VARIANT_AUTO | VARIANT_INHERIT,
|
||||
VARIANT_AUTO | VARIANT_LPCALC,
|
||||
eCSSProperty_inset_inline_start,
|
||||
eCSSProperty_inset_inline_end);
|
||||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseListStyleType(nsCSSValue& aValue)
|
||||
{
|
||||
|
||||
@@ -2999,6 +2999,12 @@ CSS_PROP_POSITION(
|
||||
kImageLayerPositionKTable,
|
||||
offsetof(nsStylePosition, mObjectPosition),
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_SHORTHAND(
|
||||
inset-block,
|
||||
inset_block,
|
||||
InsetBlock,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_LOGICAL(
|
||||
inset-block-end,
|
||||
inset_block_end,
|
||||
@@ -3032,6 +3038,12 @@ CSS_PROP_LOGICAL(
|
||||
Position,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_SHORTHAND(
|
||||
inset-inline,
|
||||
inset_inline,
|
||||
InsetInline,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_LOGICAL(
|
||||
inset-inline-end,
|
||||
inset_inline_end,
|
||||
|
||||
@@ -2866,6 +2866,18 @@ static const nsCSSPropertyID gInsetSubpropTable[] = {
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSPropertyID gInsetBlockSubpropTable[] = {
|
||||
eCSSProperty_inset_block_start,
|
||||
eCSSProperty_inset_block_end,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSPropertyID gInsetInlineSubpropTable[] = {
|
||||
eCSSProperty_inset_inline_start,
|
||||
eCSSProperty_inset_inline_end,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSPropertyID gListStyleSubpropTable[] = {
|
||||
eCSSProperty_list_style_type,
|
||||
eCSSProperty_list_style_image,
|
||||
|
||||
Reference in New Issue
Block a user