Speech Input: Report speech element rect relative to window rather than frame
authorhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 08:52:10 +0000 (08:52 +0000)
committerhans@chromium.org <hans@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 08:52:10 +0000 (08:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76443

Reviewed by Darin Fisher.

Source/WebCore:

When requesting speech input, report the speech element rect relative
to the window rather than the frame. The embedder will typically use
this position to show a bubble indicating that speech recognition is
in progress.

Test: fast/speech/bubble-position.html

* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):

Tools:

Update LayoutTestController to allow for retrieving the speech
element's position used in a request.

In Chromium this is handled by the MockWebSpeechInputController;
adding stubs for the other implementations.

* DumpRenderTree/LayoutTestController.cpp:
(setMockSpeechInputDumpRectCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
(MockWebSpeechInputController::setDumpRect):
(MockWebSpeechInputController::clearResults):
(MockWebSpeechInputController::startRecognition):
(MockWebSpeechInputController::MockWebSpeechInputController):
(makeRectResult):
(MockWebSpeechInputController::speechTaskFired):
* DumpRenderTree/chromium/MockWebSpeechInputController.h:
(MockWebSpeechInputController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setMockSpeechInputDumpRect):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::setMockSpeechInputDumpRect):

LayoutTests:

Add layout test to check that the element position used when
requesting speech input is relative to the window, not the frame.

* fast/speech/bubble-position-expected.txt: Added.
* fast/speech/bubble-position.html: Added.

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

19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/speech/bubble-position-expected.txt [new file with mode: 0644]
LayoutTests/fast/speech/bubble-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
Tools/DumpRenderTree/chromium/MockWebSpeechInputController.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 d68726f..3ee1a48 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-31  Hans Wennborg  <hans@chromium.org>
+
+        Speech Input: Report speech element rect relative to window rather than frame
+        https://bugs.webkit.org/show_bug.cgi?id=76443
+
+        Reviewed by Darin Fisher.
+
+        Add layout test to check that the element position used when
+        requesting speech input is relative to the window, not the frame.
+
+        * fast/speech/bubble-position-expected.txt: Added.
+        * fast/speech/bubble-position.html: Added.
+
 2012-02-01  Philippe Normand  <pnormand@igalia.com>
 
         Unreviewed, GTK rebaseline after r106373 and r106361.
diff --git a/LayoutTests/fast/speech/bubble-position-expected.txt b/LayoutTests/fast/speech/bubble-position-expected.txt
new file mode 100644 (file)
index 0000000..1dab760
--- /dev/null
@@ -0,0 +1,12 @@
+Tests for speech button click with <input type="text" speech>.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Clicking the speech button.
+onSpeechChange()
+PASS input.value === expectedString is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/speech/bubble-position.html b/LayoutTests/fast/speech/bubble-position.html
new file mode 100644 (file)
index 0000000..8158a7f
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+description('Tests for speech button click with &lt;input type="text" speech>.');
+
+function onSpeechChange() {
+    debug("onSpeechChange()");
+
+    // Since we requested dumpRect, the rect comes back as the speech result.
+    window.expectedString = expectedX + "," + expectedY + "," + expectedWidth + "," + expectedHeight;
+    shouldBeTrue("input.value === expectedString");
+    finishJSTest();
+}
+
+function run() {
+    window.iframe = document.getElementById('iframe');
+    window.input = iframe.contentDocument.createElement('input');
+    input.setAttribute('x-webkit-speech');
+    input.onwebkitspeechchange = onSpeechChange;
+    iframe.contentDocument.getElementsByTagName('body')[0].appendChild(input);
+
+    window.expectedWidth = input.scrollHeight;
+    window.expectedHeight = input.scrollHeight;
+    window.expectedX = iframe.offsetLeft + input.offsetLeft + input.offsetWidth - expectedWidth;
+    window.expectedY = iframe.offsetTop + input.offsetTop + input.offsetHeight - 1;
+
+    if (window.layoutTestController && window.eventSender) {
+        layoutTestController.setMockSpeechInputDumpRect(true);
+
+        debug('Clicking the speech button.');
+        var x = input.offsetLeft + input.offsetWidth - 4;
+        var y = input.offsetTop + input.offsetHeight / 2;
+        x += iframe.offsetLeft;
+        y += iframe.offsetTop;
+
+        eventSender.mouseMoveTo(x, y);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+
+window.onload = run;
+window.jsTestIsAsync = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+<iframe id="iframe">
+</body>
+</html>
+
index 0e2318c..7f4be87 100644 (file)
@@ -1,3 +1,20 @@
+2012-01-31  Hans Wennborg  <hans@chromium.org>
+
+        Speech Input: Report speech element rect relative to window rather than frame
+        https://bugs.webkit.org/show_bug.cgi?id=76443
+
+        Reviewed by Darin Fisher.
+
+        When requesting speech input, report the speech element rect relative
+        to the window rather than the frame. The embedder will typically use
+        this position to show a bubble indicating that speech recognition is
+        in progress.
+
+        Test: fast/speech/bubble-position.html
+
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
+
 2012-01-31  Andreas Kling  <awesomekling@apple.com>
 
         Make elements that don't have attributes smaller.
index 6ab9d1f..808ffa3 100644 (file)
@@ -39,6 +39,7 @@
 #include "Page.h"
 #include "RenderLayer.h"
 #include "RenderTextControlSingleLine.h"
+#include "RenderView.h"
 #include "ScriptController.h"
 #include "ScrollbarTheme.h"
 #include "SpeechInput.h"
@@ -549,7 +550,7 @@ void InputFieldSpeechButtonElement::startSpeechInput()
     AtomicString language = input->computeInheritedLanguage();
     String grammar = input->getAttribute(webkitgrammarAttr);
     // FIXME: this should probably respect transforms
-    IntRect rect = renderer()->absoluteBoundingBoxRectIgnoringTransforms();
+    IntRect rect = renderer()->view()->frameView()->contentsToWindow(renderer()->absoluteBoundingBoxRectIgnoringTransforms());
     if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, document()->securityOrigin()))
         setState(Recording);
 }
index 7643b00..ea1f2e2 100644 (file)
@@ -1,3 +1,50 @@
+2012-01-31  Hans Wennborg  <hans@chromium.org>
+
+        Speech Input: Report speech element rect relative to window rather than frame
+        https://bugs.webkit.org/show_bug.cgi?id=76443
+
+        Reviewed by Darin Fisher.
+
+        Update LayoutTestController to allow for retrieving the speech
+        element's position used in a request.
+
+        In Chromium this is handled by the MockWebSpeechInputController;
+        adding stubs for the other implementations.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (setMockSpeechInputDumpRectCallback):
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
+        (MockWebSpeechInputController::setDumpRect):
+        (MockWebSpeechInputController::clearResults):
+        (MockWebSpeechInputController::startRecognition):
+        (MockWebSpeechInputController::MockWebSpeechInputController):
+        (makeRectResult):
+        (MockWebSpeechInputController::speechTaskFired):
+        * DumpRenderTree/chromium/MockWebSpeechInputController.h:
+        (MockWebSpeechInputController):
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        (LayoutTestController):
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        (LayoutTestController::setMockSpeechInputDumpRect):
+
 2012-01-31  Ryuan Choi  <ryuan.choi@samsung.com>
 
         [EFL] Add basic DRT/Efl implementation to support viewport test.
index 6c13d93..ae1164e 100644 (file)
@@ -1356,6 +1356,19 @@ static JSValueRef addMockSpeechInputResultCallback(JSContextRef context, JSObjec
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef setMockSpeechInputDumpRectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    if (argumentCount < 1)
+        return JSValueMakeUndefined(context);
+
+    bool dumpRect = JSValueToBoolean(context, arguments[0]);
+
+    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    controller->setMockSpeechInputDumpRect(dumpRect);
+
+    return JSValueMakeUndefined(context);
+}
+
 static JSValueRef setNewWindowsCopyBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation
@@ -2453,6 +2466,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "setMockGeolocationError", setMockGeolocationErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setMockGeolocationPosition", setMockGeolocationPositionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "addMockSpeechInputResult", addMockSpeechInputResultCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setMockSpeechInputDumpRect", setMockSpeechInputDumpRectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setNewWindowsCopyBackForwardList", setNewWindowsCopyBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setPageVisibility", setPageVisibilityCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setPOSIXLocale", setPOSIXLocaleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index 9f4db49..6617cfe 100644 (file)
@@ -108,6 +108,7 @@ public:
     void setMockGeolocationError(int code, JSStringRef message);
     void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
     void addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language);
+    void setMockSpeechInputDumpRect(bool flag);
     void setPersistentUserStyleSheetLocation(JSStringRef path);
     void setPluginsEnabled(bool flag);
     void setPopupBlockingEnabled(bool flag);
index 37480b0..b0347c8 100644 (file)
@@ -91,6 +91,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     // by CppBoundClass, the parent to LayoutTestController).
     bindMethod("addFileToPasteboardOnDrag", &LayoutTestController::addFileToPasteboardOnDrag);
     bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
+    bindMethod("setMockSpeechInputDumpRect", &LayoutTestController::setMockSpeechInputDumpRect);
     bindMethod("addOriginAccessWhitelistEntry", &LayoutTestController::addOriginAccessWhitelistEntry);
     bindMethod("addUserScript", &LayoutTestController::addUserScript);
     bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet);
@@ -1938,6 +1939,16 @@ void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& argum
         controller->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
 }
 
+void LayoutTestController::setMockSpeechInputDumpRect(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    if (arguments.size() < 1 || !arguments[0].isBool())
+        return;
+
+    if (MockWebSpeechInputController* controller = m_shell->webViewHost()->speechInputControllerMock())
+        controller->setDumpRect(arguments[0].value.boolValue);
+}
+
 void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
index e37ff7d..a686e86 100644 (file)
@@ -377,6 +377,7 @@ public:
 
     // Speech input related functions.
     void addMockSpeechInputResult(const CppArgumentList&, CppVariant*);
+    void setMockSpeechInputDumpRect(const CppArgumentList&, CppVariant*);
     void startSpeechInput(const CppArgumentList&, CppVariant*);
 
     void layerTreeAsText(const CppArgumentList& args, CppVariant* result);
index cb0b066..35357a8 100644 (file)
@@ -28,7 +28,9 @@
 
 #include "WebSpeechInputListener.h"
 #include "platform/WebCString.h"
+#include "platform/WebVector.h"
 #include <wtf/text/CString.h>
+#include <wtf/text/StringBuilder.h>
 
 using namespace WebKit;
 
@@ -52,10 +54,16 @@ void MockWebSpeechInputController::addMockRecognitionResult(const WebString& res
     }
 }
 
+void MockWebSpeechInputController::setDumpRect(bool dumpRect)
+{
+    m_dumpRect = dumpRect;
+}
+
 void MockWebSpeechInputController::clearResults()
 {
     m_resultsForEmptyLanguage.clear();
     m_recognitionResults.clear();
+    m_dumpRect = false;
 }
 
 bool MockWebSpeechInputController::startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar, const WebSecurityOrigin& origin)
@@ -64,6 +72,7 @@ bool MockWebSpeechInputController::startRecognition(int requestId, const WebRect
         return false;
 
     m_requestId = requestId;
+    m_requestRect = elementRect;
     m_recording = true;
     m_language = String::fromUTF8(language.utf8().data());
 
@@ -99,9 +108,29 @@ MockWebSpeechInputController::MockWebSpeechInputController(WebSpeechInputListene
     , m_speechTask(0)
     , m_recording(false)
     , m_requestId(-1)
+    , m_dumpRect(false)
 {
 }
 
+static WebSpeechInputResultArray makeRectResult(const WebRect& rect)
+{
+    StringBuilder sb;
+    sb.append(String::number(rect.x));
+    sb.append(",");
+    sb.append(String::number(rect.y));
+    sb.append(",");
+    sb.append(String::number(rect.width));
+    sb.append(",");
+    sb.append(String::number(rect.height));
+
+    WebSpeechInputResult res;
+    res.set(WebString(sb.characters(), sb.length()), 1.0);
+
+    WebSpeechInputResultArray results;
+    results.assign(&res, 1);
+    return results;
+}
+
 void MockWebSpeechInputController::speechTaskFired()
 {
     if (m_recording) {
@@ -117,8 +146,10 @@ void MockWebSpeechInputController::speechTaskFired()
         int requestId = m_requestId;
         m_requestId = 0;
 
-        // Empty language case must be handled separately to avoid problems with HashMap and empty keys.
-        if (m_language.isEmpty()) {
+        if (m_dumpRect) {
+            m_listener->setRecognitionResult(requestId, makeRectResult(m_requestRect));
+        } else if (m_language.isEmpty()) {
+            // Empty language case must be handled separately to avoid problems with HashMap and empty keys.
             if (!m_resultsForEmptyLanguage.isEmpty())
                 m_listener->setRecognitionResult(requestId, m_resultsForEmptyLanguage);
             else
index 96aadff..8d75196 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(INPUT_SPEECH)
 
 #include "Task.h"
+#include "platform/WebRect.h"
 #include "WebSpeechInputController.h"
 #include "WebSpeechInputResult.h"
 #include <wtf/Compiler.h>
@@ -39,7 +40,6 @@
 #include <wtf/text/StringHash.h>
 
 namespace WebKit {
-struct WebRect;
 class WebSecurityOrigin;
 class WebSpeechInputListener;
 class WebString;
@@ -50,6 +50,7 @@ public:
     static PassOwnPtr<MockWebSpeechInputController> create(WebKit::WebSpeechInputListener*);
 
     void addMockRecognitionResult(const WebKit::WebString& result, double confidence, const WebKit::WebString& language);
+    void setDumpRect(bool);
     void clearResults();
 
     // WebSpeechInputController implementation:
@@ -79,10 +80,12 @@ private:
 
     bool m_recording;
     int m_requestId;
+    WebKit::WebRect m_requestRect;
     String m_language;
 
     HashMap<String, Vector<WebKit::WebSpeechInputResult> > m_recognitionResults;
     Vector<WebKit::WebSpeechInputResult> m_resultsForEmptyLanguage;
+    bool m_dumpRect;
 };
 
 #endif // ENABLE(INPUT_SPEECH)
index 90c2633..66594f7 100644 (file)
@@ -389,6 +389,13 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef, double, JSStrin
     notImplemented();
 }
 
+void LayoutTestController::setMockSpeechInputDumpRect(bool)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+    notImplemented();
+}
+
 void LayoutTestController::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.
index 7545010..87ecdd0 100644 (file)
@@ -526,6 +526,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::setMockSpeechInputDumpRect(bool flag)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.
index 784bc61..4bc48d2 100644 (file)
@@ -545,6 +545,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::setMockSpeechInputDumpRect(bool flag)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.
index a6050c7..722bf77 100644 (file)
@@ -899,6 +899,12 @@ void LayoutTestController::addMockSpeechInputResult(const QString& result, doubl
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
 }
 
+void LayoutTestController::setMockSpeechInputDumpRect(bool flag)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::startSpeechInput(const QString& inputElement)
 {
     // FIXME: Implement for speech input layout tests.
index b842fe4..a543e45 100644 (file)
@@ -234,6 +234,7 @@ public slots:
     bool geolocationPermission() const { return m_geolocationPermission; }
 
     void addMockSpeechInputResult(const QString& result, double confidence, const QString& language);
+    void setMockSpeechInputDumpRect(bool flag);
     void startSpeechInput(const QString& inputElement);
 
     // Empty stub method to keep parity with object model exposed by global LayoutTestController.
index 38c9877..c69c474 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::setMockSpeechInputDumpRect(bool flag)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.
index cfd1f6d..b2f7fb4 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::setMockSpeechInputDumpRect(bool flag)
+{
+    // FIXME: Implement for speech input layout tests.
+    // See https://bugs.webkit.org/show_bug.cgi?id=39485.
+}
+
 void LayoutTestController::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.