Changeset 139060 in webkit


Ignore:
Timestamp:
Jan 8, 2013 8:28:49 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Can't select text out of current focused input
https://bugs.webkit.org/show_bug.cgi?id=106322

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2013-01-08
Reviewed by Rob Buis.

PR270755
Internally reviewed by Mike Fenton

When selection changed, the selection handler clips new selection with
current focused node's boundary. So we clear focus before selectObject.
This patch clear focus when selectObject is at a point but not at a node.

  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::SelectionHandler::selectObject):

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

Legend:

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

    r139045 r139060  
     12013-01-08  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
     2
     3        [BlackBerry] Can't select text out of current focused input
     4        https://bugs.webkit.org/show_bug.cgi?id=106322
     5
     6        Reviewed by Rob Buis.
     7
     8        PR270755
     9        Internally reviewed by Mike Fenton
     10
     11        When selection changed, the selection handler clips new selection with
     12        current focused node's boundary. So we clear focus before selectObject.
     13        This patch clear focus when selectObject is at a point but not at a node.
     14
     15        * WebKitSupport/SelectionHandler.cpp:
     16        (BlackBerry::WebKit::SelectionHandler::selectObject):
     17
    1182013-01-08  Steve Block  <steveblock@chromium.org>
    219
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r138905 r139060  
    663663
    664664    WebCore::IntPoint relativePoint = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), focusedFrame, location);
     665    // Clear input focus if we're not selecting in old input field.
     666    if (!m_webPage->m_inputHandler->boundingBoxForInputField().contains(relativePoint))
     667        m_webPage->clearFocusNode();
     668
    665669    VisiblePosition pointLocation(focusedFrame->visiblePositionForPoint(relativePoint));
    666670    VisibleSelection selection = VisibleSelection(pointLocation, pointLocation);
Note: See TracChangeset for help on using the changeset viewer.