Currently the speech input event 'onwebkitspeechchange' receives no parameters. WebCore already has the full list of recognition results and populates only the top result into the input field automatically. In this patch we pass a SpeechInputEvent object to the event handler, and the JS code can access the full list of results via "event.results.length", "results[i].utterance" and "results[i].confidence". To test multiple recognition results, I have replaced the 'setMockSpeechInputResult' methods with 'addMockSpeechInputResult' which can be called multiple times to add multiple results. This method also takes in the result's confidence value. The mock object in webCore has been updated, along with existing layout tests and a new test added. I have placed some newly added speech input IDLs and headers under WebCore/page since that seemed most appropriate and previously added files are located there. I'm happy to move them if there is a better suggestion.
Created attachment 74243 [details] Patch
Attachment 74243 [details] did not build on mac: Build output: http://queues.webkit.org/results/6222057
Attachment 74243 [details] did not build on win: Build output: http://queues.webkit.org/results/6123061
Comment on attachment 74243 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=74243&action=review r=me > WebCore/page/SpeechInputEvent.h:42 > + ~SpeechInputEvent() {} Please put this and the constructor in a .cpp. With something like a RefPtr of Vectors, this could lead to a lot of blow up in .o file size for anything that includes this file. > WebCore/page/SpeechInputResultList.h:54 > + SpeechInputResultList(const SpeechInputResultArray& results) ditto (and for the ~)
Created attachment 74540 [details] Patch for landing
Comment on attachment 74540 [details] Patch for landing Rejecting patch 74540 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=abarth-cq-sl', 'build', '--no-clean', '--no-update', '--build-style=both']" exit_code: 2 Last 500 characters of output: _MINOR 0320 setenv YACC /Developer/usr/bin/yacc /bin/sh -c /Users/abarth/git/webkit-queue/WebKitBuild/WebCore.build/Debug/WebCore.build/Script-5DF50887116F3077005202AB.sh ** BUILD FAILED ** The following build commands failed: WebCore: CompileC /Users/abarth/git/webkit-queue/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/JSEventCustom.o /Users/abarth/git/webkit-queue/WebCore/bindings/js/JSEventCustom.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 (1 failure) Full output: http://queues.webkit.org/results/6274062
Created attachment 74546 [details] Patch for landing
Comment on attachment 74546 [details] Patch for landing Rejecting patch 74546 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=abarth-cq-sl', 'build', '--no-clean', '--no-update', '--build-style=both']" exit_code: 2 Last 500 characters of output: ebug/WebCore.build/Objects-normal/x86_64/JSSpeechInputResult.o /Users/abarth/git/webkit-queue/WebKitBuild/Debug/DerivedSources/WebCore/JSSpeechInputResult.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 CompileC /Users/abarth/git/webkit-queue/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/JSSpeechInputResultList.o /Users/abarth/git/webkit-queue/WebKitBuild/Debug/DerivedSources/WebCore/JSSpeechInputResultList.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 (4 failures) Full output: http://queues.webkit.org/results/6272057
Created attachment 74553 [details] Patch for landing
Comment on attachment 74553 [details] Patch for landing Rejecting patch 74553 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sl', 'build', '--no-clean', '--no-update', '--build-style=both']" exit_code: 2 Last 500 characters of output: Element.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 (26 failures) Failed to run "['WebKitTools/Scripts/build-webkit', '--release']" exit_code: 1 nsitionEvent.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 CompileC /Projects/CommitQueue/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/JSSVGFEMorphologyElement.o /Projects/CommitQueue/WebKitBuild/Release/DerivedSources/WebCore/JSSVGFEMorphologyElement.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 (26 failures) Full output: http://queues.webkit.org/results/6281054
Comment on attachment 74553 [details] Patch for landing I can't find out why this patch doesn't pass through commit queue (no useful error messages shown in the CQ build log). This patch builds fine in my mac with 'build-webkit --release'. Any suggestions?
Committed r72591: <http://trac.webkit.org/changeset/72591>
Comment on attachment 74553 [details] Patch for landing Cleared review? from attachment 74553 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).