Title: [143786] trunk/Source/WebKit/blackberry
- Revision
- 143786
- Author
- mifen...@rim.com
- Date
- 2013-02-22 13:41:53 -0800 (Fri, 22 Feb 2013)
Log Message
[BlackBerry] Eliminate invalid clipping for content editable selections
https://bugs.webkit.org/show_bug.cgi?id=110630
Reviewed by Rob Buis.
PR 284629.
Remove selection clipping for content editable
fields as the bounds aren't valid and cause
clipping based on starting node rather than the
union of nodes.
Reviewed Internally by Nima Ghanavatian.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::updateFormState):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (143785 => 143786)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-02-22 21:38:08 UTC (rev 143785)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-02-22 21:41:53 UTC (rev 143786)
@@ -1,3 +1,24 @@
+2013-02-22 Mike Fenton <mifen...@rim.com>
+
+ [BlackBerry] Eliminate invalid clipping for content editable selections
+ https://bugs.webkit.org/show_bug.cgi?id=110630
+
+ Reviewed by Rob Buis.
+
+ PR 284629.
+
+ Remove selection clipping for content editable
+ fields as the bounds aren't valid and cause
+ clipping based on starting node rather than the
+ union of nodes.
+
+ Reviewed Internally by Nima Ghanavatian.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::updateFormState):
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
+
2013-02-22 Tiancheng Jiang <tiji...@rim.com>
[BlackBerry]Adjust fatfinger detection rect size
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (143785 => 143786)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2013-02-22 21:38:08 UTC (rev 143785)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2013-02-22 21:41:53 UTC (rev 143786)
@@ -1218,11 +1218,17 @@
return WebCore::IntRect();
// type="search" can have a 'X', so take the inner block bounding box to not include it.
- if (HTMLInputElement* element = m_currentFocusElement->toInputElement())
+ if (HTMLInputElement* element = m_currentFocusElement->toInputElement()) {
if (element->isSearchField())
return element->innerBlockElement()->renderer()->absoluteBoundingBoxRect();
+ return m_currentFocusElement->renderer()->absoluteBoundingBoxRect();
+ }
- return m_currentFocusElement->renderer()->absoluteBoundingBoxRect();
+ if (m_currentFocusElement->hasTagName(HTMLNames::textareaTag))
+ return m_currentFocusElement->renderer()->absoluteBoundingBoxRect();
+
+ // Content Editable can't rely on the bounding box since it isn't fixed.
+ return WebCore::IntRect();
}
void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (143785 => 143786)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-02-22 21:38:08 UTC (rev 143785)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-02-22 21:41:53 UTC (rev 143786)
@@ -107,7 +107,7 @@
{
// Get the containing content rect for the frame.
Frame* frame = m_webPage->focusedOrMainFrame();
- WebCore::IntRect clipRect = WebCore::IntRect(WebCore::IntPoint(0, 0), m_webPage->contentsSize());
+ WebCore::IntRect clipRect = WebCore::IntRect(WebCore::IntPoint(0, 0), frame->view()->contentsSize());
if (frame != m_webPage->mainFrame()) {
clipRect = m_webPage->getRecursiveVisibleWindowRect(frame->view(), true /* no clip to main frame window */);
clipRect = m_webPage->m_mainFrame->view()->windowToContents(clipRect);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes