Closed Bug 466410 Opened 16 years ago Closed 16 years ago

videoWidth and videoHeight should be valid when loadedmetadata fires

Categories

(Core :: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: kinetik, Assigned: roc)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files, 2 obsolete files)

Per section 4.8.10.5.11.4, where it talks about firing the loadedmetadata, "Once enough of the media data has been fetched to determine the duration of the media resource, its dimensions, and other metadata".
Attached patch mochitest (obsolete) — Splinter Review
This happens because nsOggDecoder updates the videoWidth and videoHeight during invalidate, which may not have happened by the time loadedmetadata fires.  In some cases, it's possible for invalidate never to occur, e.g. if the video is created outside of the document and never attached or if the element is set to display: none.
Attached patch mochitestSplinter Review
Test display: none case too.
Attachment #349697 - Attachment is obsolete: true
I posted a message to the WhatWG spec list requesting clarification on this: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017412.html
Flags: blocking1.9.1+
Priority: -- → P2
Attached patch fix (obsolete) — Splinter Review
This makes the size valid when metadataloaded fires.
Assignee: nobody → roc
Attachment #357295 - Flags: review?(chris.double)
Whiteboard: [needs review]
Attachment #357295 - Flags: review?(chris.double) → review+
Whiteboard: [needs review] → [needs landing]
Pushed http://hg.mozilla.org/mozilla-central/rev/e6566d187edd
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
This seems to have caused reftest failures in ogg-video/basic-1.html' and 'ogg-video/zoomed-1.html' on the linux unittest box:
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1232599526.1232605622.2267.gz
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1232600679.1232605576.2202.gz

Backed out to fix bustage:
http://hg.mozilla.org/mozilla-central/rev/c0d1d49217cc
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch updated patchSplinter Review
The frame was not being reflowed after the video intrinsic size became known, because we were just calling UpdateMediaSize and then setting mSizeChanged to false, but we need to do what Invalidate does and also mark the frame as needing reflow. So in this version of the patch I just call Invalidate to do all those things.
Attachment #357295 - Attachment is obsolete: true
Whiteboard: [needs landing]
Pushed http://hg.mozilla.org/mozilla-central/rev/4bc1bd14f5a0
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: