[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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b137172a
2013-01-24 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
[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
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):
2013-01-23 Nima Ghanavatian <nghanavatian@rim.com>
[BlackBerry] Take a better guess as to what text the user wants learned
......
......@@ -73,6 +73,13 @@ void TouchEventHandler::doFatFingers(const Platform::TouchPoint& point)
m_webPage->postponeDocumentStyleRecalc();
m_lastFatFingersResult = FatFingers(m_webPage, point.documentContentPosition(), FatFingers::ClickableElement).findBestPoint();
m_webPage->resumeDocumentStyleRecalc();
Node* nodeUnderFatFinger = m_lastFatFingersResult.node();
if (nodeUnderFatFinger && nodeUnderFatFinger->document()->frame() != m_webPage->focusedOrMainFrame()) {
m_webPage->clearFocusNode();
m_webPage->m_selectionHandler->cancelSelection();
m_webPage->m_page->focusController()->setFocusedFrame(nodeUnderFatFinger->document()->frame());
}
}
void TouchEventHandler::sendClickAtFatFingersPoint(unsigned modifiers)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment