mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +00:00
LibWeb: Don't clip descendants outside stacking context root rect
Skia allows you to pass a bounding rect to its saveLayer() function as an optimization when you know that you won't paint outside those bounds. Unfortunately, we were passing a too-small rectangle that didn't take into account transformed descendants, etc. For now, simply pass null instead of a bounding rect. This way, Skia figures it out internally. It may allocate larger temporary bitmaps than needed this way, but at least we get more correct results. I've left re-enabling the optimization as a FIXME in the code. This fixes unwanted clipping in various parts of the Discord UI.
This commit is contained in:
parent
b1c3ce807b
commit
b4435bd50c
Notes:
github-actions[bot]
2025-07-24 15:17:25 +00:00
Author: https://github.com/awesomekling
Commit: b4435bd50c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5588
Reviewed-by: https://github.com/kalenikaliaksandr ✅
7 changed files with 29 additions and 11 deletions
|
@ -324,7 +324,6 @@ void StackingContext::paint(PaintContext& context) const
|
|||
.compositing_and_blending_operator = compositing_and_blending_operator,
|
||||
.isolate = paintable_box().computed_values().isolation() == CSS::Isolation::Isolate,
|
||||
.is_fixed_position = paintable_box().is_fixed_position(),
|
||||
.source_paintable_rect = source_paintable_rect,
|
||||
.transform = {
|
||||
.origin = transform_origin.scaled(to_device_pixels_scale),
|
||||
.matrix = matrix_with_scaled_translation(transform_matrix, to_device_pixels_scale),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue