Re: [whatwg] Exposing visible string of an input field

2012-09-10 Thread Kang-Hao (Kenny) Lu
(12/09/07 17:49), TAMURA, Kent wrote: Proposal: I'd like to propose adding new IDL attribute to HTMLInputElement. readonly attribute DOMString rawValue; If I understand the main use case correctly. This probably should be called displayValue or something. It returns text content which

[whatwg] DOM4: createHTMLDocument argument

2012-09-10 Thread Erik Arvidsson
In WebKit the argument to createHTMLDocument is optional, defaulting to the empty string. In DOM4 it is a required argument http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#domimplementation It seems reasonable to change the spec here since it is common to want to create a document

[whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
I sent this to the public-h...@w3.org list: http://www.w3.org/mid/b2fff68c-cd91-4273-8087-ec3058d24...@apple.com Copied below. [[[ I propose adding a new method to HTMLCanvasElement: interface HTMLCanvasElement : HTMLElement { boolean supportsContext(DOMString contextId, any... arguments);

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Tobie Langel
On Sep 10, 2012, at 8:14 PM, Dean Jackson d...@apple.com wrote: I propose adding a new method to HTMLCanvasElement: interface HTMLCanvasElement : HTMLElement { boolean supportsContext(DOMString contextId, any... arguments); }; supportsContext takes the same parameters as getContext, and

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:28 PM, Tobie Langel tobie.lan...@gmail.com wrote: On Sep 10, 2012, at 8:14 PM, Dean Jackson d...@apple.com wrote: I propose adding a new method to HTMLCanvasElement: interface HTMLCanvasElement : HTMLElement { boolean supportsContext(DOMString contextId, any...

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Ashley Gullen
Can't Modernizr just lazy load the WebGL context? (i.e. only try to create a context if the web page actually asks if WebGL is supported) On the other hand I would love to see a supportsContext function which can tell if WebGL is software rendered (i.e. Swiftshader in Chrome). There's been a

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:35 PM, Ashley Gullen ash...@scirra.com wrote: Can't Modernizr just lazy load the WebGL context? (i.e. only try to create a context if the web page actually asks if WebGL is supported) Yes, it could. But we don't control Modernizr or any other scripts people might

Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

2012-09-10 Thread Vladimir Vukicevic
This is pretty tricky to get right -- there's just a general graphics problem in this case. There are valid use cases for both sampling outside and not sampling outside the source rectangle, as well as implementation issues for being able to do source rectangle clamping. For example, should you

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Tobie Langel
On Sep 10, 2012, at 9:32 PM, Dean Jackson d...@apple.com wrote: On Sep 10, 2012, at 12:28 PM, Tobie Langel tobie.lan...@gmail.com wrote: On Sep 10, 2012, at 8:14 PM, Dean Jackson d...@apple.com wrote: I propose adding a new method to HTMLCanvasElement: interface HTMLCanvasElement :

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:44 PM, Tobie Langel tobie.lan...@gmail.com wrote: What about enabling feature detection by providing a method per context? interface HTMLCanvasElement : HTMLElement { object get2DContext(); object getWebGLContext(any... args); }; That way, developers can use

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Tobie Langel
This is actually what we could do now. We could hide window.WebGLRenderingContext when we can't create one. But then we'd have to hide all these too: attribute [Conditional=WEBGL] WebGLActiveInfoConstructor WebGLActiveInfo; attribute [Conditional=WEBGL]

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Rick Waldron
On Mon, Sep 10, 2012 at 3:56 PM, Tobie Langel tobie.lan...@gmail.comwrote: This is actually what we could do now. We could hide window.WebGLRenderingContext when we can't create one. But then we'd have to hide all these too: attribute [Conditional=WEBGL] WebGLActiveInfoConstructor

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 1:03 PM, Rick Waldron waldron.r...@gmail.com wrote: On Mon, Sep 10, 2012 at 3:56 PM, Tobie Langel tobie.lan...@gmail.com wrote: This is actually what we could do now. We could hide window.WebGLRenderingContext when we can't create one. But then we'd have to hide

Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

2012-09-10 Thread Jeff Muizelaar
On 2012-09-10, at 3:43 PM, Vladimir Vukicevic wrote: This is pretty tricky to get right -- there's just a general graphics problem in this case. There are valid use cases for both sampling outside and not sampling outside the source rectangle, as well as implementation issues for being able

Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

2012-09-10 Thread Justin Novosad
On Mon, Sep 10, 2012 at 4:49 PM, Jeff Muizelaar jmuizel...@mozilla.comwrote: On 2012-09-10, at 3:43 PM, Vladimir Vukicevic wrote: FWIW, there are also negative performance implications to clamping samples to the source rect. Many graphics APIs do not support this kind sampling, and

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Mike Taylor
On Mon, 10 Sep 2012 13:14:30 -0500, Dean Jackson d...@apple.com wrote: To give a real world example, the popular tool Modernizr tests for the availability of WebGL by attempting to create a WebGL context. This can happen even on pages that have no intention of using WebGL - an author has

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Ashley Gullen
On 10 September 2012 20:39, Dean Jackson d...@apple.com wrote: On Sep 10, 2012, at 12:35 PM, Ashley Gullen ash...@scirra.com wrote: Can't Modernizr just lazy load the WebGL context? (i.e. only try to create a context if the web page actually asks if WebGL is supported) Yes, it could. But

Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

2012-09-10 Thread Jeff Muizelaar
On 2012-09-10, at 5:28 PM, Justin Novosad wrote: On Mon, Sep 10, 2012 at 4:49 PM, Jeff Muizelaar jmuizel...@mozilla.com wrote: On 2012-09-10, at 3:43 PM, Vladimir Vukicevic wrote: FWIW, there are also negative performance implications to clamping samples to the source rect. Many

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Glenn Maynard
On Mon, Sep 10, 2012 at 2:39 PM, Dean Jackson d...@apple.com wrote: Can't Modernizr just lazy load the WebGL context? (i.e. only try to create a context if the web page actually asks if WebGL is supported) Yes, it could. But we don't control Modernizr or any other scripts people might use.

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Glenn Maynard
On Mon, Sep 10, 2012 at 5:39 PM, Tobie Langel tobie.lan...@gmail.comwrote: It's too late; WebGL is a shipping, widely-used API. (This isn't a WebGL problem, either; it's just doing what every other API on the platform does. I don't think WebIDL even has a mechanism to put interfaces

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Boris Zbarsky
On 9/10/12 6:39 PM, Tobie Langel wrote: interface WebGLActiveInfo { readonly attribute GLint size; readonly attribute GLenum type; readonly attribute DOMString name; }; That just added a WebGLActiveInfo property on Window. Unless you meant to make this [NoInterfaceObject]?

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Paul Irish
On Mon, Sep 10, 2012 at 3:14 PM, Glenn Maynard gl...@zewt.org wrote: (By the way, I'm not sure about it being bad practice to create a context in advance. It's just standard feature testing, which is exactly how JavaScript developers have been taught to detect features. Indeed, js

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Tobie Langel
On Tue, Sep 11, 2012 at 12:52 AM, Glenn Maynard gl...@zewt.org wrote: On Mon, Sep 10, 2012 at 5:39 PM, Tobie Langel tobie.lan...@gmail.com wrote: It's too late; WebGL is a shipping, widely-used API. (This isn't a WebGL problem, either; it's just doing what every other API on the platform

[whatwg] Including HTML more directly into SVG

2012-09-10 Thread Tab Atkins Jr.
This is a continuation of a discussion started in the #whatwg IRC room, so I'll start somewhat abruptly. 1. Check out http://www.xanthir.com/etc/railroad-diagrams/example.html. See all those boxes full of text in the diagrams? Looks simple, right? Just a box filled with text, with a border and

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Cameron McCormack
Tobie Langel: No. It sounds like I should be fast asleep instead of making a fool of myself and wasting everybody's time. It is however the kind of thing that Tab wants to do for CSS (have a window.CSS object that is like a namespace object for some CSS interfaces -- the concept for which