[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:47:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fbfdb144b38c6f0f6ab4e18b0d17c7362e4d809b
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 20 16:25:10 2010 +0000

    2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r70149.
            http://trac.webkit.org/changeset/70149
            https://bugs.webkit.org/show_bug.cgi?id=47989
    
            "Build breaks in mac and win" (Requested by satish on
            #webkit).
    
            * fast/speech/input-text-speechbutton.html:
            * fast/speech/speech-button-ignore-generated-events.html:
            * platform/chromium/test_expectations.txt:
    2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r70149.
            http://trac.webkit.org/changeset/70149
            https://bugs.webkit.org/show_bug.cgi?id=47989
    
            "Build breaks in mac and win" (Requested by satish on
            #webkit).
    
            * dom/Element.cpp:
            (WebCore::Element::computeInheritedLanguage):
            * 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-20  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r70149.
            http://trac.webkit.org/changeset/70149
            https://bugs.webkit.org/show_bug.cgi?id=47989
    
            "Build breaks in mac and win" (Requested by satish on
            #webkit).
    
            * public/WebSpeechInputController.h:
            (WebKit::WebSpeechInputController::startRecognition):
            * public/WebSpeechInputControllerMock.h:
            * src/SpeechInputClientImpl.cpp:
            (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  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r70149.
            http://trac.webkit.org/changeset/70149
            https://bugs.webkit.org/show_bug.cgi?id=47989
    
            "Build breaks in mac and win" (Requested by satish on
            #webkit).
    
            * DumpRenderTree/LayoutTestController.cpp:
            (setMockSpeechInputResultCallback):
            * DumpRenderTree/LayoutTestController.h:
            * DumpRenderTree/chromium/LayoutTestController.cpp:
            (LayoutTestController::setMockSpeechInputResult):
            * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
            (LayoutTestController::setMockSpeechInputResult):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f6a6245..1958c7e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r70149.
+        http://trac.webkit.org/changeset/70149
+        https://bugs.webkit.org/show_bug.cgi?id=47989
+
+        "Build breaks in mac and win" (Requested by satish on
+        #webkit).
+
+        * fast/speech/input-text-speechbutton.html:
+        * fast/speech/speech-button-ignore-generated-events.html:
+        * platform/chromium/test_expectations.txt:
+
 2010-10-20  Martin Robinson  <mrobinson at igalia.com>
 
         Unskip some tests that are now passing.
diff --git a/LayoutTests/fast/speech/input-text-speechbutton.html b/LayoutTests/fast/speech/input-text-speechbutton.html
index cef7705..6f5bc4b 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 c684863..b9b8ec3 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 2cbe37d..d32845a 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3242,6 +3242,3 @@ BUGJAPHET : fast/dom/HTMLAnchorElement/set-href-attribute-prevents-rebase.html =
 
 // r69833, JSC/V8 Date parsing differences
 BUGJAPHET : fast/js/date-parse-test.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 6fc2f94..fdc02e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r70149.
+        http://trac.webkit.org/changeset/70149
+        https://bugs.webkit.org/show_bug.cgi?id=47989
+
+        "Build breaks in mac and win" (Requested by satish on
+        #webkit).
+
+        * dom/Element.cpp:
+        (WebCore::Element::computeInheritedLanguage):
+        * 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-19  Leandro Gracia Gil  <leandrogracia at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index c7d442a..83e129e 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -56,7 +56,6 @@
 #include "Settings.h"
 #include "TextIterator.h"
 #include "XMLNames.h"
-#include <wtf/ASCIICType.h>
 #include <wtf/text/CString.h>
 
 #if ENABLE(SVG)
@@ -1475,15 +1474,6 @@ AtomicString Element::computeInheritedLanguage() const
         n = n->parent();
     }
 
-    if (!value.isNull() && !value.isEmpty()) {
-        // Only A-Za-z0-9 and '-' are allowed in the language tag (see BCP 47)
-        const char *p = value.string().ascii().data();
-        for (; *p != '\0'; ++p) {
-            if (!isASCIIAlphanumeric(*p) && *p != '-')
-                return AtomicString();
-        }
-    }
-
     return value;
 }
 
diff --git a/WebCore/page/SpeechInput.cpp b/WebCore/page/SpeechInput.cpp
index cc5e0f9..234791b 100644
--- a/WebCore/page/SpeechInput.cpp
+++ b/WebCore/page/SpeechInput.cpp
@@ -93,10 +93,10 @@ void SpeechInput::setRecognitionResult(int listenerId, const String& result)
         m_listeners.get(listenerId)->setRecognitionResult(listenerId, result);
 }
 
-bool SpeechInput::startRecognition(int listenerId, const String& language, const IntRect& elementRect)
+bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect)
 {
     ASSERT(m_listeners.contains(listenerId));
-    return m_client->startRecognition(listenerId, language, elementRect);
+    return m_client->startRecognition(listenerId, elementRect);
 }
 
 void SpeechInput::stopRecording(int listenerId)
diff --git a/WebCore/page/SpeechInput.h b/WebCore/page/SpeechInput.h
index 8b426f5..d10b789 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, const String&, const IntRect&);
+    bool startRecognition(int, const IntRect&);
     void stopRecording(int);
     void cancelRecognition(int);
 
diff --git a/WebCore/page/SpeechInputClient.h b/WebCore/page/SpeechInputClient.h
index f5aab02..d5fda17 100644
--- a/WebCore/page/SpeechInputClient.h
+++ b/WebCore/page/SpeechInputClient.h
@@ -31,8 +31,6 @@
 #ifndef SpeechInputClient_h
 #define SpeechInputClient_h
 
-#include <wtf/Forward.h>
-
 #if ENABLE(INPUT_SPEECH)
 
 namespace WebCore {
@@ -50,7 +48,7 @@ public:
     virtual void setListener(SpeechInputListener*) = 0;
 
     // Starts speech recognition and audio recording.
-    virtual bool startRecognition(int requestId, const String& language, const IntRect& elementRect) = 0;
+    virtual bool startRecognition(int requestId, const IntRect& elementRect) = 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 c04971e..6b64942 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.cpp
+++ b/WebCore/platform/mock/SpeechInputClientMock.cpp
@@ -35,11 +35,6 @@
 
 #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()
@@ -55,13 +50,12 @@ void SpeechInputClientMock::setListener(SpeechInputListener* listener)
     m_listener = listener;
 }
 
-bool SpeechInputClientMock::startRecognition(int requestId, const String& language, const IntRect&)
+bool SpeechInputClientMock::startRecognition(int requestId, const IntRect&)
 {
     if (m_timer.isActive())
         return false;
     m_requestId = requestId;
     m_recording = true;
-    m_language = language;
     m_timer.startOneShot(0);
     return true;
 }
@@ -86,12 +80,9 @@ void SpeechInputClientMock::cancelRecognition(int requestId)
     }
 }
 
-void SpeechInputClientMock::setRecognitionResult(const String& result, const String& language)
+void SpeechInputClientMock::setRecognitionResult(const String& result)
 {
-    if (language.isEmpty())
-        m_recognitionResult.set(emptyLanguage, result);
-    else
-        m_recognitionResult.set(language, result);
+    m_recognitionResult = result;
 }
 
 void SpeechInputClientMock::timerFired(WebCore::Timer<SpeechInputClientMock>*)
@@ -101,17 +92,7 @@ void SpeechInputClientMock::timerFired(WebCore::Timer<SpeechInputClientMock>*)
         m_listener->didCompleteRecording(m_requestId);
         m_timer.startOneShot(0);
     } else {
-        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("'");
-            m_listener->setRecognitionResult(m_requestId, error);
-        } else
-            m_listener->setRecognitionResult(m_requestId, m_recognitionResult.get(language));
-
+        m_listener->setRecognitionResult(m_requestId, m_recognitionResult);
         m_listener->didCompleteRecognition(m_requestId);
         m_requestId = 0;
     }
