mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
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:
parent
9d4004135b
commit
005164df4a
4 changed files with 18 additions and 53 deletions
|
@ -337,11 +337,10 @@ impl WebViewRenderer {
|
|||
};
|
||||
|
||||
// If we can't find a pipeline to send this event to, we cannot continue.
|
||||
let get_pipeline_details = |pipeline_id| self.pipelines.get(&pipeline_id);
|
||||
let Some(result) = self
|
||||
.global
|
||||
.borrow()
|
||||
.hit_test_at_point(point, get_pipeline_details)
|
||||
.hit_test_at_point(point)
|
||||
.into_iter()
|
||||
.nth(0)
|
||||
else {
|
||||
|
@ -852,12 +851,10 @@ impl WebViewRenderer {
|
|||
ScrollLocation::Start | ScrollLocation::End => scroll_location,
|
||||
};
|
||||
|
||||
let get_pipeline_details = |pipeline_id| self.pipelines.get(&pipeline_id);
|
||||
let hit_test_results = self.global.borrow().hit_test_at_point_with_flags(
|
||||
cursor,
|
||||
HitTestFlags::FIND_ALL,
|
||||
get_pipeline_details,
|
||||
);
|
||||
let hit_test_results = self
|
||||
.global
|
||||
.borrow()
|
||||
.hit_test_at_point_with_flags(cursor, HitTestFlags::FIND_ALL);
|
||||
|
||||
// Iterate through all hit test results, processing only the first node of each pipeline.
|
||||
// This is needed to propagate the scroll events from a pipeline representing an iframe to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue