layout: Use box tree Fragments for offset parent queries (#36681)

This change switches `offsetParent`, `offsetLeft`, etc queries to use
the BoxTree fragments instead of walking the entire fragment tree. In
addition, fragments are stored for columns and colgroups. In general,
this greatly simplifies the flow of the query and prevents having to do
expensive tree walks.

Testing: This change is covered by newly passing WPT tests and three new
failures:

 - /css/filter-effects/backdrop-filter-edge-clipping-2.html
 - /css/filter-effects/backdrop-filter-edge-mirror.html
 - /css/filter-effects/backdrop-filter-edge-pixels-2.html

These failures are actually progressions, because now the references
start
to render properly whereas before they did not.

Fixes: This is part of #36525 and #36665.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-25 22:25:10 +02:00 committed by GitHub
parent 69605d05cf
commit a62f0eaf0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 193 additions and 269 deletions

View file

@ -252,7 +252,7 @@ pub trait Layout {
point: Point2D<f32>,
query_type: NodesFromPointQueryType,
) -> Vec<UntrustedNodeAddress>;
fn query_offset_parent(&self, node: OpaqueNode) -> OffsetParentResponse;
fn query_offset_parent(&self, node: TrustedNodeAddress) -> OffsetParentResponse;
fn query_resolved_style(
&self,
node: TrustedNodeAddress,