diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 6c253839bd4..7f461996de1 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1580,6 +1580,7 @@ To scroll an element (or [=pseudo-element=]) element to partial interface HTMLElement { + readonly attribute Element? scrollParent; readonly attribute Element? offsetParent; readonly attribute long offsetTop; readonly attribute long offsetLeft; @@ -1588,6 +1589,19 @@ partial interface HTMLElement { }; +The scrollParent attribute must return the result of running these steps: +1. If any of the following holds true, return null and terminate this algorithm: + * The element does not have an associated [=CSS/box=]. + * The element is the [=root element=]. + * The element is the body element. + * The element's computed value of the 'position' property is ''position/fixed'' and no ancestor establishes a fixed position [=containing block=]. +1. Let ancestor be the [=containing block=] of the element in the flat tree and repeat these substeps: + 1. If ancestor is closed-shadow-hidden from the element, terminate this algorithm and return null. + 1. If ancestor is the [=initial containing block=], return the {{Document/scrollingElement}} for the element's document. + 1. If ancestor is a scroll container, terminate this algorithm and return ancestor. + 1. If the computed value of the 'position' property of ancestor is ''position/fixed'', and no ancestor establishes a fixed position [=containing block=], terminate this algorithm and return null. + 1. Let ancestor be the [=containing block=] of ancestor in the flat tree. + The offsetParent attribute must return the result of running these steps: 1. If any of the following holds true return null and terminate this algorithm: @@ -2075,6 +2089,7 @@ generally not listed. * Introduced the {{VisualViewport}} API and related concepts * Pinch zoom is now renamed to scale factor * Added visibilityProperty, opacityProperty, and contentVisiblityAuto properties for {{Element/checkVisibility()}} method. +* Added the {{HTMLElement/scrollParent}} attribute.

Changes From 22 June 2022

* Adam Argyle moved the scrollend event from WICG overscroll-scrollend-events to [[CSSOM-VIEW-1]]