diff --git a/WebCore/platform/mock/SpeechInputClientMock.h b/WebCore/platform/mock/SpeechInputClientMock.h
index 3ce987b..ce83d3b 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.h
+++ b/WebCore/platform/mock/SpeechInputClientMock.h
@@ -34,8 +34,6 @@
 #include "PlatformString.h"
 #include "SpeechInputClient.h"
 #include "Timer.h"
-#include <wtf/HashMap.h>
-#include <wtf/text/StringHash.h>
 
 #if ENABLE(INPUT_SPEECH)
 
@@ -48,11 +46,11 @@ class SpeechInputClientMock : public SpeechInputClient {
 public:
     SpeechInputClientMock();
 
-    void setRecognitionResult(const String& result, const String& language);
+    void setRecognitionResult(const String& result);
 
     // SpeechInputClient methods.
     void setListener(SpeechInputListener*);
-    bool startRecognition(int, const String&, const IntRect&);
+    bool startRecognition(int, const IntRect&);
     void stopRecording(int);
     void cancelRecognition(int);
 
@@ -63,9 +61,7 @@ private:
     Timer<SpeechInputClientMock> m_timer;
     SpeechInputListener* m_listener;
     int m_requestId;
-
-    HashMap<String, String> m_recognitionResult;
-    String m_language;
+    String m_recognitionResult;
 };
 
 } // namespace WebCore
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp
index 65d0a64..5d5b8b3 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->computeInheritedLanguage(), input->renderer()->absoluteBoundingBoxRect()))
+            if (speechInput()->startRecognition(m_listenerId, input->renderer()->absoluteBoundingBoxRect()))
                 setState(Recording);
             break;
         case Recording:
