Title: [142116] trunk/Source/WebKit/blackberry
Revision
142116
Author
[email protected]
Date
2013-02-07 07:07:03 -0800 (Thu, 07 Feb 2013)

Log Message

[BlackBerry] Send type details with IMF mask as part of focus gained.
https://bugs.webkit.org/show_bug.cgi?id=109086

Reviewed by Yong Li.

PR 292609.

Add masking options based on VKB type to the IMF mask.

Reviewed Internally by Nima Ghanavatian.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::addInputStyleMaskForKeyboardType):
(WebKit):
(BlackBerry::WebKit::InputHandler::setElementFocused):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (142115 => 142116)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-02-07 15:05:26 UTC (rev 142115)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-02-07 15:07:03 UTC (rev 142116)
@@ -1,3 +1,21 @@
+2013-02-07  Mike Fenton  <[email protected]>
+
+        [BlackBerry] Send type details with IMF mask as part of focus gained.
+        https://bugs.webkit.org/show_bug.cgi?id=109086
+
+        Reviewed by Yong Li.
+
+        PR 292609.
+
+        Add masking options based on VKB type to the IMF mask.
+
+        Reviewed Internally by Nima Ghanavatian.
+
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::addInputStyleMaskForKeyboardType):
+        (WebKit):
+        (BlackBerry::WebKit::InputHandler::setElementFocused):
+
 2013-02-06  Jakob Petsovits  <[email protected]>
 
         [BlackBerry] Refactor renderContents() for cleaner code.

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (142115 => 142116)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2013-02-07 15:05:26 UTC (rev 142115)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2013-02-07 15:07:03 UTC (rev 142116)
@@ -899,6 +899,29 @@
         m_currentFocusElement->document()->frame()->selection()->setFocused(true);
 }
 
+static void addInputStyleMaskForKeyboardType(int64_t& inputMask, VirtualKeyboardType keyboardType)
+{
+    switch (keyboardType) {
+    case VKBTypeUrl:
+        inputMask |= IMF_URL_TYPE;
+        break;
+    case VKBTypePassword:
+        inputMask |= IMF_PASSWORD_TYPE;
+        break;
+    case VKBTypePin:
+        inputMask |= IMF_PIN_TYPE;
+        break;
+    case VKBTypePhone:
+        inputMask |= IMF_PHONE_TYPE;
+        break;
+    case VKBTypeEmail:
+        inputMask |= IMF_EMAIL_TYPE;
+        break;
+    default:
+        break;
+    }
+}
+
 void InputHandler::setElementFocused(Element* element)
 {
     ASSERT(DOMSupport::isTextBasedContentEditableElement(element));
@@ -938,6 +961,8 @@
     if (keyboardType == VKBTypeNotSet)
         keyboardType = convertInputTypeToVKBType(type);
 
+    addInputStyleMaskForKeyboardType(m_currentFocusElementTextEditMask, keyboardType);
+
     VirtualKeyboardEnterKeyType enterKeyType = keyboardEnterKeyTypeAttribute(element);
 
     if (enterKeyType == VKBEnterKeyNotSet && type != InputTypeTextArea) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to