Changeset 140349 in webkit


Ignore:
Timestamp:
Jan 21, 2013 11:46:48 AM (11 years ago)
Author:
nghanavatian@rim.com
Message:

[BlackBerry] Skip spell checking on single character strings
https://bugs.webkit.org/show_bug.cgi?id=107463

Reviewed by Yong Li.

Check for a minimum string length when firing off spellcheck since we don't
want to mark single letter words.

Internally reviewed by Mike Fenton.

  • WebKitSupport/InputHandler.cpp:
  • WebKitSupport/SpellingHandler.cpp:

(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):

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

Legend:

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

    r140289 r140349  
     12013-01-21  Nima Ghanavatian  <nghanavatian@rim.com>
     2
     3        [BlackBerry] Skip spell checking on single character strings
     4        https://bugs.webkit.org/show_bug.cgi?id=107463
     5
     6        Reviewed by Yong Li.
     7
     8        Check for a minimum string length when firing off spellcheck since we don't
     9        want to mark single letter words.
     10
     11        Internally reviewed by Mike Fenton.
     12
     13        * WebKitSupport/InputHandler.cpp:
     14        * WebKitSupport/SpellingHandler.cpp:
     15        (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
     16        (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
     17
    1182013-01-20  Charles Wei  <charles.wei@torchmobile.com.cn>
    219
  • trunk/Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp

    r140170 r140349  
    8080{
    8181    RefPtr<WebCore::Range> rangeForSpellChecking = rangeForSpellCheckingPtr;
    82     if (isSpellCheckActive()) {
     82    if (isSpellCheckActive() && rangeForSpellChecking->text().length() >= MinSpellCheckingStringLength)
    8383        m_inputHandler->callRequestCheckingFor(SpellCheckRequest::create(TextCheckingTypeSpelling, textCheckingProcessType, rangeForSpellChecking, rangeForSpellChecking));
    84         m_timer.startOneShot(s_timeout);
    85     }
    8684}
    8785
     
    122120    // Call spellcheck with substring.
    123121    createSpellCheckRequest(rangeForSpellChecking, m_textCheckingProcessType);
     122    if (isSpellCheckActive())
     123        m_timer.startOneShot(s_timeout);
    124124}
    125125
Note: See TracChangeset for help on using the changeset viewer.