Adds code to handle clicks on the input element's speech button and invoke speech recognition. The speech button now implements SpeechInputListener to receive progress events and the recognized text. All code changes are behind the speech input compile time flag (disabled by default). More information about the speech input API proposal can be found in the following links: Parent bug: https://bugs.webkit.org/show_bug.cgi?id=39485 Full API proposal: https://docs.google.com/View?id=dcfg79pz_5dhnp23f5 Relevant discussions in the WHATWG list: - http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-May/026338.html - http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-June/026747.html
Created attachment 61486 [details] Patch
Comment on attachment 61486 [details] Patch WebCore/rendering/TextControlInnerElements.cpp:353 + input->focus(); focus() dispatches a focus event, and an event handler might remove 'input' node. So the next input->select() can use a deleted object. Please look at SpinButtonElement::defaultEventHandler() of the latest revision of TextControlInnerElements.cpp. WebCore/rendering/TextControlInnerElements.cpp:392 + input->dispatchFormControlChangeEvent(); This has a similar problem. An event handler of the event might remove the 'input' node. So this InputFieldSpeechButtonElement instance might be removed. So, we need RefPtr<InputFieldSpeechButtonElement> protector(this); before input->dispatchFormControlChangeEvent().
Created attachment 61494 [details] Patch Address Kent's comments
Attachment 61494 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebCore/rendering/TextControlInnerElements.cpp:356: hold_ref is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebCore/rendering/TextControlInnerElements.cpp:398: hold_ref is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 61495 [details] Patch Address Kent's comments (2nd try)
Comment on attachment 61495 [details] Patch OK.
Comment on attachment 61495 [details] Patch Clearing flags on attachment: 61495 Committed r63315: <http://trac.webkit.org/changeset/63315>
All reviewed patches have been landed. Closing bug.