@@ -720,9 +720,6 @@ pub(crate) fn fullhittest_new_webrender(
720
720
721
721
let pipeline_id = PipelineId ( dom_id. inner . min ( core:: u32:: MAX as usize ) as u32 , document_id. id ) ;
722
722
723
- println ! ( "doing hit test: cursor = {:?} (hidipi = {:?}), document = {:?}, pipeline = {:?}" ,
724
- cursor_location, hidpi_factor, document_id, pipeline_id) ;
725
-
726
723
let layout_result = match layout_results. get ( dom_id. inner ) {
727
724
Some ( s) => s,
728
725
None => break ,
@@ -733,8 +730,6 @@ pub(crate) fn fullhittest_new_webrender(
733
730
WrWorldPoint :: new ( cursor_relative_to_dom. x , cursor_relative_to_dom. y ) ,
734
731
) ;
735
732
736
- println ! ( "wr result: {:#?}" , wr_result) ;
737
-
738
733
let hit_items = wr_result. items . iter ( )
739
734
. filter_map ( |i| {
740
735
@@ -753,8 +748,6 @@ pub(crate) fn fullhittest_new_webrender(
753
748
} ) )
754
749
} ) . collect :: < Vec < _ > > ( ) ;
755
750
756
- println ! ( "hit_items: {:#?}" , hit_items) ;
757
-
758
751
for ( node_id, item) in hit_items. into_iter ( ) {
759
752
760
753
use azul_core:: ui_solver:: HitTest ;
@@ -796,9 +789,6 @@ pub(crate) fn fullhittest_new_webrender(
796
789
}
797
790
}
798
791
799
- println ! ( "final result: {:#?}" , ret) ;
800
- println ! ( "--------------------------" ) ;
801
-
802
792
ret
803
793
}
804
794
@@ -1644,6 +1634,19 @@ fn push_frame(
1644
1634
None => WrClipId :: root ( builder. pipeline_id ) , // no clipping
1645
1635
} ;
1646
1636
1637
+ // push the hit-testing tag if any
1638
+ if let Some ( hit_tag) = frame. tag {
1639
+ builder. push_hit_test ( & WrCommonItemProperties {
1640
+ clip_rect : WrLayoutRect :: new (
1641
+ WrLayoutPoint :: new ( 0.0 , 0.0 ) ,
1642
+ WrLayoutSize :: new ( frame. size . width , frame. size . height ) ,
1643
+ ) ,
1644
+ spatial_id : rect_spatial_id,
1645
+ clip_id : parent_clip_id,
1646
+ flags : WrPrimitiveFlags :: empty ( ) ,
1647
+ } , ( hit_tag. 0 , 0 ) ) ;
1648
+ }
1649
+
1647
1650
// if let Some(image_mask) -> define_image_mask_clip()
1648
1651
for child in frame. children {
1649
1652
push_display_list_msg ( document_id, render_api, builder, child, rect_spatial_id, children_clip_id, positioned_items, current_hidpi_factor) ;
@@ -1712,6 +1715,30 @@ fn push_scroll_frame(
1712
1715
) ,
1713
1716
) ;
1714
1717
1718
+ // push the scroll hit-testing tag if any
1719
+ builder. push_hit_test ( & WrCommonItemProperties {
1720
+ clip_rect : WrLayoutRect :: new (
1721
+ WrLayoutPoint :: new ( 0.0 , 0.0 ) ,
1722
+ WrLayoutSize :: new ( scroll_frame. content_rect . size . width , scroll_frame. content_rect . size . height ) ,
1723
+ ) ,
1724
+ spatial_id : scroll_frame_clip_info. spatial_id ,
1725
+ clip_id : scroll_frame_clip_info. clip_id ,
1726
+ flags : WrPrimitiveFlags :: empty ( ) ,
1727
+ } , ( scroll_frame. scroll_tag . 0 . 0 , 0 ) ) ;
1728
+
1729
+ // additionally push the hit tag of the frame if there is any
1730
+ if let Some ( hit_tag) = scroll_frame. frame . tag {
1731
+ builder. push_hit_test ( & WrCommonItemProperties {
1732
+ clip_rect : WrLayoutRect :: new (
1733
+ WrLayoutPoint :: new ( 0.0 , 0.0 ) ,
1734
+ WrLayoutSize :: new ( scroll_frame. frame . size . width , scroll_frame. frame . size . height ) ,
1735
+ ) ,
1736
+ spatial_id : scroll_frame_clip_info. spatial_id ,
1737
+ clip_id : scroll_frame_clip_info. clip_id ,
1738
+ flags : WrPrimitiveFlags :: empty ( ) ,
1739
+ } , ( hit_tag. 0 , 0 ) ) ;
1740
+ }
1741
+
1715
1742
for child in scroll_frame. frame . children {
1716
1743
push_display_list_msg (
1717
1744
document_id,
0 commit comments