mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Make VideoPaintable's clip rect temporary
Otherwise, in a simple page such as: <video src=...> <audio src=...> The video's clip rect would "leak" to the AudioPaintable, preventing the audio controls from rendering at all.
This commit is contained in:
parent
902c2ef5a3
commit
44911173f5
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/trflynn89
Commit: 44911173f5
Pull-request: https://github.com/SerenityOS/serenity/pull/20301
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ void VideoPaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
if (phase != PaintPhase::Foreground)
|
||||
return;
|
||||
|
||||
Gfx::PainterStateSaver saver { context.painter() };
|
||||
|
||||
auto video_rect = context.rounded_device_rect(absolute_rect());
|
||||
context.painter().add_clip_rect(video_rect.to_type<int>());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue