File API does not support DOM events (like addEventListener)
authorarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 23:31:18 +0000 (23:31 +0000)
committerarv@chromium.org <arv@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 23:31:18 +0000 (23:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83688

Reviewed by Adam Barth.

Source/WebCore:

The IDL files where missing addEventListener, removeEventListener and dispatchEvent.

Tests: fast/filesystem/file-writer-events.html
       fast/speech/scripted/basics.html

* Modules/filesystem/FileWriter.idl: Add missing methods.
* Modules/mediastream/LocalMediaStream.idl: This one gets its EventTarget from MediaStream.
* Modules/speech/SpeechRecognition.idl: Add missing methods.

LayoutTests:

* fast/filesystem/resources/file-writer-events.js:
(runTest):
* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/filesystem/resources/file-writer-events.js
LayoutTests/fast/speech/scripted/basics-expected.txt
LayoutTests/fast/speech/scripted/basics.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/filesystem/FileWriter.idl
Source/WebCore/Modules/mediastream/LocalMediaStream.idl
Source/WebCore/Modules/speech/SpeechRecognition.idl

index c2fef20..855eea9 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-11  Erik Arvidsson  <arv@chromium.org>
+
+        File API does not support DOM events (like addEventListener)
+        https://bugs.webkit.org/show_bug.cgi?id=83688
+
+        Reviewed by Adam Barth.
+
+        * fast/filesystem/resources/file-writer-events.js:
+        (runTest):
+        * fast/speech/scripted/basics-expected.txt:
+        * fast/speech/scripted/basics.html:
+
 2012-04-11  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r113912.
index 46a2cc8..c88e0fb 100644 (file)
@@ -96,6 +96,9 @@ function startWrite(fileWriter) {
 }
 
 function runTest(unusedFileEntry, fileWriter) {
+    assert(typeof fileWriter.addEventListener === 'function');
+    assert(typeof fileWriter.removeEventListener === 'function');
+    assert(typeof fileWriter.dispatchEvent === 'function');
     startWrite(fileWriter);
 }
 var jsTestIsAsync = true;
index 7607916..8008e04 100644 (file)
@@ -26,4 +26,7 @@ PASS 'onresultdeleted' in speechReco is true
 PASS 'onerror' in speechReco is true
 PASS 'onstart' in speechReco is true
 PASS 'onend' in speechReco is true
+PASS 'addEventListener' in speechReco is true
+PASS 'removeEventListener' in speechReco is true
+PASS 'dispatchEvent' in speechReco is true
 
index 4b148f4..98176d7 100644 (file)
@@ -36,6 +36,10 @@ function run() {
     shouldBeTrue("'onstart' in speechReco");
     shouldBeTrue("'onend' in speechReco");
 
+    shouldBeTrue("'addEventListener' in speechReco");
+    shouldBeTrue("'removeEventListener' in speechReco");
+    shouldBeTrue("'dispatchEvent' in speechReco");
+
     finishJSTest();
 }
 
index 38dae64..d6e64a3 100644 (file)
@@ -1,3 +1,19 @@
+2012-04-11  Erik Arvidsson  <arv@chromium.org>
+
+        File API does not support DOM events (like addEventListener)
+        https://bugs.webkit.org/show_bug.cgi?id=83688
+
+        Reviewed by Adam Barth.
+
+        The IDL files where missing addEventListener, removeEventListener and dispatchEvent.
+
+        Tests: fast/filesystem/file-writer-events.html
+               fast/speech/scripted/basics.html
+
+        * Modules/filesystem/FileWriter.idl: Add missing methods.
+        * Modules/mediastream/LocalMediaStream.idl: This one gets its EventTarget from MediaStream.
+        * Modules/speech/SpeechRecognition.idl: Add missing methods.
+
 2012-04-11  Andy Estes  <aestes@apple.com>
 
         LayerFlushScheduler's run loop observer should have an autorelease pool.
index c6a88f3..754fa0f 100644 (file)
@@ -60,5 +60,15 @@ module html {
                  attribute EventListener onabort;
                  attribute EventListener onerror;
                  attribute EventListener onwriteend;
+
+        // EventTarget interface
+        void addEventListener(in DOMString type,
+                              in EventListener listener,
+                              in [Optional] boolean useCapture);
+        void removeEventListener(in DOMString type,
+                                 in EventListener listener,
+                                 in [Optional] boolean useCapture);
+        boolean dispatchEvent(in Event evt)
+            raises(EventException);
     };
 }
index fdb8225..7aaddc3 100644 (file)
@@ -27,7 +27,6 @@ module core {
     interface [
         Conditional=MEDIA_STREAM,
         JSGenerateToNativeObject,
-        EventTarget,
         JSGenerateToJSObject
     ] LocalMediaStream : MediaStream {
         [ImplementedAs=stopFunction] void stop();
index 92a4bc0..5fea70d 100644 (file)
@@ -51,5 +51,15 @@ module core {
         attribute EventListener onerror;
         attribute EventListener onstart;
         attribute EventListener onend;
+
+        // EventTarget interface
+        void addEventListener(in DOMString type,
+                              in EventListener listener,
+                              in [Optional] boolean useCapture);
+        void removeEventListener(in DOMString type,
+                                 in EventListener listener,
+                                 in [Optional] boolean useCapture);
+        boolean dispatchEvent(in Event evt)
+            raises(EventException);
     };
 }