mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1237809: P3. Ensure element dimensions are up to date. r=jwwang
The VideoContainer contains more up to date video size information than the MediaInfo received by MediaDecoder::MetadataLoaded
This commit is contained in:
parent
cc68149a50
commit
c91e944f9b
@ -872,11 +872,16 @@ MediaDecoder::MetadataLoaded(nsAutoPtr<MediaInfo> aInfo,
|
||||
|
||||
// Make sure the element and the frame (if any) are told about
|
||||
// our new size.
|
||||
Invalidate();
|
||||
if (aEventVisibility != MediaDecoderEventVisibility::Suppressed) {
|
||||
mFiredMetadataLoaded = true;
|
||||
mOwner->MetadataLoaded(mInfo, nsAutoPtr<const MetadataTags>(aTags.forget()));
|
||||
}
|
||||
// Invalidate() will end up calling mOwner->UpdateMediaSize with the last
|
||||
// dimensions retrieved from the video frame container. The video frame
|
||||
// container contains more up to date dimensions than aInfo.
|
||||
// So we call Invalidate() after calling mOwner->MetadataLoaded to ensure
|
||||
// the media element has the latest dimensions.
|
||||
Invalidate();
|
||||
|
||||
EnsureTelemetryReported();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user