Closed
Bug 463162
Opened 16 years ago
Closed 16 years ago
Pick-a-media-resource accepts source from non-source elements
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: cpearce, Assigned: kinetik)
References
()
Details
Attachments
(1 file, 1 obsolete file)
2.71 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Media's pick-a-media-resource (see URL for spec) is supposed to accept resources from <source> elements which are children of <video>, when <video> doesn't have a src attribute. But currently we accept src attributes from any child element of the media element, e.g.:
<video controls>
<dogfood src="video.ogg" type="video/ogg">
</video>
The above will still load "video.ogg", but it shouldn't according to the spec, the dogfood element needs to be a source element.
We can fix this in nsHTMLMediaElement::PickMediaElement() by QI'ing the children of <media> to nsIDOMHTMLSourceElement, and only taking the src attribute if the QI'd ref is non-null.
Reporter | ||
Comment 1•16 years ago
|
||
Assignee | ||
Comment 2•16 years ago
|
||
Check that the child is a source tag before using it.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Attachment #347418 -
Flags: superreview?(roc)
Attachment #347418 -
Flags: review?(roc)
I think you need to check whether the source element is in the HTML namespace too.
And add that to the test too!
Assignee | ||
Comment 5•16 years ago
|
||
Check namespace, extend test to cover this case.
Attachment #347418 -
Attachment is obsolete: true
Attachment #347439 -
Flags: superreview?(roc)
Attachment #347439 -
Flags: review?(roc)
Attachment #347418 -
Flags: superreview?(roc)
Attachment #347418 -
Flags: review?(roc)
Attachment #347439 -
Flags: superreview?(roc)
Attachment #347439 -
Flags: superreview+
Attachment #347439 -
Flags: review?(roc)
Attachment #347439 -
Flags: review+
Assignee | ||
Comment 7•16 years ago
|
||
The fix and test for this are included in the patch attached to bug 464158, so this bug should depend on that one.
Depends on: 464158
Fixed by checkin for bug 464158.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•