mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +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
Notes:
sideshowbarker
2024-07-17 18:38:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/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());
|
||||
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();
|
||||
|
|
Loading…
Add table
Reference in a new issue