Changeset 130307 in webkit


Ignore:
Timestamp:
Oct 3, 2012, 11:23:25 AM (13 years ago)
Author:
hans@chromium.org
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:
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r130305 r130307  
     12012-10-03  Hans Wennborg  <hans@chromium.org>
     2
     3        Speech JavaScript API: Remove resultdeleted event
     4        https://bugs.webkit.org/show_bug.cgi?id=98272
     5
     6        Reviewed by Adam Barth.
     7
     8        Update layout test not to check for onresultdeleted event handler.
     9
     10        * fast/speech/scripted/basics-expected.txt:
     11        * fast/speech/scripted/basics.html:
     12
    1132012-10-03  Andrey Kosyakov  <caseq@chromium.org>
    214
  • trunk/LayoutTests/fast/speech/scripted/basics-expected.txt

    r120817 r130307  
    2424PASS 'onresult' in speechReco is true
    2525PASS 'onnomatch' in speechReco is true
    26 PASS 'onresultdeleted' in speechReco is true
    2726PASS 'onerror' in speechReco is true
    2827PASS 'onstart' in speechReco is true
  • trunk/LayoutTests/fast/speech/scripted/basics.html

    r120817 r130307  
    3333    shouldBeTrue("'onresult' in speechReco");
    3434    shouldBeTrue("'onnomatch' in speechReco");
    35     shouldBeTrue("'onresultdeleted' in speechReco");
    3635    shouldBeTrue("'onerror' in speechReco");
    3736    shouldBeTrue("'onstart' in speechReco");
  • trunk/Source/WebCore/ChangeLog

    r130303 r130307  
     12012-10-03  Hans Wennborg  <hans@chromium.org>
     2
     3        Speech JavaScript API: Remove resultdeleted event
     4        https://bugs.webkit.org/show_bug.cgi?id=98272
     5
     6        Reviewed by Adam Barth.
     7
     8        Remove the resultdeleted event. This was never used, and was removed
     9        from the spec draft in
     10        http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
     11
     12        The fast/speech/scripted/basics.html test is updated to reflect this.
     13
     14        * Modules/speech/SpeechRecognition.cpp:
     15        * Modules/speech/SpeechRecognition.h:
     16        (SpeechRecognition):
     17        * Modules/speech/SpeechRecognition.idl:
     18        * Modules/speech/SpeechRecognitionEvent.cpp:
     19        * Modules/speech/SpeechRecognitionEvent.h:
     20        (SpeechRecognitionEvent):
     21        * dom/EventNames.h:
     22        (WebCore):
     23
    1242012-09-16  Mark Hahnenberg  <mhahnenberg@apple.com>
    225
  • trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp

    r124225 r130307  
    111111}
    112112
    113 void SpeechRecognition::didDeleteResult(unsigned resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory)
    114 {
    115     dispatchEvent(SpeechRecognitionEvent::createResultDeleted(resultIndex, resultHistory));
    116 }
    117 
    118113void SpeechRecognition::didReceiveError(PassRefPtr<SpeechRecognitionError> error)
    119114{
  • trunk/Source/WebCore/Modules/speech/SpeechRecognition.h

    r127757 r130307  
    7474    void didReceiveResult(PassRefPtr<SpeechRecognitionResult>, unsigned long resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
    7575    void didReceiveNoMatch(PassRefPtr<SpeechRecognitionResult>);
    76     void didDeleteResult(unsigned resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
    7776    void didReceiveError(PassRefPtr<SpeechRecognitionError>);
    7877    void didStart();
     
    9796    DEFINE_ATTRIBUTE_EVENT_LISTENER(result);
    9897    DEFINE_ATTRIBUTE_EVENT_LISTENER(nomatch);
    99     DEFINE_ATTRIBUTE_EVENT_LISTENER(resultdeleted);
    10098    DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
    10199    DEFINE_ATTRIBUTE_EVENT_LISTENER(start);
  • trunk/Source/WebCore/Modules/speech/SpeechRecognition.idl

    r124225 r130307  
    4949        attribute EventListener onresult;
    5050        attribute EventListener onnomatch;
    51         attribute EventListener onresultdeleted;
    5251        attribute EventListener onerror;
    5352        attribute EventListener onstart;
  • trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp

    r120053 r130307  
    5757}
    5858
    59 PassRefPtr<SpeechRecognitionEvent> SpeechRecognitionEvent::createResultDeleted(short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory)
    60 {
    61     return adoptRef(new SpeechRecognitionEvent(eventNames().resultdeletedEvent, 0, resultIndex, resultHistory));
    62 }
    63 
    6459const AtomicString& SpeechRecognitionEvent::interfaceName() const
    6560{
  • trunk/Source/WebCore/Modules/speech/SpeechRecognitionEvent.h

    r123945 r130307  
    5656    static PassRefPtr<SpeechRecognitionEvent> createResult(PassRefPtr<SpeechRecognitionResult>, short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
    5757    static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtr<SpeechRecognitionResult>);
    58     static PassRefPtr<SpeechRecognitionEvent> createResultDeleted(short resultIndex, PassRefPtr<SpeechRecognitionResultList> resultHistory);
    5958
    6059    SpeechRecognitionResult* result() const { return m_result.get(); }
  • trunk/Source/WebCore/dom/EventNames.h

    r129551 r130307  
    210210    macro(result) \
    211211    macro(nomatch) \
    212     macro(resultdeleted) \
    213212    macro(start) \
    214213    macro(end) \
  • trunk/Source/WebKit/chromium/ChangeLog

    r130302 r130307  
     12012-10-03  Hans Wennborg  <hans@chromium.org>
     2
     3        Speech JavaScript API: Remove resultdeleted event
     4        https://bugs.webkit.org/show_bug.cgi?id=98272
     5
     6        Reviewed by Adam Barth.
     7
     8        Remove didDeleteResult. This was never used, and has been removed from
     9        the spec draft.
     10
     11        * public/WebSpeechRecognizerClient.h:
     12        * src/SpeechRecognitionClientProxy.cpp:
     13        * src/SpeechRecognitionClientProxy.h:
     14        (SpeechRecognitionClientProxy):
     15
    1162012-10-02  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebKit/chromium/public/WebSpeechRecognizerClient.h

    r124474 r130307  
    7575    virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) = 0;
    7676
    77     // To be called when the recognizer needs to delete one of the previously
    78     // returned interim results.
    79     virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) = 0;
    80 
    8177    // To be called when a speech recognition error occurs.
    8278    virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, ErrorCode) = 0;
  • trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.cpp

    r124474 r130307  
    120120}
    121121
    122 void SpeechRecognitionClientProxy::didDeleteResult(const WebSpeechRecognitionHandle& handle, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory)
    123 {
    124     RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle);
    125 
    126     Vector<RefPtr<SpeechRecognitionResult> > resultHistoryVector(resultHistory.size());
    127     for (size_t i = 0; i < resultHistory.size(); ++i)
    128         resultHistoryVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(resultHistory[i]);
    129 
    130     recognition->didDeleteResult(resultIndex, SpeechRecognitionResultList::create(resultHistoryVector));
    131 }
    132 
    133122void SpeechRecognitionClientProxy::didReceiveError(const WebSpeechRecognitionHandle& handle, const WebString& message, WebSpeechRecognizerClient::ErrorCode code)
    134123{
  • trunk/Source/WebKit/chromium/src/SpeechRecognitionClientProxy.h

    r127757 r130307  
    5858    virtual void didReceiveResult(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&, unsigned long resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
    5959    virtual void didReceiveNoMatch(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionResult&) OVERRIDE;
    60     virtual void didDeleteResult(const WebSpeechRecognitionHandle&, unsigned resultIndex, const WebVector<WebSpeechRecognitionResult>& resultHistory) OVERRIDE;
    6160    virtual void didReceiveError(const WebSpeechRecognitionHandle&, const WebString& message, WebSpeechRecognizerClient::ErrorCode) OVERRIDE;
    6261    virtual void didStart(const WebSpeechRecognitionHandle&) OVERRIDE;
Note: See TracChangeset for help on using the changeset viewer.