mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:25:07 +00:00
LibWeb: Update the media element's display in a couple situations
Mostly seen on macOS, but when we toggle playing a media element, we need to update its layout node's display to ensure the change is reflected on the playback button. Further, when setting the element's display time, we need to update the display to ensure the change is refelected on the media timeline.
This commit is contained in:
parent
b57199ccb9
commit
435ced70b8
1 changed files with 6 additions and 0 deletions
|
@ -1574,6 +1574,9 @@ void HTMLMediaElement::set_paused(bool paused)
|
|||
|
||||
if (m_paused)
|
||||
on_paused();
|
||||
|
||||
if (auto* layout_node = this->layout_node())
|
||||
layout_node->set_needs_display();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#blocked-media-element
|
||||
|
@ -1852,6 +1855,9 @@ void HTMLMediaElement::set_layout_display_time(Badge<Painting::MediaPaintable>,
|
|||
}
|
||||
|
||||
m_display_time = move(display_time);
|
||||
|
||||
if (auto* layout_node = this->layout_node())
|
||||
layout_node->set_needs_display();
|
||||
}
|
||||
|
||||
double HTMLMediaElement::layout_display_time(Badge<Painting::MediaPaintable>) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue