mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
committed by
Andreas Kling
parent
b57199ccb9
commit
435ced70b8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user