Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
On 07/05/2012 08:00 AM, Adam Barth wrote: On Wed, Jul 4, 2012 at 5:25 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 03:11 AM, Ryosuke Niwa wrote: On Wed, Jul 4, 2012 at 5:00 PM, Olli Pettay olli.pet...@helsinki.fi mailto:olli.pet...@helsinki.fi wrote: On 07/05/2012 01:38

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
But anyhow, event based API is ok to me. In general I prefer events/event listeners over other callbacks. On 07/05/2012 11:37 AM, Olli Pettay wrote: On 07/05/2012 08:00 AM, Adam Barth wrote: On Wed, Jul 4, 2012 at 5:25 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 03:11 AM,

Re: Quota Management API error codes

2012-07-05 Thread Jochen Eisinger
On Wed, Jul 4, 2012 at 11:21 AM, Anne van Kesteren ann...@annevk.nl wrote: On Tue, Jul 3, 2012 at 2:56 PM, Jochen Eisinger joc...@chromium.org wrote: while reading http://www.w3.org/TR/quota-api/#quota-handling-in-storage-api I wondered what the desired behavior was when the UA refuses to

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Adam Barth
On Thu, Jul 5, 2012 at 1:37 AM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 08:00 AM, Adam Barth wrote: On Wed, Jul 4, 2012 at 5:25 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 03:11 AM, Ryosuke Niwa wrote: So, it is very much implementation detail. (And I still

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
On 07/05/2012 05:15 PM, Adam Barth wrote: On Thu, Jul 5, 2012 at 1:37 AM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 08:00 AM, Adam Barth wrote: On Wed, Jul 4, 2012 at 5:25 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 03:11 AM, Ryosuke Niwa wrote: So, it is very

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread James Graham
On 07/05/2012 12:38 AM, Ryosuke Niwa wrote: Hi all, Sukolsak has been implementing the Undo Manager API in WebKit but the fact undoManager.transact() takes a pure JS object with callback functions is making it very challenging. The problem is that this object needs to be kept alive by either

[Bug 17702] New: [IndexedDB editorial] IDBIndex.getKey should tell what it's doing

2012-07-05 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17702 Summary: [IndexedDB editorial] IDBIndex.getKey should tell what it's doing Product: WebAppsWG Version: unspecified Platform: All OS/Version: All Status: NEW

Re: Quota Management API error codes

2012-07-05 Thread Maxime RETY
Sorry for being unclear. I would like to see the standard to include what happens when a page requests quota using requestQuota, but the UA doesn't fulfill the request because of some user configured policies (and not because it's just not possible). This would allow a web site to display

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ojan Vafai
On Thu, Jul 5, 2012 at 7:15 AM, Adam Barth w...@adambarth.com wrote: On Thu, Jul 5, 2012 at 1:37 AM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 08:00 AM, Adam Barth wrote: On Wed, Jul 4, 2012 at 5:25 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 07/05/2012 03:11 AM,

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
On 07/05/2012 08:01 PM, Ojan Vafai wrote: On Thu, Jul 5, 2012 at 7:15 AM, Adam Barth w...@adambarth.com mailto:w...@adambarth.com wrote: On Thu, Jul 5, 2012 at 1:37 AM, Olli Pettay olli.pet...@helsinki.fi mailto:olli.pet...@helsinki.fi wrote: On 07/05/2012 08:00 AM, Adam Barth

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
Btw, is there something unique with UndoManager which causes implementation problems in WebKit? There are plenty of other APIs not using eventlisteners which take JS callbacks: setTimeout, requestAnimationFrame, Google's File System API, PeerConnection ... Why aren't those causing problems? We

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ryosuke Niwa
On Thu, Jul 5, 2012 at 8:08 AM, James Graham jgra...@opera.com wrote: On 07/05/2012 12:38 AM, Ryosuke Niwa wrote: After this change, authors can write: scope.undoManager.transact(new AutomaticDOMTransaction{**function () { scope.appendChild(foo); }, 'append foo')); instead of:

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Olli Pettay
On 07/05/2012 10:05 PM, Ryosuke Niwa wrote: Also, I think consistency matters a lot here. I'm not aware of any other Web-facing API that takes a pure object with callback functions. Except of course event listeners. Well, addEventListener can take an object with _a_ callback function. I

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread James Graham
On Thu, 5 Jul 2012, Ryosuke Niwa wrote: On Thu, Jul 5, 2012 at 8:08 AM, James Graham jgra...@opera.com wrote: On 07/05/2012 12:38 AM, Ryosuke Niwa wrote: After this change, authors can write: scope.undoManager.transact(new AutomaticDOMTransaction{function () {      

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ryosuke Niwa
On Thu, Jul 5, 2012 at 12:45 PM, James Graham jgra...@opera.com wrote: On Thu, 5 Jul 2012, Ryosuke Niwa wrote: On Thu, Jul 5, 2012 at 8:08 AM, James Graham jgra...@opera.com **wrote: On 07/05/2012 12:38 AM, Ryosuke Niwa wrote: After this change, authors can write:

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Yuval Sadan
Passing in objects containing one or more non-callback properties is also an increaingly common pattern, and we are trying to replace legacy APIs that took lots of positional arguments with options-object based replacements (e.g. init*Event). From the point of view of a javascript author

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ryosuke Niwa
Thanks for the feedback. We need more developer feedbacks on this spec. On Jul 5, 2012 1:50 PM, Yuval Sadan sadan.yu...@gmail.com wrote: Passing in objects containing one or more non-callback properties is also an increaingly common pattern, and we are trying to replace legacy APIs that took

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Yuval Sadan
To sum up, as an author I vote for-- var t = undoManager.transact(foo); t.onundo = function() { ... }; OR t.setUndo(function() { }); How do you envision it should work with an automatic transaction? We need some mechanism to tell the UA record DOM mutations while I'm calling

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ryosuke Niwa
On Jul 5, 2012 2:50 PM, Yuval Sadan sadan.yu...@gmail.com wrote: To sum up, as an author I vote for-- var t = undoManager.transact(foo); t.onundo = function() { ... }; OR t.setUndo(function() { }); How do you envision it should work with an automatic transaction? We need some

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ojan Vafai
On Thu, Jul 5, 2012 at 1:02 PM, Ryosuke Niwa rn...@webkit.org wrote: On Thu, Jul 5, 2012 at 12:45 PM, James Graham jgra...@opera.com wrote: On Thu, 5 Jul 2012, Ryosuke Niwa wrote: On Thu, Jul 5, 2012 at 8:08 AM, James Graham jgra...@opera.com ** wrote: On 07/05/2012 12:38 AM,

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Yuval Sadan
t = undoManager.transact(foobar, function() { ... }); t.onredo = function() { /* custom redo */ }; t.execute(); Whether onundo/onredo are assigned upon execute() is well defined, so basing behavior on that is clear enough for me. Plus, I wonder - what is a non-automatic transaction

Re: [UndoManager] Re-introduce DOMTransaction interface?

2012-07-05 Thread Ryosuke Niwa
On Thu, Jul 5, 2012 at 4:27 PM, Ojan Vafai o...@chromium.org wrote: On Thu, Jul 5, 2012 at 1:02 PM, Ryosuke Niwa rn...@webkit.org wrote: On Thu, Jul 5, 2012 at 12:45 PM, James Graham jgra...@opera.com wrote: On Thu, 5 Jul 2012, Ryosuke Niwa wrote: On Thu, Jul 5, 2012 at 8:08 AM, James