[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
satish at chromium.org
satish at chromium.org
Wed Dec 22 15:02:21 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3b460c0f5e2b6eea2d0f871f551d992a69317ab0
Author: satish at chromium.org <satish at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 17:19:42 2010 +0000
2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
Reviewed by Jeremy Orlow.
Added a layout test for the language tag in speech input. Updated
the speech button tests to include the new language parameter in the
mock result.
https://bugs.webkit.org/show_bug.cgi?id=47089
* fast/speech/input-text-language-tag-expected.txt: Added.
* fast/speech/input-text-language-tag.html: Added.
* fast/speech/input-text-speechbutton.html:
* fast/speech/speech-button-ignore-generated-events.html:
* platform/chromium/test_expectations.txt:
2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
Reviewed by Jeremy Orlow.
Patch the current speech input implementation to use the nearest
language tag. The language is now passed to the startRecognition
methods so that language-specific recognition could be used. Also added
a second parameter to setMockSpeechInputResult for the language used in
speech recognition.
https://bugs.webkit.org/show_bug.cgi?id=47089
This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
details see http://codereview.chromium.org/3615005/show and
http://codereview.chromium.org/3595018/show. The last of the 4 patches
depends also on the language tag validation provided by this patch:
https://bugs.webkit.org/show_bug.cgi?id=48225.
Test: fast/speech/input-text-language-tag.html
* page/SpeechInput.cpp:
(WebCore::SpeechInput::startRecognition):
* page/SpeechInput.h:
* page/SpeechInputClient.h:
* platform/mock/SpeechInputClientMock.cpp:
(WebCore::SpeechInputClientMock::startRecognition):
(WebCore::SpeechInputClientMock::setRecognitionResult):
(WebCore::SpeechInputClientMock::timerFired):
* platform/mock/SpeechInputClientMock.h:
* rendering/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::attachInnerElement):
(WebCore::SearchFieldCancelButtonElement::detach):
(WebCore::SpinButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::detach):
2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
Reviewed by Jeremy Orlow.
Patch the current speech input implementation to use the nearest
language tag. The language is now passed to the startRecognition
methods so that language-specific recognition could be used. Also added
a second parameter to setMockSpeechInputResult for the language used in
speech recognition.
https://bugs.webkit.org/show_bug.cgi?id=47089
This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
details see http://codereview.chromium.org/3615005/show and
http://codereview.chromium.org/3595018/show. The last of the 4 patches
depends also on the language tag validation provided by this patch:
https://bugs.webkit.org/show_bug.cgi?id=48225.
* public/WebSpeechInputController.h:
(WebKit::WebSpeechInputController::startRecognition):
* public/WebSpeechInputControllerMock.h:
* src/SpeechInputClientImpl.cpp:
(WebKit::SpeechInputClientImpl::create):
(WebKit::SpeechInputClientImpl::startRecognition):
* src/SpeechInputClientImpl.h:
* src/WebSpeechInputControllerMockImpl.cpp:
(WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):
(WebKit::WebSpeechInputControllerMockImpl::startRecognition):
* src/WebSpeechInputControllerMockImpl.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
* src/WebViewImpl.h:
2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
Reviewed by Jeremy Orlow.
Added a second parameter to setMockSpeechInputResult for
the language used in speech input.
https://bugs.webkit.org/show_bug.cgi?id=47089
* DumpRenderTree/LayoutTestController.cpp:
(setMockSpeechInputResultCallback):
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::setMockSpeechInputResult):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setMockSpeechInputResult):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setMockSpeechInputResult):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setMockSpeechInputResult):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setMockSpeechInputResult):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::setMockSpeechInputResult):
(LayoutTestController::pageSizeAndMarginsInPixels):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7371f9b..73ed958 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Added a layout test for the language tag in speech input. Updated
+ the speech button tests to include the new language parameter in the
+ mock result.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ * fast/speech/input-text-language-tag-expected.txt: Added.
+ * fast/speech/input-text-language-tag.html: Added.
+ * fast/speech/input-text-speechbutton.html:
+ * fast/speech/speech-button-ignore-generated-events.html:
+ * platform/chromium/test_expectations.txt:
+
2010-10-27 David Hyatt <hyatt at apple.com>
Reviewed by Dan Bernstein.
@@ -5399,6 +5414,24 @@
* fast/speech/speech-button-ignore-generated-events.html:
* platform/chromium/test_expectations.txt:
+2010-10-20 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Added a layout test for the language tag in speech input. Updated
+ the speech button tests to include the new language parameter in the
+ mock result.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ * fast/speech/input-text-language-tag-expected.txt: Added.
+ * fast/speech/input-text-language-tag.html: Added.
+ * fast/speech/input-text-speechbutton.html: Added an empty language
+ parameter.
+ * fast/speech/speech-button-ignore-generated-events.html: Added an
+ empty language parameter.
+ * platform/chromium/test_expectations.txt: language tag test is expected
+ to fail until the chromium-side patch has been applied.
+
2010-10-20 Martin Robinson <mrobinson at igalia.com>
Unskip some tests that are now passing.
diff --git a/LayoutTests/fast/speech/input-text-language-tag-expected.txt b/LayoutTests/fast/speech/input-text-language-tag-expected.txt
new file mode 100644
index 0000000..aecb475
--- /dev/null
+++ b/LayoutTests/fast/speech/input-text-language-tag-expected.txt
@@ -0,0 +1,12 @@
+Tests for language tag inheritance and validation in speech buttons.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById("speechInputNone").value is "error: no result found for language ''"
+PASS document.getElementById("speechInputElement").value is "Pictures of the moon"
+PASS document.getElementById("speechInputInherited").value is "月の写真"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/speech/input-text-language-tag.html b/LayoutTests/fast/speech/input-text-language-tag.html
new file mode 100644
index 0000000..3158d3e
--- /dev/null
+++ b/LayoutTests/fast/speech/input-text-language-tag.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<meta charset="utf-8">
+<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 language tag inheritance and validation in speech buttons.');
+
+// Note: test cases are sequential to ensure that no new recognition starts when another recognition recording is active.
+function onChangeNone() {
+ shouldBeEqualToString('document.getElementById("speechInputNone").value', 'error: no result found for language \'\'');
+ setTimeout(function() { speechButtonClick('speechInputElement'); }, 50);
+}
+
+function onChangeElement() {
+ shouldBeEqualToString('document.getElementById("speechInputElement").value', 'Pictures of the moon');
+ setTimeout(function() { speechButtonClick('speechInputInherited'); }, 50);
+}
+
+function onChangeInherited() {
+ shouldBeEqualToString('document.getElementById("speechInputInherited").value', '月の写真');
+ finishJSTest();
+}
+
+function speechButtonClick(elementId) {
+ var element = document.getElementById(elementId);
+ var x = element.offsetLeft + element.offsetWidth - 4;
+ var y = element.offsetTop + element.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+function run() {
+ if (window.layoutTestController && window.eventSender) {
+ layoutTestController.setMockSpeechInputResult('Pictures of the moon', 'en-GB');
+ layoutTestController.setMockSpeechInputResult('月の写真', 'ja');
+ speechButtonClick('speechInputNone');
+ }
+}
+
+window.onload = run;
+window.jsTestIsAsync = true;
+window.successfullyParsed = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+<input id="speechInputNone" x-webkit-speech onwebkitspeechchange="onChangeNone()">
+<input id="speechInputElement" x-webkit-speech onwebkitspeechchange="onChangeElement()" lang="en-GB">
+<div lang="ja"> <input id="speechInputInherited" x-webkit-speech onwebkitspeechchange="onChangeInherited()"> </div>
+</body>
+</html>
diff --git a/LayoutTests/fast/speech/input-text-speechbutton.html b/LayoutTests/fast/speech/input-text-speechbutton.html
index 6f5bc4b..cef7705 100644
--- a/LayoutTests/fast/speech/input-text-speechbutton.html
+++ b/LayoutTests/fast/speech/input-text-speechbutton.html
@@ -32,7 +32,7 @@ function onWebkitSpeechChange() {
function run() {
if (window.layoutTestController && window.eventSender) {
- layoutTestController.setMockSpeechInputResult('Pictures of the moon');
+ layoutTestController.setMockSpeechInputResult('Pictures of the moon', '');
// Clicking the speech button should fill in mock speech-recognized text.
var input = document.getElementById('speechInput');
diff --git a/LayoutTests/fast/speech/speech-button-ignore-generated-events.html b/LayoutTests/fast/speech/speech-button-ignore-generated-events.html
index b9b8ec3..c684863 100644
--- a/LayoutTests/fast/speech/speech-button-ignore-generated-events.html
+++ b/LayoutTests/fast/speech/speech-button-ignore-generated-events.html
@@ -49,7 +49,7 @@ function setupDispatchEventTest() {
function run() {
if (window.layoutTestController && window.eventSender) {
// Running in DRT, test the eventSender case.
- layoutTestController.setMockSpeechInputResult('Pictures of the moon');
+ layoutTestController.setMockSpeechInputResult('Pictures of the moon', '');
document.getElementById('speechInput').onwebkitspeechchange = function() {
shouldBeEqualToString('document.getElementById("speechInput").value', 'Pictures of the moon');
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 0dbc5fe..5802557 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3253,3 +3253,6 @@ BUGWK48164 : plugins/invalid-mime-with-valid-extension-shows-missing-plugin.html
// Chromium-mac-specific test, and only runs in DRT.
BUGWK46868 : platform/chromium/fast/text/chromium-mac-duplicate-ime-composition.html = TEXT
+
+// Temporarily disabled for a 4-sided patch. Will be enabled again by BUGWK47420.
+BUGWK47089 : fast/speech/input-text-language-tag.html = FAIL
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 348f9d7..91fab8f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,38 @@
+2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Patch the current speech input implementation to use the nearest
+ language tag. The language is now passed to the startRecognition
+ methods so that language-specific recognition could be used. Also added
+ a second parameter to setMockSpeechInputResult for the language used in
+ speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
+ details see http://codereview.chromium.org/3615005/show and
+ http://codereview.chromium.org/3595018/show. The last of the 4 patches
+ depends also on the language tag validation provided by this patch:
+ https://bugs.webkit.org/show_bug.cgi?id=48225.
+
+ Test: fast/speech/input-text-language-tag.html
+
+ * page/SpeechInput.cpp:
+ (WebCore::SpeechInput::startRecognition):
+ * page/SpeechInput.h:
+ * page/SpeechInputClient.h:
+ * platform/mock/SpeechInputClientMock.cpp:
+ (WebCore::SpeechInputClientMock::startRecognition):
+ (WebCore::SpeechInputClientMock::setRecognitionResult):
+ (WebCore::SpeechInputClientMock::timerFired):
+ * platform/mock/SpeechInputClientMock.h:
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::TextControlInnerElement::attachInnerElement):
+ (WebCore::SearchFieldCancelButtonElement::detach):
+ (WebCore::SpinButtonElement::defaultEventHandler):
+ (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
+ (WebCore::InputFieldSpeechButtonElement::detach):
+
2010-10-27 David Hyatt <hyatt at apple.com>
Reviewed by Dan Bernstein.
@@ -5092,6 +5127,43 @@
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::detach):
+2010-10-20 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Patch the current speech input implementation to use and validate the
+ nearest language tag. The language is now passed to the startRecognition
+ methods so that language-specific recognition could be used. Also added
+ a second parameter to setMockSpeechInputResult for the language used in
+ speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
+ details see http://codereview.chromium.org/3615005/show and
+ http://codereview.chromium.org/3595018/show.
+
+ Test: fast/speech/input-text-language-tag.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::computeInheritedLanguage): includes a brief character
+ validation for the BCP 47 language tag.
+ * page/SpeechInput.cpp:
+ (WebCore::SpeechInput::startRecognition):
+ * page/SpeechInput.h:
+ * page/SpeechInputClient.h:
+ * platform/mock/SpeechInputClientMock.cpp:
+ (WebCore::SpeechInputClientMock::startRecognition):
+ (WebCore::SpeechInputClientMock::setRecognitionResult): results are now
+ stored by language using a hash map.
+ (WebCore::SpeechInputClientMock::timerFired):
+ * platform/mock/SpeechInputClientMock.h:
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::TextControlInnerElement::attachInnerElement):
+ (WebCore::SearchFieldCancelButtonElement::detach):
+ (WebCore::SpinButtonElement::defaultEventHandler):
+ (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
+ (WebCore::InputFieldSpeechButtonElement::detach):
+
2010-10-20 Dirk Schulze <krit at webkit.org>
Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/page/SpeechInput.cpp b/WebCore/page/SpeechInput.cpp
index c533a80..6de0af2 100644
--- a/WebCore/page/SpeechInput.cpp
+++ b/WebCore/page/SpeechInput.cpp
@@ -93,10 +93,10 @@ void SpeechInput::setRecognitionResult(int listenerId, const SpeechInputResultAr
m_listeners.get(listenerId)->setRecognitionResult(listenerId, result);
}
-bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect, const String& grammar)
+bool SpeechInput::startRecognition(int listenerId, const String& language, const IntRect& elementRect, const String& grammar)
{
ASSERT(m_listeners.contains(listenerId));
- return m_client->startRecognition(listenerId, elementRect, grammar);
+ return m_client->startRecognition(listenerId, language, elementRect, grammar);
}
void SpeechInput::stopRecording(int listenerId)
diff --git a/WebCore/page/SpeechInput.h b/WebCore/page/SpeechInput.h
index 08d95de..d03a1ce 100644
--- a/WebCore/page/SpeechInput.h
+++ b/WebCore/page/SpeechInput.h
@@ -61,7 +61,7 @@ public:
void unregisterListener(int);
// Methods invoked by the input elements.
- bool startRecognition(int listenerId, const IntRect& elementRect, const String& grammar);
+ bool startRecognition(int listenerId, const String& language, const IntRect& elementRect, const String& grammar);
void stopRecording(int);
void cancelRecognition(int);
diff --git a/WebCore/page/SpeechInputClient.h b/WebCore/page/SpeechInputClient.h
index 45b309a..a9a3e13 100644
--- a/WebCore/page/SpeechInputClient.h
+++ b/WebCore/page/SpeechInputClient.h
@@ -50,7 +50,7 @@ public:
virtual void setListener(SpeechInputListener*) = 0;
// Starts speech recognition and audio recording.
- virtual bool startRecognition(int requestId, const IntRect& elementRect, const String& grammar) = 0;
+ virtual bool startRecognition(int requestId, const String& language, const IntRect& elementRect, const String& grammar) = 0;
// Stops audio recording and performs recognition with the audio recorded until now
// (does not discard audio).
diff --git a/WebCore/platform/mock/SpeechInputClientMock.cpp b/WebCore/platform/mock/SpeechInputClientMock.cpp
index 0b3c8ac..f9ae4fe 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.cpp
+++ b/WebCore/platform/mock/SpeechInputClientMock.cpp
@@ -35,6 +35,11 @@
#include "SpeechInputListener.h"
+namespace {
+ // HashMap doesn't support empty strings as keys, so this value (an invalid BCP47 tag) is used for those cases.
+ const String emptyLanguage = "_";
+}
+
namespace WebCore {
SpeechInputClientMock::SpeechInputClientMock()
@@ -50,12 +55,13 @@ void SpeechInputClientMock::setListener(SpeechInputListener* listener)
m_listener = listener;
}
-bool SpeechInputClientMock::startRecognition(int requestId, const IntRect& elementRect, const String& grammar)
+bool SpeechInputClientMock::startRecognition(int requestId, const String& language, const IntRect& elementRect, const String& grammar)
{
if (m_timer.isActive())
return false;
m_requestId = requestId;
m_recording = true;
+ m_language = language;
m_timer.startOneShot(0);
return true;
}
@@ -80,9 +86,12 @@ void SpeechInputClientMock::cancelRecognition(int requestId)
}
}
-void SpeechInputClientMock::setRecognitionResult(const String& result)
+void SpeechInputClientMock::setRecognitionResult(const String& result, const String& language)
{
- m_recognitionResult = result;
+ if (language.isEmpty())
+ m_recognitionResult.set(emptyLanguage, result);
+ else
+ m_recognitionResult.set(language, result);
}
void SpeechInputClientMock::timerFired(WebCore::Timer<SpeechInputClientMock>*)
@@ -93,7 +102,19 @@ void SpeechInputClientMock::timerFired(WebCore::Timer<SpeechInputClientMock>*)
m_timer.startOneShot(0);
} else {
SpeechInputResultArray results;
- results.append(SpeechInputResult::create(m_recognitionResult, 1.0));
+
+ // Empty language strings crash the HashMap. Using an invalid language value for that case.
+ String language = m_language.isEmpty() ? String(emptyLanguage) : m_language;
+ if (!m_recognitionResult.contains(language)) {
+ // Can't avoid setting a result on empty or invalid language strings.
+ // This would avoid generating the events used to check the results and the test would timeout.
+ String error("error: no result found for language '");
+ error.append(m_language);
+ error.append("'");
+ results.append(SpeechInputResult::create(error, 1.0));
+ } else
+ results.append(SpeechInputResult::create(m_recognitionResult.get(language), 1.0));
+
m_listener->setRecognitionResult(m_requestId, results);
m_listener->didCompleteRecognition(m_requestId);
m_requestId = 0;
diff --git a/WebCore/platform/mock/SpeechInputClientMock.h b/WebCore/platform/mock/SpeechInputClientMock.h
index 7900f36..491b9c8 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.h
+++ b/WebCore/platform/mock/SpeechInputClientMock.h
@@ -34,6 +34,8 @@
#include "PlatformString.h"
#include "SpeechInputClient.h"
#include "Timer.h"
+#include <wtf/HashMap.h>
+#include <wtf/text/StringHash.h>
#if ENABLE(INPUT_SPEECH)
@@ -46,11 +48,11 @@ class SpeechInputClientMock : public SpeechInputClient {
public:
SpeechInputClientMock();
- void setRecognitionResult(const String& result);
+ void setRecognitionResult(const String& result, const String& language);
// SpeechInputClient methods.
void setListener(SpeechInputListener*);
- bool startRecognition(int requestId, const IntRect& elementRect, const String& grammar);
+ bool startRecognition(int requestId, const String& language, const IntRect& elementRect, const String& grammar);
void stopRecording(int);
void cancelRecognition(int);
@@ -61,7 +63,9 @@ private:
Timer<SpeechInputClientMock> m_timer;
SpeechInputListener* m_listener;
int m_requestId;
- String m_recognitionResult;
+
+ HashMap<String, String> m_recognitionResult;
+ String m_language;
};
} // namespace WebCore
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp
index 9248395..d42607f 100644
--- a/WebCore/rendering/TextControlInnerElements.cpp
+++ b/WebCore/rendering/TextControlInnerElements.cpp
@@ -21,9 +21,9 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+
#include "config.h"
#include "TextControlInnerElements.h"
@@ -107,18 +107,18 @@ void TextControlInnerElement::attachInnerElement(Node* parent, PassRefPtr<Render
setRenderer(renderer);
renderer->setStyle(style);
}
-
+
// Set these explicitly since this normally happens during an attach()
setAttached();
setInDocument();
-
+
// For elements without a shadow parent, add the node to the DOM normally.
if (!m_shadowParent) {
// FIXME: This code seems very wrong. Why are we magically adding |this| to the DOM here?
// We shouldn't be calling parser API methods outside of the parser!
parent->deprecatedParserAddChild(this);
}
-
+
// Add the renderer to the render tree
if (renderer)
parent->renderer()->addChild(renderer);
@@ -208,7 +208,7 @@ void SearchFieldCancelButtonElement::detach()
{
if (m_capturing) {
if (Frame* frame = document()->frame())
- frame->eventHandler()->setCapturingMouseEventsNode(0);
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
}
TextControlInnerElement::detach();
}
@@ -281,9 +281,9 @@ void SpinButtonElement::defaultEventHandler(Event* event)
if (!box) {
if (!event->defaultHandled())
HTMLDivElement::defaultEventHandler(event);
- return;
+ return;
}
-
+
HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode());
if (input->disabled() || input->isReadOnlyFormControl()) {
if (!event->defaultHandled())
@@ -431,7 +431,7 @@ void InputFieldSpeechButtonElement::defaultEventHandler(Event* event)
if (event->type() == eventNames().clickEvent) {
switch (m_state) {
case Idle:
- if (speechInput()->startRecognition(m_listenerId, input->renderer()->absoluteBoundingBoxRect(), input->getAttribute(webkitgrammarAttr)))
+ if (speechInput()->startRecognition(m_listenerId, input->computeInheritedLanguage(), input->renderer()->absoluteBoundingBoxRect(), input->getAttribute(webkitgrammarAttr)))
setState(Recording);
break;
case Recording:
@@ -489,7 +489,7 @@ void InputFieldSpeechButtonElement::detach()
{
if (m_capturing) {
if (Frame* frame = document()->frame())
- frame->eventHandler()->setCapturingMouseEventsNode(0);
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
}
if (m_state != Idle)
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 9057e60..b6bf9e7 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,35 @@
+2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Patch the current speech input implementation to use the nearest
+ language tag. The language is now passed to the startRecognition
+ methods so that language-specific recognition could be used. Also added
+ a second parameter to setMockSpeechInputResult for the language used in
+ speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
+ details see http://codereview.chromium.org/3615005/show and
+ http://codereview.chromium.org/3595018/show. The last of the 4 patches
+ depends also on the language tag validation provided by this patch:
+ https://bugs.webkit.org/show_bug.cgi?id=48225.
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ * public/WebSpeechInputControllerMock.h:
+ * src/SpeechInputClientImpl.cpp:
+ (WebKit::SpeechInputClientImpl::create):
+ (WebKit::SpeechInputClientImpl::startRecognition):
+ * src/SpeechInputClientImpl.h:
+ * src/WebSpeechInputControllerMockImpl.cpp:
+ (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):
+ (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
+ * src/WebSpeechInputControllerMockImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
2010-10-26 Victoria Kirst <vrk at google.com>
Reviewed by David Levin.
@@ -336,7 +368,7 @@
2010-10-22 Leandro Gracia Gil <leandrogracia at google.com>
Reviewed by Jeremy Orlow.
-
+
Patch the current speech input implementation to use and validate the
nearest language tag. The language is now passed to the startRecognition
methods so that language-specific recognition could be used. Also added
@@ -485,6 +517,36 @@
(WebKit::WebViewImpl::WebViewImpl):
* src/WebViewImpl.h:
+2010-10-20 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Patch the current speech input implementation to use and validate the
+ nearest language tag. The language is now passed to the startRecognition
+ methods so that language-specific recognition could be used. Also added
+ a second parameter to setMockSpeechInputResult for the language used in
+ speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
+ details see http://codereview.chromium.org/3615005/show and
+ http://codereview.chromium.org/3595018/show.
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ * public/WebSpeechInputControllerMock.h:
+ * src/SpeechInputClientImpl.cpp:
+ (WebKit::SpeechInputClientImpl::create):
+ (WebKit::SpeechInputClientImpl::startRecognition):
+ * src/SpeechInputClientImpl.h:
+ * src/WebSpeechInputControllerMockImpl.cpp:
+ (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):
+ (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
+ * src/WebSpeechInputControllerMockImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
2010-10-20 Dirk Schulze <krit at webkit.org>
Unreviewed Chromium win build fix.
diff --git a/WebKit/chromium/public/WebSpeechInputController.h b/WebKit/chromium/public/WebSpeechInputController.h
index 63250cd..ce4b8b3 100644
--- a/WebKit/chromium/public/WebSpeechInputController.h
+++ b/WebKit/chromium/public/WebSpeechInputController.h
@@ -35,6 +35,7 @@
namespace WebKit {
+class WebString;
struct WebRect;
class WebString;
@@ -44,14 +45,14 @@ public:
// Starts speech recognition. Speech will get recorded until the endpointer detects silence,
// runs to the limit or stopRecording is called. Progress indications and the recognized
// text are returned via the listener interface.
- virtual bool startRecognition(int requestId, const WebRect& elementRect, const WebString& grammar)
+ virtual bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect, const WebString& grammar)
{
- startRecognition(requestId, elementRect);
+ startRecognition(requestId, language, elementRect);
return false;
}
// FIXME: Remove this method once chromium implements the above method.
- virtual bool startRecognition(int requestId, const WebRect&)
+ virtual bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect)
{
WEBKIT_ASSERT_NOT_REACHED();
return false;
diff --git a/WebKit/chromium/public/WebSpeechInputControllerMock.h b/WebKit/chromium/public/WebSpeechInputControllerMock.h
index 9a26235..b4c50a0 100644
--- a/WebKit/chromium/public/WebSpeechInputControllerMock.h
+++ b/WebKit/chromium/public/WebSpeechInputControllerMock.h
@@ -44,6 +44,10 @@ public:
WebSpeechInputListener* listener);
virtual ~WebSpeechInputControllerMock() { }
+ virtual void setMockRecognitionResult(const WebString& result, const WebString& language) = 0;
+
+ // FIXME: this is a fix for a two-sided patch. Delete as soon as the chromium side is patched.
+ // Chromium patch not uploaded yet, but will depend on http://codereview.chromium.org/3615005/show patch.
virtual void setMockRecognitionResult(const WebString& result) = 0;
};
diff --git a/WebKit/chromium/src/SpeechInputClientImpl.cpp b/WebKit/chromium/src/SpeechInputClientImpl.cpp
index 672de63..242a174 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.cpp
+++ b/WebKit/chromium/src/SpeechInputClientImpl.cpp
@@ -32,15 +32,21 @@
#include "SpeechInputClientImpl.h"
#include "PlatformString.h"
+#include "SpeechInputListener.h"
#include "WebSpeechInputController.h"
#include "WebString.h"
#include "WebViewClient.h"
-#include "page/SpeechInputListener.h"
+#include <wtf/PassOwnPtr.h>
#if ENABLE(INPUT_SPEECH)
namespace WebKit {
+PassOwnPtr<SpeechInputClientImpl> SpeechInputClientImpl::create(WebViewClient* client)
+{
+ return adoptPtr(new SpeechInputClientImpl(client));
+}
+
SpeechInputClientImpl::SpeechInputClientImpl(WebViewClient* web_view_client)
: m_controller(web_view_client ? web_view_client->speechInputController(this) : 0)
, m_listener(0)
@@ -56,10 +62,10 @@ void SpeechInputClientImpl::setListener(WebCore::SpeechInputListener* listener)
m_listener = listener;
}
-bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect, const WTF::String& grammar)
+bool SpeechInputClientImpl::startRecognition(int requestId, const String& language, const WebCore::IntRect& elementRect, const String& grammar)
{
ASSERT(m_listener);
- return m_controller->startRecognition(requestId, elementRect, grammar);
+ return m_controller->startRecognition(requestId, language, elementRect, grammar);
}
void SpeechInputClientImpl::stopRecording(int requestId)
diff --git a/WebKit/chromium/src/SpeechInputClientImpl.h b/WebKit/chromium/src/SpeechInputClientImpl.h
index d2db453..9e5961f 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.h
+++ b/WebKit/chromium/src/SpeechInputClientImpl.h
@@ -33,8 +33,11 @@
#if ENABLE(INPUT_SPEECH)
+#include "SpeechInputClient.h"
#include "WebSpeechInputListener.h"
-#include "page/SpeechInputClient.h"
+#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
class SpeechInputListener;
@@ -49,12 +52,12 @@ class SpeechInputClientImpl
: public WebCore::SpeechInputClient,
public WebSpeechInputListener {
public:
- SpeechInputClientImpl(WebViewClient*);
+ static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*);
virtual ~SpeechInputClientImpl();
// SpeechInputClient methods.
void setListener(WebCore::SpeechInputListener*);
- bool startRecognition(int requestId, const WebCore::IntRect& elementRect, const WTF::String& grammar);
+ bool startRecognition(int requestId, const String& language, const WebCore::IntRect& elementRect, const String& grammar);
void stopRecording(int);
void cancelRecognition(int);
@@ -64,6 +67,8 @@ public:
void didCompleteRecognition(int);
private:
+ SpeechInputClientImpl(WebViewClient*);
+
WebSpeechInputController* m_controller; // To call into the embedder.
WebCore::SpeechInputListener* m_listener;
};
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
index 98cc6cf..0a176fd 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
@@ -57,7 +57,12 @@ WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl()
void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result)
{
- m_webcoreMock->setRecognitionResult(result);
+ m_webcoreMock->setRecognitionResult(result, WebString::fromUTF8(""));
+}
+
+void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result, const WebString &language)
+{
+ m_webcoreMock->setRecognitionResult(result, language);
}
void WebSpeechInputControllerMockImpl::didCompleteRecording(int requestId)
@@ -75,9 +80,9 @@ void WebSpeechInputControllerMockImpl::setRecognitionResult(int requestId, const
m_listener->setRecognitionResult(requestId, result);
}
-bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebRect& elementRect, const WebString& grammar)
+bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebString& language, const WebRect& elementRect, const WebString& grammar)
{
- return m_webcoreMock->startRecognition(requestId, elementRect, grammar);
+ return m_webcoreMock->startRecognition(requestId, language, elementRect, grammar);
}
void WebSpeechInputControllerMockImpl::cancelRecognition(int requestId)
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
index 146793a..06ab8c2 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
@@ -57,11 +57,15 @@ public:
void setRecognitionResult(int requestId, const WebCore::SpeechInputResultArray& result);
// WebSpeechInputController methods.
- bool startRecognition(int requestId, const WebRect& elementRect, const WebString& grammar);
+ bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect, const WebString& grammar);
void cancelRecognition(int requestId);
void stopRecording(int requestId);
// WebSpeechInputControllerMock methods.
+ void setMockRecognitionResult(const WebString& result, const WebString& language);
+
+ // FIXME: this is a fix for a two-sided patch. Delete as soon as the chromium side is patched.
+ // Chromium patch not uploaded yet, but will depend on http://codereview.chromium.org/3615005/show patch.
void setMockRecognitionResult(const WebString& result);
private:
@@ -72,4 +76,3 @@ private:
} // namespace WebKit
#endif // WebSpeechInputControllerMockImpl_h
-
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 9faedac..6782a23 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -88,6 +88,7 @@
#include "SecurityOrigin.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "SpeechInputClientImpl.h"
#include "Timer.h"
#include "TypingCommand.h"
#include "UserGestureIndicator.h"
@@ -282,7 +283,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
, m_compositorCreationFailed(false)
#endif
#if ENABLE(INPUT_SPEECH)
- , m_speechInputClient(client)
+ , m_speechInputClient(SpeechInputClientImpl::create(client))
#endif
, m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0))
{
@@ -305,7 +306,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
pageClients.dragClient = &m_dragClientImpl;
pageClients.inspectorClient = &m_inspectorClientImpl;
#if ENABLE(INPUT_SPEECH)
- pageClients.speechInputClient = &m_speechInputClient;
+ pageClients.speechInputClient = m_speechInputClient.get();
#endif
pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index c3fd39e..0388770 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -49,7 +49,6 @@
#include "IntRect.h"
#include "LayerRendererChromium.h"
#include "NotificationPresenterImpl.h"
-#include "SpeechInputClientImpl.h"
#include <wtf/OwnPtr.h>
#include <wtf/RefCounted.h>
@@ -74,6 +73,7 @@ class AutoFillPopupMenuClient;
class ContextMenuClientImpl;
class DeviceOrientationClientProxy;
class DragScrollTimer;
+class SpeechInputClientImpl;
class WebAccessibilityObject;
class WebDevToolsAgentClient;
class WebDevToolsAgentPrivate;
@@ -548,7 +548,7 @@ private:
static const WebInputEvent* m_currentInputEvent;
#if ENABLE(INPUT_SPEECH)
- SpeechInputClientImpl m_speechInputClient;
+ OwnPtr<SpeechInputClientImpl> m_speechInputClient;
#endif
// If we attempt to fetch the on-screen GraphicsContext3D before
// the compositor has been turned on, we need to instantiate it
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index d8d636a..05eaccf 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,29 @@
+2010-10-27 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Added a second parameter to setMockSpeechInputResult for
+ the language used in speech input.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setMockSpeechInputResultCallback):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ (LayoutTestController::pageSizeAndMarginsInPixels):
+
2010-10-27 Adam Roben <aroben at apple.com>
Reset TestNetscapePlugIn's NPP_GetValue pointer when
@@ -1589,6 +1615,22 @@
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setMockSpeechInputResult):
+2010-10-20 Leandro Gracia Gil <leandrogracia at google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Added a second parameter to setMockSpeechInputResult for
+ the language used in speech input.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setMockSpeechInputResultCallback):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setMockSpeechInputResult):
+
2010-10-19 Adam Roben <aroben at apple.com>
Teach update-webkit-support-libs about the new versioning of
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index 83655bd..9619389 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -1078,14 +1078,17 @@ static JSValueRef setMockGeolocationErrorCallback(JSContextRef context, JSObject
static JSValueRef setMockSpeechInputResultCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- if (argumentCount < 1)
+ if (argumentCount < 2)
return JSValueMakeUndefined(context);
JSRetainPtr<JSStringRef> result(Adopt, JSValueToStringCopy(context, arguments[0], exception));
ASSERT(!*exception);
+ JSRetainPtr<JSStringRef> language(Adopt, JSValueToStringCopy(context, arguments[1], exception));
+ ASSERT(!*exception);
+
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setMockSpeechInputResult(result.get());
+ controller->setMockSpeechInputResult(result.get(), language.get());
return JSValueMakeUndefined(context);
}
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 27518b7..b61860b 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -94,7 +94,7 @@ public:
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
void setMockGeolocationError(int code, JSStringRef message);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
- void setMockSpeechInputResult(JSStringRef result);
+ void setMockSpeechInputResult(JSStringRef result, JSStringRef language);
void setPersistentUserStyleSheetLocation(JSStringRef path);
void setPluginsEnabled(bool flag);
void setPopupBlockingEnabled(bool flag);
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 1a6187e..d713b04 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -1534,10 +1534,10 @@ void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVaria
void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
- if (arguments.size() < 1 || !arguments[0].isString())
+ if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isString())
return;
- m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]));
+ m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]), cppVariantToWebString(arguments[1]));
}
WebKit::WebSpeechInputController* LayoutTestController::speechInputController(WebKit::WebSpeechInputListener* listener)
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 04d97eb..688b3f8 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -501,7 +501,7 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
-void LayoutTestController::setMockSpeechInputResult(JSStringRef result)
+void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=39485.
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index c5d5a90..150b6f9 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -371,7 +371,7 @@ void LayoutTestController::setGeolocationPermission(bool allow)
[[[mainFrame webView] UIDelegate] didSetMockGeolocationPermission];
}
-void LayoutTestController::setMockSpeechInputResult(JSStringRef result)
+void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=39485.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index b2c3807..f99ec4f 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -765,7 +765,7 @@ void LayoutTestController::setMockGeolocationPosition(double latitude, double lo
DumpRenderTreeSupportQt::setMockGeolocationPosition(latitude, longitude, accuracy);
}
-void LayoutTestController::setMockSpeechInputResult(const QString& result)
+void LayoutTestController::setMockSpeechInputResult(const QString& result, const QString& language)
{
// FIXME: Implement for speech input layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=39485.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 68ebe1d..11d72e4 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -216,7 +216,7 @@ public slots:
bool isGeolocationPermissionSet() const { return m_isGeolocationPermissionSet; }
bool geolocationPermission() const { return m_geolocationPermission; }
- void setMockSpeechInputResult(const QString& result);
+ void setMockSpeechInputResult(const QString& result, const QString& language);
// Empty stub method to keep parity with object model exposed by global LayoutTestController.
void abortModal() {}
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index 9e8ed1e..d7c41e0 100644
--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -405,7 +405,7 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
-void LayoutTestController::setMockSpeechInputResult(JSStringRef result)
+void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=39485.
diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
index eefc587..32614c1 100644
--- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
@@ -320,7 +320,7 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
-void LayoutTestController::setMockSpeechInputResult(JSStringRef result)
+void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=39485.
@@ -528,4 +528,3 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
// FIXME: Implement
return 0;
}
-
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list