Implement UndoManager's item() method
[WebKit-https.git] / Source / WebCore / ChangeLog
index a34c7df..2083238 100644 (file)
@@ -1,3 +1,37 @@
+2012-08-22  Sukolsak Sakshuwong  <sukolsak@google.com>
+
+        Implement UndoManager's item() method
+        https://bugs.webkit.org/show_bug.cgi?id=94671
+
+        Reviewed by Ryosuke Niwa.
+
+        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:
+
 2012-08-22  Dominic Mazzoni  <dmazzoni@google.com>
 
         AX: Focusable elements without a role should not be ignored