[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

crogers at google.com crogers at google.com
Wed Dec 22 15:52:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a37d2595f102420efe83b56d88f02b4d35678108
Author: crogers at google.com <crogers at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 16 01:22:00 2010 +0000

    2010-11-15  Chris Rogers  <crogers at google.com>
    
            Reviewed by Kenneth Russell.
    
            Add Event and EventListener hooks for JavaScriptAudioNode and AudioProcessingEvent
            https://bugs.webkit.org/show_bug.cgi?id=49357
    
            No new tests since audio API is not yet implemented.
    
            * bindings/js/JSEventCustom.cpp:
            (WebCore::toJS):
            * bindings/js/JSEventTarget.cpp:
            (WebCore::toJS):
            * bindings/v8/V8DOMWrapper.cpp:
            (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
            * bindings/v8/custom/V8EventCustom.cpp:
            (WebCore::toV8):
            * dom/Event.cpp:
            (WebCore::Event::isAudioProcessingEvent):
            * dom/Event.h:
            * dom/EventNames.h:
            * dom/EventTarget.cpp:
            (WebCore::EventTarget::toJavaScriptAudioNode):
            * dom/EventTarget.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index beeb63c..f993c40 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-11-15  Chris Rogers  <crogers at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Add Event and EventListener hooks for JavaScriptAudioNode and AudioProcessingEvent
+        https://bugs.webkit.org/show_bug.cgi?id=49357
+
+        No new tests since audio API is not yet implemented.
+
+        * bindings/js/JSEventCustom.cpp:
+        (WebCore::toJS):
+        * bindings/js/JSEventTarget.cpp:
+        (WebCore::toJS):
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
+        * bindings/v8/custom/V8EventCustom.cpp:
+        (WebCore::toV8):
+        * dom/Event.cpp:
+        (WebCore::Event::isAudioProcessingEvent):
+        * dom/Event.h:
+        * dom/EventNames.h:
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::toJavaScriptAudioNode):
+        * dom/EventTarget.h:
+
 2010-11-15  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/bindings/js/JSEventCustom.cpp b/WebCore/bindings/js/JSEventCustom.cpp
index d2e9d61..d671dee 100644
--- a/WebCore/bindings/js/JSEventCustom.cpp
+++ b/WebCore/bindings/js/JSEventCustom.cpp
@@ -98,6 +98,11 @@
 #include "JSIDBSuccessEvent.h"
 #endif
 
+#if ENABLE(WEB_AUDIO)
+#include "AudioProcessingEvent.h"
+#include "JSAudioProcessingEvent.h"
+#endif
+
 using namespace JSC;
 
 namespace WebCore {
@@ -184,6 +189,10 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Event* event)
     else if (event->isDeviceOrientationEvent())
         wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, DeviceOrientationEvent, event);
 #endif
+#if ENABLE(WEB_AUDIO)
+    else if (event->isAudioProcessingEvent())
+        wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, AudioProcessingEvent, event);
+#endif
     else
         wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, Event, event);
 
diff --git a/WebCore/bindings/js/JSEventTarget.cpp b/WebCore/bindings/js/JSEventTarget.cpp
index c86845d..04be175 100644
--- a/WebCore/bindings/js/JSEventTarget.cpp
+++ b/WebCore/bindings/js/JSEventTarget.cpp
@@ -83,6 +83,11 @@
 #include "JSIDBRequest.h"
 #endif
 
+#if ENABLE(WEB_AUDIO)
+#include "JSJavaScriptAudioNode.h"
+#include "JavaScriptAudioNode.h"
+#endif
+
 #if ENABLE(WEB_SOCKETS)
 #include "JSWebSocket.h"
 #include "WebSocket.h"
@@ -159,6 +164,11 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
         return toJS(exec, idbRequest);
 #endif
 
+#if ENABLE(WEB_AUDIO)
+    if (JavaScriptAudioNode* jsAudioNode = target->toJavaScriptAudioNode())
+        return toJS(exec, globalObject, jsAudioNode);
+#endif
+
 #if ENABLE(WEB_SOCKETS)
     if (WebSocket* webSocket = target->toWebSocket())
         return toJS(exec, webSocket);
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp
index dd0446c..72f6bdc 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -82,6 +82,10 @@
 #include "V8SVGElementInstance.h"
 #endif
 
+#if ENABLE(WEB_AUDIO)
+#include "V8JavaScriptAudioNode.h"
+#endif
+
 #include <algorithm>
 #include <utility>
 #include <v8-debug.h>
@@ -434,6 +438,11 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventTargetToV8Object(EventTarget* ta
         return toV8(fileWriter);
 #endif
 
+#if ENABLE(WEB_AUDIO)
+    if (JavaScriptAudioNode* jsAudioNode = target->toJavaScriptAudioNode())
+        return toV8(jsAudioNode);
+#endif    
+
     ASSERT(0);
     return notHandledByInterceptor();
 }
diff --git a/WebCore/bindings/v8/custom/V8EventCustom.cpp b/WebCore/bindings/v8/custom/V8EventCustom.cpp
index f96ba7a..bb885b9 100644
--- a/WebCore/bindings/v8/custom/V8EventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8EventCustom.cpp
@@ -68,6 +68,10 @@
 #include "V8SVGZoomEvent.h"
 #endif
 
+#if ENABLE(WEB_AUDIO)
+#include "V8AudioProcessingEvent.h"
+#endif
+
 namespace WebCore {
 
 void V8Event::valueAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -164,6 +168,10 @@ v8::Handle<v8::Value> toV8(Event* impl)
     if (impl->isDeviceOrientationEvent())
         return toV8(static_cast<DeviceOrientationEvent*>(impl));
 #endif
+#if ENABLE(WEB_AUDIO)
+    if (impl->isAudioProcessingEvent())
+        return toV8(static_cast<AudioProcessingEvent*>(impl));
+#endif
     if (impl->isCustomEvent())
         return toV8(static_cast<CustomEvent*>(impl));
     return V8Event::wrap(impl);
diff --git a/WebCore/dom/Event.cpp b/WebCore/dom/Event.cpp
index 0515fe7..c8da461 100644
--- a/WebCore/dom/Event.cpp
+++ b/WebCore/dom/Event.cpp
@@ -229,6 +229,13 @@ bool Event::isDeviceOrientationEvent() const
 }
 #endif
 
+#if ENABLE(WEB_AUDIO)
+bool Event::isAudioProcessingEvent() const
+{
+    return false;
+}
+#endif
+
 bool Event::fromUserGesture()
 {
     if (!UserGestureIndicator::processingUserGesture())
diff --git a/WebCore/dom/Event.h b/WebCore/dom/Event.h
index c8fd21e..0d2f2b9 100644
--- a/WebCore/dom/Event.h
+++ b/WebCore/dom/Event.h
@@ -129,6 +129,9 @@ namespace WebCore {
         virtual bool isIDBErrorEvent() const;
         virtual bool isIDBSuccessEvent() const;
 #endif
+#if ENABLE(WEB_AUDIO)
+        virtual bool isAudioProcessingEvent() const;
+#endif
 #if ENABLE(WORKERS)
         virtual bool isErrorEvent() const;
 #endif
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index aead2bc..496804e 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -174,6 +174,8 @@ namespace WebCore {
     macro(webglcontextrestored) \
     macro(webglcontextcreationerror) \
     \
+    macro(audioprocess) \
+    \
 // end of DOM_EVENT_NAMES_FOR_EACH
 
     class EventNames : public Noncopyable {
diff --git a/WebCore/dom/EventTarget.cpp b/WebCore/dom/EventTarget.cpp
index 42cbb32..5f2f8a7 100644
--- a/WebCore/dom/EventTarget.cpp
+++ b/WebCore/dom/EventTarget.cpp
@@ -118,6 +118,13 @@ SVGElementInstance* EventTarget::toSVGElementInstance()
 }
 #endif
 
+#if ENABLE(WEB_AUDIO)
+JavaScriptAudioNode* EventTarget::toJavaScriptAudioNode()
+{
+    return 0;
+}
+#endif
+
 #if ENABLE(WEB_SOCKETS)
 WebSocket* EventTarget::toWebSocket()
 {
diff --git a/WebCore/dom/EventTarget.h b/WebCore/dom/EventTarget.h
index feff4ae..ddcb663 100644
--- a/WebCore/dom/EventTarget.h
+++ b/WebCore/dom/EventTarget.h
@@ -51,6 +51,7 @@ namespace WebCore {
     class FileWriter;
     class IDBRequest;
     class IDBTransaction;
+    class JavaScriptAudioNode;
     class MessagePort;
     class Node;
     class Notification;
@@ -115,6 +116,11 @@ namespace WebCore {
         virtual SharedWorker* toSharedWorker();
         virtual SharedWorkerContext* toSharedWorkerContext();
 #endif
+
+#if ENABLE(WEB_AUDIO)
+        virtual JavaScriptAudioNode* toJavaScriptAudioNode();
+#endif
+
 #if ENABLE(WEB_SOCKETS)
         virtual WebSocket* toWebSocket();
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list