Changeset 95722 in webkit
- Timestamp:
- Sep 22, 2011 9:18:50 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95721 r95722 1 2011-09-22 Leandro Gracia Gil <leandrogracia@chromium.org> 2 3 Testing text events triggered by speech input. 4 https://bugs.webkit.org/show_bug.cgi?id=60451 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/speech/input-ontextinput-event-expected.txt: Added. 9 * fast/speech/input-ontextinput-event.html: Added. 10 * fast/speech/input-text-speechstart.html: 11 1 12 2011-09-20 Jason Liu <jason.liu@torchmobile.com.cn> 2 13 -
trunk/LayoutTests/fast/speech/input-text-speechstart.html
r94343 r95722 14 14 // Test that we can trigger speech with a method call to the input 15 15 // element, so the user agent could toggle speech via a keypress, 16 // for example. 16 // for example. Select is required in order to ensure that the result 17 // will be set in input during the generated TextInput event. 17 18 var input = document.getElementById(id); 19 input.select(); 18 20 layoutTestController.startSpeechInput(input); 19 21 } -
trunk/Source/WebCore/ChangeLog
r95721 r95722 1 2011-09-22 Leandro Gracia Gil <leandrogracia@chromium.org> 2 3 Fire TextInput events on speech input, but not set/add any inputMethod attribute. 4 https://bugs.webkit.org/show_bug.cgi?id=60451 5 6 Reviewed by Ryosuke Niwa. 7 8 Introduce code to dispatch TextInput events when text is introduced via 9 the speech input feature. Handle also the cases where speech input is 10 started programmatically from the LayoutTestController. 11 12 Test: fast/speech/input-ontextinput-event.html 13 14 * dom/TextEventInputType.h: 15 * html/shadow/TextControlInnerElements.cpp: 16 (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): 17 1 18 2011-09-20 Jason Liu <jason.liu@torchmobile.com.cn> 2 19 -
trunk/Source/WebCore/dom/TextEventInputType.h
r76482 r95722 36 36 TextEventInputPaste, 37 37 TextEventInputDrop, 38 TextEventInputOther, 38 39 }; 39 40 -
trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp
r94659 r95722 44 44 #include "SpeechInput.h" 45 45 #include "SpeechInputEvent.h" 46 #include "TextEvent.h" 47 #include "TextEventInputType.h" 46 48 47 49 namespace WebCore { … … 489 491 490 492 RefPtr<InputFieldSpeechButtonElement> holdRefButton(this); 491 input->setValue(results.isEmpty() ? "" : results[0]->utterance()); 493 if (document() && document()->domWindow()) 494 input->dispatchEvent(TextEvent::create(document()->domWindow(), results.isEmpty() ? "" : results[0]->utterance(), TextEventInputOther)); 495 496 // This event is sent after the text event so the website can perform actions using the input field content immediately. 497 // It provides alternative recognition hypotheses and notifies that the results come from speech input. 492 498 input->dispatchEvent(SpeechInputEvent::create(eventNames().webkitspeechchangeEvent, results)); 493 499
Note: See TracChangeset
for help on using the changeset viewer.