Implement UndoManager's item() method
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 05:58:10 +0000 (05:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 05:58:10 +0000 (05:58 +0000)
commit514a61c231b00754c3e6be877b4a539a4263af15
treed29c6521088ee82e8890e54311972804bf9117b4
parent73740c2a9957a70c379e18d7ac554ecb7e78bf66
Implement UndoManager's item() method
https://bugs.webkit.org/show_bug.cgi?id=94671

Patch by Sukolsak Sakshuwong <sukolsak@google.com> on 2012-08-22
Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch implements UndoManager's item() method and its V8 custom binding.
We need to use custom binding here because we need to return user objects
that are stored in a hidden property of DOMTransaction wrappers, not returning
the wrappers themselves.

Test: editing/undomanager/undomanager-item.html

* bindings/js/JSUndoManagerCustom.cpp:
(WebCore::JSUndoManager::item):
(WebCore):
* bindings/v8/DOMTransaction.cpp:
(WebCore::DOMTransaction::data):
(WebCore):
(WebCore::DOMTransaction::setData):
(WebCore::DOMTransaction::getFunction):
* bindings/v8/DOMTransaction.h:
* bindings/v8/custom/V8UndoManagerCustom.cpp:
(WebCore::V8UndoManager::transactCallback):
(WebCore::V8UndoManager::itemCallback):
(WebCore):
* editing/UndoManager.cpp:
(WebCore::UndoManager::item):
(WebCore):
* editing/UndoManager.h:
(UndoManager):
* editing/UndoManager.idl:

LayoutTests:

* editing/undomanager/undomanager-item-expected.txt: Added.
* editing/undomanager/undomanager-item.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/undomanager/undomanager-item-expected.txt [new file with mode: 0644]
LayoutTests/editing/undomanager/undomanager-item.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSUndoManagerCustom.cpp
Source/WebCore/bindings/v8/DOMTransaction.cpp
Source/WebCore/bindings/v8/DOMTransaction.h
Source/WebCore/bindings/v8/custom/V8UndoManagerCustom.cpp
Source/WebCore/editing/UndoManager.cpp
Source/WebCore/editing/UndoManager.h
Source/WebCore/editing/UndoManager.idl