Changeset 70301 in webkit
- Timestamp:
- Oct 22, 2010 5:09:08 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70295 r70301 1 2010-10-22 Leandro Gracia Gil <leandrogracia@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 Added a layout test for the language tag in speech input. Updated 6 the speech button tests to include the new language parameter in the 7 mock result. 8 https://bugs.webkit.org/show_bug.cgi?id=47089 9 10 * fast/speech/input-text-language-tag-expected.txt: Added. 11 * fast/speech/input-text-language-tag.html: Added. 12 * fast/speech/input-text-speechbutton.html: Added an empty language 13 parameter. 14 * fast/speech/speech-button-ignore-generated-events.html: Added an 15 empty language parameter. 16 * platform/chromium/test_expectations.txt: language tag test is expected 17 to fail until the chromium-side patch has been applied. 18 1 19 2010-10-22 MORITA Hajime <morrita@google.com> 2 20 … … 1557 1575 1558 1576 * platform/gtk/Skipped: Unskip passing tests. 1559 1560 2010-10-19 Leandro Gracia Gil <leandrogracia@google.com>1561 1562 Reviewed by Jeremy Orlow.1563 1564 Added a layout test for the language tag in speech input. Updated1565 the speech button tests to include the new language parameter in the1566 mock result.1567 https://bugs.webkit.org/show_bug.cgi?id=470891568 1569 * fast/speech/input-text-language-tag-expected.txt: Added.1570 * fast/speech/input-text-language-tag.html: Added.1571 * fast/speech/input-text-speechbutton.html: Added an empty language1572 parameter.1573 * fast/speech/speech-button-ignore-generated-events.html: Added an1574 empty language parameter.1575 * platform/chromium/test_expectations.txt: language tag test is expected1576 to fail until the chromium-side patch has been applied.1577 1577 1578 1578 2010-10-19 Antonio Gomes <agomes@rim.com> -
trunk/LayoutTests/fast/speech/input-text-speechbutton.html
r70152 r70301 33 33 function run() { 34 34 if (window.layoutTestController && window.eventSender) { 35 layoutTestController.setMockSpeechInputResult('Pictures of the moon' );35 layoutTestController.setMockSpeechInputResult('Pictures of the moon', ''); 36 36 37 37 // Clicking the speech button should fill in mock speech-recognized text. -
trunk/LayoutTests/fast/speech/speech-button-ignore-generated-events.html
r70152 r70301 50 50 if (window.layoutTestController && window.eventSender) { 51 51 // Running in DRT, test the eventSender case. 52 layoutTestController.setMockSpeechInputResult('Pictures of the moon' );52 layoutTestController.setMockSpeechInputResult('Pictures of the moon', ''); 53 53 document.getElementById('speechInput').onwebkitspeechchange = function() { 54 54 shouldBeEqualToString('document.getElementById("speechInput").value', 'Pictures of the moon'); -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r70295 r70301 3249 3249 // Added in WebKit r70190 3250 3250 BUGWK48034 : plugins/pass-different-npp-struct.html = TEXT 3251 3251 3252 // Added in WebKit r70265 3252 3253 BUGWK48034 : platform/win/plugins/npn-invalidate-rect-invalidates-window.html = TEXT 3254 3255 // Temporarily disabled for a 4-sided patch. Will be enabled again by BUGWK47420. 3256 BUGWK47089 : fast/speech/input-text-language-tag.html = FAIL -
trunk/WebCore/ChangeLog
r70300 r70301 1 2010-10-22 Leandro Gracia Gil <leandrogracia@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 Patch the current speech input implementation to use and validate the 6 nearest language tag. The language is now passed to the startRecognition 7 methods so that language-specific recognition could be used. Also added 8 a second parameter to setMockSpeechInputResult for the language used in 9 speech recognition. 10 https://bugs.webkit.org/show_bug.cgi?id=47089 11 12 This is the 2nd of a 4-sided patch in Chromium and WebKit. For more 13 details see http://codereview.chromium.org/3615005/show and 14 http://codereview.chromium.org/3595018/show. 15 16 Test: fast/speech/input-text-language-tag.html 17 18 * dom/Element.cpp: 19 (WebCore::Element::computeInheritedLanguage): includes a brief character 20 validation for the BCP 47 language tag. 21 * page/SpeechInput.cpp: 22 (WebCore::SpeechInput::startRecognition): 23 * page/SpeechInput.h: 24 * page/SpeechInputClient.h: 25 * platform/mock/SpeechInputClientMock.cpp: 26 (WebCore::SpeechInputClientMock::startRecognition): 27 (WebCore::SpeechInputClientMock::setRecognitionResult): results are now 28 stored by language using a hash map. 29 (WebCore::SpeechInputClientMock::timerFired): 30 * platform/mock/SpeechInputClientMock.h: 31 * rendering/TextControlInnerElements.cpp: 32 (WebCore::TextControlInnerElement::attachInnerElement): 33 (WebCore::SearchFieldCancelButtonElement::detach): 34 (WebCore::SpinButtonElement::defaultEventHandler): 35 (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): 36 (WebCore::InputFieldSpeechButtonElement::detach): 37 1 38 2010-10-21 Yury Semikhatsky <yurys@chromium.org> 2 39 … … 1679 1716 (WebCore::SpeechInputClientMock::startRecognition): 1680 1717 (WebCore::SpeechInputClientMock::setRecognitionResult): 1681 (WebCore::SpeechInputClientMock::timerFired):1682 * platform/mock/SpeechInputClientMock.h:1683 * rendering/TextControlInnerElements.cpp:1684 (WebCore::TextControlInnerElement::attachInnerElement):1685 (WebCore::SearchFieldCancelButtonElement::detach):1686 (WebCore::SpinButtonElement::defaultEventHandler):1687 (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):1688 (WebCore::InputFieldSpeechButtonElement::detach):1689 1690 2010-10-19 Leandro Gracia Gil <leandrogracia@google.com>1691 1692 Reviewed by Jeremy Orlow.1693 1694 Patch the current speech input implementation to use and validate the1695 nearest language tag. The language is now passed to the startRecognition1696 methods so that language-specific recognition could be used. Also added1697 a second parameter to setMockSpeechInputResult for the language used in1698 speech recognition.1699 https://bugs.webkit.org/show_bug.cgi?id=470891700 1701 This is the 2nd of a 4-sided patch in Chromium and WebKit. For more1702 details see http://codereview.chromium.org/3615005/show and1703 http://codereview.chromium.org/3595018/show.1704 1705 Test: fast/speech/input-text-language-tag.html1706 1707 * dom/Element.cpp:1708 (WebCore::Element::computeInheritedLanguage): includes a brief character1709 validation for the BCP 47 language tag.1710 * page/SpeechInput.cpp:1711 (WebCore::SpeechInput::startRecognition):1712 * page/SpeechInput.h:1713 * page/SpeechInputClient.h:1714 * platform/mock/SpeechInputClientMock.cpp:1715 (WebCore::SpeechInputClientMock::startRecognition):1716 (WebCore::SpeechInputClientMock::setRecognitionResult): results are now1717 stored by language using a hash map.1718 1718 (WebCore::SpeechInputClientMock::timerFired): 1719 1719 * platform/mock/SpeechInputClientMock.h: -
trunk/WebCore/dom/Element.cpp
r70152 r70301 57 57 #include "TextIterator.h" 58 58 #include "XMLNames.h" 59 #include <wtf/ASCIICType.h> 59 60 #include <wtf/text/CString.h> 60 61 … … 1475 1476 } 1476 1477 1478 if (!value.isNull() && !value.isEmpty()) { 1479 // Only A-Za-z0-9 and '-' are allowed in the language tag (see BCP 47) 1480 const char *p = value.string().ascii().data(); 1481 for (; *p != '\0'; ++p) { 1482 if (!isASCIIAlphanumeric(*p) && *p != '-') 1483 return AtomicString(); 1484 } 1485 } 1486 1477 1487 return value; 1478 1488 } -
trunk/WebCore/page/SpeechInput.cpp
r70152 r70301 94 94 } 95 95 96 bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect)96 bool SpeechInput::startRecognition(int listenerId, const String& language, const IntRect& elementRect) 97 97 { 98 98 ASSERT(m_listeners.contains(listenerId)); 99 return m_client->startRecognition(listenerId, elementRect);99 return m_client->startRecognition(listenerId, language, elementRect); 100 100 } 101 101 -
trunk/WebCore/page/SpeechInput.h
r70152 r70301 62 62 63 63 // Methods invoked by the input elements. 64 bool startRecognition(int, const IntRect&);64 bool startRecognition(int, const String&, const IntRect&); 65 65 void stopRecording(int); 66 66 void cancelRecognition(int); -
trunk/WebCore/page/SpeechInputClient.h
r70152 r70301 32 32 #define SpeechInputClient_h 33 33 34 #include <wtf/Forward.h> 35 34 36 #if ENABLE(INPUT_SPEECH) 35 37 … … 49 51 50 52 // Starts speech recognition and audio recording. 51 virtual bool startRecognition(int requestId, const IntRect& elementRect) = 0;53 virtual bool startRecognition(int requestId, const String& language, const IntRect& elementRect) = 0; 52 54 53 55 // Stops audio recording and performs recognition with the audio recorded until now -
trunk/WebCore/platform/mock/SpeechInputClientMock.cpp
r70152 r70301 36 36 #include "SpeechInputListener.h" 37 37 38 namespace { 39 // HashMap doesn't support empty strings as keys, so this value (an invalid BCP47 tag) is used for those cases. 40 const String emptyLanguage = "_"; 41 } 42 38 43 namespace WebCore { 39 44 … … 51 56 } 52 57 53 bool SpeechInputClientMock::startRecognition(int requestId, const IntRect&)58 bool SpeechInputClientMock::startRecognition(int requestId, const String& language, const IntRect&) 54 59 { 55 60 if (m_timer.isActive()) … … 57 62 m_requestId = requestId; 58 63 m_recording = true; 64 m_language = language; 59 65 m_timer.startOneShot(0); 60 66 return true; … … 81 87 } 82 88 83 void SpeechInputClientMock::setRecognitionResult(const String& result )89 void SpeechInputClientMock::setRecognitionResult(const String& result, const String& language) 84 90 { 85 m_recognitionResult = result; 91 if (language.isEmpty()) 92 m_recognitionResult.set(emptyLanguage, result); 93 else 94 m_recognitionResult.set(language, result); 86 95 } 87 96 … … 93 102 m_timer.startOneShot(0); 94 103 } else { 95 m_listener->setRecognitionResult(m_requestId, m_recognitionResult); 104 String language = m_language.isEmpty() ? String(emptyLanguage) : m_language; 105 if (!m_recognitionResult.contains(language)) { 106 // Can't avoid setting a result on empty or invalid language strings. 107 // This would avoid generating the events used to check the results and the test would timeout. 108 String error("error: no result found for language '"); 109 error.append(m_language); 110 error.append("'"); 111 m_listener->setRecognitionResult(m_requestId, error); 112 } else 113 m_listener->setRecognitionResult(m_requestId, m_recognitionResult.get(language)); 114 96 115 m_listener->didCompleteRecognition(m_requestId); 97 116 m_requestId = 0; -
trunk/WebCore/platform/mock/SpeechInputClientMock.h
r70152 r70301 35 35 #include "SpeechInputClient.h" 36 36 #include "Timer.h" 37 #include <wtf/HashMap.h> 38 #include <wtf/text/StringHash.h> 37 39 38 40 #if ENABLE(INPUT_SPEECH) … … 47 49 SpeechInputClientMock(); 48 50 49 void setRecognitionResult(const String& result );51 void setRecognitionResult(const String& result, const String& language); 50 52 51 53 // SpeechInputClient methods. 52 54 void setListener(SpeechInputListener*); 53 bool startRecognition(int, const IntRect&);55 bool startRecognition(int, const String&, const IntRect&); 54 56 void stopRecording(int); 55 57 void cancelRecognition(int); … … 62 64 SpeechInputListener* m_listener; 63 65 int m_requestId; 64 String m_recognitionResult; 66 67 HashMap<String, String> m_recognitionResult; 68 String m_language; 65 69 }; 66 70 -
trunk/WebCore/rendering/TextControlInnerElements.cpp
r70152 r70301 22 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 25 */ 26 26 27 27 #include "config.h" 28 28 #include "TextControlInnerElements.h" … … 108 108 renderer->setStyle(style); 109 109 } 110 110 111 111 // Set these explicitly since this normally happens during an attach() 112 112 setAttached(); 113 113 setInDocument(); 114 114 115 115 // For elements without a shadow parent, add the node to the DOM normally. 116 116 if (!m_shadowParent) { … … 119 119 parent->deprecatedParserAddChild(this); 120 120 } 121 121 122 122 // Add the renderer to the render tree 123 123 if (renderer) … … 209 209 if (m_capturing) { 210 210 if (Frame* frame = document()->frame()) 211 frame->eventHandler()->setCapturingMouseEventsNode(0); 211 frame->eventHandler()->setCapturingMouseEventsNode(0); 212 212 } 213 213 TextControlInnerElement::detach(); … … 282 282 if (!event->defaultHandled()) 283 283 HTMLDivElement::defaultEventHandler(event); 284 return; 285 } 286 284 return; 285 } 286 287 287 HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode()); 288 288 if (input->disabled() || input->isReadOnlyFormControl()) { … … 432 432 switch (m_state) { 433 433 case Idle: 434 if (speechInput()->startRecognition(m_listenerId, input-> renderer()->absoluteBoundingBoxRect()))434 if (speechInput()->startRecognition(m_listenerId, input->computeInheritedLanguage(), input->renderer()->absoluteBoundingBoxRect())) 435 435 setState(Recording); 436 436 break; … … 488 488 if (m_capturing) { 489 489 if (Frame* frame = document()->frame()) 490 frame->eventHandler()->setCapturingMouseEventsNode(0); 490 frame->eventHandler()->setCapturingMouseEventsNode(0); 491 491 } 492 492 -
trunk/WebKit/chromium/ChangeLog
r70289 r70301 1 2010-10-22 Leandro Gracia Gil <leandrogracia@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 Patch the current speech input implementation to use and validate the 6 nearest language tag. The language is now passed to the startRecognition 7 methods so that language-specific recognition could be used. Also added 8 a second parameter to setMockSpeechInputResult for the language used in 9 speech recognition. 10 https://bugs.webkit.org/show_bug.cgi?id=47089 11 12 This is the 2nd of a 4-sided patch in Chromium and WebKit. For more 13 details see http://codereview.chromium.org/3615005/show and 14 http://codereview.chromium.org/3595018/show. 15 16 * public/WebSpeechInputController.h: 17 (WebKit::WebSpeechInputController::startRecognition): 18 * public/WebSpeechInputControllerMock.h: 19 * src/SpeechInputClientImpl.cpp: 20 (WebKit::SpeechInputClientImpl::create): 21 (WebKit::SpeechInputClientImpl::startRecognition): 22 * src/SpeechInputClientImpl.h: 23 * src/WebSpeechInputControllerMockImpl.cpp: 24 (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): 25 (WebKit::WebSpeechInputControllerMockImpl::startRecognition): 26 * src/WebSpeechInputControllerMockImpl.h: 27 * src/WebViewImpl.cpp: 28 (WebKit::WebViewImpl::WebViewImpl): 29 * src/WebViewImpl.h: 30 1 31 2010-10-21 Yuzo Fujishima <yuzo@google.com> 2 32 … … 111 141 * public/WebSpeechInputControllerMock.h: 112 142 * src/SpeechInputClientImpl.cpp: 113 (WebKit::SpeechInputClientImpl::startRecognition):114 * src/SpeechInputClientImpl.h:115 * src/WebSpeechInputControllerMockImpl.cpp:116 (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):117 (WebKit::WebSpeechInputControllerMockImpl::startRecognition):118 * src/WebSpeechInputControllerMockImpl.h:119 * src/WebViewImpl.cpp:120 (WebKit::WebViewImpl::WebViewImpl):121 * src/WebViewImpl.h:122 123 2010-10-19 Leandro Gracia Gil <leandrogracia@google.com>124 125 Reviewed by Jeremy Orlow.126 127 Patch the current speech input implementation to use and validate the128 nearest language tag. The language is now passed to the startRecognition129 methods so that language-specific recognition could be used. Also added130 a second parameter to setMockSpeechInputResult for the language used in131 speech recognition.132 https://bugs.webkit.org/show_bug.cgi?id=47089133 134 This is the 2nd of a 4-sided patch in Chromium and WebKit. For more135 details see http://codereview.chromium.org/3615005/show and136 http://codereview.chromium.org/3595018/show.137 138 * public/WebSpeechInputController.h:139 (WebKit::WebSpeechInputController::startRecognition):140 * public/WebSpeechInputControllerMock.h:141 * src/SpeechInputClientImpl.cpp:142 (WebKit::SpeechInputClientImpl::create):143 143 (WebKit::SpeechInputClientImpl::startRecognition): 144 144 * src/SpeechInputClientImpl.h: -
trunk/WebKit/chromium/public/WebSpeechInputController.h
r70152 r70301 36 36 namespace WebKit { 37 37 38 class WebString; 38 39 struct WebRect; 39 40 … … 44 45 // runs to the limit or stopRecording is called. Progress indications and the recognized 45 46 // text are returned via the listener interface. 46 virtual bool startRecognition(int requestId, const Web Rect&)47 virtual bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect) 47 48 { 48 49 WEBKIT_ASSERT_NOT_REACHED(); -
trunk/WebKit/chromium/public/WebSpeechInputControllerMock.h
r70152 r70301 45 45 virtual ~WebSpeechInputControllerMock() { } 46 46 47 virtual void setMockRecognitionResult(const WebString& result, const WebString& language) = 0; 48 49 // FIXME: this is a fix for a two-sided patch. Delete as soon as the chromium side is patched. 50 // Chromium patch not uploaded yet, but will depend on http://codereview.chromium.org/3615005/show patch. 47 51 virtual void setMockRecognitionResult(const WebString& result) = 0; 48 52 }; -
trunk/WebKit/chromium/src/SpeechInputClientImpl.cpp
r70152 r70301 33 33 34 34 #include "PlatformString.h" 35 #include "SpeechInputListener.h" 35 36 #include "WebSpeechInputController.h" 36 37 #include "WebString.h" 37 38 #include "WebViewClient.h" 38 #include "page/SpeechInputListener.h"39 #include <wtf/PassOwnPtr.h> 39 40 40 41 #if ENABLE(INPUT_SPEECH) 41 42 42 43 namespace WebKit { 44 45 PassOwnPtr<SpeechInputClientImpl> SpeechInputClientImpl::create(WebViewClient* client) 46 { 47 return adoptPtr(new SpeechInputClientImpl(client)); 48 } 43 49 44 50 SpeechInputClientImpl::SpeechInputClientImpl(WebViewClient* web_view_client) … … 57 63 } 58 64 59 bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect)65 bool SpeechInputClientImpl::startRecognition(int requestId, const String& language, const WebCore::IntRect& elementRect) 60 66 { 61 67 ASSERT(m_listener); 62 return m_controller->startRecognition(requestId, elementRect);68 return m_controller->startRecognition(requestId, language, elementRect); 63 69 } 64 70 -
trunk/WebKit/chromium/src/SpeechInputClientImpl.h
r70152 r70301 34 34 #if ENABLE(INPUT_SPEECH) 35 35 36 #include "SpeechInputClient.h" 36 37 #include "WebSpeechInputListener.h" 37 #include "page/SpeechInputClient.h" 38 #include <wtf/Forward.h> 39 #include <wtf/OwnPtr.h> 40 #include <wtf/PassOwnPtr.h> 41 42 namespace WTF { 43 class String; 44 } 38 45 39 46 namespace WebCore { … … 50 57 public WebSpeechInputListener { 51 58 public: 52 SpeechInputClientImpl(WebViewClient*);59 static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*); 53 60 virtual ~SpeechInputClientImpl(); 54 61 55 62 // SpeechInputClient methods. 56 63 void setListener(WebCore::SpeechInputListener*); 57 bool startRecognition(int, const WebCore::IntRect&);64 bool startRecognition(int, const String&, const WebCore::IntRect&); 58 65 void stopRecording(int); 59 66 void cancelRecognition(int); … … 65 72 66 73 private: 74 SpeechInputClientImpl(WebViewClient*); 75 67 76 WebSpeechInputController* m_controller; // To call into the embedder. 68 77 WebCore::SpeechInputListener* m_listener; -
trunk/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
r70152 r70301 58 58 void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result) 59 59 { 60 m_webcoreMock->setRecognitionResult(result); 60 m_webcoreMock->setRecognitionResult(result, WebString::fromUTF8("")); 61 } 62 63 void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result, const WebString &language) 64 { 65 m_webcoreMock->setRecognitionResult(result, language); 61 66 } 62 67 … … 76 81 } 77 82 78 bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const Web Rect& elementRect)83 bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebString& language, const WebRect& elementRect) 79 84 { 80 return m_webcoreMock->startRecognition(requestId, elementRect);85 return m_webcoreMock->startRecognition(requestId, language, elementRect); 81 86 } 82 87 -
trunk/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
r70152 r70301 38 38 #include <wtf/OwnPtr.h> 39 39 40 namespace WTF { 41 class String; 42 } 43 40 44 namespace WebCore { 41 45 class SpeechInputClientMock; … … 58 62 59 63 // WebSpeechInputController methods. 60 bool startRecognition(int requestId, const Web Rect& elementRect);64 bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect); 61 65 void cancelRecognition(int requestId); 62 66 void stopRecording(int requestId); 63 67 64 68 // WebSpeechInputControllerMock methods. 69 void setMockRecognitionResult(const WebString& result, const WebString& language); 70 71 // FIXME: this is a fix for a two-sided patch. Delete as soon as the chromium side is patched. 72 // Chromium patch not uploaded yet, but will depend on http://codereview.chromium.org/3615005/show patch. 65 73 void setMockRecognitionResult(const WebString& result); 66 74 … … 73 81 74 82 #endif // WebSpeechInputControllerMockImpl_h 75 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r70222 r70301 89 89 #include "SelectionController.h" 90 90 #include "Settings.h" 91 #include "SpeechInputClientImpl.h" 91 92 #include "Timer.h" 92 93 #include "TypingCommand.h" … … 283 284 #endif 284 285 #if ENABLE(INPUT_SPEECH) 285 , m_speechInputClient( client)286 , m_speechInputClient(SpeechInputClientImpl::create(client)) 286 287 #endif 287 288 , m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0)) … … 306 307 pageClients.inspectorClient = &m_inspectorClientImpl; 307 308 #if ENABLE(INPUT_SPEECH) 308 pageClients.speechInputClient = &m_speechInputClient;309 pageClients.speechInputClient = m_speechInputClient.get(); 309 310 #endif 310 311 pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get(); -
trunk/WebKit/chromium/src/WebViewImpl.h
r70222 r70301 50 50 #include "LayerRendererChromium.h" 51 51 #include "NotificationPresenterImpl.h" 52 #include "SpeechInputClientImpl.h"53 52 #include <wtf/OwnPtr.h> 54 53 #include <wtf/RefCounted.h> … … 75 74 class DeviceOrientationClientProxy; 76 75 class DragScrollTimer; 76 class SpeechInputClientImpl; 77 77 class WebAccessibilityObject; 78 78 class WebDevToolsAgentClient; … … 548 548 549 549 #if ENABLE(INPUT_SPEECH) 550 SpeechInputClientImplm_speechInputClient;550 OwnPtr<SpeechInputClientImpl> m_speechInputClient; 551 551 #endif 552 552 // If we attempt to fetch the on-screen GraphicsContext3D before -
trunk/WebKitTools/ChangeLog
r70291 r70301 1 2010-10-22 Leandro Gracia Gil <leandrogracia@google.com> 2 3 Reviewed by Jeremy Orlow. 4 5 Added a second parameter to setMockSpeechInputResult for 6 the language used in speech input. 7 https://bugs.webkit.org/show_bug.cgi?id=47089 8 9 * DumpRenderTree/LayoutTestController.cpp: 10 (setMockSpeechInputResultCallback): 11 * DumpRenderTree/LayoutTestController.h: 12 * DumpRenderTree/chromium/LayoutTestController.cpp: 13 (LayoutTestController::setMockSpeechInputResult): 14 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 15 (LayoutTestController::setMockSpeechInputResult): 16 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 17 (LayoutTestController::setMockSpeechInputResult): 18 * DumpRenderTree/qt/LayoutTestControllerQt.h: 19 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 20 (LayoutTestController::setMockSpeechInputResult): 21 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 22 (LayoutTestController::setMockSpeechInputResult): 23 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 24 (LayoutTestController::setMockSpeechInputResult): 25 1 26 2010-10-21 MORITA Hajime <morrita@google.com> 2 27 … … 563 588 "Build breaks in mac and win" (Requested by satish on 564 589 #webkit). 565 566 * DumpRenderTree/LayoutTestController.cpp:567 (setMockSpeechInputResultCallback):568 * DumpRenderTree/LayoutTestController.h:569 * DumpRenderTree/chromium/LayoutTestController.cpp:570 (LayoutTestController::setMockSpeechInputResult):571 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:572 (LayoutTestController::setMockSpeechInputResult):573 574 2010-10-19 Leandro Gracia Gil <leandrogracia@google.com>575 576 Reviewed by Jeremy Orlow.577 578 Added a second parameter to setMockSpeechInputResult for579 the language used in speech input.580 https://bugs.webkit.org/show_bug.cgi?id=47089581 590 582 591 * DumpRenderTree/LayoutTestController.cpp: -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r70152 r70301 1071 1071 static JSValueRef setMockSpeechInputResultCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1072 1072 { 1073 if (argumentCount < 1)1073 if (argumentCount < 2) 1074 1074 return JSValueMakeUndefined(context); 1075 1075 … … 1077 1077 ASSERT(!*exception); 1078 1078 1079 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1080 controller->setMockSpeechInputResult(result.get()); 1079 JSRetainPtr<JSStringRef> language(Adopt, JSValueToStringCopy(context, arguments[1], exception)); 1080 ASSERT(!*exception); 1081 1082 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1083 controller->setMockSpeechInputResult(result.get(), language.get()); 1081 1084 1082 1085 return JSValueMakeUndefined(context); -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r70152 r70301 95 95 void setMockGeolocationError(int code, JSStringRef message); 96 96 void setMockGeolocationPosition(double latitude, double longitude, double accuracy); 97 void setMockSpeechInputResult(JSStringRef result );97 void setMockSpeechInputResult(JSStringRef result, JSStringRef language); 98 98 void setPersistentUserStyleSheetLocation(JSStringRef path); 99 99 void setPluginsEnabled(bool flag); -
trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
r70152 r70301 1527 1527 { 1528 1528 result->setNull(); 1529 if (arguments.size() < 1 || !arguments[0].isString())1530 return; 1531 1532 m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]) );1529 if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isString()) 1530 return; 1531 1532 m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]), cppVariantToWebString(arguments[1])); 1533 1533 } 1534 1534 -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r70152 r70301 501 501 } 502 502 503 void LayoutTestController::setMockSpeechInputResult(JSStringRef result )503 void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language) 504 504 { 505 505 // FIXME: Implement for speech input layout tests. -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r69952 r70301 372 372 } 373 373 374 void LayoutTestController::setMockSpeechInputResult(JSStringRef result )374 void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language) 375 375 { 376 376 // FIXME: Implement for speech input layout tests. -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r69952 r70301 760 760 } 761 761 762 void LayoutTestController::setMockSpeechInputResult(const QString& result )762 void LayoutTestController::setMockSpeechInputResult(const QString& result, const QString& language) 763 763 { 764 764 // FIXME: Implement for speech input layout tests. -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
r69952 r70301 216 216 bool geolocationPermission() const { return m_geolocationPermission; } 217 217 218 void setMockSpeechInputResult(const QString& result );218 void setMockSpeechInputResult(const QString& result, const QString& language); 219 219 220 220 // Empty stub method to keep parity with object model exposed by global LayoutTestController. -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r70291 r70301 406 406 } 407 407 408 void LayoutTestController::setMockSpeechInputResult(JSStringRef result )408 void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language) 409 409 { 410 410 // FIXME: Implement for speech input layout tests. -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r69952 r70301 321 321 } 322 322 323 void LayoutTestController::setMockSpeechInputResult(JSStringRef result )323 void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language) 324 324 { 325 325 // FIXME: Implement for speech input layout tests. … … 529 529 return 0; 530 530 } 531
Note: See TracChangeset
for help on using the changeset viewer.