[Webkit-unassigned] [Bug 91812] Implement UndoManager's automatic DOM transactions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 10:19:43 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=91812





--- Comment #15 from Sukolsak Sakshuwong <sukolsak at google.com>  2012-08-21 10:19:36 PST ---
(In reply to comment #14)
> (From update of attachment 159629 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=159629&action=review
> 
> > Source/WebCore/dom/CharacterData.cpp:193
> > +#if ENABLE(UNDO_MANAGER)
> > +    if (UndoManager::isRecordingAutomaticTransaction(this)) {
> > +        const String& replacingData = newData.substring(offsetOfReplacedData, newLength);
> > +        const String& replacedData = m_data.substring(offsetOfReplacedData, oldLength);
> > +        UndoManager::addTransactionStep(DataReplacingDOMTransactionStep::create(this, offsetOfReplacedData, oldLength, replacingData, replacedData));
> > +    }
> > +#endif
> 
> Why don't we do this in dispatchModifiedEvent to follow the pattern?

Because we need to record the offset and the length of replaced data to be able to unapply/reapply change.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list