Title: [130307] trunk
Revision
130307
Author
h...@chromium.org
Date
2012-10-03 11:23:25 -0700 (Wed, 03 Oct 2012)

Log Message

Speech _javascript_ API: Remove resultdeleted event
https://bugs.webkit.org/show_bug.cgi?id=98272

Reviewed by Adam Barth.

Source/WebCore:

Remove the resultdeleted event. This was never used, and was removed
from the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449

The fast/speech/scripted/basics.html test is updated to reflect this.

* Modules/speech/SpeechRecognition.cpp:
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionEvent.cpp:
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEvent):
* dom/EventNames.h:
(WebCore):

Source/WebKit/chromium:

Remove didDeleteResult. This was never used, and has been removed from
the spec draft.

* public/WebSpeechRecognizerClient.h:
* src/SpeechRecognitionClientProxy.cpp:
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests:

Update layout test not to check for onresultdeleted event handler.

* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (130306 => 130307)


--- trunk/LayoutTests/ChangeLog	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/LayoutTests/ChangeLog	2012-10-03 18:23:25 UTC (rev 130307)
@@ -1,3 +1,15 @@
+2012-10-03  Hans Wennborg  <h...@chromium.org>
+
+        Speech _javascript_ API: Remove resultdeleted event
+        https://bugs.webkit.org/show_bug.cgi?id=98272
+
+        Reviewed by Adam Barth.
+
+        Update layout test not to check for onresultdeleted event handler.
+
+        * fast/speech/scripted/basics-expected.txt:
+        * fast/speech/scripted/basics.html:
+
 2012-10-03  Andrey Kosyakov  <ca...@chromium.org>
 
         Unreviwed gardening -- adjusted expectations for tiny-layer-rotated.html

Modified: trunk/LayoutTests/fast/speech/scripted/basics-expected.txt (130306 => 130307)


--- trunk/LayoutTests/fast/speech/scripted/basics-expected.txt	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/LayoutTests/fast/speech/scripted/basics-expected.txt	2012-10-03 18:23:25 UTC (rev 130307)
@@ -23,7 +23,6 @@
 PASS 'onaudioend' in speechReco is true
 PASS 'onresult' in speechReco is true
 PASS 'onnomatch' in speechReco is true
-PASS 'onresultdeleted' in speechReco is true
 PASS 'onerror' in speechReco is true
 PASS 'onstart' in speechReco is true
 PASS 'onend' in speechReco is true

Modified: trunk/LayoutTests/fast/speech/scripted/basics.html (130306 => 130307)


--- trunk/LayoutTests/fast/speech/scripted/basics.html	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/LayoutTests/fast/speech/scripted/basics.html	2012-10-03 18:23:25 UTC (rev 130307)
@@ -32,7 +32,6 @@
     shouldBeTrue("'onaudioend' in speechReco");
     shouldBeTrue("'onresult' in speechReco");
     shouldBeTrue("'onnomatch' in speechReco");
-    shouldBeTrue("'onresultdeleted' in speechReco");
     shouldBeTrue("'onerror' in speechReco");
     shouldBeTrue("'onstart' in speechReco");
     shouldBeTrue("'onend' in speechReco");

Modified: trunk/Source/WebCore/ChangeLog (130306 => 130307)


--- trunk/Source/WebCore/ChangeLog	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/ChangeLog	2012-10-03 18:23:25 UTC (rev 130307)
@@ -1,3 +1,26 @@
+2012-10-03  Hans Wennborg  <h...@chromium.org>
+
+        Speech _javascript_ API: Remove resultdeleted event
+        https://bugs.webkit.org/show_bug.cgi?id=98272
+
+        Reviewed by Adam Barth.
+
+        Remove the resultdeleted event. This was never used, and was removed
+        from the spec draft in
+        http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
+
+        The fast/speech/scripted/basics.html test is updated to reflect this.
+
+        * Modules/speech/SpeechRecognition.cpp:
+        * Modules/speech/SpeechRecognition.h:
+        (SpeechRecognition):
+        * Modules/speech/SpeechRecognition.idl:
+        * Modules/speech/SpeechRecognitionEvent.cpp:
+        * Modules/speech/SpeechRecognitionEvent.h:
+        (SpeechRecognitionEvent):
+        * dom/EventNames.h:
+        (WebCore):
+
 2012-09-16  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         Delayed structure sweep can leak structures without bound

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp (130306 => 130307)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp	2012-10-03 18:23:25 UTC (rev 130307)
@@ -110,11 +110,6 @@
     dispatchEvent(SpeechRecognitionEvent::createNoMatch(result));
 }
 
