File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -87,17 +87,10 @@ fn update_clipping(
87
87
88
88
// Calculate new clip rectangle for children nodes
89
89
let children_clip = if node. overflow . is_visible ( ) {
90
- // When `Visible`, children might be visible even when they are outside
91
- // the current node's boundaries. In this case they inherit the current
92
- // node's parent clip. If an ancestor is set as `Hidden`, that clip will
93
- // be used; otherwise this will be `None`.
90
+ // The current node doesn't clip, propagate the optional inherited clipping rect to any children
94
91
maybe_inherited_clip
95
92
} else {
96
- // If `maybe_inherited_clip` is `Some`, use the intersection between
97
- // current node's clip and the inherited clip. This handles the case
98
- // of nested `Overflow::Hidden` nodes. If parent `clip` is not
99
- // defined, use the current node's clip.
100
-
93
+ // Find the current node's clipping rect and intersect it with the inherited clipping rect, if one exists
101
94
let mut clip_rect = Rect :: from_center_size (
102
95
global_transform. translation ( ) . truncate ( ) ,
103
96
computed_node. size ( ) ,
You can’t perform that action at this time.
0 commit comments