script: Move point_in_initial_containing_block calculation to script (#38520)

Instead of calculating this value in the compositor, calculate it in
`ScriptThread` now that it is straightforward to get this value from the
layout spatial tree. This allows removing some tricky callback code in
the Compositor.

Testing: This shouldn't change any observable behavior so is covered by
existing tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-08-11 11:32:38 +02:00 committed by GitHub
parent 9d4004135b
commit 005164df4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 53 deletions

View file

@ -884,10 +884,6 @@ pub struct CompositorHitTestResult {
/// The hit test point in the item's viewport.
pub point_in_viewport: Point2D<f32, CSSPixel>,
/// The hit test point relative to the root scroll node content origin / initial
/// containing block.
pub point_relative_to_initial_containing_block: Point2D<f32, CSSPixel>,
/// The [`ExternalScrollId`] of the scroll tree node associated with this hit test item.
pub external_scroll_id: ExternalScrollId,
}