Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Philip Jägenstedt
On Tue, 07 Sep 2010 02:46:29 +0200, Gregory Maxwell gmaxw...@gmail.com wrote: On Mon, Sep 6, 2010 at 3:19 PM, Aryeh Gregor simetrical+...@gmail.com wrote: On Mon, Sep 6, 2010 at 4:14 AM, Philip Jägenstedt phil...@opera.com wrote: The Ogg page begins with the 4 bytes OggS, which is what

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Philip Jägenstedt
On Tue, 07 Sep 2010 03:56:54 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 9/6/10 3:19 PM, Aryeh Gregor wrote: On Mon, Sep 6, 2010 at 4:14 AM, Philip Jägenstedtphil...@opera.com wrote: The Ogg page begins with the 4 bytes OggS, which is what Opera (GStreamer) checks for. For additional

Re: [whatwg] The choice of script global object to use when the script element is moved

2010-09-07 Thread Henri Sivonen
NOTE! This email contains URLs to pages that crash WebKit on reload, so you probably shouldn't follow the URLs here in any WebKit-based browser where you have something important going on in the same renderer process. (In Chrome, only the isolated content process crashes.) On Fri, Sep 3, 2010

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread And Clover
On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone wants to argue for *more* sniffing, and even enshrining it in a web standard. Sniffing is a perpetual disaster that, after several

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Julian Reschke
On 07.09.2010 11:51, And Clover wrote: On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone wants to argue for *more* sniffing, and even enshrining it in a web standard. +1 Sniffing is

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Philip Jägenstedt
On Tue, 07 Sep 2010 11:51:55 +0200, And Clover and...@doxdesk.com wrote: On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone wants to argue for *more* sniffing, and even enshrining it

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Julian Reschke
On 07.09.2010 12:52, Philip Jägenstedt wrote: ... IE9, Safari and Chrome ignore Content-Type in a video context and rely on sniffing. If you want Content-Type to be respected, convince the developers of those 3 browsers to change. If not, it's quite inevitable that Opera and Firefox will

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 6:52 AM, Philip Jägenstedt wrote: It hasn't been explicitly stated, but I assume that the only cases where sniffing for video formats would be employed would be for missing Content-Type, text/plain and application/octet-stream. That's not what at least Aryeh is proposing, no. Also

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 6:01 AM, Julian Reschke wrote: Hmm, that's what Content-Disposition: attachment is for... This header is currently ignored in non-toplevel browsing contexts in web browsers, last I checked. -Boris

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 4:11 AM, Philip Jägenstedt wrote: It's garbage in at least UTF-8, Big5 and GBK. Thanks. I assume that applies to the OggS\0 sequence too, right? I appreciate the data! I'm not sure what infrastructure is in place, but perhaps one could *not* sniff if Content-Type also indicates

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Philip Jägenstedt
On Tue, 07 Sep 2010 14:54:15 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 9/7/10 6:52 AM, Philip Jägenstedt wrote: It hasn't been explicitly stated, but I assume that the only cases where sniffing for video formats would be employed would be for missing Content-Type, text/plain and

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 9:03 AM, Philip Jägenstedt wrote: On Tue, 07 Sep 2010 14:54:15 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 9/7/10 6:52 AM, Philip Jägenstedt wrote: It hasn't been explicitly stated, but I assume that the only cases where sniffing for video formats would be employed would be for

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Philip Jägenstedt
On Tue, 07 Sep 2010 14:56:38 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 9/7/10 4:11 AM, Philip Jägenstedt wrote: It's garbage in at least UTF-8, Big5 and GBK. Thanks. I assume that applies to the OggS\0 sequence too, right? I appreciate the data! UTF-8, Big5 and GBK are all (as

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 9:16 AM, Philip Jägenstedt wrote: UTF-8, Big5 and GBK are all (as far as I know) ASCII supersets. Do real-world text documents include \0 bytes? Yes. Real-world text documents include all sorts of gunk. Just rarely. As long as indicates an encoding doesn't include UTF-8 or

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Maciej Stachowiak
On Sep 7, 2010, at 3:52 AM, Philip Jägenstedt wrote: On Tue, 07 Sep 2010 11:51:55 +0200, And Clover and...@doxdesk.com wrote: On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread David Singer
On Sep 7, 2010, at 2:51 , And Clover wrote: On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone wants to argue for *more* sniffing, and even enshrining it in a web standard. Yes. We

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread David Singer
And like I said before, please be careful of assuming our intent and desires from the way things currently work. We are thinking, listening, and implementing (and fixing bugs, and re-inspecting older behavior in lower-level code), so there is some...flexibility...I think. On Sep 7, 2010, at

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Adam Barth
On Tue, Sep 7, 2010 at 3:01 AM, Julian Reschke julian.resc...@gmx.de wrote: On 07.09.2010 11:51, And Clover wrote: On 09/07/2010 03:56 AM, Boris Zbarsky wrote: P.S. Sniffing is harder that you seem to think. It really is... Quite. It surprises and saddens me that anyone wants to argue for

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 3:19 PM, Adam Barth wrote: It sadden me when standards bodies ignore reality and leave implementors to invent their own non-iteroperable algorithms for security-critical behavior. Of course nothing prevents us from saying UAs MUST NOT sniff but if they do anyway they MUST use a

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Aryeh Gregor
On Tue, Sep 7, 2010 at 5:51 AM, And Clover and...@doxdesk.com wrote: Quite. It surprises and saddens me that anyone wants to argue for *more* sniffing, and even enshrining it in a web standard. I'm not a fan of sniffing, but I'm also not a fan of blindly believing clearly wrong MIME types and

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 3:29 PM, Aryeh Gregor wrote: * Sniff only if Content-Type is typical of what popular browsers serve for unrecognized filetypes. E.g., only for no Content-Type, text/plain, or application/octet-stream, and only if the encoding is either not present or is UTF-8 or ISO-8859-1. Or

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 3:29 PM, Aryeh Gregor wrote: * Sniff only if Content-Type is typical of what popular browsers serve for unrecognized filetypes. E.g., only for no Content-Type, text/plain, or application/octet-stream, and only if the encoding is either not present or is UTF-8 or ISO-8859-1. Or

