зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1907179 - Repalce horizontal/vertical with x/y for ScrollAxis. r=layout-reviewers,firefox-style-system-reviewers,emilio
Per spec, we should use `x`/`y` to match `scroll-snap-type` and `overflow`. Differential Revision: https://phabricator.services.mozilla.com/D216233
This commit is contained in:
Родитель
5058f79ee4
Коммит
0a235ee708
|
@ -156,7 +156,7 @@ layers::ScrollDirection ScrollTimeline::Axis() const {
|
|||
MOZ_ASSERT(mSource && mSource.mElement->GetPrimaryFrame());
|
||||
|
||||
const WritingMode wm = mSource.mElement->GetPrimaryFrame()->GetWritingMode();
|
||||
return mAxis == StyleScrollAxis::Horizontal ||
|
||||
return mAxis == StyleScrollAxis::X ||
|
||||
(!wm.IsVertical() && mAxis == StyleScrollAxis::Inline) ||
|
||||
(wm.IsVertical() && mAxis == StyleScrollAxis::Block)
|
||||
? layers::ScrollDirection::eHorizontal
|
||||
|
|
|
@ -140,10 +140,9 @@ ScrollTimeline::ScrollOffsets ViewTimeline::ComputeInsets(
|
|||
aScrollContainerFrame->GetScrolledFrame()->GetWritingMode();
|
||||
const auto& scrollPadding =
|
||||
LogicalMargin(wm, aScrollContainerFrame->GetScrollPadding());
|
||||
const bool isBlockAxis =
|
||||
mAxis == StyleScrollAxis::Block ||
|
||||
(mAxis == StyleScrollAxis::Horizontal && wm.IsVertical()) ||
|
||||
(mAxis == StyleScrollAxis::Vertical && !wm.IsVertical());
|
||||
const bool isBlockAxis = mAxis == StyleScrollAxis::Block ||
|
||||
(mAxis == StyleScrollAxis::X && wm.IsVertical()) ||
|
||||
(mAxis == StyleScrollAxis::Y && !wm.IsVertical());
|
||||
|
||||
// The percentages of view-timelne-inset is relative to the corresponding
|
||||
// dimension of the relevant scrollport.
|
||||
|
|
|
@ -92,7 +92,7 @@ waitUntilApzStable().then(() => {
|
|||
// transform property with scroll-driven animations. The writing mode is from
|
||||
// right to left, so we have to use the negative scroll offset.
|
||||
addAsyncAnimTest(async function() {
|
||||
new_div("animation: transform_anim 1s linear scroll(horizontal root);");
|
||||
new_div("animation: transform_anim 1s linear scroll(x root);");
|
||||
await waitForPaintsFlushed();
|
||||
|
||||
const root = document.scrollingElement;
|
||||
|
|
|
@ -14008,20 +14008,20 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
|
|||
"scroll()",
|
||||
"scroll(block)",
|
||||
"scroll(inline)",
|
||||
"scroll(horizontal)",
|
||||
"scroll(vertical)",
|
||||
"scroll(x)",
|
||||
"scroll(y)",
|
||||
"scroll(root)",
|
||||
"scroll(nearest)",
|
||||
"scroll(inline nearest)",
|
||||
"scroll(vertical root)",
|
||||
"scroll(root horizontal)",
|
||||
"scroll(y root)",
|
||||
"scroll(root x)",
|
||||
"view()",
|
||||
"view(inline)",
|
||||
"view(auto)",
|
||||
"view(auto 1px)",
|
||||
"view(inline auto)",
|
||||
"view(vertical auto auto)",
|
||||
"view(horizontal 1px 1%)",
|
||||
"view(y auto auto)",
|
||||
"view(x 1px 1%)",
|
||||
"view(1px 1% block)",
|
||||
],
|
||||
invalid_values: [
|
||||
|
@ -14062,8 +14062,8 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
|
|||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["block"],
|
||||
other_values: ["inline", "vertical", "horizontal"],
|
||||
invalid_values: ["auto", "none", "abc"],
|
||||
other_values: ["inline", "x", "y"],
|
||||
invalid_values: ["auto", "none", "abc", "horizontal"],
|
||||
};
|
||||
|
||||
gCSSProperties["scroll-timeline"] = {
|
||||
|
@ -14075,15 +14075,15 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
|
|||
other_values: [
|
||||
"auto inline",
|
||||
"bounce inline",
|
||||
"bounce vertical",
|
||||
"bounce y",
|
||||
"\\32bounce inline",
|
||||
"-bounce block",
|
||||
"\\32 0bounce vertical",
|
||||
"-\\32 0bounce horizontal",
|
||||
"\\32 0bounce y",
|
||||
"-\\32 0bounce x",
|
||||
"a, b, c",
|
||||
"a block, b inline, c vertical",
|
||||
"a block, b inline, c y",
|
||||
],
|
||||
invalid_values: ["", "bounce bounce", "horizontal a", "block abc"],
|
||||
invalid_values: ["", "bounce bounce", "x a", "block abc"],
|
||||
};
|
||||
|
||||
gCSSProperties["view-timeline-name"] = {
|
||||
|
@ -14116,8 +14116,8 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
|
|||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["block"],
|
||||
other_values: ["inline", "vertical", "horizontal", "inline, block"],
|
||||
invalid_values: ["auto", "none", "abc", "inline block"],
|
||||
other_values: ["inline", "x", "y", "inline, block"],
|
||||
invalid_values: ["auto", "none", "abc", "inline block", "vertical"],
|
||||
};
|
||||
|
||||
gCSSProperties["view-timeline-inset"] = {
|
||||
|
@ -14138,15 +14138,15 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
|
|||
other_values: [
|
||||
"auto inline",
|
||||
"bounce inline",
|
||||
"bounce vertical",
|
||||
"bounce y",
|
||||
"\\32bounce inline",
|
||||
"-bounce block",
|
||||
"\\32 0bounce vertical",
|
||||
"-\\32 0bounce horizontal",
|
||||
"\\32 0bounce y",
|
||||
"-\\32 0bounce x",
|
||||
"a, b, c",
|
||||
"a block, b inline, c vertical",
|
||||
"a block, b inline, c y",
|
||||
],
|
||||
invalid_values: ["", ",", "abc abc", "horizontal a", "block abc"],
|
||||
invalid_values: ["", ",", "abc abc", "x a", "block abc"],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -419,10 +419,10 @@ pub enum ScrollAxis {
|
|||
Block = 0,
|
||||
/// The inline axis of the scroll container.
|
||||
Inline = 1,
|
||||
/// The vertical block axis of the scroll container.
|
||||
Vertical = 2,
|
||||
/// The horizontal axis of the scroll container.
|
||||
Horizontal = 3,
|
||||
X = 2,
|
||||
/// The vertical axis of the scroll container.
|
||||
Y = 3,
|
||||
}
|
||||
|
||||
impl ScrollAxis {
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
[animation-timeline-computed.html]
|
||||
[Property animation-timeline value 'scroll(x)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'scroll(y)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'scroll(y root)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(x)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(y)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(y 1px)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(y 1px auto)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(1px y)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(y auto)']
|
||||
expected: FAIL
|
||||
|
||||
[Property animation-timeline value 'view(y auto auto)']
|
||||
expected: FAIL
|
|
@ -13,9 +13,3 @@
|
|||
|
||||
[scroll-timeline-name is not referenceable in animation-timeline on that element's siblings]
|
||||
expected: FAIL
|
||||
|
||||
[scroll-timeline-axis is x]
|
||||
expected: FAIL
|
||||
|
||||
[scroll-timeline-axis is y]
|
||||
expected: FAIL
|
||||
|
|
|
@ -4,42 +4,3 @@
|
|||
|
||||
[e.style['animation-timeline'\] = "test1" should not set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "scroll(x)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "scroll(y)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "scroll(y root)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(x)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y 1px 2px)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y 1px)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y auto)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y auto auto)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(y auto 1px)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(1px 2px y)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(1px y)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['animation-timeline'\] = "view(auto x)" should set the property value]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[animation-timeline-scroll-functional-notation.tentative.html]
|
||||
[animation-timeline: scroll(x)]
|
||||
expected: FAIL
|
||||
|
||||
[animation-timeline: scroll(y)]
|
||||
expected: FAIL
|
|
@ -35,15 +35,6 @@
|
|||
if os == "mac": [NOTRUN, FAIL]
|
||||
FAIL
|
||||
|
||||
[animation-timeline: view(x) without timeline range name]
|
||||
expected: FAIL
|
||||
|
||||
[animation-timeline: view(y) without timeline range name]
|
||||
expected: FAIL
|
||||
|
||||
[animation-timeline: view(x 50px) without timeline range name]
|
||||
expected: FAIL
|
||||
|
||||
[animation-timeline: view(x)]
|
||||
expected:
|
||||
if os == "mac": [NOTRUN, FAIL]
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[scroll-timeline-axis-computed.html]
|
||||
[Property scroll-timeline-axis value 'y']
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline-axis value 'x']
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline-axis value 'block, y, x, inline']
|
||||
expected: FAIL
|
|
@ -1,9 +0,0 @@
|
|||
[scroll-timeline-axis-parsing.html]
|
||||
[e.style['scroll-timeline-axis'\] = "y" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline-axis'\] = "x" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline-axis'\] = "block, y, x, inline" should set the property value]
|
||||
expected: FAIL
|
|
@ -1,8 +0,0 @@
|
|||
[scroll-timeline-axis-writing-mode.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[Vertical axis]
|
||||
expected: FAIL
|
||||
|
||||
[Horizontal axis]
|
||||
expected: FAIL
|
|
@ -1,49 +1,4 @@
|
|||
[scroll-timeline-shorthand.html]
|
||||
[e.style['scroll-timeline'\] = "--abc x" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--a inline, --b block, --c y" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline value 'none y']
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline value '--abc x']
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline value '--y y']
|
||||
expected: FAIL
|
||||
|
||||
[Property scroll-timeline value '--a inline, --b block, --c y']
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y" should set scroll-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y" should set scroll-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--inline x" should set scroll-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--inline x" should set scroll-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--inline x" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y, --def" should set scroll-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y, --def" should set scroll-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['scroll-timeline'\] = "--abc y, --def" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[Shorthand contraction of scroll-timeline-name:--a, --b, --c:undefined;scroll-timeline-axis:inline, inline:undefined]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
[view-timeline-axis-computed.html]
|
||||
[Property view-timeline-axis value 'y']
|
||||
expected: FAIL
|
||||
|
||||
[Property view-timeline-axis value 'x']
|
||||
expected: FAIL
|
||||
|
||||
[Property view-timeline-axis value 'block, y, x, inline']
|
||||
expected: FAIL
|
|
@ -1,9 +0,0 @@
|
|||
[view-timeline-axis-parsing.html]
|
||||
[e.style['view-timeline-axis'\] = "y" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline-axis'\] = "x" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline-axis'\] = "block, y, x, inline" should set the property value]
|
||||
expected: FAIL
|
|
@ -1,9 +1,4 @@
|
|||
[view-timeline-dynamic.html]
|
||||
[Dynamically changing view-timeline-axis]
|
||||
expected:
|
||||
if (os == "mac") and not debug: [FAIL, PASS]
|
||||
FAIL
|
||||
|
||||
[Dynamically changing view-timeline-inset]
|
||||
expected:
|
||||
if (os == "mac") and not debug: [PASS, FAIL]
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
[view-timeline-inset:auto, inline, vertical-lr, rtl]
|
||||
expected: FAIL
|
||||
|
||||
[view-timeline-inset:auto, y]
|
||||
expected: FAIL
|
||||
|
||||
[view-timeline-inset:auto, y, vertical-rl]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -40,14 +37,6 @@
|
|||
[view-timeline-inset:auto, x, rtl]
|
||||
expected: FAIL
|
||||
|
||||
[view-timeline-inset:auto, x, vertical-lr]
|
||||
expected: FAIL
|
||||
|
||||
[view-timeline-inset:auto, x, vertical-rl]
|
||||
expected:
|
||||
if os == "mac": [TIMEOUT, FAIL]
|
||||
FAIL
|
||||
|
||||
[view-timeline-inset:auto, mix]
|
||||
expected:
|
||||
if os == "mac": [NOTRUN, PASS, TIMEOUT]
|
||||
|
|
|
@ -1,37 +1,4 @@
|
|||
[view-timeline-shorthand.html]
|
||||
[e.style['view-timeline'\] = "--a inline, --b block, --c y" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[Property view-timeline value '--a inline, --b block, --c y']
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y" should set view-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y" should set view-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y, --def" should set view-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y, --def" should set view-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abc y, --def" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--inline x" should set view-timeline-axis]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--inline x" should set view-timeline-name]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--inline x" should not set unrelated longhands]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['view-timeline'\] = "--abcd block auto" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче