Changeset 140681 in webkit


Ignore:
Timestamp:
Jan 24, 2013 6:46:55 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] It can't Select texts in main frame when the current focus is in a IFrame
https://bugs.webkit.org/show_bug.cgi?id=107773

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2013-01-24
Reviewed by Antonio Gomes.

PR285211 Internally reviewed by Genevieve Mak

When touch hold in the unfocused frame, it doesn't switch frame focus. Many
places in code depends on the webpage->forcusOrMainFrame(), including the
SelectionHandler, so it can't select in an unfocused frame. This patch switchs
frame focus when touch starts.

  • WebKitSupport/TouchEventHandler.cpp:

(BlackBerry::WebKit::TouchEventHandler::doFatFingers):

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

Legend:

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

    r140564 r140681  
     12013-01-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
     2
     3        [BlackBerry] It can't Select texts in main frame when the current focus is in a IFrame
     4        https://bugs.webkit.org/show_bug.cgi?id=107773
     5
     6        Reviewed by Antonio Gomes.
     7
     8        PR285211 Internally reviewed by Genevieve Mak
     9
     10        When touch hold in the unfocused frame, it doesn't switch frame focus. Many
     11        places in code depends on the webpage->forcusOrMainFrame(), including the
     12        SelectionHandler, so it can't select in an unfocused frame. This patch switchs
     13        frame focus when touch starts.
     14
     15        * WebKitSupport/TouchEventHandler.cpp:
     16        (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
     17
    1182013-01-23  Nima Ghanavatian  <nghanavatian@rim.com>
    219
  • trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp

    r138619 r140681  
    7474    m_lastFatFingersResult = FatFingers(m_webPage, point.documentContentPosition(), FatFingers::ClickableElement).findBestPoint();
    7575    m_webPage->resumeDocumentStyleRecalc();
     76
     77    Node* nodeUnderFatFinger = m_lastFatFingersResult.node();
     78    if (nodeUnderFatFinger && nodeUnderFatFinger->document()->frame() != m_webPage->focusedOrMainFrame()) {
     79        m_webPage->clearFocusNode();
     80        m_webPage->m_selectionHandler->cancelSelection();
     81        m_webPage->m_page->focusController()->setFocusedFrame(nodeUnderFatFinger->document()->frame());
     82    }
    7683}
    7784
Note: See TracChangeset for help on using the changeset viewer.