Re: [whatwg] The choice of script global object to use when the script element is moved

2010-09-07 Thread Adam Barth
On Tue, Sep 7, 2010 at 1:40 AM, Henri Sivonen hsivo...@iki.fi wrote: On Sep 3, 2010, at 20:55, Jonas Sicking wrote: On Fri, Sep 3, 2010 at 10:47 AM, Adam Barth w...@adambarth.com wrote: I'm not sure it makes much of a difference from a security point of view. Agreed. Pages can only move

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Adam Barth
On Tue, Sep 7, 2010 at 12:21 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 9/7/10 3:19 PM, Adam Barth wrote: It sadden me when standards bodies ignore reality and leave implementors to invent their own non-iteroperable algorithms for security-critical behavior. Of course nothing prevents us

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
Of course nothing prevents us from saying UAs MUST NOT sniff but if they do anyway they MUST use a given algorithm, right? That's a contrary to duty imperative, which is something that's been puzzling philosophers for centuries. A more sensible requirement would be that user agents SHOULD NOT

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Adam Barth
On Tue, Sep 7, 2010 at 2:13 PM, Boris Zbarsky bzbar...@mit.edu wrote: Of course nothing prevents us from saying UAs MUST NOT sniff but if they do anyway they MUST use a given algorithm, right? That's a contrary to duty imperative, which is something that's been puzzling philosophers for

[whatwg] ArrayBuffer and ByteArray questions

2010-09-07 Thread Jian Li
Hi, Several specs, like File API and WebGL, use ArrayBuffer, while other spec, like XMLHttpRequest Level 2, use ByteArray. Should we change to use the same name all across our specs? Since we define ArrayBuffer in the Typed Arrays spec (

Re: [whatwg] HTML6 Doctype

2010-09-07 Thread fantasai
On 08/29/2010 08:00 AM, Tab Atkins Jr. wrote: On Sat, Aug 28, 2010 at 8:15 PM, David John Burrowes bain...@davidjohnburrowes.com wrote: I agree that they don't have access to versioning info from within the languages. But, CSS has some sense of versions (CSS, CSS2, and CSS3). This gives me

Re: [whatwg] HTML6 Doctype

2010-09-07 Thread Tab Atkins Jr.
On Tue, Sep 7, 2010 at 4:45 PM, fantasai fantasai.li...@inkedblade.net wrote: On 08/29/2010 08:00 AM, Tab Atkins Jr. wrote: On Sat, Aug 28, 2010 at 8:15 PM, David John Burrowes bain...@davidjohnburrowes.com  wrote: I agree that they don't have access to versioning info from within the

Re: [whatwg] Video with MIME type application/octet-stream

2010-09-07 Thread Boris Zbarsky
On 9/7/10 5:35 PM, Adam Barth wrote: In any case, lawyering the requirement level in the spec isn't the way to solve these problems. You need to change the underlying incentives to actually affect what gets implemented. The incentive structure for pretty much any sort of sniffing is a

[whatwg] Descendents of source and track elements should be skipped when serializing HTML fragment (10.3)

2010-09-07 Thread Ryosuke Niwa
Hi, In HTML fragment serialization algorithm, we skip elements with empty content model in step 2.2: If current node is an areahttp://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-area-element ,

Re: [whatwg] Descendents of source and track elements should be skipped when serializing HTML fragment (10.3)

2010-09-07 Thread Adam Barth
The HTML parser expands the isindex element into a bunch of other elements, so it never inserts that element into the tree. Of course, an isindex element could have been inserted via the DOM... Adam On Tue, Sep 7, 2010 at 4:44 PM, Ryosuke Niwa ryosuke.n...@gmail.com wrote: Hi, In HTML

Re: [whatwg] Timed tracks: feedback compendium

2010-09-07 Thread Chris Double
On Wed, Sep 8, 2010 at 11:19 AM, Ian Hickson i...@hixie.ch wrote: On Thu, 26 Aug 2010, Chris Double wrote: Firefox (in the case of video) uses file extensions to identify video files. We have an internal maping of file extensions to mime types. We don't sniff the content. I imagine we'd do the

[whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-07 Thread Boris Zbarsky
Consider this testcase: !doctype html html body canvas id=c width=200 height=200/canvas script try { var c = document.getElementById(c), t = c.getContext(2d); t.moveTo(100, 100); t.lineTo(NaN, NaN); t.lineTo(50, 25); t.stroke(); } catch (e)

Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-07 Thread Sam Weinig
In 4.8.11.1 the spec does state: Except where otherwise specified, for the 2D context interface, any method call with a numeric argument whose value is infinite or a NaN value must be ignored. -Sam On Sep 7, 2010, at 9:41 PM, Boris Zbarsky wrote: Consider this testcase: !doctype html

Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-07 Thread Jonas Sicking
This seems like a strange choice of behavior. Given that this is very likely a bug in the program, wouldn't it make more sense to throw an exception as to make it easier to debug? Similar to for example Node.appendChild when called with a null argument. / Jonas On Tue, Sep 7, 2010 at 10:32 PM,