The default bug view has changed. See this FAQ.

canPlayType should return "", not "no"

RESOLVED FIXED

Status

()

Core
Audio/Video
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

({dev-doc-complete, verified1.9.1})

Trunk
dev-doc-complete, verified1.9.1
Points:
---
Bug Flags:
blocking1.9.2 +
blocking1.9.1.1 -

Firefox Tracking Flags

(status1.9.2 beta1-fixed, blocking1.9.1 .2+, status1.9.1 .2-fixed)

Details

Attachments

(1 attachment)

Hixie just made this change. We should make it ASAP and ram it into 1.9.1, since sites will have to be adjusted for it.

The reason for this change is that it's completely natural to write "if (v.canPlayType(...))" or "if (!v.canPlayType(...))". And thanks to JS string->bool conversion, this happily always passes (or always fails) for all possible return values. This issue was brought up on the whatwg list ages ago, but Hixie forgot to change the spec.

By returning "" instead of "no", simple uses of canPlayType will treat "no" as false and basically do what the author expects.
Flags: blocking1.9.2+
Flags: blocking1.9.1.1?
Created attachment 387822 [details] [diff] [review]
fix
Attachment #387822 - Flags: review?(chris.double)
Keywords: dev-doc-needed
Yeah, let's block on this... needs review soon though.
Flags: blocking1.9.1.1? → blocking1.9.1.1+
Whiteboard: [needs r=cdouble]

Updated

8 years ago
Attachment #387822 - Flags: review?(chris.double) → review+
http://hg.mozilla.org/mozilla-central/rev/831a02b18da0
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Comment on attachment 387822 [details] [diff] [review]
fix

Has to wait for 1.9.1.12
Attachment #387822 - Flags: approval1.9.1.2?
blocking1.9.1: --- → .2+
Flags: blocking1.9.1.1+ → blocking1.9.1.1-
Comment on attachment 387822 [details] [diff] [review]
fix

a=beltzner, please land on mozilla-1.9.1
Attachment #387822 - Flags: approval1.9.1.2? → approval1.9.1.2+
Whiteboard: [needs r=cdouble]
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/6180a70604f1
Keywords: fixed1.9.1
status1.9.1: --- → .2-fixed
Keywords: fixed1.9.1

Updated

8 years ago
Keywords: dev-doc-needed → dev-doc-complete

Comment 7

8 years ago
Verified on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2.  Patch has testcases
Keywords: verified1.9.1
Mass change: adding fixed1.9.2 keyword

(This bug was identified as a mozilla1.9.2 blocker which was fixed before the mozilla-1.9.2 repository was branched (August 13th, 2009) as per this query: http://is.gd/2ydcb - if this bug is not actually fixed on mozilla1.9.2, please remove the keyword. Apologies for the bugspam)
Keywords: fixed1.9.2
status1.9.2: --- → beta1-fixed
Keywords: fixed1.9.2
You need to log in before you can comment on or make changes to this bug.