Changeset 140161 in webkit


Ignore:
Timestamp:
Jan 18, 2013 9:14:04 AM (11 years ago)
Author:
nghanavatian@rim.com
Message:

[BlackBerry] Check if continuous spellchecking is enabled before processing a request
https://bugs.webkit.org/show_bug.cgi?id=107169

Reviewed by Rob Buis.

PR265815
We set this value based on the global settings page. The
spellcheck-on-focus codepath did not hit this, so focusing a
field would not uphold the setting.

Internally reviewed by Mike Fenton and Gen Mak.

  • WebKitSupport/DOMSupport.cpp:

(BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled):
(DOMSupport):

  • WebKitSupport/DOMSupport.h:
  • WebKitSupport/InputHandler.cpp:

(BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):

Location:
trunk/Source/WebKit/blackberry
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r140148 r140161  
     12013-01-18  Nima Ghanavatian  <nghanavatian@rim.com>
     2
     3        [BlackBerry] Check if continuous spellchecking is enabled before processing a request
     4        https://bugs.webkit.org/show_bug.cgi?id=107169
     5
     6        Reviewed by Rob Buis.
     7
     8        PR265815
     9        We set this value based on the global settings page. The
     10        spellcheck-on-focus codepath did not hit this, so focusing a
     11        field would not uphold the setting.
     12
     13        Internally reviewed by Mike Fenton and Gen Mak.
     14
     15        * WebKitSupport/DOMSupport.cpp:
     16        (BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled):
     17        (DOMSupport):
     18        * WebKitSupport/DOMSupport.h:
     19        * WebKitSupport/InputHandler.cpp:
     20        (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
     21
    1222013-01-18  Seokju Kwon  <seokju.kwon@gmail.com>
    223
  • trunk/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp

    r137931 r140161  
    249249}
    250250
     251bool elementHasContinuousSpellCheckingEnabled(const PassRefPtr<WebCore::Element> element)
     252{
     253    return element && element->document()->frame() && element->document()->frame()->editor()->isContinuousSpellCheckingEnabled();
     254}
     255
    251256// Check if this is an input field that will be focused & require input support.
    252257bool isTextBasedContentEditableElement(Element* element)
  • trunk/Source/WebKit/blackberry/WebKitSupport/DOMSupport.h

    r135422 r140161  
    6565AttributeState elementSupportsSpellCheck(const WebCore::Element*);
    6666
     67bool elementHasContinuousSpellCheckingEnabled(const PassRefPtr<WebCore::Element>);
     68
    6769WTF::String inputElementText(WebCore::Element*);
    6870WTF::String webWorksContext(const WebCore::Element*);
  • trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp

    r139787 r140161  
    656656        transactionId == m_processingTransactionId ? "" : "We are out of sync with input service.");
    657657
    658     if (!spannableString || !isActiveTextEdit()) {
     658    if (!spannableString || !isActiveTextEdit() || !DOMSupport::elementHasContinuousSpellCheckingEnabled(m_currentFocusElement)) {
    659659        SpellingLog(Platform::LogLevelWarn, "InputHandler::spellCheckingRequestProcessed Cancelling request with transactionId %d.", transactionId);
    660660        m_request->didCancel();
Note: See TracChangeset for help on using the changeset viewer.