Skip to content

Commit 743e653

Browse files
authored
[cssom-view-1] Clarify offsetParent behavior in fixed position containing blocks (#12531)
1 parent a901655 commit 743e653

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cssom-view-1/Overview.bs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,14 +1645,16 @@ The <dfn attribute for=HTMLElement>offsetParent</dfn> attribute must return the
16451645
* The element does not have an associated [=CSS/box=].
16461646
* The element is the [=root element=].
16471647
* The element is <a>the <code>body</code> element</a>.
1648-
* The element's computed value of the 'position' property is ''position/fixed''.
1648+
* The element's computed value of the 'position' property is ''position/fixed'' and no ancestor establishes a fixed position [=containing block=].
16491649
1. Let <var>ancestor</var> be the parent of the element in the <a>flat tree</a> and repeat these substeps:
1650-
1. If <var>ancestor</var> is <a>closed-shadow-hidden</a> from the element and its computed value of the 'position' property is ''position/fixed'', terminate this algorithm and return null.
1650+
1. If <var>ancestor</var> is <a>closed-shadow-hidden</a> from the element, its computed value of the 'position' property is ''position/fixed'', and no ancestor establishes a fixed position [=containing block=], terminate this algorithm and return null.
16511651
1. If <var>ancestor</var> is not <a>closed-shadow-hidden</a> from the element and satisfies at least one of the following, terminate this algorithm and return <var>ancestor</var>.
1652-
* <var>ancestor</var> is a containing block of absolutely-positioned descendants (regardless of whether there are any absolutely-positioned descendants).
1652+
* The element is in a fixed position [=containing block=], and <var>ancestor</var> is a containing block for fixed-positioned descendants.
1653+
* The element is not in a fixed position [=containing block=], and:
1654+
* <var>ancestor</var> is a containing block of absolutely-positioned descendants (regardless of whether there are any absolutely-positioned descendants).
1655+
* It is <a>the <code>body</code> element</a>.
1656+
* The computed value of the 'position' property of the element is ''static'' and the ancestor is one of the following <a>HTML elements</a>: <code>td</code>, <code>th</code>, or <code>table</code>.
16531657
* The element has a different [=effective zoom=] than <var>ancestor</var>.
1654-
* It is <a>the <code>body</code> element</a>.
1655-
* The computed value of the 'position' property of the element is ''static'' and the ancestor is one of the following <a>HTML elements</a>: <code>td</code>, <code>th</code>, or <code>table</code>.
16561658
1. If there is no more parent of <var>ancestor</var> in the <a>flat tree</a>, terminate this algorithm and return null.
16571659
1. Let <var>ancestor</var> be the parent of <var>ancestor</var> in the <a>flat tree</a>.
16581660

0 commit comments

Comments
 (0)