Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Tobie Langel
On Sep 11, 2012, at 7:09, Cameron McCormack wrote: > 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 namespa

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

2012-09-10 Thread TAMURA, Kent
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. Yeah, displayValue sounds better. What about type=file ? IMO, the IDL at

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 use

[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 . See all those boxes full of text in the diagrams? Looks simple, right? Just a box filled with text, with a border an

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Tobie Langel
On Tue, Sep 11, 2012 at 12:52 AM, Glenn Maynard wrote: > On Mon, Sep 10, 2012 at 5:39 PM, Tobie Langel > 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 >> > does. >> > I don'

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Paul Irish
On Mon, Sep 10, 2012 at 3:14 PM, Glenn Maynard 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 developers are g

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]? i

Re: [whatwg] WebIDL nested interfaces

2012-09-10 Thread Glenn Maynard
On Mon, Sep 10, 2012 at 5:39 PM, Tobie Langel 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 > does. > > I don't think WebIDL even has a mechanism to put interfaces inside other > > obj

[whatwg] WebIDL nested interfaces

2012-09-10 Thread Tobie Langel
On Tue, Sep 11, 2012 at 12:14 AM, Glenn Maynard wrote: > On Mon, Sep 10, 2012 at 3:03 PM, Rick Waldron > wrote: >> Has anyone considered a single global WebGL object with all of those >> constructors defined as properties? >> > > It's too late; WebGL is a shipping, widely-used API. (This isn't

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Glenn Maynard
On Mon, Sep 10, 2012 at 2:39 PM, Dean Jackson 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. I'd rath

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 > 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 graphics APIs d

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Ashley Gullen
On 10 September 2012 20:39, Dean Jackson wrote: > > On Sep 10, 2012, at 12:35 PM, Ashley Gullen 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 Modern

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Mike Taylor
On Mon, 10 Sep 2012 13:14:30 -0500, Dean Jackson 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 just inserted Mode

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 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 graphics APIs do not support this kind sampling, > and supporting this behavio

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 a

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 1:03 PM, Rick Waldron wrote: > > > On Mon, Sep 10, 2012 at 3:56 PM, Tobie Langel 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 all these too: > > > >attribu

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Rick Waldron
On Mon, Sep 10, 2012 at 3:56 PM, Tobie Langel 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 all these too: > > > >attribute [Conditional=WEBGL] WebGLActiveInfoConstructor > WebGLActive

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] WebGLBufferCons

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:44 PM, Tobie Langel 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 idi

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Tobie Langel
On Sep 10, 2012, at 9:32 PM, Dean Jackson wrote: > > On Sep 10, 2012, at 12:28 PM, Tobie Langel wrote: > >> On Sep 10, 2012, at 8:14 PM, Dean Jackson wrote: >> >>> I propose adding a new method to HTMLCanvasElement: >>> >>> interface HTMLCanvasElement : HTMLElement { >>> boolean supportsContext

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 b

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:35 PM, Ashley Gullen 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. I'd rather pro

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 lot

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Dean Jackson
On Sep 10, 2012, at 12:28 PM, Tobie Langel wrote: > On Sep 10, 2012, at 8:14 PM, Dean Jackson wrote: > >> I propose adding a new method to HTMLCanvasElement: >> >> interface HTMLCanvasElement : HTMLElement { >> boolean supportsContext(DOMString contextId, any... arguments); >> }; >> >> suppo

Re: [whatwg] [canvas] Proposal for supportsContext

2012-09-10 Thread Tobie Langel
On Sep 10, 2012, at 8:14 PM, Dean Jackson 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 simply re

[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); }

[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 withou

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 wh