Changeset 136689 in webkit


Ignore:
Timestamp:
Dec 5, 2012 7:52:50 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Avoid showing FCC on empty text field in a different way
https://bugs.webkit.org/show_bug.cgi?id=104019

Patch by Yongxin Dai <yodai@rim.com> on 2012-12-05
Reviewed by Rob Buis.

PR #222796

Add text field empty flag along with the caret change notification so that
FineCursorContnrol is able to avoid showing FCC on empty text filed.
Previous approach, notifying client with empty caret on empty text field,
causes problem. Its code is removed.

Reviewed Internally by Mike Fenton.

  • Api/WebPageClient.h:
  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::SelectionHandler::caretPositionChanged):

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r135775 r136689  
    156156    virtual void cancelSelectionVisuals() = 0;
    157157    virtual void notifySelectionHandlesReversed() = 0;
    158     virtual void notifyCaretChanged(const Platform::IntRect& documentCaretRect, bool userTouchTriggered, bool isSingleLineInput = false, const Platform::IntRect& singleLineDocumentBoundingBox = Platform::IntRect()) = 0;
     158    virtual void notifyCaretChanged(const Platform::IntRect& documentCaretRect, bool userTouchTriggered, bool isSingleLineInput = false, const Platform::IntRect& singleLineDocumentBoundingBox = Platform::IntRect(), bool textFieldIsEmpty = false) = 0;
    159159
    160160    virtual void cursorChanged(Platform::CursorType, const char* url, const Platform::IntPoint& hotSpotInImage) = 0;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r136633 r136689  
     12012-12-05  Yongxin Dai  <yodai@rim.com>
     2
     3        [BlackBerry] Avoid showing FCC on empty text field in a different way
     4        https://bugs.webkit.org/show_bug.cgi?id=104019
     5
     6        Reviewed by Rob Buis.
     7
     8        PR #222796
     9
     10        Add text field empty flag along with the caret change notification so that
     11        FineCursorContnrol is able to avoid showing FCC on empty text filed.
     12        Previous approach, notifying client with empty caret on empty text field,
     13        causes problem. Its code is removed.
     14
     15        Reviewed Internally by Mike Fenton.
     16
     17        * Api/WebPageClient.h:
     18        * WebKitSupport/SelectionHandler.cpp:
     19        (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
     20
    1212012-12-04  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
    222        [BlackBerry] VKB flickers in and out when tapping on webview after text selection on URL bar
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r136633 r136689  
    978978
    979979    WebCore::IntRect caretLocation;
    980     // If the input field is empty, we always turn off the caret.
    981980    // If the input field is not active, we must be turning off the caret.
    982     bool emptyInputField = m_webPage->m_inputHandler->elementText().isEmpty();
    983     if (emptyInputField || (!m_webPage->m_inputHandler->isInputMode() && m_caretActive)) {
    984         if (!emptyInputField)
    985             m_caretActive = false;
     981    if (!m_webPage->m_inputHandler->isInputMode() && m_caretActive) {
     982        m_caretActive = false;
    986983        // Send an empty caret change to turn off the caret.
    987984        m_webPage->m_client->notifyCaretChanged(caretLocation, m_webPage->m_touchEventHandler->lastFatFingersResult().isTextInput() /* userTouchTriggered */);
     
    10191016    }
    10201017
    1021     SelectionLog(LogLevelInfo, "SelectionHandler::caretPositionChanged: %s line input, single line bounding box (%d, %d) %dx%d",
    1022         isSingleLineInput ? "single" : "multi", nodeBoundingBox.x(), nodeBoundingBox.y(), nodeBoundingBox.width(), nodeBoundingBox.height());
    1023 
    1024     m_webPage->m_client->notifyCaretChanged(caretLocation, m_webPage->m_touchEventHandler->lastFatFingersResult().isTextInput() /* userTouchTriggered */, isSingleLineInput, nodeBoundingBox);
     1018    SelectionLog(LogLevelInfo, "SelectionHandler::caretPositionChanged: %s line input, single line bounding box (%d, %d) %dx%d%s",
     1019        isSingleLineInput ? "single" : "multi", nodeBoundingBox.x(), nodeBoundingBox.y(), nodeBoundingBox.width(), nodeBoundingBox.height(),
     1020        m_webPage->m_inputHandler->elementText().isEmpty() ? ", empty text field" : "");
     1021
     1022    m_webPage->m_client->notifyCaretChanged(caretLocation, m_webPage->m_touchEventHandler->lastFatFingersResult().isTextInput() /* userTouchTriggered */,
     1023        isSingleLineInput, nodeBoundingBox, m_webPage->m_inputHandler->elementText().isEmpty());
    10251024}
    10261025
Note: See TracChangeset for help on using the changeset viewer.