Title: [125808] trunk/Source/WebKit/blackberry
- Revision
- 125808
- Author
- [email protected]
- Date
- 2012-08-16 13:47:18 -0700 (Thu, 16 Aug 2012)
Log Message
[BlackBerry] Use form state to determine the VKB enter key.
https://bugs.webkit.org/show_bug.cgi?id=94239
Reviewed by Rob Buis.
PR 188234.
If the enter key for the VKB is not explicitly set, use
submit if we are in a single line input and a default
button exists for the form.
Reviewed Internally by Gen Mak.
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setElementFocused):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (125807 => 125808)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-08-16 20:44:36 UTC (rev 125807)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-08-16 20:47:18 UTC (rev 125808)
@@ -1,3 +1,21 @@
+2012-08-16 Mike Fenton <[email protected]>
+
+ [BlackBerry] Use form state to determine the VKB enter key.
+ https://bugs.webkit.org/show_bug.cgi?id=94239
+
+ Reviewed by Rob Buis.
+
+ PR 188234.
+
+ If the enter key for the VKB is not explicitly set, use
+ submit if we are in a single line input and a default
+ button exists for the form.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::setElementFocused):
+
2012-08-16 Konrad Piascik <[email protected]>
[BlackBerry] Reload valid page from Error Page keeps history ViewState and zoom.
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (125807 => 125808)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-08-16 20:44:36 UTC (rev 125807)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-08-16 20:47:18 UTC (rev 125808)
@@ -818,6 +818,14 @@
VirtualKeyboardType keyboardType = keyboardTypeAttribute(element);
VirtualKeyboardEnterKeyType enterKeyType = keyboardEnterKeyTypeAttribute(element);
+ if (enterKeyType == VKBEnterKeyNotSet && type != InputTypeTextArea) {
+ if (element->isFormControlElement()) {
+ const HTMLFormControlElement* formElement = static_cast<const HTMLFormControlElement*>(element);
+ if (formElement->form() && formElement->form()->defaultButton())
+ enterKeyType = VKBEnterKeySubmit;
+ }
+ }
+
FocusLog(LogLevelInfo, "InputHandler::setElementFocused, Type=%d, Style=%d, Keyboard Type=%d, Enter Key=%d", type, m_currentFocusElementTextEditMask, keyboardType, enterKeyType);
m_webPage->m_client->inputFocusGained(type, m_currentFocusElementTextEditMask, keyboardType, enterKeyType);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes