WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
80424
Speech JavaScript API: SpeechRecognitionAlternative, Result and ResultList
https://bugs.webkit.org/show_bug.cgi?id=80424
Summary
Speech JavaScript API: SpeechRecognitionAlternative, Result and ResultList
Hans Wennborg
Reported
2012-03-06 08:16:07 PST
Speech JavaScript API: SpeechRecognitionAlternative, Result and ResultList
Attachments
Patch
(24.51 KB, patch)
2012-03-06 08:21 PST
,
Hans Wennborg
no flags
Details
Formatted Diff
Diff
Patch
(24.57 KB, patch)
2012-03-07 03:37 PST
,
Hans Wennborg
no flags
Details
Formatted Diff
Diff
Patch
(24.51 KB, patch)
2012-03-07 09:00 PST
,
Hans Wennborg
abarth
: review+
abarth
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Hans Wennborg
Comment 1
2012-03-06 08:21:31 PST
Created
attachment 130389
[details]
Patch
Hans Wennborg
Comment 2
2012-03-07 03:37:23 PST
Created
attachment 130589
[details]
Patch Rebase and link to spec in the ChangeLog.
Satish Sampath
Comment 3
2012-03-07 08:46:06 PST
Comment on
attachment 130589
[details]
Patch looks good
Hans Wennborg
Comment 4
2012-03-07 09:00:42 PST
Created
attachment 130633
[details]
Patch Remove FIXME as per offline discussion.
Adam Barth
Comment 5
2012-03-07 10:32:47 PST
Comment on
attachment 130633
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130633&action=review
> Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:42 > + String transcript() { return m_transcript; }
String transcript() -> const String& transcript() const
> Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:43 > + double confidence() { return m_confidence; }
double confidence() -> double confidence() const
> Source/WebCore/Modules/speech/SpeechRecognitionResult.h:42 > + PassRefPtr<SpeechRecognitionAlternative> item(unsigned long index);
Why a PassRefPtr ? We're not transferring ownership. This should return a SpeechRecognitionAlternative*. Please see
http://www.webkit.org/coding/RefPtr.html
for more information about RefPtr and friends.
> Source/WebCore/Modules/speech/SpeechRecognitionResult.idl:31 > + getter SpeechRecognitionAlternative item(in unsigned long index);
As I mentioned in the other patch, we don't support the "getter" syntax (yet!). Instead you should use
https://trac.webkit.org/wiki/WebKitIDL#IndexedGetter
> Source/WebCore/Modules/speech/SpeechRecognitionResultList.h:42 > + PassRefPtr<SpeechRecognitionResult> item(unsigned long index);
Same issue here. This should be a SpeechRecognitionResult*
> Source/WebCore/Modules/speech/SpeechRecognitionResultList.idl:31 > + getter SpeechRecognitionResult item(in unsigned long index);
Same issue with "getter"
Hans Wennborg
Comment 6
2012-03-08 03:18:00 PST
Thanks very much for the review! (In reply to
comment #5
)
> (From update of
attachment 130633
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=130633&action=review
> > > Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:42 > > + String transcript() { return m_transcript; } > > String transcript() -> const String& transcript() const
Done.
> > Source/WebCore/Modules/speech/SpeechRecognitionAlternative.h:43 > > + double confidence() { return m_confidence; } > > double confidence() -> double confidence() const
Done.
> > Source/WebCore/Modules/speech/SpeechRecognitionResult.h:42 > > + PassRefPtr<SpeechRecognitionAlternative> item(unsigned long index); > > Why a PassRefPtr ? We're not transferring ownership. This should return a SpeechRecognitionAlternative*. Please see
http://www.webkit.org/coding/RefPtr.html
for more information about RefPtr and friends.
Done. I was thinking that we're passing ownership to the V8 wrapper object, but I see now that PassRefPtr is not used in this situation. Thanks for catching it.
> > Source/WebCore/Modules/speech/SpeechRecognitionResult.idl:31 > > + getter SpeechRecognitionAlternative item(in unsigned long index); > > As I mentioned in the other patch, we don't support the "getter" syntax (yet!). Instead you should use
https://trac.webkit.org/wiki/WebKitIDL#IndexedGetter
Done.
> > Source/WebCore/Modules/speech/SpeechRecognitionResultList.h:42 > > + PassRefPtr<SpeechRecognitionResult> item(unsigned long index); > > Same issue here. This should be a SpeechRecognitionResult*
Done.
> > Source/WebCore/Modules/speech/SpeechRecognitionResultList.idl:31 > > + getter SpeechRecognitionResult item(in unsigned long index); > > Same issue with "getter"
Done.
Hans Wennborg
Comment 7
2012-03-08 03:22:49 PST
Committed
r110160
: <
http://trac.webkit.org/changeset/110160
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug