Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Maciej Stachowiak
On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote: On Tue, Feb 23, 2010 at 9:57 PM, Maciej Stachowiak m...@apple.com wrote: - Raytracing a complex scene at high resolution. - Drawing a highly zoomed in high resolution portion of the Mandelbrot set. To be fair though, you could compute

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Anne van Kesteren
On Wed, 24 Feb 2010 05:56:31 +0100, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible. Web developers shouldn't have to parse a cookie-string or prepare a properly formated set-cookie-string. Here's a proposal for an HTML cookie API that isn't as terrible:

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Maciej Stachowiak
On Feb 24, 2010, at 12:09 AM, Maciej Stachowiak wrote: On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote: On Tue, Feb 23, 2010 at 9:57 PM, Maciej Stachowiak m...@apple.com wrote: - Raytracing a complex scene at high resolution. - Drawing a highly zoomed in high resolution portion of the

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Darin Fisher
An explicit deleteCookie method might also be nice. -Darin On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible. Web developers shouldn't have to parse a cookie-string or prepare a properly formated set-cookie-string. Here's a

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Jonas Sicking
On Wed, Feb 24, 2010 at 12:14 AM, Maciej Stachowiak m...@apple.com wrote: On Feb 24, 2010, at 12:09 AM, Maciej Stachowiak wrote: On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote: On Tue, Feb 23, 2010 at 9:57 PM, Maciej Stachowiak m...@apple.com wrote: - Raytracing a complex scene at high

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Jonas Sicking
On Wed, Feb 24, 2010 at 1:35 AM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Feb 24, 2010 at 12:14 AM, Maciej Stachowiak m...@apple.com wrote: On Feb 24, 2010, at 12:09 AM, Maciej Stachowiak wrote: On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote: On Tue, Feb 23, 2010 at 9:57 PM, Maciej

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Maciej Stachowiak
On Feb 24, 2010, at 1:35 AM, Jonas Sicking wrote: On Wed, Feb 24, 2010 at 12:14 AM, Maciej Stachowiak m...@apple.com wrote: On Feb 24, 2010, at 12:09 AM, Maciej Stachowiak wrote: On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote: On Tue, Feb 23, 2010 at 9:57 PM, Maciej Stachowiak

Re: [whatwg] whatwg Digest, Vol 71, Issue 72

2010-02-24 Thread Anthony
On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible. Web developers shouldn't have to parse a cookie-string or prepare a properly formated set-cookie-string. Here's a proposal for an HTML cookie API that isn't as terrible:

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Andrew Grieve
Regarding the three steps of offscreen rendering: 1. Draw stuff 2. Ship pixels to main thread 3. Draw them on the screen. How would you do #2 efficiently? If you used toDataUr*l*(), then you have to encode a png on one side and then decode the png on the main thread. I think we might want to add

Re: [whatwg] Offscreen canvas (or canvas for web workers).

2010-02-24 Thread Anne van Kesteren
On Wed, 24 Feb 2010 16:45:44 +0100, Andrew Grieve agri...@google.com wrote: How would you do #2 efficiently? If you used toDataUr*l*(), then you have to encode a png on one side and then decode the png on the main thread. I think we might want to add some sort of API for blitting directly

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Tue, Feb 23, 2010 at 10:22 PM, Darin Fisher da...@chromium.org wrote: On Tue, Feb 23, 2010 at 9:21 PM, Adam Barth w...@adambarth.com wrote: On Tue, Feb 23, 2010 at 9:15 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The

Re: [whatwg] whatwg Digest, Vol 71, Issue 72

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 3:55 AM, Anthony antsc...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have to parse a cookie-string or prepare a properly formated set-cookie-string.  

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 12:12 AM, Anne van Kesteren ann...@opera.com wrote: On Wed, 24 Feb 2010 05:56:31 +0100, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have to parse a cookie-string or prepare a properly formated

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
Done. On Wed, Feb 24, 2010 at 12:29 AM, Darin Fisher da...@chromium.org wrote: An explicit deleteCookie method might also be nice. -Darin On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have to

Re: [whatwg] whatwg Digest, Vol 71, Issue 72

