Commit d863be30 authored by mifenton@rim.com's avatar mifenton@rim.com
Browse files

[BlackBerry] Update the minimum zoom scale when focusing an input field.

https://bugs.webkit.org/show_bug.cgi?id=96789

Reviewed by Antonio Gomes.

PR 188751.

Increase the minimum font fix and base it on mm instead of pixels.

Reviewed Internally by Gen Mak.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 808cdde9
2012-09-14 Mike Fenton <mifenton@rim.com>
[BlackBerry] Update the minimum zoom scale when focusing an input field.
https://bugs.webkit.org/show_bug.cgi?id=96789
Reviewed by Antonio Gomes.
PR 188751.
Increase the minimum font fix and base it on mm instead of pixels.
Reviewed Internally by Gen Mak.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2012-09-13 Antonio Gomes <agomes@rim.com>
[BlackBerry] Remove the ability to schedule a zoom about point call.
......
......@@ -66,6 +66,7 @@
#include <BlackBerryPlatformKeyboardEvent.h>
#include <BlackBerryPlatformLog.h>
#include <BlackBerryPlatformMisc.h>
#include <BlackBerryPlatformScreen.h>
#include <BlackBerryPlatformSettings.h>
#include <sys/keycodes.h>
#include <wtf/text/CString.h>
......@@ -1158,9 +1159,10 @@ void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
}
// If the text is too small, zoom in to make it a minimum size.
static const int s_minimumTextHeightInPixels = 6;
// 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, m_webPage->centerOfVisibleContentsRect());
m_webPage->zoomAboutPoint(s_minimumTextHeightInPixels / fontHeight, selectionFocusRect.location());
}
void InputHandler::ensureFocusPluginElementVisible()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment