Changeset 150914 in webkit


Ignore:
Timestamp:
May 29, 2013 11:39:28 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Notify client of selection deletion
https://bugs.webkit.org/show_bug.cgi?id=116843

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

Internally reviewed by Mike Fenton.

PR342106
Our change guard was preventing caret change notification to be sent to IMF.
This put us out of state when a selection was deleted because it is not a simple
single character deletion. Ensure that selection deletions always send a caret
update.

  • WebKitSupport/InputHandler.cpp:

(BlackBerry::WebKit::InputHandler::deleteSelection):
(BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
(BlackBerry::WebKit::InputHandler::deleteText):

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

Legend:

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

    r150913 r150914  
     12013-05-29  Nima Ghanavatian  <nghanavatian@blackberry.com>
     2
     3        [BlackBerry] Notify client of selection deletion
     4        https://bugs.webkit.org/show_bug.cgi?id=116843
     5
     6        Reviewed by Rob Buis.
     7
     8        Internally reviewed by Mike Fenton.
     9
     10        PR342106
     11        Our change guard was preventing caret change notification to be sent to IMF.
     12        This put us out of state when a selection was deleted because it is not a simple
     13        single character deletion. Ensure that selection deletions always send a caret
     14        update.
     15
     16        * WebKitSupport/InputHandler.cpp:
     17        (BlackBerry::WebKit::InputHandler::deleteSelection):
     18        (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
     19        (BlackBerry::WebKit::InputHandler::deleteText):
     20
    1212013-05-29  Rob Buis  <rbuis@rim.com>
    222
  • trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp

    r150796 r150914  
    18931893
    18941894    ASSERT(frame->editor());
    1895     return handleKeyboardInput(Platform::KeyboardEvent(KEYCODE_BACKSPACE, Platform::KeyboardEvent::KeyDown, 0), false /* changeIsPartOfComposition */);
     1895    if (!handleKeyboardInput(Platform::KeyboardEvent(KEYCODE_BACKSPACE, Platform::KeyboardEvent::KeyDown, 0), false /* changeIsPartOfComposition */))
     1896        return false;
     1897
     1898    selectionChanged();
     1899    return true;
    18961900}
    18971901
     
    21902194        return false;
    21912195
    2192     ProcessingChangeGuard guard(this);
    2193 
    21942196    InputLog(Platform::LogLevelInfo,
    21952197        "InputHandler::deleteTextRelativeToCursor left %d right %d",
     
    22022204    // If we have backspace in a single character, send this to webkit as a KeyboardEvent. Otherwise, call deleteText.
    22032205    if (leftOffset == 1 && !rightOffset) {
     2206        if (selectionActive())
     2207            return deleteSelection();
     2208
    22042209        if (!handleKeyboardInput(Platform::KeyboardEvent(KEYCODE_BACKSPACE, Platform::KeyboardEvent::KeyDown, 0), true /* changeIsPartOfComposition */))
    22052210            return false;
     
    22072212        return false;
    22082213
     2214    ProcessingChangeGuard guard(this);
     2215
    22092216    // Scroll the field if necessary. The automatic update is suppressed
    22102217    // by the processing change guard.
     
    22192226        return false;
    22202227
    2221     ProcessingChangeGuard guard(this);
    2222 
    2223     if (end - start == 1)
    2224         return handleKeyboardInput(Platform::KeyboardEvent(KEYCODE_BACKSPACE, Platform::KeyboardEvent::KeyDown, 0), true /* changeIsPartOfComposition */);
    2225 
    2226     if (!setSelection(start, end, true /*changeIsPartOfComposition*/))
    2227         return false;
     2228    {
     2229        ProcessingChangeGuard guard(this);
     2230
     2231        if (end - start == 1)
     2232            return handleKeyboardInput(Platform::KeyboardEvent(KEYCODE_BACKSPACE, Platform::KeyboardEvent::KeyDown, 0), true /* changeIsPartOfComposition */);
     2233
     2234        if (!setSelection(start, end, true /*changeIsPartOfComposition*/))
     2235            return false;
     2236    }
    22282237
    22292238    InputLog(Platform::LogLevelInfo, "InputHandler::deleteText start %d end %d", start, end);
Note: See TracChangeset for help on using the changeset viewer.