Ryosuke Niwa Software Engineer Google Inc.
On Thu, Aug 23, 2012 at 6:55 AM, Olli Pettay <[email protected]> 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 the platform conventions for >> undo so freely. You seem to feel strongly that webpages should be able to >> align with the Gecko behavior, but wouldn't it be even worse to let them >> forcibly violate the WebKit behavior? >> > > 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 > default handling could be somehow platform specific. > Maybe I didn't make this point clear but we're not going to implement multiple undo managers in a single document (at least as it's currently spec'ed) in WebKit regardless of how useful that feature is. *Our implementation feedback is that we can't implement it*. So if there is an API for separate undo stacks, it has to handle the case >> where there's really a single undo stack. And that would potentially be >> hard to program with. >> >> On the other hand, there are certainly use cases where a single global >> undo stack is right (such as a page with a single rich text editor). And >> it's easy to handle those cases without adding a lot of complexity. And >> if we get that right, we could try to add on something for conditional >> multiple undo stacks. >> > On Thu, Aug 23, 2012 at 7:05 AM, Olli Pettay <[email protected]>wrote: > On 08/22/2012 11:28 PM, Ryosuke Niwa wrote: > >> On Wed, Aug 22, 2012 at 11:16 PM, Maciej Stachowiak <[email protected]<mailto: >> [email protected]>> wrote: >> >> So if there is an API for separate undo stacks, it has to handle the >> case where there's really a single undo stack. And that would potentially be >> hard to program with. >> >> On the other hand, there are certainly use cases where a single >> global undo stack is right (such as a page with a single rich text editor). >> And >> it's easy to handle those cases without adding a lot of complexity. >> And if we get that right, we could try to add on something for conditional >> multiple undo stacks. >> >> >> Maybe the solution is as simple as to make undoscope content attribute an >> optional feature. >> Browsers/platforms that can have multiple undo managers >> within a single document will support undoscope content attribute, and >> those that can't won't support it. Authors will then feature-detect >> undoscope >> content attribute and support both cases. >> >> What do you guys think? >> > > There should be no optional features in this kind of API. > I disagree. - Ryosuke