@@ -487,7 +487,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 37b22e0..8a31294 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,26 @@
+2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r70149.
+        http://trac.webkit.org/changeset/70149
+        https://bugs.webkit.org/show_bug.cgi?id=47989
+
+        "Build breaks in mac and win" (Requested by satish on
+        #webkit).
+
+        * public/WebSpeechInputController.h:
+        (WebKit::WebSpeechInputController::startRecognition):
+        * public/WebSpeechInputControllerMock.h:
+        * src/SpeechInputClientImpl.cpp:
+        (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-19  Leandro Gracia Gil  <leandrogracia at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/public/WebSpeechInputController.h b/WebKit/chromium/public/WebSpeechInputController.h
index 1fde2a8..5408741 100644
--- a/WebKit/chromium/public/WebSpeechInputController.h
+++ b/WebKit/chromium/public/WebSpeechInputController.h
@@ -35,7 +35,6 @@
 
 namespace WebKit {
 
-class WebString;
 struct WebRect;
 
 // Provides an embedder API called by WebKit.
@@ -44,7 +43,7 @@ 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 WebString& language, const WebRect& elementRect)
+    virtual bool startRecognition(int requestId, const WebRect&)
     {
         WEBKIT_ASSERT_NOT_REACHED();
         return false;
diff --git a/WebKit/chromium/public/WebSpeechInputControllerMock.h b/WebKit/chromium/public/WebSpeechInputControllerMock.h
index b4c50a0..9a26235 100644
--- a/WebKit/chromium/public/WebSpeechInputControllerMock.h
+++ b/WebKit/chromium/public/WebSpeechInputControllerMock.h
@@ -44,10 +44,6 @@ 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 1381929..963d440 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.cpp
+++ b/WebKit/chromium/src/SpeechInputClientImpl.cpp
@@ -32,21 +32,15 @@
 #include "SpeechInputClientImpl.h"
 
 #include "PlatformString.h"
-#include "SpeechInputListener.h"
 #include "WebSpeechInputController.h"
 #include "WebString.h"
 #include "WebViewClient.h"
-#include <wtf/PassOwnPtr.h>
+#include "page/SpeechInputListener.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)
@@ -62,10 +56,10 @@ void SpeechInputClientImpl::setListener(WebCore::SpeechInputListener* listener)
     m_listener = listener;
 }
 
-bool SpeechInputClientImpl::startRecognition(int requestId, const String& language, const WebCore::IntRect& elementRect)
+bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect)
 {
     ASSERT(m_listener);
-    return m_controller->startRecognition(requestId, language, elementRect);
+    return m_controller->startRecognition(requestId, elementRect);
 }
 
 void SpeechInputClientImpl::stopRecording(int requestId)
diff --git a/WebKit/chromium/src/SpeechInputClientImpl.h b/WebKit/chromium/src/SpeechInputClientImpl.h
index c7d1fa3..817b32b 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.h
+++ b/WebKit/chromium/src/SpeechInputClientImpl.h
@@ -33,15 +33,8 @@
 
 #if ENABLE(INPUT_SPEECH)
 
-#include "SpeechInputClient.h"
 #include "WebSpeechInputListener.h"
-#include <wtf/Forward.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WTF {
-class String;
-}
+#include "page/SpeechInputClient.h"
 
 namespace WebCore {
 class SpeechInputListener;
@@ -56,12 +49,12 @@ class SpeechInputClientImpl
     : public WebCore::SpeechInputClient,
       public WebSpeechInputListener {
 public:
-    static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*);
+    SpeechInputClientImpl(WebViewClient*);
     virtual ~SpeechInputClientImpl();
 
     // SpeechInputClient methods.
     void setListener(WebCore::SpeechInputListener*);
-    bool startRecognition(int, const String&, const WebCore::IntRect&);
+    bool startRecognition(int, const WebCore::IntRect&);
     void stopRecording(int);
     void cancelRecognition(int);
 
@@ -71,8 +64,6 @@ 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 45c6ff0..60c4fed 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
@@ -57,12 +57,7 @@ WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl()
 
 void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result)
 {
-    m_webcoreMock->setRecognitionResult(result, WebString::fromUTF8(""));
-}
-
-void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString& result, const WebString &language)
-{
-    m_webcoreMock->setRecognitionResult(result, language);
+    m_webcoreMock->setRecognitionResult(result);
 }
 
 void WebSpeechInputControllerMockImpl::didCompleteRecording(int requestId)
@@ -80,9 +75,9 @@ void WebSpeechInputControllerMockImpl::setRecognitionResult(int requestId, const
     m_listener->setRecognitionResult(requestId, result);
 }
 
-bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebString& language, const WebRect& elementRect)
+bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebRect& elementRect)
 {
-    return m_webcoreMock->startRecognition(requestId, language, elementRect);
+    return m_webcoreMock->startRecognition(requestId, elementRect);
 }
 
 void WebSpeechInputControllerMockImpl::cancelRecognition(int requestId)
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
index 1b3053b..edbfca3 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
@@ -37,10 +37,6 @@
 #include "WebString.h"
 #include <wtf/OwnPtr.h>
 
-namespace WTF {
-class String;
-}
-
 namespace WebCore {
 class SpeechInputClientMock;
 }
@@ -61,15 +57,11 @@ public:
     void setRecognitionResult(int requestId, const WTF::String& result);
 
     // WebSpeechInputController methods.
-    bool startRecognition(int requestId, const WebString& language, const WebRect& elementRect);
+    bool startRecognition(int requestId, const WebRect& elementRect);
     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:
@@ -80,3 +72,4 @@ private:
 } // namespace WebKit
 
 #endif // WebSpeechInputControllerMockImpl_h
+
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 0c1ee36..aeab400 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -88,7 +88,6 @@
 #include "SecurityOrigin.h"
 #include "SelectionController.h"
 #include "Settings.h"
-#include "SpeechInputClientImpl.h"
 #include "Timer.h"
 #include "TypingCommand.h"
 #include "UserGestureIndicator.h"
@@ -276,7 +275,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
     , m_compositorCreationFailed(false)
 #endif
 #if ENABLE(INPUT_SPEECH)
-    , m_speechInputClient(SpeechInputClientImpl::create(client))
+    , m_speechInputClient(client)
 #endif
     , m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0))
 {
@@ -299,7 +298,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
     pageClients.dragClient = &m_dragClientImpl;
     pageClients.inspectorClient = &m_inspectorClientImpl;
 #if ENABLE(INPUT_SPEECH)
-    pageClients.speechInputClient = m_speechInputClient.get();
+    pageClients.speechInputClient = &m_speechInputClient;
 #endif
     pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
 
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 712eb7a..050b5e1 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -49,6 +49,7 @@
 #include "IntRect.h"
 #include "LayerRendererChromium.h"
 #include "NotificationPresenterImpl.h"
+#include "SpeechInputClientImpl.h"
 #include <wtf/OwnPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -73,7 +74,6 @@ class AutoFillPopupMenuClient;
 class ContextMenuClientImpl;
 class DeviceOrientationClientProxy;
 class DragScrollTimer;
-class SpeechInputClientImpl;
 class WebAccessibilityObject;
 class WebDevToolsAgentClient;
 class WebDevToolsAgentPrivate;
@@ -543,7 +543,7 @@ private:
     static const WebInputEvent* m_currentInputEvent;
 
 #if ENABLE(INPUT_SPEECH)
-    OwnPtr<SpeechInputClientImpl> m_speechInputClient;
+    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 a870d51..cc3aaf9 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-20  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r70149.
+        http://trac.webkit.org/changeset/70149
+        https://bugs.webkit.org/show_bug.cgi?id=47989
+
+        "Build breaks in mac and win" (Requested by satish on
+        #webkit).
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (setMockSpeechInputResultCallback):
+        * DumpRenderTree/LayoutTestController.h:
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::setMockSpeechInputResult):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::setMockSpeechInputResult):
+
 2010-10-19  Leandro Gracia Gil  <leandrogracia at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index db470c8..b5cc874 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -1070,17 +1070,14 @@ 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 < 2)
+    if (argumentCount < 1)
         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(), language.get());
+    controller->setMockSpeechInputResult(result.get());
 
     return JSValueMakeUndefined(context);
 }
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 9a945e9..689e114 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, JSStringRef languageTag);
+    void setMockSpeechInputResult(JSStringRef result);
     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 d9d8183..82fd085 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -1526,10 +1526,10 @@ void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVaria
 void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
-    if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isString())
+    if (arguments.size() < 1 || !arguments[0].isString())
         return;
 
-    m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]), cppVariantToWebString(arguments[1]));
+    m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]));
 }
 
 WebKit::WebSpeechInputController* LayoutTestController::speechInputController(WebKit::WebSpeechInputListener* listener)
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index f3db622..181ef9f 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -500,7 +500,7 @@ void LayoutTestController::setGeolocationPermission(bool allow)
     setGeolocationPermissionCommon(allow);
 }
 
-void LayoutTestController::setMockSpeechInputResult(JSStringRef result, JSStringRef language)
+void LayoutTestController::setMockSpeechInputResult(JSStringRef result)
 {
     // FIXME: Implement for speech input layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list