Bug 48339 - Add a 'grammar' attribute for speech input.
Summary: Add a 'grammar' attribute for speech input.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 39485
  Show dependency treegraph
 
Reported: 2010-10-26 09:59 PDT by Satish Sampath
Modified: 2010-10-26 13:41 PDT (History)
1 user (show)

See Also:


Attachments
Patch (13.18 KB, patch)
2010-10-26 10:06 PDT, Satish Sampath
jorlow: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satish Sampath 2010-10-26 09:59:41 PDT
To differentiate between various types of speech input, we add a 'x-webkit-grammar' attribute to a speech enabled input element. This is passed without validation to the speech recognizer. Typical values could be "builtin:search", "builtin:dictation" and even an externally hosted SRGS grammar XML file URI. It is up to the recognizer to interpret the value and use it as an aid in recognition.
Comment 1 Satish Sampath 2010-10-26 10:06:02 PDT
Created attachment 71904 [details]
Patch
Comment 2 Jeremy Orlow 2010-10-26 12:08:24 PDT
Comment on attachment 71904 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=71904&action=review

r=me

> WebCore/page/SpeechInputClient.h:34
> +#include <wtf/Forward.h>

Needed?

> WebCore/platform/mock/SpeechInputClientMock.cpp:53
> +bool SpeechInputClientMock::startRecognition(int requestId, const IntRect&, const String&)

include name

> WebCore/platform/mock/SpeechInputClientMock.h:53
> +    bool startRecognition(int, const IntRect&, const String&);

include name

> WebKit/chromium/src/SpeechInputClientImpl.h:57
> +    bool startRecognition(int, const WebCore::IntRect&, const WTF::String&);

you should include a name here
Comment 3 Satish Sampath 2010-10-26 13:29:24 PDT
Comment on attachment 71904 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=71904&action=review

Thanks, addressed the comments. Will land.

>> WebCore/page/SpeechInputClient.h:34
>> +#include <wtf/Forward.h>
> 
> Needed?

Yes since we are using WTF::String in the added code below.

>> WebCore/platform/mock/SpeechInputClientMock.cpp:53
>> +bool SpeechInputClientMock::startRecognition(int requestId, const IntRect&, const String&)
> 
> include name

Done

>> WebCore/platform/mock/SpeechInputClientMock.h:53
>> +    bool startRecognition(int, const IntRect&, const String&);
> 
> include name

Done

>> WebKit/chromium/src/SpeechInputClientImpl.h:57
>> +    bool startRecognition(int, const WebCore::IntRect&, const WTF::String&);
> 
> you should include a name here

Done
Comment 4 Satish Sampath 2010-10-26 13:41:02 PDT
Committed r70567: <http://trac.webkit.org/changeset/70567>