Source/WebCore: Add API functions to enable starting and stopping speech input,
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2011 21:14:56 +0000 (21:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2011 21:14:56 +0000 (21:14 +0000)
and checking the current speech input state.
https://bugs.webkit.org/show_bug.cgi?id=60170

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-01
Reviewed by Dimitri Glazkov.

Test: fast/speech/input-text-speechstart.html

* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
(WebCore::InputFieldSpeechButtonElement::stopSpeechInput):
* html/shadow/TextControlInnerElements.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::speechButtonElement):
* rendering/RenderTextControlSingleLine.h:

Source/WebKit/chromium: Add API functions to enable starting and stopping speech input,
and checking the current speech input state.
https://bugs.webkit.org/show_bug.cgi?id=60170

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-01
Reviewed by Dimitri Glazkov.

* public/WebInputElement.h:
* src/AssertMatchingEnums.cpp:
* src/WebInputElement.cpp:
(WebKit::WebInputElement::isSpeechInputEnabled):
(WebKit::WebInputElement::getSpeechInputState):
(WebKit::WebInputElement::startSpeechInput):
(WebKit::WebInputElement::stopSpeechInput):

Tools: Adds a LayoutTestController method to make it possible to test
starting speech input via an API call.
https://bugs.webkit.org/show_bug.cgi?id=60170

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-01
Reviewed by Dimitri Glazkov.

* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::startSpeechInput):
* DumpRenderTree/chromium/LayoutTestController.h:
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::startSpeechInput):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::startSpeechInput):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::startSpeechInput):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::startSpeechInput):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::startSpeechInput):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::startSpeechInput):

LayoutTests: Adds a new test that checks triggering speech input via an API call.
https://bugs.webkit.org/show_bug.cgi?id=60170

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-01
Reviewed by Dimitri Glazkov.

* fast/speech/input-text-speechtrigger-expected.txt: Added.
* fast/speech/input-text-speechtrigger.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94343 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/speech/input-text-speechstart-expected.txt [new file with mode: 0644]
LayoutTests/fast/speech/input-text-speechstart.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebInputElement.h
Source/WebKit/chromium/src/AssertMatchingEnums.cpp
Source/WebKit/chromium/src/WebInputElement.cpp
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

index 2e4fc1b..d1d7bca 100644 (file)
@@ -1,3 +1,13 @@
+2011-09-01  Dominic Mazzoni  <dmazzoni@google.com>
+
+        Adds a new test that checks triggering speech input via an API call.
+        https://bugs.webkit.org/show_bug.cgi?id=60170
+
+        Reviewed by Dimitri Glazkov.
+
+        * fast/speech/input-text-speechtrigger-expected.txt: Added.
+        * fast/speech/input-text-speechtrigger.html: Added.
+
 2011-09-01  Cary Clark  <caryclark@google.com>
 
         Unreviewed; new baselines (Skia on Mac, next chunk of files)
diff --git a/LayoutTests/fast/speech/input-text-speechstart-expected.txt b/LayoutTests/fast/speech/input-text-speechstart-expected.txt
new file mode 100644 (file)
index 0000000..60dfee0
--- /dev/null
@@ -0,0 +1,10 @@
+Tests for triggering speech directly in a <input type="text" speech>.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById("speechInput").value is "Pictures of a sunset"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/speech/input-text-speechstart.html b/LayoutTests/fast/speech/input-text-speechstart.html
new file mode 100644 (file)
index 0000000..eb8ebc9
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script type="text/javascript">
+description('Tests for triggering speech directly in a &lt;input type="text" speech>.');
+
+function startSpeechInput(id) {
+    // Test that we can trigger speech with a method call to the input
+    // element, so the user agent could toggle speech via a keypress,
+    // for example.
+    var input = document.getElementById(id);
+    layoutTestController.startSpeechInput(input);
+}
+
+function onWebkitSpeechChange() {
+    shouldBeEqualToString('document.getElementById("speechInput").value', 'Pictures of a sunset');
+    finishJSTest();
+}
+
+function run() {
+    if (window.layoutTestController && window.eventSender) {
+        layoutTestController.addMockSpeechInputResult('Pictures of a sunset', 1.0, '');
+        startSpeechInput("speechInput");
+    }
+}
+
+window.onload = run;
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+<input id='speechInput' x-webkit-speech onwebkitspeechchange="onWebkitSpeechChange()">
+</body>
+</html>
index dffb8ae..7469f68 100644 (file)
@@ -1,3 +1,22 @@
+2011-09-01  Dominic Mazzoni  <dmazzoni@google.com>
+
+        Add API functions to enable starting and stopping speech input,
+        and checking the current speech input state.
+        https://bugs.webkit.org/show_bug.cgi?id=60170
+
+        Reviewed by Dimitri Glazkov.
+
+        Test: fast/speech/input-text-speechstart.html
+
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
+        (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
+        (WebCore::InputFieldSpeechButtonElement::stopSpeechInput):
+        * html/shadow/TextControlInnerElements.h:
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::speechButtonElement):
+        * rendering/RenderTextControlSingleLine.h:
+
 2011-09-01  Tim Horton  <timothy_horton@apple.com>
 
         REGRESSION: Rendering artifacts on a rotated, pattern filled SVG shape
index da9084e..21f88a4 100644 (file)
@@ -434,16 +434,11 @@ void InputFieldSpeechButtonElement::defaultEventHandler(Event* event)
 
     if (event->type() == eventNames().clickEvent && m_listenerId) {
         switch (m_state) {
-        case Idle: {
-              AtomicString language = input->computeInheritedLanguage();
-              String grammar = input->getAttribute(webkitgrammarAttr);
-              IntRect rect = renderer()->absoluteBoundingBoxRect();
-              if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, document()->securityOrigin()))
-                  setState(Recording);
-            }
+        case Idle:
+            startSpeechInput();
             break;
         case Recording:
-            speechInput()->stopRecording(m_listenerId);
+            stopSpeechInput();
             break;
         case Recognizing:
             // Nothing to do here, we will continue to wait for results.
@@ -524,6 +519,25 @@ void InputFieldSpeechButtonElement::detach()
     HTMLDivElement::detach();
 }
 
+void InputFieldSpeechButtonElement::startSpeechInput()
+{
+    if (m_state != Idle)
+        return;
+
+    RefPtr<HTMLInputElement> input = static_cast<HTMLInputElement*>(shadowAncestorNode());
+    AtomicString language = input->computeInheritedLanguage();
+    String grammar = input->getAttribute(webkitgrammarAttr);
+    IntRect rect = input->renderer()->absoluteBoundingBoxRect();
+    if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, document()->securityOrigin()))
+        setState(Recording);
+}
+
+void InputFieldSpeechButtonElement::stopSpeechInput()
+{
+    if (m_state == Recording)
+        speechInput()->stopRecording(m_listenerId);
+}
+
 const AtomicString& InputFieldSpeechButtonElement::shadowPseudoId() const
 {
     DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-input-speech-button"));
index 31936c1..efd4e40 100644 (file)
@@ -140,6 +140,8 @@ public:
     virtual void defaultEventHandler(Event*);
     virtual bool isInputFieldSpeechButtonElement() const { return true; }
     SpeechInputState state() const { return m_state; }
+    void startSpeechInput();
+    void stopSpeechInput();
 
     // SpeechInputListener methods.
     void didCompleteRecording(int);
index 39d6f28..17097b1 100644 (file)
@@ -111,13 +111,6 @@ inline HTMLElement* RenderTextControlSingleLine::cancelButtonElement() const
     return inputElement()->cancelButtonElement();
 }
 
-#if ENABLE(INPUT_SPEECH)
-inline HTMLElement* RenderTextControlSingleLine::speechButtonElement() const
-{
-    return inputElement()->speechButtonElement();
-}
-#endif
-
 RenderStyle* RenderTextControlSingleLine::textBaseStyle() const
 {
     HTMLElement* innerBlock = innerBlockElement();
@@ -364,6 +357,13 @@ void RenderTextControlSingleLine::capsLockStateMayHaveChanged()
     }
 }
 
+#if ENABLE(INPUT_SPEECH)
+HTMLElement* RenderTextControlSingleLine::speechButtonElement() const
+{
+    return inputElement()->speechButtonElement();
+}
+#endif
+
 bool RenderTextControlSingleLine::hasControlClip() const
 {
     // Apply control clip for text fields with decorations.
index 08879f2..474d353 100644 (file)
@@ -49,6 +49,10 @@ public:
 
     void capsLockStateMayHaveChanged();
 
+#if ENABLE(INPUT_SPEECH)
+    HTMLElement* speechButtonElement() const;
+#endif
+
 private:
     virtual bool hasControlClip() const;
     virtual LayoutRect controlClipRect(const LayoutPoint&) const;
@@ -120,9 +124,6 @@ private:
     HTMLElement* innerSpinButtonElement() const;
     HTMLElement* resultsButtonElement() const;
     HTMLElement* cancelButtonElement() const;
-#if ENABLE(INPUT_SPEECH)
-    HTMLElement* speechButtonElement() const;
-#endif
 
     bool m_searchPopupIsVisible;
     bool m_shouldDrawCapsLockIndicator;
index 42ca727..75b5046 100644 (file)
@@ -1,3 +1,19 @@
+2011-09-01  Dominic Mazzoni  <dmazzoni@google.com>
+
+        Add API functions to enable starting and stopping speech input,
+        and checking the current speech input state.
+        https://bugs.webkit.org/show_bug.cgi?id=60170
+
+        Reviewed by Dimitri Glazkov.
+
+        * public/WebInputElement.h:
+        * src/AssertMatchingEnums.cpp:
+        * src/WebInputElement.cpp:
+        (WebKit::WebInputElement::isSpeechInputEnabled):
+        (WebKit::WebInputElement::getSpeechInputState):
+        (WebKit::WebInputElement::startSpeechInput):
+        (WebKit::WebInputElement::stopSpeechInput):
+
 2011-08-31  Greg Billock  <gbillock@google.com>
 
         Add pass-throughs for NPObject/v8::Value marshalling to WebBindings
index 4ef988f..3d1ffb6 100644 (file)
@@ -42,6 +42,12 @@ namespace WebKit {
     // Provides readonly access to some properties of a DOM input element node.
     class WebInputElement : public WebFormControlElement {
     public:
+        enum SpeechInputState {
+            Idle,
+            Recording,
+            Recognizing,
+        };
+
         WebInputElement() : WebFormControlElement() { }
         WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
 
@@ -78,6 +84,11 @@ namespace WebKit {
         WEBKIT_EXPORT bool isValidValue(const WebString&) const;
         WEBKIT_EXPORT bool isChecked() const;
 
+        WEBKIT_EXPORT bool isSpeechInputEnabled() const;
+        WEBKIT_EXPORT SpeechInputState getSpeechInputState() const;
+        WEBKIT_EXPORT void startSpeechInput();
+        WEBKIT_EXPORT void stopSpeechInput();
+
         // Exposes the default value of the maxLength attribute.
         WEBKIT_EXPORT static int defaultMaxLength();
 
index ca73691..0bc5d4f 100644 (file)
@@ -57,6 +57,7 @@
 #include "Settings.h"
 #include "StorageInfo.h"
 #include "TextAffinity.h"
+#include "TextControlInnerElements.h"
 #include "UserContentTypes.h"
 #include "UserScriptTypes.h"
 #include "UserStyleSheetTypes.h"
@@ -311,6 +312,10 @@ COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeFavicon, Favicon);
 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouch, TouchIcon);
 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouchPrecomposed, TouchPrecomposedIcon);
 
+COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Idle, InputFieldSpeechButtonElement::Idle);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Recording, InputFieldSpeechButtonElement::Recording);
+COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Recognizing, InputFieldSpeechButtonElement::Recognizing);
+
 COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
 COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);
 COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE);
index 5e7a1cf..49fe19e 100644 (file)
@@ -33,6 +33,9 @@
 
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
+#include "RenderObject.h"
+#include "RenderTextControlSingleLine.h"
+#include "TextControlInnerElements.h"
 #include "WebString.h"
 #include <wtf/PassRefPtr.h>
 
@@ -150,6 +153,59 @@ bool WebInputElement::isChecked() const
     return constUnwrap<HTMLInputElement>()->checked();
 }
 
