Title: [144488] trunk/Source/WebKit/blackberry
- Revision
- 144488
- Author
- mifen...@rim.com
- Date
- 2013-03-01 13:07:34 -0800 (Fri, 01 Mar 2013)
Log Message
[BlackBerry] Improve input bounds clipping for search fields.
https://bugs.webkit.org/show_bug.cgi?id=111204
Reviewed by Rob Buis.
PR 292673.
Use the standardized InputHandler function to get the
bounds of an input field so that search fields are
truncated smaller to account for the X.
Reviewed Internally by Gen Mak.
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setCaretPosition):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (144487 => 144488)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-03-01 21:02:16 UTC (rev 144487)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-03-01 21:07:34 UTC (rev 144488)
@@ -1,3 +1,21 @@
+2013-03-01 Mike Fenton <mifen...@rim.com>
+
+ [BlackBerry] Improve input bounds clipping for search fields.
+ https://bugs.webkit.org/show_bug.cgi?id=111204
+
+ Reviewed by Rob Buis.
+
+ PR 292673.
+
+ Use the standardized InputHandler function to get the
+ bounds of an input field so that search fields are
+ truncated smaller to account for the X.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
+
2013-03-01 Nima Ghanavatian <nghanavat...@rim.com>
[BlackBerry] Reverse the base and extent of a selection when reversing its handles
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (144487 => 144488)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-03-01 21:02:16 UTC (rev 144487)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-03-01 21:07:34 UTC (rev 144488)
@@ -259,22 +259,18 @@
return;
}
- VisiblePosition visibleCaretPosition(focusedFrame->visiblePositionForPoint(relativePoint));
+ WebCore::IntRect nodeOutlineBounds(m_webPage->m_inputHandler->boundingBoxForInputField());
+ if (!nodeOutlineBounds.isEmpty() && !nodeOutlineBounds.contains(relativePoint)) {
+ if (unsigned character = directionOfPointRelativeToRect(relativePoint, currentCaretRect))
+ m_webPage->m_inputHandler->handleKeyboardInput(Platform::KeyboardEvent(character));
- if (RenderObject* focusedRenderer = focusedFrame->document()->focusedNode()->renderer()) {
- WebCore::IntRect nodeOutlineBounds(focusedRenderer->absoluteOutlineBounds());
- if (!nodeOutlineBounds.contains(relativePoint)) {
- if (unsigned character = directionOfPointRelativeToRect(relativePoint, currentCaretRect))
- m_webPage->m_inputHandler->handleKeyboardInput(Platform::KeyboardEvent(character));
-
- // Send the selection changed in case this does not trigger a selection change to
- // ensure the caret position is accurate. This may be a duplicate event.
- selectionPositionChanged(true /* forceUpdateWithoutChange */);
- return;
- }
+ // Send the selection changed in case this does not trigger a selection change to
+ // ensure the caret position is accurate. This may be a duplicate event.
+ selectionPositionChanged(true /* forceUpdateWithoutChange */);
+ return;
}
- VisibleSelection newSelection(visibleCaretPosition);
+ VisibleSelection newSelection(focusedFrame->visiblePositionForPoint(relativePoint));
if (controller->selection() == newSelection) {
selectionPositionChanged(true /* forceUpdateWithoutChange */);
return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes