You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cssom-view] Update offsetParent spec for Shadow DOM
The previous attempt to update offsetParent was incomplete:
when the real offsetParent in the closed shadow tree has
'position:fixed', offsetParent should return null, instead
of continue searching for unclosed ancestor.
PR: w3c#252Fixesw3c#159.
Copy file name to clipboardExpand all lines: cssom-view/Overview.bs
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1352,11 +1352,14 @@ The <dfn attribute for=HTMLElement>offsetParent</dfn> attribute must return the
1352
1352
* The element is the root element.
1353
1353
* The element is <a>the HTML <code>body</code> element</a>.
1354
1354
* The element's computed value of the 'position' property is ''position/fixed''.
1355
-
1. Return the nearest ancestor <a lt="unclosed node">unclosed</a> element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found: [[!DOM]]
1356
-
* The computed value of the 'position' property is not ''static''.
1357
-
* It is <a>the HTML <code>body</code> element</a>.
1358
-
* 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>.
1359
-
1. Return null.
1355
+
1. Let <var>ancestor</var> be the parent of the element in the <a>flat tree</a> and repeat these substeps:
1356
+
1. If <var>ancestor</var> is not an <a lt="unclosed node">unclosed</a> element of the element and its computed value of the 'position' property is ''position/fixed'', terminate this algorithm and return null.
1357
+
1. If <var>ancestor</var> is an <a lt="unclosed node">unclosed</a> element of the element and satisfies at least one of the following, terminate this algorithm and return <var>ancestor</var>.
1358
+
* The computed value of the 'position' property is not ''static''.
1359
+
* It is <a>the HTML <code>body</code> element</a>.
1360
+
* 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>.
1361
+
1. If there is no more parent of <var>ancestor</var> in the <a>flat tree</a>, terminate this algorithm and return null.
1362
+
1. Let <var>ancestor</var> be the parent of <var>ancestor</var> in the <a>flat tree</a>.
1360
1363
1361
1364
The <dfn attribute for=HTMLElement>offsetTop</dfn> attribute must return the result of running these steps:
0 commit comments