Function layout_2020::query::is_eligible_parent
source ยท fn is_eligible_parent(fragment: &BoxFragment) -> bool
Expand description
Returns whether or not the element with the given style and body element determination is eligible to be a parent element for offset* queries.
From https://www.w3.org/TR/cssom-view-1/#dom-htmlelement-offsetparent: >
Return the nearest ancestor element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found:
- The computed value of the position property is not static.
- It is the HTML body element.
- The computed value of the position property of the element is static and the ancestor is one of the following HTML elements: td, th, or table.