Revert "gpui: Fix overflow_hidden to support clip with border radius" (#37480)
This reverts commit 40199266b6.
The issue with the commit is: ContentMask<Pixels>::intersect is doing
intersection of corner radii which makes inner containers use the max
corner radius out of all the parents when it should be more complex to
correctly clip children (clip sorting..?)
Release Notes:
- N/A
This commit is contained in:
@@ -6043,7 +6043,6 @@ impl EditorElement {
|
||||
window.with_content_mask(
|
||||
Some(ContentMask {
|
||||
bounds: layout.position_map.text_hitbox.bounds,
|
||||
..Default::default()
|
||||
}),
|
||||
|window| {
|
||||
let editor = self.editor.read(cx);
|
||||
@@ -6986,15 +6985,9 @@ impl EditorElement {
|
||||
} else {
|
||||
let mut bounds = layout.hitbox.bounds;
|
||||
bounds.origin.x += layout.gutter_hitbox.bounds.size.width;
|
||||
window.with_content_mask(
|
||||
Some(ContentMask {
|
||||
bounds,
|
||||
..Default::default()
|
||||
}),
|
||||
|window| {
|
||||
block.element.paint(window, cx);
|
||||
},
|
||||
)
|
||||
window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
||||
block.element.paint(window, cx);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8297,13 +8290,9 @@ impl Element for EditorElement {
|
||||
}
|
||||
|
||||
let rem_size = self.rem_size(cx);
|
||||
let content_mask = ContentMask {
|
||||
bounds,
|
||||
..Default::default()
|
||||
};
|
||||
window.with_rem_size(rem_size, |window| {
|
||||
window.with_text_style(Some(text_style), |window| {
|
||||
window.with_content_mask(Some(content_mask), |window| {
|
||||
window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
||||
let (mut snapshot, is_read_only) = self.editor.update(cx, |editor, cx| {
|
||||
(editor.snapshot(window, cx), editor.read_only(cx))
|
||||
});
|
||||
@@ -9411,13 +9400,9 @@ impl Element for EditorElement {
|
||||
..Default::default()
|
||||
};
|
||||
let rem_size = self.rem_size(cx);
|
||||
let content_mask = ContentMask {
|
||||
bounds,
|
||||
..Default::default()
|
||||
};
|
||||
window.with_rem_size(rem_size, |window| {
|
||||
window.with_text_style(Some(text_style), |window| {
|
||||
window.with_content_mask(Some(content_mask), |window| {
|
||||
window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
||||
self.paint_mouse_listeners(layout, window, cx);
|
||||
self.paint_background(layout, window, cx);
|
||||
self.paint_indent_guides(layout, window, cx);
|
||||
|
||||
Reference in New Issue
Block a user