From f5a4b2932b65e2788c0449b8b2c316359a0107f8 Mon Sep 17 00:00:00 2001 From: BibekPathak Date: Sun, 6 Sep 2026 00:02:50 +0530 Subject: [PATCH 1/2] fix(layout): hit-test atomic inlines in front of wrapping inline boxes --- moli-layout/src/projection.rs | 15 ++++ .../src/domains/dom/tests/geometry.rs | 78 +++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/moli-layout/src/projection.rs b/moli-layout/src/projection.rs index ded04acbe5..85e138084d 100644 --- a/moli-layout/src/projection.rs +++ b/moli-layout/src/projection.rs @@ -784,6 +784,21 @@ where for fragment in self.owner_paint_fragments[index].clone() { self.assign_fragment_paint_metadata(fragment, self.content_clips[index]); } + // An atomic inline-level box (a replaced element, form + // control, or inline-block wrapper consumed by its owner + // IFC) is painted and hit-tested as line content, in front + // of the enclosing inline boxes' fragments. Promote its own + // box fragment to this contents phase so a point inside the + // atomic's box resolves to the atomic rather than to an + // inline ancestor (e.g. a wrapping `