+bool WebInputElement::isSpeechInputEnabled() const
+{
+#if ENABLE(INPUT_SPEECH)
+    return constUnwrap<HTMLInputElement>()->isSpeechEnabled();
+#else
+    return false;
+#endif
+}
+
+WebInputElement::SpeechInputState WebInputElement::getSpeechInputState() const
+{
+#if ENABLE(INPUT_SPEECH)
+    RenderObject* renderer = constUnwrap<HTMLInputElement>()->renderer();
+    if (!renderer)
+        return Idle;
+
+    RenderTextControlSingleLine* control = toRenderTextControlSingleLine(renderer);
+    InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElement(control->speechButtonElement());
+    if (speechButton)
+        return static_cast<WebInputElement::SpeechInputState>(speechButton->state());
+#endif
+
+    return Idle;
+}
+
+void WebInputElement::startSpeechInput()
+{
+#if ENABLE(INPUT_SPEECH)
+    RenderObject* renderer = constUnwrap<HTMLInputElement>()->renderer();
+    if (!renderer)
+        return;
+
+    RenderTextControlSingleLine* control = toRenderTextControlSingleLine(renderer);
+    InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElement(control->speechButtonElement());
+    if (speechButton)
+        speechButton->startSpeechInput();
+#endif
+}
+
+void WebInputElement::stopSpeechInput()
+{
+#if ENABLE(INPUT_SPEECH)
+    RenderObject* renderer = constUnwrap<HTMLInputElement>()->renderer();
+    if (!renderer)
+        return;
+
+    RenderTextControlSingleLine* control = toRenderTextControlSingleLine(renderer);
+    InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElement(control->speechButtonElement());
+    if (speechButton)
+        speechButton->stopSpeechInput();
+#endif
+}
+
 int WebInputElement::defaultMaxLength()
 {
     return HTMLInputElement::maximumLength;
index 3fd3202..7db84ed 100644 (file)
@@ -1,3 +1,30 @@
+2011-09-01  Dominic Mazzoni  <dmazzoni@google.com>
+
+        Adds a LayoutTestController method to make it possible to test
+        starting speech input via an API call.
+        https://bugs.webkit.org/show_bug.cgi?id=60170
+
+        Reviewed by Dimitri Glazkov.
+
+        * DumpRenderTree/LayoutTestController.h:
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        (LayoutTestController::startSpeechInput):
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        (LayoutTestController::startSpeechInput):
+
 2011-09-01  Tim Horton  <hortont424@gmail.com>
 
         Fix TestWebKitAPI build on clang-2.0
index 928cfc7..d5cfba7 100644 (file)
@@ -125,6 +125,7 @@ public:
     void setSpatialNavigationEnabled(bool enable);
     void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
     void setEditingBehavior(const char* editingBehavior);
+    void startSpeechInput(JSContextRef inputElement);
 
     void setPageVisibility(const char* visibility) { }
     void resetPageVisibility() { }
index 84a5cbf..11e6282 100644 (file)
@@ -188,6 +188,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
     bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
     bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
+    bindMethod("startSpeechInput", &LayoutTestController::startSpeechInput);
     bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
     bindMethod("testRepaint", &LayoutTestController::testRepaint);
     bindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate);
@@ -1725,6 +1726,26 @@ void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& argum
     m_shell->webViewHost()->speechInputControllerMock()->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
 }
 
+void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    if (arguments.size() != 1)
+        return;
+
+    WebElement element;
+    if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
+        return;
+
+    WebInputElement* input = toWebInputElement(&element);
+    if (!input)
+        return;
+
+    if (!input->isSpeechInputEnabled())
+        return;
+
+    input->startSpeechInput();
+}
+
 void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
 {
     result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
index 65cbaa8..d2e0ca1 100644 (file)
@@ -360,6 +360,7 @@ public:
 
     // Speech input related functions.
     void addMockSpeechInputResult(const CppArgumentList&, CppVariant*);
+    void startSpeechInput(const CppArgumentList&, CppVariant*);
 
     void layerTreeAsText(const CppArgumentList& args, CppVariant* result);
 
index fc5357b..da6ffb7 100644 (file)
@@ -384,6 +384,13 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef, double, JSStrin
     notImplemented();
 }
 
+void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+    notImplemented();
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool enabled)
 {
     if (!enabled) {
index 98cc1dd..c817b2b 100644 (file)
@@ -502,6 +502,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool enabled)
 {
     WebKitIconDatabase* database = webkit_get_icon_database();
index 127e215..f6e543f 100644 (file)
@@ -482,6 +482,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
 {
     // FIXME: Workaround <rdar://problem/6480108>
index f4615ab..270a53e 100644 (file)
@@ -875,6 +875,12 @@ void LayoutTestController::addMockSpeechInputResult(const QString& result, doubl
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::startSpeechInput(const QString& inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::evaluateScriptInIsolatedWorld(int worldID, const QString& script)
 {
     DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(m_drt->webPage()->mainFrame(), worldID, script);
index 15fd8fc..0486e05 100644 (file)
@@ -233,6 +233,7 @@ public slots:
     bool geolocationPermission() const { return m_geolocationPermission; }
 
     void addMockSpeechInputResult(const QString& result, double confidence, const QString& language);
+    void startSpeechInput(const QString& inputElement);
 
     // Empty stub method to keep parity with object model exposed by global LayoutTestController.
     void abortModal() {}
index 0097583..c78fea5 100644 (file)
@@ -450,6 +450,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
 {
     // See also <rdar://problem/6480108>
index 6300cc5..8a49d69 100644 (file)
@@ -376,6 +376,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
 {
     // FIXME: implement