-void SpeechRecognition::didDeleteResult(unsigned resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory)
-{
-    dispatchEvent(SpeechRecognitionEvent::createResultDeleted(resultIndex, resultHistory));
-}
-
 void SpeechRecognition::didReceiveError(PassRefPtr<SpeechRecognitionError> error)
 {
     dispatchEvent(error);

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.h (130306 => 130307)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.h	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.h	2012-10-03 18:23:25 UTC (rev 130307)
@@ -73,7 +73,6 @@
     void didEndAudio();
     void didReceiveResult(PassRefPtr<SpeechRecognitionResult>, unsigned long resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
     void didReceiveNoMatch(PassRefPtr<SpeechRecognitionResult>);
-    void didDeleteResult(unsigned resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
     void didReceiveError(PassRefPtr<SpeechRecognitionError>);
     void didStart();
     void didEnd();
@@ -96,7 +95,6 @@
     DEFINE_ATTRIBUTE_EVENT_LISTENER(audioend);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(result);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(nomatch);
-    DEFINE_ATTRIBUTE_EVENT_LISTENER(resultdeleted);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(start);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(end);

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.idl (130306 => 130307)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.idl	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.idl	2012-10-03 18:23:25 UTC (rev 130307)
@@ -48,7 +48,6 @@
         attribute EventListener onaudioend;
         attribute EventListener onresult;
         attribute EventListener onnomatch;
-        attribute EventListener onresultdeleted;
         attribute EventListener onerror;
         attribute EventListener onstart;
         attribute EventListener onend;

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp (130306 => 130307)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp	2012-10-03 18:23:25 UTC (rev 130307)
@@ -56,11 +56,6 @@
     return adoptRef(new SpeechRecognitionEvent(eventNames().nomatchEvent, result, 0, 0));
 }
 
-PassRefPtr<SpeechRecognitionEvent> SpeechRecognitionEvent::createResultDeleted(short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory)
-{
-    return adoptRef(new SpeechRecognitionEvent(eventNames().resultdeletedEvent, 0, resultIndex, resultHistory));
-}
-
 const AtomicString& SpeechRecognitionEvent::interfaceName() const
 {
     return eventNames().interfaceForSpeechRecognitionEvent;

Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.h (130306 => 130307)


--- trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.h	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.h	2012-10-03 18:23:25 UTC (rev 130307)
@@ -55,7 +55,6 @@
 
     static PassRefPtr<SpeechRecognitionEvent> createResult(PassRefPtr<SpeechRecognitionResult>, short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
     static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtr<SpeechRecognitionResult>);
-    static PassRefPtr<SpeechRecognitionEvent> createResultDeleted(short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
 
     SpeechRecognitionResult* result() const { return m_result.get(); }
     short resultIndex() const { return m_resultIndex; } // FIXME: Spec says this should be short, but other indices are unsigned ints.

Modified: trunk/Source/WebCore/dom/EventNames.h (130306 => 130307)


--- trunk/Source/WebCore/dom/EventNames.h	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebCore/dom/EventNames.h	2012-10-03 18:23:25 UTC (rev 130307)
@@ -209,7 +209,6 @@
     macro(audioend) \
     macro(result) \
     macro(nomatch) \
-    macro(resultdeleted) \
     macro(start) \
     macro(end) \
     \

Modified: trunk/Source/WebKit/chromium/ChangeLog (130306 => 130307)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-10-03 18:23:25 UTC (rev 130307)
@@ -1,3 +1,18 @@
+2012-10-03  Hans Wennborg  <h...@chromium.org>
+
+        Speech _javascript_ API: Remove resultdeleted event
+        https://bugs.webkit.org/show_bug.cgi?id=98272
+
+        Reviewed by Adam Barth.
+
+        Remove didDeleteResult. This was never used, and has been removed from
+        the spec draft.
+
+        * public/WebSpeechRecognizerClient.h:
+        * src/SpeechRecognitionClientProxy.cpp:
+        * src/SpeechRecognitionClientProxy.h:
+        (SpeechRecognitionClientProxy):
+
 2012-10-02  Anders Carlsson  <ander...@apple.com>
 
         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory

Modified: trunk/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h (130306 => 130307)


--- trunk/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h	2012-10-03 18:23:25 UTC (rev 130307)
@@ -74,10 +74,6 @@
     // recognizion hypothesis.
     virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) = 0;
 
-    // To be called when the recognizer needs to delete one of the previously
-    // returned interim results.
-    virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0;
-
     // To be called when a speech recognition error occurs.
     virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, ErrorCode) = 0;
 

Modified: trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp (130306 => 130307)


--- trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp	2012-10-03 18:23:25 UTC (rev 130307)
@@ -119,17 +119,6 @@
     recognition->didReceiveNoMatch(result);
 }
 
-void SpeechRecognitionClientProxy::didDeleteResult(const WebSpeechRecognitionHandle& handle, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory)
-{
-    RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
-
-    Vector<RefPtr<SpeechRecognitionResult> > resultHistoryVector(resultHistory.size());
-    for (size_t i = 0; i < resultHistory.size(); ++i)
-        resultHistoryVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(resultHistory[i]);
-
-    recognition->didDeleteResult(resultIndex, SpeechRecognitionResultList::create(resultHistoryVector));
-}
-
 void SpeechRecognitionClientProxy::didReceiveError(const WebSpeechRecognitionHandle& handle, const WebString& message, WebSpeechRecognizerClient::ErrorCode code)
 {
     RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);

Modified: trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h (130306 => 130307)


--- trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h	2012-10-03 18:15:09 UTC (rev 130306)
+++ trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h	2012-10-03 18:23:25 UTC (rev 130307)
@@ -57,7 +57,6 @@
     virtual void didEndAudio(const WebSpeechRecognitionHandle&) OVERRIDE;
     virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
     virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) OVERRIDE;
-    virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
     virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, WebSpeechRecognizerClient::ErrorCode) OVERRIDE;
     virtual void didStart(const WebSpeechRecognitionHandle&) OVERRIDE;
     virtual void didEnd(const WebSpeechRecognitionHandle&) OVERRIDE;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to