2010-10-22 Leandro Gracia Gil <leandrogracia@google.com>
authorjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Oct 2010 12:09:08 +0000 (12:09 +0000)
committerjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Oct 2010 12:09:08 +0000 (12:09 +0000)
commitfc59755b260a52a3280baebf4b2f549663e4c340
tree2e7e553d79556c8c656c945e3dad31a90f4016d7
parent2d3793b3e776ab4232085fe3b9dd9dae9c507b9d
2010-10-22  Leandro Gracia Gil  <leandrogracia@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-22  Leandro Gracia Gil  <leandrogracia@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-22  Leandro Gracia Gil  <leandrogracia@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-22  Leandro Gracia Gil  <leandrogracia@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.h:
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::setMockSpeechInputResult):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::setMockSpeechInputResult):
        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
        (LayoutTestController::setMockSpeechInputResult):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/speech/input-text-language-tag-expected.txt [new file with mode: 0644]
LayoutTests/fast/speech/input-text-language-tag.html [new file with mode: 0644]
LayoutTests/fast/speech/input-text-speechbutton.html
LayoutTests/fast/speech/speech-button-ignore-generated-events.html
LayoutTests/platform/chromium/test_expectations.txt
WebCore/ChangeLog
WebCore/dom/Element.cpp
WebCore/page/SpeechInput.cpp
WebCore/page/SpeechInput.h
WebCore/page/SpeechInputClient.h
WebCore/platform/mock/SpeechInputClientMock.cpp
WebCore/platform/mock/SpeechInputClientMock.h
WebCore/rendering/TextControlInnerElements.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebSpeechInputController.h
WebKit/chromium/public/WebSpeechInputControllerMock.h
WebKit/chromium/src/SpeechInputClientImpl.cpp
WebKit/chromium/src/SpeechInputClientImpl.h
WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
WebKit/chromium/src/WebViewImpl.cpp
WebKit/chromium/src/WebViewImpl.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp