mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
LibWeb: Add a clip rect for AudioPaintable
Not a huge deal because the base MediaPaintable class goes very out of its way to paint within the confines of its own box, but just to be safe, this was missed when adding the AudioPaintable class.
This commit is contained in:
parent
c31e8cad1e
commit
902c2ef5a3
Notes:
sideshowbarker
2024-07-17 00:16:31 +09:00
Author: https://github.com/trflynn89
Commit: 902c2ef5a3
Pull-request: https://github.com/SerenityOS/serenity/pull/20301
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 0 deletions
|
@ -52,7 +52,11 @@ void AudioPaintable::paint(PaintContext& context, PaintPhase phase) const
|
|||
if (phase != PaintPhase::Foreground)
|
||||
return;
|
||||
|
||||
Gfx::PainterStateSaver saver { context.painter() };
|
||||
|
||||
auto audio_rect = context.rounded_device_rect(absolute_rect());
|
||||
context.painter().add_clip_rect(audio_rect.to_type<int>());
|
||||
|
||||
ScopedCornerRadiusClip corner_clip { context, context.painter(), audio_rect, normalized_border_radii_data(ShrinkRadiiForBorders::Yes) };
|
||||
|
||||
auto const& audio_element = layout_box().dom_node();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue