Title: [129044] trunk/Source/WebKit/blackberry
- Revision
- 129044
- Author
- [email protected]
- Date
- 2012-09-19 14:35:01 -0700 (Wed, 19 Sep 2012)
Log Message
[BlackBerry] After zooming into an input field, zoom out when focus is lost.
https://bugs.webkit.org/show_bug.cgi?id=97128
Reviewed by Rob Buis.
When the page has automatically zoomed in for input
focus, unzoom it when input focus is lost or keyboard hidden.
Reviewed Internally by Gen Mak.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::InputHandler):
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
* WebKitSupport/InputHandler.h:
(InputHandler):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (129043 => 129044)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-09-19 21:10:14 UTC (rev 129043)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-09-19 21:35:01 UTC (rev 129044)
@@ -1,3 +1,21 @@
+2012-09-19 Mike Fenton <[email protected]>
+
+ [BlackBerry] After zooming into an input field, zoom out when focus is lost.
+ https://bugs.webkit.org/show_bug.cgi?id=97128
+
+ Reviewed by Rob Buis.
+
+ When the page has automatically zoomed in for input
+ focus, unzoom it when input focus is lost or keyboard hidden.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::InputHandler):
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+ * WebKitSupport/InputHandler.h:
+ (InputHandler):
+
2012-09-19 Nima Ghanavatian <[email protected]>
[BlackBerry] Clean up the SpellingLog output
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (129043 => 129044)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-09-19 21:10:14 UTC (rev 129043)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-09-19 21:35:01 UTC (rev 129044)
@@ -138,6 +138,7 @@
, m_delayKeyboardVisibilityChange(false)
, m_request(0)
, m_processingTransactionId(-1)
+ , m_focusZoomScale(0.0)
{
}
@@ -1125,8 +1126,14 @@
// If the text is too small, zoom in to make it a minimum size.
// The minimum size being defined as 3 mm is a good value based on my observations.
static const int s_minimumTextHeightInPixels = Graphics::Screen::primaryScreen()->widthInMMToPixels(3);
- if (fontHeight && fontHeight < s_minimumTextHeightInPixels)
- m_webPage->zoomAboutPoint(s_minimumTextHeightInPixels / fontHeight, selectionFocusRect.location());
+ if (fontHeight && fontHeight < s_minimumTextHeightInPixels) {
+ m_focusZoomScale = s_minimumTextHeightInPixels / fontHeight;
+ m_focusZoomLocation = selectionFocusRect.location();
+ m_webPage->zoomAboutPoint(m_focusZoomScale, m_focusZoomLocation);
+ } else {
+ m_focusZoomScale = 0.0;
+ m_focusZoomLocation = WebCore::IntPoint();
+ }
}
void InputHandler::ensureFocusPluginElementVisible()
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h (129043 => 129044)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h 2012-09-19 21:10:14 UTC (rev 129043)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.h 2012-09-19 21:35:01 UTC (rev 129044)
@@ -19,6 +19,7 @@
#ifndef InputHandler_h
#define InputHandler_h
+#include "FloatPoint.h"
#include "TextChecking.h"
#include <BlackBerryPlatformInputEvents.h>
@@ -221,6 +222,9 @@
RefPtr<WebCore::TextCheckingRequest> m_request;
int32_t m_processingTransactionId;
+
+ double m_focusZoomScale;
+ WebCore::FloatPoint m_focusZoomLocation;
};
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes