Title: [144314] branches/chromium/1425/Source/WebCore/bindings
Revision
144314
Author
kar...@chromium.org
Date
2013-02-28 07:27:31 -0800 (Thu, 28 Feb 2013)

Log Message

Revert 144142
> [V8] Remove Event::dataTransferAttrGetterCustom() and Event::valueAttrSetterCustom()
> https://bugs.webkit.org/show_bug.cgi?id=110666
> 
> Reviewed by Adam Barth.
> 
> Event::dataTransferAttrGetterCustom() is not used
> (i.e. the custom method is not registered to V8).
> Event::valueAttrSetterCustom() is declared but not
> implemented. We can remove them.
> 
> No tests. No change in behavior.
> 
> * bindings/scripts/CodeGeneratorV8.pm:
> (GenerateHeaderCustomCall):
> * bindings/v8/custom/V8EventCustom.cpp:
> 

TBR=hara...@chromium.org
Review URL: https://codereview.chromium.org/12386021

Modified Paths

Diff

Modified: branches/chromium/1425/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144313 => 144314)


--- branches/chromium/1425/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2013-02-28 15:26:19 UTC (rev 144313)
+++ branches/chromium/1425/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2013-02-28 15:27:31 UTC (rev 144314)
@@ -728,6 +728,10 @@
     if ($interface->extendedAttributes->{"CustomCall"}) {
         push(@headerContent, "    static v8::Handle<v8::Value> callAsFunctionCallback(const v8::Arguments&);\n");
     }
+    if ($interface->name eq "Event") {
+        push(@headerContent, "    static v8::Handle<v8::Value> dataTransferAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo&);\n");
+        push(@headerContent, "    static void valueAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value>, const v8::AccessorInfo&);\n");
+    }
     if ($interface->name eq "Location") {
         push(@headerContent, "    static v8::Handle<v8::Value> assignAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo&);\n");
         push(@headerContent, "    static v8::Handle<v8::Value> reloadAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo&);\n");

Modified: branches/chromium/1425/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp (144313 => 144314)


--- branches/chromium/1425/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp	2013-02-28 15:26:19 UTC (rev 144313)
+++ branches/chromium/1425/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp	2013-02-28 15:27:31 UTC (rev 144314)
@@ -42,6 +42,16 @@
 
 namespace WebCore {
 
+v8::Handle<v8::Value> V8Event::dataTransferAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    Event* event = V8Event::toNative(info.Holder());
+
+    if (event->isDragEvent())
+        return toV8Fast(static_cast<MouseEvent*>(event)->clipboard(), info, event);
+
+    return v8::Undefined();
+}
+
 v8::Handle<v8::Value> V8Event::clipboardDataAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     Event* event = V8Event::toNative(info.Holder());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to