Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-24 Thread Ryosuke Niwa
On Thu, Aug 23, 2012 at 5:10 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Aug 23, 2012 at 4:32 PM, Glenn Maynard gl...@zewt.org wrote: On Thu, Aug 23, 2012 at 12:19 PM, Ryosuke Niwa rn...@webkit.org wrote: It is not worse either way. Equally bad both ways. But, we're designing a

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-24 Thread Ryosuke Niwa
On Fri, Aug 24, 2012 at 1:41 PM, Ryosuke Niwa rn...@webkit.org wrote: On Thu, Aug 23, 2012 at 5:10 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Aug 23, 2012 at 4:32 PM, Glenn Maynard gl...@zewt.org wrote: On Thu, Aug 23, 2012 at 12:19 PM, Ryosuke Niwa rn...@webkit.org wrote: It is

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Olli Pettay
On 08/22/2012 10:44 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org mailto:o...@chromium.org wrote: On Wed, Aug 22, 2012 at 6:49 PM, Ryosuke Niwa rn...@webkit.org mailto:rn...@webkit.org wrote: On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Maciej Stachowiak
On Aug 22, 2012, at 11:08 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 10:44 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org mailto:o...@chromium.org wrote: On Wed, Aug 22, 2012 at 6:49 PM, Ryosuke Niwa rn...@webkit.org

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Ryosuke Niwa
On Wed, Aug 22, 2012 at 10:44 PM, Maciej Stachowiak m...@apple.com wrote: BTW, I don't think the API should impose any requirements on how browsers handle undo for their built-in form controls. I have not read the spec close enough to know if that is the case. No, the spec. currently doesn't

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Ryosuke Niwa
On Wed, Aug 22, 2012 at 11:16 PM, Maciej Stachowiak m...@apple.com wrote: On Aug 22, 2012, at 11:08 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 10:44 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org mailto: o...@chromium.org wrote:

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Olli Pettay
On 08/22/2012 11:16 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 11:08 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 10:44 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org mailto:o...@chromium.org wrote: On Wed, Aug 22, 2012 at

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Olli Pettay
(And this time to the mailing list too. Sorry for spamming) On 08/22/2012 11:16 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 11:08 PM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 10:44 PM, Maciej Stachowiak wrote: On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Olli Pettay
On 08/22/2012 11:28 PM, Ryosuke Niwa wrote: On Wed, Aug 22, 2012 at 11:16 PM, Maciej Stachowiak m...@apple.com mailto:m...@apple.com wrote: On Aug 22, 2012, at 11:08 PM, Olli Pettay olli.pet...@helsinki.fi mailto:olli.pet...@helsinki.fi wrote: On 08/22/2012 10:44 PM, Maciej

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Ryosuke Niwa
Ryosuke Niwa Software Engineer Google Inc. On Thu, Aug 23, 2012 at 6:55 AM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 11:16 PM, Maciej Stachowiak wrote: But, again, letting webpages force that behavior in Safari seems wrong to me. I don't think we should allow violating

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Ryosuke Niwa
On Thu, Aug 23, 2012 at 10:19 AM, Ryosuke Niwa rn...@webkit.org wrote: On Thu, Aug 23, 2012 at 6:55 AM, Olli Pettay olli.pet...@helsinki.fi wrote: On 08/22/2012 11:16 PM, Maciej Stachowiak wrote: But, again, letting webpages force that behavior in Safari seems wrong to me. I don't think

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Glenn Maynard
On Thu, Aug 23, 2012 at 12:19 PM, Ryosuke Niwa rn...@webkit.org wrote: It is not worse either way. Equally bad both ways. But, we're designing a new API here, so we should make the API as good as possible from the start. And I think that means allowing multiple undo stack must be in. The

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-23 Thread Jonas Sicking
On Thu, Aug 23, 2012 at 4:32 PM, Glenn Maynard gl...@zewt.org wrote: On Thu, Aug 23, 2012 at 12:19 PM, Ryosuke Niwa rn...@webkit.org wrote: It is not worse either way. Equally bad both ways. But, we're designing a new API here, so we should make the API as good as possible from the start. And

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Maciej Stachowiak
Hi folks, I wanted to mention that, in addition to the extra implementation complexity, I am not sure that multiple independent UndoManagers per page is even a good feature. The use cases document gives a use case of a text editor with an embedded vector graphics editor. But for all the

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Glenn Maynard
On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also raised the possibility of multiple text fields having separate UndoManagers. On Mac, most apps wipe they undo queue when you change text field focus. WebKit preserves a single undo queue across text fields,

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Ryosuke Niwa
On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also raised the possibility of multiple text fields having separate UndoManagers. On Mac, most apps wipe they undo queue when you change text

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Ojan Vafai
On Wed, Aug 22, 2012 at 6:49 PM, Ryosuke Niwa rn...@webkit.org wrote: On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also raised the possibility of multiple text fields having separate

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Glenn Maynard
On Wed, Aug 22, 2012 at 8:49 PM, Ryosuke Niwa rn...@webkit.org wrote: On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also raised the possibility of multiple text fields having separate

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Ryosuke Niwa
On Aug 22, 2012 7:40 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 8:49 PM, Ryosuke Niwa rn...@webkit.org wrote: On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-22 Thread Maciej Stachowiak
On Aug 22, 2012, at 6:53 PM, Ojan Vafai o...@chromium.org wrote: On Wed, Aug 22, 2012 at 6:49 PM, Ryosuke Niwa rn...@webkit.org wrote: On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak m...@apple.com wrote: Ryosuke also

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Jonas Sicking
Will this still allow a node which has an undo manager to be moved from one part of the document to another part of the document, without losing all transactions attached to the undo manager? That seems like an important use case. / Jonas On Mon, Aug 20, 2012 at 9:52 PM, Ryosuke Niwa

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Ryosuke Niwa
No. Allowing the host to be moved without removing automatic transaction is what causes the problem because automatic transactions need to keep relevant nodes alive. Essentially, this has the same problem has the magic iframe. We can alternatively change the way automatic transactions work so

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Jonas Sicking
On Mon, Aug 20, 2012 at 11:56 PM, Ryosuke Niwa rn...@webkit.org wrote: No. Allowing the host to be moved without removing automatic transaction is what causes the problem because automatic transactions need to keep relevant nodes alive. Essentially, this has the same problem has the magic

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Ryosuke Niwa
On Tue, Aug 21, 2012 at 1:54 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Aug 20, 2012 at 11:56 PM, Ryosuke Niwa rn...@webkit.org wrote: No. Allowing the host to be moved without removing automatic transaction is what causes the problem because automatic transactions need to keep

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Adam Barth
[Re-sending from the proper address.] On Tue, Aug 21, 2012 at 1:54 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Aug 20, 2012 at 11:56 PM, Ryosuke Niwa rn...@webkit.org wrote: No. Allowing the host to be moved without removing automatic transaction is what causes the problem because

Re: [UndoManager] Disallowing live UndoManager on detached nodes

2012-08-21 Thread Ryosuke Niwa
Maciej, Ojan, and I had a further conversion about this matter off the list, and we've concluded that we should drop the support for undoscope content attribute altogether. So we're just going to do that and let authors use iframe to have multiple undo managers. I can keep it around in the spec

[UndoManager] Disallowing live UndoManager on detached nodes

2012-08-20 Thread Ryosuke Niwa
Greetings all, We've been implementing undo manager in WebKit, and we've found out that allowing live undo manager on a detached undo scope host is a terrible idea. e.g. say you have a subtree like follows: - A - B - D - C where A is the undo scope host. If we then