2010-02-24 Thread Boris Zbarsky
On 2/24/10 1:04 PM, David Flanagan wrote: If I've been following the thread correctly, the justification for an asynchronous API was that localStorage is a mess, or something like that. I'm not aware of what the issues are with localStorage In brief, the fact that if you have multiple threads

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Nicholas Zakas
I like the idea of creating an easier way to deal with cookies (which is why I wrote the YUI Cookie utility way back when). The thing that seems to be missing in your proposed API is what I consider to be the most common use case: retrieving the value of a single cookie. There's not many times

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Darin Fisher
For reference, reading document.cookie has measurable performance cost in Chromium since the cookie jar lives in a process separate from the process running JavaScript. We could have minimized this cost by caching the cookies locally, but then there are cache coherency issues. I think the cookie

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Jeremy Orlow
On Wed, Feb 24, 2010 at 8:23 PM, Peter Kasting pkast...@google.com wrote: On Wed, Feb 24, 2010 at 11:11 AM, Nicholas Zakas nza...@yahoo-inc.comwrote: I'm also less-than-thrilled with this being asynchronous, as I think the use cases for cookies are vastly differently than those for databases

Re: [whatwg] HTML Cookie API

2010-02-24 Thread David Flanagan
Jeremy Orlow wrote: Also note that the spec currently has the notion of a storage mutex which should be taken whenever a script tries to access a cookie (or local storage) and is held until the script finishes. The network stack is also supposed to take this lock whenever getting or

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Jeremy Orlow
On Wed, Feb 24, 2010 at 9:07 PM, David Flanagan da...@davidflanagan.comwrote: Jeremy Orlow wrote: Also note that the spec currently has the notion of a storage mutex which should be taken whenever a script tries to access a cookie (or local storage) and is held until the script finishes.

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Nicholas Zakas
I think there's always going to be a disconnect between browser developers and web developers, since we're both living in very different worlds. Like I said, I'm all for making cookie access more rational (as if one could argue that it has been at all rational to this point). Right now,

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 12:44 PM, Nicholas Zakas nza...@yahoo-inc.com wrote: I think there’s always going to be a disconnect between browser developers and web developers, since we’re both living in very different worlds. Like I said, I’m all for making cookie access more rational (as if one

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 11:11 AM, Nicholas Zakas nza...@yahoo-inc.com wrote: I like the idea of creating an easier way to deal with cookies (which is why I wrote the YUI Cookie utility way back when). The thing that seems to be missing in your proposed API is what I consider to be the most

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Garrett Smith
On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have to parse a cookie-string or prepare a properly formated set-cookie-string.  Here's a proposal for an HTML cookie API that isn't as terrible:

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 4:03 PM, Garrett Smith dhtmlkitc...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have to parse a cookie-string or prepare a properly formated

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Garrett Smith
On Wed, Feb 24, 2010 at 4:17 PM, Adam Barth w...@adambarth.com wrote: On Wed, Feb 24, 2010 at 4:03 PM, Garrett Smith dhtmlkitc...@gmail.com wrote: On Tue, Feb 23, 2010 at 8:56 PM, Adam Barth w...@adambarth.com wrote: The document.cookie API is kind of terrible.  Web developers shouldn't have

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Peter Kasting
On Wed, Feb 24, 2010 at 4:30 PM, Garrett Smith dhtmlkitc...@gmail.comwrote: Where is the argument for making the API async? Please see the discussion earlier in this thread. Can you be more specific? I see: | I really think the API should be asynchronous, as to avoid the mess | that

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 4:30 PM, Garrett Smith dhtmlkitc...@gmail.com wrote: On Wed, Feb 24, 2010 at 4:17 PM, Adam Barth w...@adambarth.com wrote: On Wed, Feb 24, 2010 at 4:03 PM, Garrett Smith dhtmlkitc...@gmail.com wrote: Instead of array like, I would like to rather have a NamedCookieMap,

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Nicholas Zakas
Even though there can be multiple cookies with the same name on a single document, this most frequently occurs due to error rather than intention. I've never received a YUI bug report about this occurrence though I have considered returning an array of values instead of just the first value in

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 5:00 PM, Nicholas Zakas nza...@yahoo-inc.com wrote: Even though there can be multiple cookies with the same name on a single document, this most frequently occurs due to error rather than intention. I've never received a YUI bug report about this occurrence though I

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Darin Fisher
On Wed, Feb 24, 2010 at 6:08 PM, Adam Barth w...@adambarth.com wrote: On Wed, Feb 24, 2010 at 5:00 PM, Nicholas Zakas nza...@yahoo-inc.com wrote: Even though there can be multiple cookies with the same name on a single document, this most frequently occurs due to error rather than intention.

Re: [whatwg] HTML Cookie API

2010-02-24 Thread Adam Barth
On Wed, Feb 24, 2010 at 8:49 PM, Darin Fisher da...@chromium.org wrote: Some other random comments: 1- Perhaps deleteCookie should also take an optional error callback. Done. It's a bit strange, but deleteCookie can fail in third-party contexts. 2- Is it possible for setCookie to be used to