layout: Skip adding ScrollFrameHitTestItem to stacking context tree if the BoxFragment has inherited style pointer-events: none (#38884)

**fix some page cannot slide**
In the refactoring of https://github.com/servo/servo/pull/38480, a
segment of logic was missing.

11844ca5af/components/layout/display_list/mod.rs (L405-L410)
Testing: The page can be scrolled on the OpenHarmony device.
Fixes: https://github.com/servo/servo/pull/38480#issuecomment-3213734994

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
Signed-off-by: Fuguo <1782765876@qq.com>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Fuguo 2025-08-23 15:00:14 +08:00 committed by GitHub
parent 4c61c7a045
commit 7dc48460d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1480,14 +1480,18 @@ impl BoxFragment {
sensitivity, sensitivity,
); );
stacking_context_tree use style::computed_values::pointer_events::T as PointerEvents;
.hit_test_items
.push(ScrollFrameHitTestItem { if self.style.get_inherited_ui().pointer_events != PointerEvents::None {
scroll_node_id: *parent_scroll_node_id, stacking_context_tree
clip_id, .hit_test_items
rect: scroll_frame_rect, .push(ScrollFrameHitTestItem {
external_scroll_id, scroll_node_id: *parent_scroll_node_id,
}); clip_id,
rect: scroll_frame_rect,
external_scroll_id,
});
}
Some(OverflowFrameData { Some(OverflowFrameData {
clip_id, clip_id,