From 0edd5a5d386c8796dd80cccb7e84efe726a4b35f Mon Sep 17 00:00:00 2001 From: Robert Flack Date: Tue, 17 Jun 2025 10:24:07 -0400 Subject: [PATCH] [cssom-view-1] Editorial scrollIntoView container attribute fixes --- cssom-view-1/Overview.bs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 2dee6e91f280..48064c6a857c 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1299,8 +1299,8 @@ 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, - set container to this element. + 1. If the {{ScrollIntoViewOptions/container}} dictionary member of options is "nearest", + set container to the element. 1. Otherwise, if arg is false, then set block to "end". 1. If the element does not have any associated [=CSS/box=], or is not available to user-agent features, @@ -1545,7 +1545,9 @@ means to run these steps: 1. Perform a scroll of the viewport to position, with root element as the associated element and behavior as the scroll behavior. - 1. If container is not null and scrolling box is a [=shadow-including inclusive ancestor=] of container, + 1. If container is not null and either scrolling box + is a [=shadow-including inclusive ancestor=] of container or + is a viewport whose document is a [=shadow-including inclusive ancestor=] of container, abort the rest of these steps.