Title: [144179] trunk/Source/WebKit/chromium
- Revision
- 144179
- Author
- [email protected]
- Date
- 2013-02-27 06:54:00 -0800 (Wed, 27 Feb 2013)
Log Message
[Chromium] Should not return WebTextInputTypeNone for date input element.
https://bugs.webkit.org/show_bug.cgi?id=110740
Patch by Seigo Nonaka <[email protected]> on 2013-02-27
Reviewed by Kent Tamura.
In the case of Windows 8, text input state including on-screen keyboard is controlled by the
value of WebTextInputType returned from WebViewImpl::textInputType().
In past, it returned WebTextInputTypeDate for date text input but now it returns
WebTextInputTypeNone.
WebTextInputTypeNone is used for non editable node, so on-screen keyboard will be hidden if
the date text input is focused. So there is no way to input on Windows 8 tablet without
physical keyboard except tapping small up/down arrow.
* public/WebTextInputType.h: Introduces WebTextInputTypeDateTimeField.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::textInputInfo): Fills type filed regardless of editable or not. It is
safe because textInputType returns editable type only for known editable element.
(WebKit::WebViewImpl::textInputType): Returns WebTextInputTypeDateTimeField for the date
time field element.
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (144178 => 144179)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-02-27 14:50:21 UTC (rev 144178)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-02-27 14:54:00 UTC (rev 144179)
@@ -1,3 +1,25 @@
+2013-02-27 Seigo Nonaka <[email protected]>
+
+ [Chromium] Should not return WebTextInputTypeNone for date input element.
+ https://bugs.webkit.org/show_bug.cgi?id=110740
+
+ Reviewed by Kent Tamura.
+
+ In the case of Windows 8, text input state including on-screen keyboard is controlled by the
+ value of WebTextInputType returned from WebViewImpl::textInputType().
+ In past, it returned WebTextInputTypeDate for date text input but now it returns
+ WebTextInputTypeNone.
+ WebTextInputTypeNone is used for non editable node, so on-screen keyboard will be hidden if
+ the date text input is focused. So there is no way to input on Windows 8 tablet without
+ physical keyboard except tapping small up/down arrow.
+
+ * public/WebTextInputType.h: Introduces WebTextInputTypeDateTimeField.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::textInputInfo): Fills type filed regardless of editable or not. It is
+ safe because textInputType returns editable type only for known editable element.
+ (WebKit::WebViewImpl::textInputType): Returns WebTextInputTypeDateTimeField for the date
+ time field element.
+
2013-02-26 Sheriff Bot <[email protected]>
Unreviewed, rolling out r144129.
Modified: trunk/Source/WebKit/chromium/public/WebTextInputType.h (144178 => 144179)
--- trunk/Source/WebKit/chromium/public/WebTextInputType.h 2013-02-27 14:50:21 UTC (rev 144178)
+++ trunk/Source/WebKit/chromium/public/WebTextInputType.h 2013-02-27 14:54:00 UTC (rev 144179)
@@ -48,6 +48,7 @@
WebTextInputTypeNumber,
WebTextInputTypeTelephone,
WebTextInputTypeURL,
+ WebTextInputTypeDateTimeField,
// FIXME: Remove these types once Date like types are not
// seen as Text. For now they also exist in WebTextInputType
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (144178 => 144179)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-02-27 14:50:21 UTC (rev 144178)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-02-27 14:54:00 UTC (rev 144179)
@@ -2291,6 +2291,10 @@
if (!focused)
return info;
+ info.type = textInputType();
+ if (info.type == WebTextInputTypeNone)
+ return info;
+
Editor* editor = focused->editor();
if (!editor || !editor->canEdit())
return info;
@@ -2303,10 +2307,6 @@
if (!node)
return info;
- info.type = textInputType();
- if (info.type == WebTextInputTypeNone)
- return info;
-
info.value = plainText(rangeOfContents(node).get());
if (info.value.isEmpty())
@@ -2376,6 +2376,14 @@
return WebTextInputTypeTextArea;
}
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+ if (node->isHTMLElement()) {
+ HTMLElement* element = toHTMLElement(node);
+ if (element->isDateTimeFieldElement())
+ return WebTextInputTypeDateTimeField;
+ }
+#endif
+
if (node->shouldUseInputMethod())
return WebTextInputTypeContentEditable;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes