[webkit-reviews] review granted: [Bug 91812] Implement UndoManager's automatic DOM transactions : [Attachment 159629] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 09:54:03 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has granted Sukolsak Sakshuwong
<sukolsak at google.com>'s request for review:
Bug 91812: Implement UndoManager's automatic DOM transactions
https://bugs.webkit.org/show_bug.cgi?id=91812

Attachment 159629: Patch
https://bugs.webkit.org/attachment.cgi?id=159629&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
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?


More information about the webkit-reviews mailing list