[webkit-reviews] review granted: [Bug 80513] Speech JavaScript API: SpeechRecognitionEvent : [Attachment 131057] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 9 14:45:23 PST 2012


Adam Barth <abarth at webkit.org> has granted Hans Wennborg <hans at chromium.org>'s
request for review:
Bug 80513: Speech JavaScript API: SpeechRecognitionEvent
https://bugs.webkit.org/show_bug.cgi?id=80513

Attachment 131057: Patch
https://bugs.webkit.org/attachment.cgi?id=131057&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=131057&action=review


> Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp:32
> +

You've got an extra blank line here.

> Source/WebCore/Modules/speech/SpeechRecognitionEvent.cpp:70
> +void SpeechRecognitionEvent::initSpeechRecognitionEvent(const AtomicString&
type, bool canBubble, bool cancelable, SpeechRecognitionResult* result,
SpeechRecognitionError* error, short resultIndex, SpeechRecognitionResultList*
resultHistory)

Oh, you can skip these init functions.	DOM4-style events don't need them
because you can just construct the event directly.  We've been removing them
from the platform.

> Source/WebCore/Modules/speech/SpeechRecognitionEvent.idl:42
> +	   void initSpeechRecognitionEvent(in [Optional=DefaultIsUndefined]
DOMString typeArg,
> +					   in [Optional=DefaultIsUndefined]
boolean canBubbleArg,
> +					   in [Optional=DefaultIsUndefined]
boolean cancelableArg,
> +					   in [Optional=DefaultIsUndefined]
SpeechRecognitionResult resultArg,
> +					   in [Optional=DefaultIsUndefined]
SpeechRecognitionError errorArg,
> +					   in [Optional=DefaultIsUndefined]
short resultIndexArg,
> +					   in [Optional=DefaultIsUndefined]
SpeechRecognitionResultList resultHistoryArg);

We should skip this.  Sorry I didn't notice it in your previous patch.

>
LayoutTests/fast/events/constructors/speech-recognition-event-constructor.html:
30
> +// Test passing resultIndex in the initializer.
> +shouldBe("new webkitSpeechRecognitionEvent('eventType', { resultIndex: 42
}).resultIndex", "42");

I mean, you can also test the other properties, but maybe that's not worth
while.


More information about the webkit-reviews mailing list