[webkit-dev] Fwd: webkit editing rewrite?

Adam Barth abarth at webkit.org
Thu Aug 5 02:22:19 PDT 2010


On Thu, Aug 5, 2010 at 1:59 AM, Maciej Stachowiak <mjs at apple.com> wrote:
>> On Aug 4, 2010 4:30:01 PM PDT, Darin Adler <darin at apple.com> wrote:
>>>> On Aug 4, 2010, at 3:48 PM, Ryosuke Niwa wrote:
>>>>> I think the kind of crashes Ojan is talking about are ones caused by
>>>> DOM mutation events.
>> <snip>
>>> It’s possible we’ll address this by changing how DOM mutation events
>>> work.
>>
>> We need to change how DOM mutation events work regardless of this
>> proposal IMO. So, lets keep that a separate discussion.
>
> If mutation events tend to break editing, one simple solution is to turn then off within the scope of editing operations and send a single mutation event at the end. It's not clear if that kind of solution would be appropriate to expose to Web content, though; you can't do the RAII idiom in JavaScript so there could be too much risk of staying stuck in the "mutation events deferred" state. On the other hand, a dynamic-wind-style solution might be appropriate. This is one tiny example of how the same abstractions might not be right internally and externally.

If we don't already have it, we definitely want a RAII for turning off
mutation events (or at least ASSERTing that we're not trying to fire
them) for the parser.  The new and old tree builders might explode if
they ever fire a mutation event.

Adam


More information about the webkit-dev mailing list