@@ -89,7 +89,7 @@
let initial_expected_scroll_top =
total_content_height - inner_scroller.clientHeight;
assert_equals(inner_scroller.scrollTop, initial_expected_scroll_top,
- "inner-scroller is scrolled to scroll-start-target");
+ "inner-scroller is scrolled to scroll-initial-target");
let display_promise = waitForDisplay(target, "none");
target.style.display = "none";
@@ -98,14 +98,14 @@
let final_expected_scroll_top = initial_expected_scroll_top - target_height;
assert_equals(inner_scroller.scrollTop, final_expected_scroll_top,
"inner scroller is clamped to updated scroll range");
- }, "display:block scroll-start-target becomes display: none");
+ }, "display:block scroll-initial-target becomes display: none");
promise_test(async (t) => {
await resetDisplay();
let initial_expected_scroll_top =
total_content_height - inner_scroller.clientHeight;
assert_equals(inner_scroller.scrollTop, initial_expected_scroll_top,
- "inner-scroller is scrolled to scroll-start-target");
+ "inner-scroller is scrolled to scroll-initial-target");
let display_promise = waitForDisplay(target, "none");
target.style.display = "none";
@@ -118,8 +118,8 @@
target.style.display = "block";
await display_promise;
assert_equals(inner_scroller.scrollTop, initial_expected_scroll_top,
- "inner scroller is updated as scroll-start-target reappears");
- }, "display:none scroll-start-target becomes display: block");
+ "inner scroller is updated as scroll-initial-target reappears");
+ }, "display:none scroll-initial-target becomes display: block");
diff --git a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-nested-container.tentative.html b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-nested-container.tentative.html
index e3a1df6e6a1b6..cd2717ed88cc9 100644
--- a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-nested-container.tentative.html
+++ b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-nested-container.tentative.html
@@ -2,8 +2,8 @@
- CSS Scroll Snap 2 Test: scroll-start-target*
-
+ CSS Scroll Snap 2 Test: scroll-initial-target*
+
@@ -49,7 +49,7 @@
width: 100px;
height: 100px;
background-color: pink;
- scroll-start-target: auto;
+ scroll-initial-target: nearest;
}
@@ -96,7 +96,7 @@
promise_test(async (t) => {
await resetDisplay();
assert_equals(outer_container.scrollTop, outer_to_target_scrolltop,
- "outer-container is scrolled to scroll-start-target");
+ "outer-container is scrolled to scroll-initial-target");
// Remove large_space_outer so we can observe outer-container adjust to
// its new content height.
@@ -113,14 +113,14 @@
await waitForAnimationFrames(2);
assert_equals(outer_container.scrollTop, outer_to_target_scrolltop,
- "outer-scroller is updated as scroll-start-target reappears");
- }, "display:none scroll-start-target becomes display:block");
+ "outer-scroller is updated as scroll-initial-target reappears");
+ }, "display:none scroll-initial-target becomes display:block");
promise_test(async (t) => {
await waitForCompositorCommit();
await resetDisplay();
assert_equals(outer_container.scrollTop, outer_to_target_scrolltop,
- "outer-container is scrolled to scroll-start-target");
+ "outer-container is scrolled to scroll-initial-target");
// Remove large_space_outer so we can observe outer-container adjust to
// its new content height.
@@ -129,7 +129,7 @@
await waitForAnimationFrames(2);
// inner-container has become a scroller and should be scrolled to
- // scroll-start-target.
+ // scroll-initial-target.
assert_equals(inner_container.scrollTop,
inner_to_target_scrolltop,
"inner-container is fully scrolled to target");
@@ -152,21 +152,21 @@
promise_test(async (t) => {
// This test verifies that:
- // 1. when both the child and grandchild are scroll-start-targets, the
+ // 1. when both the child and grandchild are scroll-initial-targets, the
// first-in-tree-order (i.e. the child) wins/is scrolled to.
- // 2. if/when the grandchild stops being a scroll-start-target, the
+ // 2. if/when the grandchild stops being a scroll-initial-target, the
// child (inner container) is scrolled to.
await waitForCompositorCommit();
await resetDisplay();
t.add_cleanup(async () => {
- inner_container.style.scrollStartTarget = "none";
+ inner_container.style.scrollInitialTarget = "none";
await waitForAnimationFrames(2);
});
assert_equals(outer_container.scrollTop, outer_to_target_scrolltop,
- "outer-container is scrolled to scroll-start-target");
- // Make the inner container a scroll-start-target.
- inner_container.style.scrollStartTarget = "auto";
+ "outer-container is scrolled to scroll-initial-target");
+ // Make the inner container a scroll-initial-target.
+ inner_container.style.scrollInitialTarget = "nearest";
await waitForAnimationFrames(2);
// The inner container has overflow: visible, so it's not the scroll
@@ -174,33 +174,33 @@
assert_equals(outer_container.scrollTop,
outer_to_inner_scrolltop,
"outer-container is scrolled to inner-container (which is before the" +
- "inner scroll-start-target in tree order)");
- }, "outer scroll-start-target takes precedence over inner");
+ "inner scroll-initial-target in tree order)");
+ }, "outer scroll-initial-target takes precedence over inner");
promise_test(async (t) => {
// This test verifies that a child which is a scroller, is a
- // scroll-start-target, and has a scroll-start-target is scrolled to by
- // its scrolling container, and also scrolls to its own
- // scroll-start-target.
+ // scroll-initial-target, and has a scroll-initial-target is scrolled to
+ // by its scrolling container, and also scrolls to its own
+ // scroll-initial-target.
await waitForCompositorCommit();
await resetDisplay();
t.add_cleanup(async () => {
inner_container.style.overflow = "visible";
- inner_container.style.scrollStartTarget = "none";
+ inner_container.style.scrollInitialTarget = "none";
await waitForAnimationFrames(2);
});
assert_equals(outer_container.scrollTop, outer_to_target_scrolltop,
- "outer-container is scrolled to scroll-start-target");
+ "outer-container is scrolled to scroll-initial-target");
- // Make the inner container a scroll-start-target.
- inner_container.style.scrollStartTarget = "auto";
+ // Make the inner container a scroll-initial-target.
+ inner_container.style.scrollInitialTarget = "nearest";
await waitForAnimationFrames(2);
assert_equals(outer_container.scrollTop,
outer_to_inner_scrolltop,
"outer-container is still scrolled to inner scroll-container" +
- "as it is a scroll-start-target and comes before #target in " +
+ "as it is a scroll-initial-target and comes before #target in " +
"tree-order");
// Make the inner container a scroller.
@@ -213,7 +213,7 @@
assert_equals(inner_container.scrollTop,
inner_to_target_scrolltop,
"inner-container is scrolled to target");
- }, "scroll containers can also be scroll-start-targets");
+ }, "scroll containers can also be scroll-initial-targets");
diff --git a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-root.tentative.html b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-root.tentative.html
index 860a592bb106a..5cb9e7447333e 100644
--- a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-root.tentative.html
+++ b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-root.tentative.html
@@ -3,8 +3,8 @@
- CSS Scroll Snap 2 Test: scroll-start-target*
-
+ CSS Scroll Snap 2 Test: scroll-initial-target*
+
@@ -32,7 +32,7 @@
top: 60vh;
left: 60vw;
background-color: purple;
- scroll-start-target: auto;
+ scroll-initial-target: nearest;
}
.bottom_right {
@@ -54,9 +54,9 @@
const expected_scroll_left = top_left_box.getBoundingClientRect().width;
assert_approx_equals(scroller.scrollTop, expected_scroll_top, 1,
- "scroll-start-target sets initial vertical scroll position");
+ "scroll-initial-target sets initial vertical scroll position");
assert_approx_equals(scroller.scrollLeft, expected_scroll_left, 1,
- "scroll-start-target sets initial horizontal scroll position");
+ "scroll-initial-target sets initial horizontal scroll position");
});
diff --git a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-rtl.tentative.html b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-rtl.tentative.html
index e7766cc07a2c8..7cb0f93c49582 100644
--- a/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-rtl.tentative.html
+++ b/testing/web-platform/tests/css/css-scroll-snap-2/scroll-start-target/scroll-start-target-rtl.tentative.html
@@ -3,8 +3,8 @@
- CSS Scroll Snap 2 Test: scroll-start-target*
-
+ CSS Scroll Snap 2 Test: scroll-initial-target*
+
@@ -34,7 +34,7 @@
.center {
top: 60%;
background-color: purple;
- scroll-start-target: auto;
+ scroll-initial-target: nearest;
}
.bottom_left {
@@ -53,10 +53,10 @@
test((t) => {
assert_equals(scroller.scrollTop, initial_expected_scroll_top,
- "scroller is vertically scrolled to scroll-start-target");
+ "scroller is vertically scrolled to scroll-initial-target");
assert_equals(scroller.scrollLeft, initial_expected_scroll_left,
- "scroller is horizontally scrolled to scroll-start-target");
- }, "scroll-start-target reflects vertical rtl writing mode.");
+ "scroller is horizontally scrolled to scroll-initial-target");
+ }, "scroll-initial-target reflects vertical rtl writing mode.");