Changeset 152102 in webkit


Ignore:
Timestamp:
Jun 27, 2013 9:32:52 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] We should clear all markers when input changes a word
https://bugs.webkit.org/show_bug.cgi?id=118136
JIRA115313.

For the case where a letter is added to the middle of a misspelled word, we were
sending incorrect offsets to clear spelling markers. However, since this
expanded the current word, it overlaps entirely the previous spelling marker so
no issue is found. However, if the keypress is backspace, the incorrect range
is smaller, causing an overlap which recreates the marker over the last character.
Setting shouldEraseMarkersAfterChangeSelection to follow continuous spell checking,
which will clear all markers regardless of overlap.
This patch also sustains spelling markers after the user taps to move the caret onto
the word, which is a nice gain as it was asked for previously.

Patch by Nima Ghanavatian <nghanavatian@blackberry.com> on 2013-06-27
Reviewed by Rob Buis.

Internally Reviewed by Mike Fenton

  • WebCoreSupport/EditorClientBlackBerry.cpp:

(WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):

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

Legend:

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

    r152081 r152102  
     12013-06-27  Nima Ghanavatian  <nghanavatian@blackberry.com>
     2
     3        [BlackBerry] We should clear all markers when input changes a word
     4        https://bugs.webkit.org/show_bug.cgi?id=118136
     5        JIRA115313.
     6
     7        For the case where a letter is added to the middle of a misspelled word, we were
     8        sending incorrect offsets to clear spelling markers. However, since this
     9        expanded the current word, it overlaps entirely the previous spelling marker so
     10        no issue is found. However, if the keypress is backspace, the incorrect range
     11        is smaller, causing an overlap which recreates the marker over the last character.
     12        Setting shouldEraseMarkersAfterChangeSelection to follow continuous spell checking,
     13        which will clear all markers regardless of overlap.
     14        This patch also sustains spelling markers after the user taps to move the caret onto
     15        the word, which is a nice gain as it was asked for previously.
     16
     17        Reviewed by Rob Buis.
     18
     19        Internally Reviewed by Mike Fenton
     20
     21        * WebCoreSupport/EditorClientBlackBerry.cpp:
     22        (WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):
     23
    1242013-06-26  Carlos Garcia Campos  <cargarcia@blackberry.com>
    225
  • trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp

    r150796 r152102  
    551551bool EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection(TextCheckingType) const
    552552{
    553     return true;
     553    const Frame* frame = m_webPagePrivate->focusedOrMainFrame();
     554    return !frame || !frame->settings() || (!frame->settings()->asynchronousSpellCheckingEnabled() && !frame->settings()->unifiedTextCheckerEnabled());
    554555}
    555556
Note: See TracChangeset for help on using the changeset viewer.