File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed
platforms/atspi-common/src Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -434,17 +434,28 @@ impl<'a> NodeWrapper<'a> {
434
434
}
435
435
436
436
fn extents ( & self , window_bounds : & WindowBounds , coord_type : CoordType ) -> Option < Rect > {
437
- self . is_root ( )
438
- . then ( || window_bounds. inner . with_origin ( Point :: ZERO ) )
439
- . or_else ( || self . 0 . bounding_box ( ) )
440
- . map ( |bounds| {
441
- let new_origin = window_bounds. accesskit_point_to_atspi_point (
442
- bounds. origin ( ) ,
443
- self . 0 . filtered_parent ( & filter) ,
444
- coord_type,
445
- ) ;
446
- bounds. with_origin ( new_origin)
447
- } )
437
+ let mut bounds = self . 0 . bounding_box ( ) ;
438
+ if self . is_root ( ) {
439
+ let window_bounds = window_bounds. inner . with_origin ( Point :: ZERO ) ;
440
+ if !window_bounds. is_empty ( ) {
441
+ if let Some ( bounds) = & mut bounds {
442
+ bounds. x0 = bounds. x0 . min ( window_bounds. x1 ) ;
443
+ bounds. y0 = bounds. y0 . min ( window_bounds. y1 ) ;
444
+ bounds. x1 = bounds. x1 . min ( window_bounds. x1 ) ;
445
+ bounds. y1 = bounds. y1 . min ( window_bounds. y1 ) ;
446
+ } else {
447
+ bounds = Some ( window_bounds) ;
448
+ }
449
+ }
450
+ }
451
+ bounds. map ( |bounds| {
452
+ let new_origin = window_bounds. accesskit_point_to_atspi_point (
453
+ bounds. origin ( ) ,
454
+ self . 0 . filtered_parent ( & filter) ,
455
+ coord_type,
456
+ ) ;
457
+ bounds. with_origin ( new_origin)
458
+ } )
448
459
}
449
460
450
461
fn current_value ( & self ) -> Option < f64 > {
You can’t perform that action at this time.
0 commit comments