mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-07 21:17:07 +09:00
LibWeb: Don't early return when masking area of StackingContext is empty
An early return was occurring between the emission of PushStackingContext and PopStackingContext, resulting in a PushStackingContext without a corresponding PopStackingContext in the display list, which caused broken painting. Fixes black screen on Discord login page.
This commit is contained in:
parent
7efdd1c1ec
commit
39fff3cf8a
Notes:
github-actions[bot]
2025-06-05 22:53:19 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 39fff3cf8a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5015
Reviewed-by: https://github.com/gmta ✅
3 changed files with 24 additions and 2 deletions
|
@ -362,8 +362,6 @@ void StackingContext::paint(PaintContext& context) const
|
|||
}
|
||||
|
||||
if (auto masking_area = paintable_box().get_masking_area(); masking_area.has_value()) {
|
||||
if (masking_area->is_empty())
|
||||
return;
|
||||
auto mask_bitmap = paintable_box().calculate_mask(context, *masking_area);
|
||||
if (mask_bitmap) {
|
||||
auto masking_area_rect = context.enclosing_device_rect(*masking_area).to_type<int>();
|
||||
|
|
11
Tests/LibWeb/Ref/expected/clip-path.html
Normal file
11
Tests/LibWeb/Ref/expected/clip-path.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div style="width: 100px; height: 100px; background-color: green"></div>
|
||||
</body>
|
||||
</html>
|
13
Tests/LibWeb/Ref/input/clip-path.html
Normal file
13
Tests/LibWeb/Ref/input/clip-path.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="match" href="../expected/clip-path.html" />
|
||||
<html>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="container" style="clip-path: rect(0 0 0 0)"></div>
|
||||
<div style="width: 100px; height: 100px; background-color: green"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue