Skip to content

Commit 16b296c

Browse files
Zaggy1024gmta
authored andcommitted
LibWeb: Update HTMLMediaElements' playback positions when invisible
1 parent c75f134 commit 16b296c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Libraries/LibWeb/HTML/HTMLMediaElement.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,8 +1159,6 @@ void HTMLMediaElement::set_selected_video_track(Badge<VideoTrack>, GC::Ptr<HTML:
11591159

11601160
void HTMLMediaElement::update_video_frame_and_timeline()
11611161
{
1162-
if (!paintable())
1163-
return;
11641162
if (!m_playback_manager)
11651163
return;
11661164

@@ -1181,7 +1179,7 @@ void HTMLMediaElement::update_video_frame_and_timeline()
11811179
needs_display = true;
11821180
}
11831181

1184-
if (needs_display)
1182+
if (needs_display && paintable())
11851183
paintable()->set_needs_display();
11861184
}
11871185

0 commit comments

Comments
 (0)