summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
commit6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch)
treed9c68d1cca0b3e352f1e438561f3e504e641a08f /Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
parentd0424a769059c84ae20beb3c217812792ea6726b (diff)
downloadqtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp')
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
index 690c1bbb7..0048a6430 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -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>
@@ -1050,7 +1051,7 @@ void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
if (!isActiveTextEdit() || !isInputModeEnabled() || !m_currentFocusElement->document())
return;
- if (!Platform::Settings::instance()->allowCenterScrollAdjustmentForInputFields() && scrollType != EdgeIfNeeded)
+ if (!(Platform::Settings::instance()->allowedScrollAdjustmentForInputFields() & scrollType))
return;
Frame* elementFrame = m_currentFocusElement->document()->frame();
@@ -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()