Title: [115152] trunk/Source/WebKit/blackberry
- Revision
- 115152
- Author
- commit-qu...@webkit.org
- Date
- 2012-04-24 18:02:47 -0700 (Tue, 24 Apr 2012)
Log Message
[BlackBerry] Perform spellcheck before handling TouchRelease event
https://bugs.webkit.org/show_bug.cgi?id=84744
After rebasing to master_35, it appears as though some code had been moved around.
Here, we were handling the TouchReleased event before calling spellcheck. This
meant that when we finally got the call to spellcheck, the fatFinger result had been
reset and the spelling markers had been removed.
In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
I am also updating the BlackBerry specific documentMarkerContainingPoint to use
LayoutPoint instead of IntPoint.
Internally reviewed by Mike Fenton.
Patch by Nima Ghanavatian <nghanavat...@rim.com> on 2012-04-24
Reviewed by Antonio Gomes.
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
(BlackBerry::WebKit::TouchEventHandler::spellCheck):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::markerContainingPoint):
* dom/DocumentMarkerController.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (115151 => 115152)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-04-25 00:58:17 UTC (rev 115151)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-04-25 01:02:47 UTC (rev 115152)
@@ -1,3 +1,28 @@
+2012-04-24 Nima Ghanavatian <nghanavat...@rim.com>
+
+ [BlackBerry] Perform spellcheck before handling TouchRelease event
+ https://bugs.webkit.org/show_bug.cgi?id=84744
+
+ After rebasing to master_35, it appears as though some code had been moved around.
+ Here, we were handling the TouchReleased event before calling spellcheck. This
+ meant that when we finally got the call to spellcheck, the fatFinger result had been
+ reset and the spelling markers had been removed.
+
+ In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
+ I am also updating the BlackBerry specific documentMarkerContainingPoint to use
+ LayoutPoint instead of IntPoint.
+
+ Internally reviewed by Mike Fenton.
+
+ Reviewed by Antonio Gomes.
+
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+ (BlackBerry::WebKit::TouchEventHandler::spellCheck):
+ * dom/DocumentMarkerController.cpp:
+ (WebCore::DocumentMarkerController::markerContainingPoint):
+ * dom/DocumentMarkerController.h:
+
2012-04-24 Mike Lattanzio <mlattan...@rim.com>
[BlackBerry] setUserViewportArguments not always respected.
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp (115151 => 115152)
--- trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp 2012-04-25 00:58:17 UTC (rev 115151)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp 2012-04-25 01:02:47 UTC (rev 115152)
@@ -227,6 +227,7 @@
}
case Platform::TouchPoint::TouchReleased:
{
+ unsigned spellLength = spellCheck(point);
// Apply any suppressed changes. This does not eliminate the need
// for the show after the handling of fat finger pressed as it may
// have triggered a state change.
@@ -252,8 +253,6 @@
PlatformMouseEvent mouseEvent(adjustedPoint, m_lastScreenPoint, PlatformEvent::MouseReleased, 1, LeftButton, TouchScreen);
m_webPage->handleMouseEvent(mouseEvent);
m_lastFatFingersResult.reset(); // Reset the fat finger result as its no longer valid when a user's finger is not on the screen.
-
- unsigned spellLength = spellCheck(point);
if (spellLength) {
unsigned end = m_webPage->m_inputHandler->caretPosition();
unsigned start = end - spellLength;
@@ -284,7 +283,7 @@
if (!m_lastFatFingersResult.isTextInput() || !elementUnderFatFinger)
return 0;
- IntPoint contentPos(m_webPage->mapFromViewportToContents(touchPoint.m_pos));
+ LayoutPoint contentPos(m_webPage->mapFromViewportToContents(touchPoint.m_pos));
contentPos = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), m_webPage->focusedOrMainFrame(), contentPos);
Document* document = elementUnderFatFinger->document();
@@ -294,7 +293,7 @@
return 0;
IntRect rect = marker->renderedRect();
- IntPoint newContentPos = IntPoint(rect.x() + rect.width(), rect.y() + rect.height() / 2);
+ LayoutPoint newContentPos = LayoutPoint(rect.x() + rect.width(), rect.y() + rect.height() / 2);
Frame* frame = m_webPage->focusedOrMainFrame();
if (frame != m_webPage->mainFrame())
newContentPos = m_webPage->mainFrame()->view()->windowToContents(frame->view()->contentsToWindow(newContentPos));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes