Title: [133258] branches/chromium/1312
- Revision
- 133258
- Author
- kei...@webkit.org
- Date
- 2012-11-01 19:32:18 -0700 (Thu, 01 Nov 2012)
Log Message
Merge 132985 - 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.
TBR=kei...@webkit.org
Review URL: https://codereview.chromium.org/11369041
Modified Paths
Added Paths
Diff
Modified: branches/chromium/1312/LayoutTests/ChangeLog (133257 => 133258)
--- branches/chromium/1312/LayoutTests/ChangeLog 2012-11-02 02:22:00 UTC (rev 133257)
+++ branches/chromium/1312/LayoutTests/ChangeLog 2012-11-02 02:32:18 UTC (rev 133258)
@@ -1,3 +1,13 @@
+2012-10-30 Keishi Hattori <kei...@webkit.org>
+
+ 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-31 Keishi Hattori <kei...@webkit.org>
Calendar picker can flicker when opened from the suggestion picker
Copied: branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt (from rev 132985, trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt) (0 => 133258)
--- branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt (rev 0)
+++ branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt 2012-11-02 02:32:18 UTC (rev 133258)
@@ -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
+
Copied: branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html (from rev 132985, trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html) (0 => 133258)
--- branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html (rev 0)
+++ branches/chromium/1312/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html 2012-11-02 02:32:18 UTC (rev 133258)
@@ -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: branches/chromium/1312/Source/WebCore/ChangeLog (133257 => 133258)
--- branches/chromium/1312/Source/WebCore/ChangeLog 2012-11-02 02:22:00 UTC (rev 133257)
+++ branches/chromium/1312/Source/WebCore/ChangeLog 2012-11-02 02:32:18 UTC (rev 133258)
@@ -1,3 +1,17 @@
+2012-10-30 Keishi Hattori <kei...@webkit.org>
+
+ 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-31 Keishi Hattori <kei...@webkit.org>
Calendar picker can flicker when opened from the suggestion picker
Modified: branches/chromium/1312/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp (133257 => 133258)
--- branches/chromium/1312/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp 2012-11-02 02:22:00 UTC (rev 133257)
+++ branches/chromium/1312/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp 2012-11-02 02:32:18 UTC (rev 133258)
@@ -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
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes