From da5dbadcee752b2b8da3bec867d45000a7bec461 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 12 Feb 2025 16:11:07 +0000 Subject: [PATCH 1/3] [cssom-view-1] Return position from top level This step makes more sense as step 11 (just after step 10 where `position` is declared) than step 10.9, and looks like a typo. --- cssom-view-1/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index d6007549a16..b3fe1181df5 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1511,7 +1511,7 @@ run the following steps:
If element edge D is outside scrolling box edge D and element width is less than scrolling box width
Align element edge D with scrolling box edge D. - 1. Return position. +1. Return position. From 5a28dbb5c503225ee94f43ed11a5ce9e1143217c Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 12 Feb 2025 16:15:46 +0000 Subject: [PATCH 2/3] [cssom-view-1][css-scroll-snap-2] Remove unused `behavior` parameter ...from "determine the scroll-into-view position". This isn't used, and seems to be a leftover from before this algorithm was split out of "scroll a target into view". --- css-scroll-snap-2/Overview.bs | 3 +-- cssom-view-1/Overview.bs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/css-scroll-snap-2/Overview.bs b/css-scroll-snap-2/Overview.bs index 45b4fe44e4c..25cb67b1e01 100644 --- a/css-scroll-snap-2/Overview.bs +++ b/css-scroll-snap-2/Overview.bs @@ -159,8 +159,7 @@ Initial scroll target 1. Let |target| be the initial scroll target for |scrollcontainer|. 1. Let |position| be the result of running the steps to determine the scroll-into-view position of |target| - with behavior set to "auto", - block set to "start", + with block set to "start", inline set to "nearest", and scrolling box set to |scrollcontainer|. 1. Set |scrollcontainer|'s initial scroll position to |position|. diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index b3fe1181df5..0d7e60a9e4e 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1462,7 +1462,6 @@ The currentCSSZoom attribute must return the
To determine the scroll-into-view position of a target, which is an Element, [=pseudo-element=], or Range, -with a scroll behavior behavior, a block flow direction position block, an inline base direction position inline, and a scrolling box scrolling box, @@ -1526,7 +1525,7 @@ means to run these steps: 1. For each ancestor element or viewport that establishes a scrolling box scrolling box, in order of innermost to outermost scrolling box, run these substeps: 1. If the {{Document}} associated with target is not same origin with the {{Document}} associated with the element or viewport associated with scrolling box, terminate these steps. - 1. Let position be the scroll position resulting from running the steps to determine the scroll-into-view position of target with behavior as the |scroll behavior|, + 1. Let position be the scroll position resulting from running the steps to determine the scroll-into-view position of target with block as the |block flow position|, inline as the |inline base direction position| and scrolling box as the |scrolling box|. 1. If position is not the same as scrolling box's current scroll position, or scrolling box has an ongoing smooth scroll, 1.
From 91fbe6d102c6a81d66db651a50687bad6d591038 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 12 Feb 2025 16:26:19 +0000 Subject: [PATCH 3/3] [cssom-view-1] Add missing value to check `container` against --- cssom-view-1/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 0d7e60a9e4e..02e8a08a692 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1299,7 +1299,7 @@ The scrollIntoView(arg 1. Set behavior to the {{ScrollOptions/behavior}} dictionary member of options. 1. Set block to the {{ScrollIntoViewOptions/block}} dictionary member of options. 1. Set inline to the {{ScrollIntoViewOptions/inline}} dictionary member of options. - 1. If the {{ScrollIntoViewOptions/container}} dictionary member of options, + 1. If the {{ScrollIntoViewOptions/container}} dictionary member of options is "nearest", set container to this element. 1. Otherwise, if arg is false, then set block to "end". 1. If the element does not have any associated [=CSS/box=],