[BlackBerry] Check for valid field focus before processing a spellcheck request
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Aug 2012 15:50:04 +0000 (15:50 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Aug 2012 15:50:04 +0000 (15:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=94115

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-08-15
Reviewed by Rob Buis.

PR192891
Checking for valid field focus before processing the spellcheck
request.

Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::requestCheckingOfString):

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

Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp

index 7d25ade..9b9f1f6 100644 (file)
@@ -1,3 +1,19 @@
+2012-08-15  Nima Ghanavatian  <nghanavatian@rim.com>
+
+        [BlackBerry] Check for valid field focus before processing a spellcheck request
+        https://bugs.webkit.org/show_bug.cgi?id=94115
+
+        Reviewed by Rob Buis.
+
+        PR192891
+        Checking for valid field focus before processing the spellcheck
+        request.
+
+        Internally reviewed by Mike Fenton.
+
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
+
 2012-08-14  Adam Barth  <abarth@webkit.org>
 
         Delete Frame::domWindow() and Frame::existingDOMWindow()
index 1cc6169..8ce2bf7 100644 (file)
@@ -535,6 +535,11 @@ void InputHandler::requestCheckingOfString(PassRefPtr<WebCore::TextCheckingReque
 
     int32_t sequenceId = request->sequence();
 
+    if (!isActiveTextEdit()) {
+        spellCheckingRequestCancelled(sequenceId, true /* isSequenceId */);
+        return;
+    }
+
     // Check if field explicitly asked for spellchecking.
     if (DOMSupport::elementSupportsSpellCheck(m_currentFocusElement.get()) != DOMSupport::On) {
         spellCheckingRequestCancelled(sequenceId, true /* isSequenceId */);