Bug 1520229 - [css-logical] Implement the inset shorthand. r=mats

Reviewers: mats

Reviewed By: mats

Bug #: 1520229

Differential Revision: https://phabricator.services.mozilla.com/D16704
This commit is contained in:
Emilio Cobos Álvarez 2019-01-20 16:48:19 +01:00
Родитель 330daedbea
Коммит d3c8dea1ae
4 изменённых файлов: 40 добавлений и 31 удалений

Просмотреть файл

@ -6697,6 +6697,22 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"inset": {
"isInherited": false,
"subproperties": [
"top",
"right",
"bottom",
"left"
],
"supports": [],
"values": [
"auto",
"inherit",
"initial",
"unset"
]
},
"inset-block": {
"isInherited": false,
"subproperties": [

Просмотреть файл

@ -6564,6 +6564,18 @@ var gCSSProperties = {
],
invalid_values: [ "none", "5" ]
},
"inset": {
domProp: "inset",
inherited: false,
type: CSS_TYPE_TRUE_SHORTHAND,
subproperties: [ "top", "right", "bottom", "left" ],
/* FIXME: run tests with multiple prerequisites */
prerequisites: { "position": "relative" },
initial_values: [ "auto" ],
other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px", "1em calc(2em + 3px) 4ex 5cm" ],
invalid_values: [ "1px calc(nonsense)", "1px red", "3" ],
unbalanced_values: [ "1px calc(" ],
},
"inset-block": {
domProp: "insetBlock",
inherited: false,

Просмотреть файл

@ -763,6 +763,15 @@
}
</%helpers:shorthand>
// See https://github.com/w3c/csswg-drafts/issues/3525 for the quirks stuff.
${helpers.four_sides_shorthand(
"inset",
"%s",
"specified::LengthPercentageOrAuto::parse",
spec="https://drafts.csswg.org/css-logical/#propdef-inset",
allow_quirks=False,
)}
% for axis in ["block", "inline"]:
<%
spec = "https://drafts.csswg.org/css-logical/#propdef-inset-%s" % axis

Просмотреть файл

@ -1,40 +1,12 @@
[logical-box-inset.html]
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: ltr; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: rtl; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: rtl; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: rtl; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: ltr; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: ltr; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: rtl; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: ltr; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: ltr; '.]
expected: FAIL
[Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: rtl; '.]
expected: FAIL
[Test that inset shorthand sets longhands and serializes correctly.]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=137688
[Test that inset-inline shorthand sets longhands and serializes correctly.]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=137688
[Test that inset-block shorthand sets longhands and serializes correctly.]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=137688