Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Justin Novosad
On Wed, Mar 5, 2014 at 11:42 PM, Rik Cabanier caban...@gmail.com wrote: Testing all browsers (except IE since document.implementation.createHTMLDocument() doesn't work) they seem to handle canvas contexts with no browsing context except when you use text. Chrome crashes, firefox throws an

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Rik Cabanier
On Thu, Mar 6, 2014 at 8:31 AM, Justin Novosad ju...@google.com wrote: On Wed, Mar 5, 2014 at 11:42 PM, Rik Cabanier caban...@gmail.com wrote: Testing all browsers (except IE since document.implementation.createHTMLDocument() doesn't work) they seem to handle canvas contexts with no

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Justin Novosad
On Thu, Mar 6, 2014 at 11:47 AM, Rik Cabanier caban...@gmail.com wrote: On Thu, Mar 6, 2014 at 8:31 AM, Justin Novosad ju...@google.com wrote: On Wed, Mar 5, 2014 at 11:42 PM, Rik Cabanier caban...@gmail.com wrote: Testing all browsers (except IE since

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Ian Hickson
On Wed, 5 Mar 2014, Rik Cabanier wrote: Testing all browsers (except IE since document.implementation.createHTMLDocument() doesn't work) they seem to handle canvas contexts with no browsing context except when you use text. Chrome crashes, firefox throws an exception and Safari draws the

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Justin Novosad
On Thu, Mar 6, 2014 at 1:17 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: Testing all browsers (except IE since document.implementation.createHTMLDocument() doesn't work) they seem to handle canvas contexts with no browsing context except when you use

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Ian Hickson
On Thu, 6 Mar 2014, Justin Novosad wrote: On Thu, Mar 6, 2014 at 1:17 PM, Ian Hickson i...@hixie.ch wrote: On Wed, 5 Mar 2014, Rik Cabanier wrote: Testing all browsers (except IE since document.implementation.createHTMLDocument() doesn't work) they seem to handle canvas contexts

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-06 Thread Justin Novosad
On Thu, Mar 6, 2014 at 1:45 PM, Ian Hickson i...@hixie.ch wrote: On Thu, 6 Mar 2014, Justin Novosad wrote: How do we interpret that for Path objects? Does adding text to a path count as a case where font style is undefined, or do we defer and resolve the font style when the path object

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-05 Thread Rik Cabanier
On Mon, Mar 3, 2014 at 9:57 AM, Justin Novosad ju...@google.com wrote: Hello whatwg, Say you create a new document using document.implementation.createHTMLDocument(), you get a document without a browsing context. This means that style and layout will never be calculated on the document.

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-05 Thread Boris Zbarsky
On 3/5/14 11:42 PM, Rik Cabanier wrote: Since this is such a small edge case, it seems reasonable to disallow the creation of a 2d context and throw an exception. Going through all the APIs and flagging them as suitable for a context-less environment is not really worth the effort. What

Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-05 Thread Rik Cabanier
On Wed, Mar 5, 2014 at 8:48 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 3/5/14 11:42 PM, Rik Cabanier wrote: Since this is such a small edge case, it seems reasonable to disallow the creation of a 2d context and throw an exception. Going through all the APIs and flagging them as suitable

[whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

2014-03-03 Thread Justin Novosad
Hello whatwg, Say you create a new document using document.implementation.createHTMLDocument(), you get a document without a browsing context. This means that style and layout will never be calculated on the document. Some of those calculations are context dependent, so they can't even be