Title: [140681] trunk/Source/WebKit/blackberry
- Revision
- 140681
- Author
- [email protected]
- Date
- 2013-01-24 06:46:55 -0800 (Thu, 24 Jan 2013)
Log 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 <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (140680 => 140681)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-01-24 14:43:11 UTC (rev 140680)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-01-24 14:46:55 UTC (rev 140681)
@@ -1,3 +1,20 @@
+2013-01-24 Sean Wang <[email protected]>
+
+ [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 <[email protected]>
[BlackBerry] Take a better guess as to what text the user wants learned
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp (140680 => 140681)
--- trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp 2013-01-24 14:43:11 UTC (rev 140680)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp 2013-01-24 14:46:55 UTC (rev 140681)
@@ -73,6 +73,13 @@
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)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes