mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibWeb: Paint non-positioned SC with z-index=0 in paint_descendants()
Fixes the bug when non-positioned boxes that establish a stacking context and have z-index=0 are ignored during paint commands recording.
This commit is contained in:
parent
15f69ffbba
commit
7bea2b68f4
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 7bea2b68f4
Pull-request: https://github.com/SerenityOS/serenity/pull/24155
3 changed files with 13 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/non-positioned-stacking-context-with-z-index-0-ref.html"/>
|
||||||
|
<style>
|
||||||
|
* { outline: 1px solid black; }
|
||||||
|
html { display: flex; }
|
||||||
|
body { z-index: 0; }
|
||||||
|
</style><body><div>Hello
|
|
@ -0,0 +1,5 @@
|
||||||
|
<!doctype html>
|
||||||
|
<style>
|
||||||
|
* { outline: 1px solid black; }
|
||||||
|
html { display: flex; }
|
||||||
|
</style><body><div>Hello
|
|
@ -107,7 +107,7 @@ void StackingContext::paint_descendants(PaintContext& context, Paintable const&
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stacking_context && z_index.has_value())
|
if (stacking_context && z_index.value_or(0) != 0)
|
||||||
return;
|
return;
|
||||||
if (child.is_positioned() && !z_index.has_value())
|
if (child.is_positioned() && !z_index.has_value())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue