Bug 1453472 - Add support for logical versions of overscroll-behavior. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D57363

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sean Voisen 2019-12-17 11:27:41 +00:00
Родитель e3b31c2c02
Коммит 0e463d054a
9 изменённых файлов: 74 добавлений и 70 удалений

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

@ -117,6 +117,8 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"overflow-wrap",
"overflow-x",
"overflow-y",
"overscroll-behavior-inline",
"overscroll-behavior-block",
"overscroll-behavior-x",
"overscroll-behavior-y",
"break-after",

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

@ -2995,6 +2995,8 @@ exports.CSS_PROPERTIES = {
"border-end-end-radius",
"overflow-inline",
"overflow-block",
"overscroll-behavior-inline",
"overscroll-behavior-block",
"margin-block-start",
"margin-block-end",
"margin-inline-start",
@ -8650,6 +8652,38 @@ exports.CSS_PROPERTIES = {
"unset"
]
},
"overscroll-behavior-block": {
"isInherited": false,
"subproperties": [
"overscroll-behavior-block"
],
"supports": [],
"values": [
"auto",
"contain",
"inherit",
"initial",
"none",
"revert",
"unset"
]
},
"overscroll-behavior-inline": {
"isInherited": false,
"subproperties": [
"overscroll-behavior-inline"
],
"supports": [],
"values": [
"auto",
"contain",
"inherit",
"initial",
"none",
"revert",
"unset"
]
},
"overscroll-behavior-x": {
"isInherited": false,
"subproperties": [
@ -10907,14 +10941,6 @@ exports.PREFERENCES = [
"overflow-clip-box-inline",
"layout.css.overflow-clip-box.enabled"
],
[
"overscroll-behavior-x",
"layout.css.overscroll-behavior.enabled"
],
[
"overscroll-behavior-y",
"layout.css.overscroll-behavior.enabled"
],
[
"overflow-block",
"layout.css.overflow-logical.enabled"
@ -10923,6 +10949,22 @@ exports.PREFERENCES = [
"overflow-inline",
"layout.css.overflow-logical.enabled"
],
[
"overscroll-behavior-block",
"layout.css.overscroll-behavior.enabled"
],
[
"overscroll-behavior-inline",
"layout.css.overscroll-behavior.enabled"
],
[
"overscroll-behavior-x",
"layout.css.overscroll-behavior.enabled"
],
[
"overscroll-behavior-y",
"layout.css.overscroll-behavior.enabled"
],
[
"backdrop-filter",
"layout.css.backdrop-filter.enabled"

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

@ -12447,6 +12447,24 @@ if (IsCSSPropertyPrefEnabled("layout.css.overscroll-behavior.enabled")) {
other_values: ["contain", "none"],
invalid_values: ["left", "1px"],
};
gCSSProperties["overscroll-behavior-inline"] = {
domProp: "overscrollBehaviorInline",
inherited: false,
logical: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["auto"],
other_values: ["contain", "none"],
invalid_values: ["left", "1px"],
};
gCSSProperties["overscroll-behavior-block"] = {
domProp: "overscrollBehaviorBlock",
inherited: false,
logical: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["auto"],
other_values: ["contain", "none"],
invalid_values: ["left", "1px"],
};
gCSSProperties["overscroll-behavior"] = {
domProp: "overscrollBehavior",
inherited: false,

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

@ -473,13 +473,15 @@ ${helpers.predefined_type(
animation_value_type="discrete",
)}
% for axis in ["x", "y"]:
% for (axis, logical) in ALL_AXES:
${helpers.predefined_type(
"overscroll-behavior-" + axis,
"OverscrollBehavior",
"computed::OverscrollBehavior::Auto",
engines="gecko",
needs_context=False,
logical_group="overscroll-behavior",
logical=logical,
gecko_pref="layout.css.overscroll-behavior.enabled",
spec="https://wicg.github.io/overscroll-behavior/#overscroll-behavior-properties",
animation_value_type="discrete",

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

@ -1 +1,2 @@
leak-threshold: [tab:51200]
prefs: [layout.css.overscroll-behavior.enabled:true]

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

@ -1,13 +0,0 @@
[inheritance.html]
[Property overscroll-behavior-inline does not inherit]
expected: FAIL
[Property overscroll-behavior-block does not inherit]
expected: FAIL
[Property overscroll-behavior-block has initial value auto]
expected: FAIL
[Property overscroll-behavior-inline has initial value auto]
expected: FAIL

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

@ -1,10 +0,0 @@
[overscroll-behavior-logical.html]
[Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction]
expected: FAIL
[Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode]
expected: FAIL
[Logical overscroll-behavior maps correctly when element has vertical-rl writing mode]
expected: FAIL

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

@ -1,19 +0,0 @@
[overscroll-behavior-computed.html]
[Property overscroll-behavior-inline value 'none']
expected: FAIL
[Property overscroll-behavior-block value 'auto']
expected: FAIL
[Property overscroll-behavior-block value 'contain']
expected: FAIL
[Property overscroll-behavior-block value 'none']
expected: FAIL
[Property overscroll-behavior-inline value 'contain']
expected: FAIL
[Property overscroll-behavior-inline value 'auto']
expected: FAIL

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

@ -1,19 +0,0 @@
[overscroll-behavior-valid.html]
[e.style['overscroll-behavior-block'\] = "auto" should set the property value]
expected: FAIL
[e.style['overscroll-behavior-block'\] = "none" should set the property value]
expected: FAIL
[e.style['overscroll-behavior-inline'\] = "none" should set the property value]
expected: FAIL
[e.style['overscroll-behavior-inline'\] = "auto" should set the property value]
expected: FAIL
[e.style['overscroll-behavior-inline'\] = "contain" should set the property value]
expected: FAIL
[e.style['overscroll-behavior-block'\] = "contain" should set the property value]
expected: FAIL