mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
LibWeb: Reset painter translation when painting fixed-position elements
This makes nested position:fixed elements work, previously we'd apply the viewport scroll offset once at every nesting level.
This commit is contained in:
parent
a494bd24f1
commit
95a3da86c3
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ void StackingContext::paint(PaintContext& context) const
|
||||||
{
|
{
|
||||||
Gfx::PainterStateSaver saver(context.painter());
|
Gfx::PainterStateSaver saver(context.painter());
|
||||||
if (m_box.is_fixed_position()) {
|
if (m_box.is_fixed_position()) {
|
||||||
context.painter().translate(context.scroll_offset());
|
context.painter().translate(-context.painter().translation());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto opacity = m_box.computed_values().opacity();
|
auto opacity = m_box.computed_values().opacity();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue