Title: [132985] trunk
- Revision
- 132985
- Author
- [email protected]
- Date
- 2012-10-30 22:49:30 -0700 (Tue, 30 Oct 2012)
Log Message
F4 inside <input type=time> should not open calendar picker
https://bugs.webkit.org/show_bug.cgi?id=100730
Reviewed by Kent Tamura.
Source/WebCore:
We lacked the check to see if the picker indicator is visible.
Test: fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Check if picker indicator is visible.
LayoutTests:
* fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (132984 => 132985)
--- trunk/LayoutTests/ChangeLog 2012-10-31 05:45:00 UTC (rev 132984)
+++ trunk/LayoutTests/ChangeLog 2012-10-31 05:49:30 UTC (rev 132985)
@@ -1,3 +1,13 @@
+2012-10-30 Keishi Hattori <[email protected]>
+
+ F4 inside <input type=time> should not open calendar picker
+ https://bugs.webkit.org/show_bug.cgi?id=100730
+
+ Reviewed by Kent Tamura.
+
+ * fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt: Added.
+ * fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html: Added.
+
2012-10-30 Kent Tamura <[email protected]>
Delaying 'change' and 'input' event dispatching during HTMLInputElement::setValue
Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt (0 => 132985)
--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt 2012-10-31 05:49:30 UTC (rev 132985)
@@ -0,0 +1,11 @@
+F4 or Alt+Down should not open the calendar picker.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById("mock-page-popup") is null
+PASS document.getElementById("mock-page-popup") is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html (0 => 132985)
--- trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html (rev 0)
+++ trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html 2012-10-31 05:49:30 UTC (rev 132985)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<input type=time id=time value="2011-05-01">
+
+<script>
+description('F4 or Alt+Down should not open the calendar picker.');
+
+var input = document.getElementById('time');
+sendKey(input, 'F4', false, false);
+shouldBeNull('document.getElementById("mock-page-popup")');
+sendKey(input, 'Down', false, true);
+shouldBeNull('document.getElementById("mock-page-popup")');
+
+finishJSTest();
+
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (132984 => 132985)
--- trunk/Source/WebCore/ChangeLog 2012-10-31 05:45:00 UTC (rev 132984)
+++ trunk/Source/WebCore/ChangeLog 2012-10-31 05:49:30 UTC (rev 132985)
@@ -1,3 +1,17 @@
+2012-10-30 Keishi Hattori <[email protected]>
+
+ F4 inside <input type=time> should not open calendar picker
+ https://bugs.webkit.org/show_bug.cgi?id=100730
+
+ Reviewed by Kent Tamura.
+
+ We lacked the check to see if the picker indicator is visible.
+
+ Test: fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html
+
+ * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
+ (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Check if picker indicator is visible.
+
2012-10-30 Kent Tamura <[email protected]>
Delaying 'change' and 'input' event dispatching during HTMLInputElement::setValue
Modified: trunk/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp (132984 => 132985)
--- trunk/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp 2012-10-31 05:45:00 UTC (rev 132984)
+++ trunk/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp 2012-10-31 05:49:30 UTC (rev 132985)
@@ -237,14 +237,11 @@
{
Document* document = element()->document();
RefPtr<RenderTheme> theme = document->page() ? document->page()->theme() : RenderTheme::defaultTheme();
- if (theme->shouldOpenPickerWithF4Key() && event->keyIdentifier() == "F4") {
+ if (m_pickerIndicatorIsVisible
+ && ((event->keyIdentifier() == "Down" && event->getModifierState("Alt")) || (theme->shouldOpenPickerWithF4Key() && event->keyIdentifier() == "F4"))) {
if (m_pickerIndicatorElement)
m_pickerIndicatorElement->openPopup();
event->setDefaultHandled();
- } else if (m_pickerIndicatorIsVisible && event->keyIdentifier() == "Down" && event->getModifierState("Alt")) {
- if (m_pickerIndicatorElement)
- m_pickerIndicatorElement->openPopup();
- event->setDefaultHandled();
} else
forwardEvent(event);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes