Diff
Modified: branches/chromium/1271/LayoutTests/ChangeLog (129321 => 129322)
--- branches/chromium/1271/LayoutTests/ChangeLog 2012-09-24 02:29:08 UTC (rev 129321)
+++ branches/chromium/1271/LayoutTests/ChangeLog 2012-09-24 03:28:08 UTC (rev 129322)
@@ -1,3 +1,13 @@
+2012-09-20 Keishi Hattori <[email protected]>
+
+ REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker
+ https://bugs.webkit.org/show_bug.cgi?id=97166
+
+ Reviewed by Kent Tamura.
+
+ * fast/forms/date/calendar-picker-key-operations-expected.txt: Added.
+ * fast/forms/date/calendar-picker-key-operations.html: Added.
+
2012-09-18 Julien Chaffraix <[email protected]>
More unreviewed rebaseline after r128906.
Copied: branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations-expected.txt (from rev 129106, trunk/LayoutTests/fast/forms/date/calendar-picker-key-operations-expected.txt) (0 => 129322)
--- branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations-expected.txt (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations-expected.txt 2012-09-24 03:28:08 UTC (rev 129322)
@@ -0,0 +1,30 @@
+Tests if calendar picker key bindings work as expected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Check that page popup doesn't exist at first.
+PASS document.getElementById("mock-page-popup") is null
+Check that page popup exists.
+PASS pickerWindow.pagePopupController.toString() is "[object PagePopupController]"
+PASS selectedDate() is "2000-01-02"
+PASS selectedMonthYear() is "2000-0"
+Check that arrow keys work properly even when going between weeks and months.
+PASS selectedDate() is "1999-12-26"
+PASS selectedMonthYear() is "2000-0"
+PASS selectedDate() is "2000-01-02"
+PASS selectedMonthYear() is "1999-11"
+PASS selectedDate() is "1999-12-26"
+PASS selectedMonthYear() is "2000-0"
+PASS selectedDate() is "2000-01-02"
+PASS selectedMonthYear() is "2000-0"
+PASS selectedDate() is "1999-12-26"
+PASS selectedMonthYear() is "2000-0"
+PASS selectedDate() is "2000-01-08"
+PASS selectedMonthYear() is "1999-11"
+PASS selectedDate() is "1999-12-26"
+PASS selectedMonthYear() is "2000-0"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations.html (from rev 129106, trunk/LayoutTests/fast/forms/date/calendar-picker-key-operations.html) (0 => 129322)
--- branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations.html (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/forms/date/calendar-picker-key-operations.html 2012-09-24 03:28:08 UTC (rev 129322)
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<input type=date id=date value="2000-01-02">
+<script>
+description("Tests if calendar picker key bindings work as expected.");
+window.jsTestIsAsync = true;
+if (window.internals)
+ internals.settings.setEnableMockPagePopup(true);
+
+debug('Check that page popup doesn\'t exist at first.');
+shouldBeNull('document.getElementById("mock-page-popup")');
+
+sendKey(document.getElementById('date'), 'Down');
+
+var pickerWindow = document.getElementById('mock-page-popup').contentWindow;
+pickerWindow.addEventListener("resize", function() {
+ debug('Check that page popup exists.');
+ shouldBe('pickerWindow.pagePopupController.toString()', '"[object PagePopupController]"');
+
+ shouldBe('selectedDate()', '"2000-01-02"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+
+ debug('Check that arrow keys work properly even when going between weeks and months.');
+
+ eventSender.keyDown('upArrow');
+ shouldBe('selectedDate()', '"1999-12-26"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+ // Move from first row of January 2000 to last row of December 1999.
+ eventSender.keyDown('upArrow');
+ shouldBe('selectedDate()', '"2000-01-02"');
+ shouldBe('selectedMonthYear()', '"1999-11"');
+
+ eventSender.keyDown('downArrow');
+ shouldBe('selectedDate()', '"1999-12-26"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+ eventSender.keyDown('downArrow');
+ shouldBe('selectedDate()', '"2000-01-02"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+
+ eventSender.keyDown('upArrow');
+ shouldBe('selectedDate()', '"1999-12-26"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+
+ // Move from top left of January 2000 to bottom right of December 1999.
+ eventSender.keyDown('leftArrow');
+ shouldBe('selectedDate()', '"2000-01-08"');
+ shouldBe('selectedMonthYear()', '"1999-11"');
+
+ eventSender.keyDown('rightArrow');
+ shouldBe('selectedDate()', '"1999-12-26"');
+ shouldBe('selectedMonthYear()', '"2000-0"');
+
+ finishJSTest();
+}, false);
+
+function selectedDate() {
+ var element = pickerWindow.document.querySelector(".day-selected");
+ if (!element)
+ return null;
+ return element.dataset.submitValue;
+}
+
+function selectedMonthYear() {
+ var element = pickerWindow.document.querySelector(".selected-month-year");
+ if (!element)
+ return null;
+ return element.dataset.value;
+}
+
+function sendKey(input, keyName) {
+ var event = document.createEvent('KeyboardEvent');
+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
+ input.dispatchEvent(event);
+}
+</script>
+<script src=""
+</body>
+
Modified: branches/chromium/1271/Source/WebCore/ChangeLog (129321 => 129322)
--- branches/chromium/1271/Source/WebCore/ChangeLog 2012-09-24 02:29:08 UTC (rev 129321)
+++ branches/chromium/1271/Source/WebCore/ChangeLog 2012-09-24 03:28:08 UTC (rev 129322)
@@ -1,3 +1,18 @@
+2012-09-20 Keishi Hattori <[email protected]>
+
+ REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker
+ https://bugs.webkit.org/show_bug.cgi?id=97166
+
+ Reviewed by Kent Tamura.
+
+ Fixing bug in r127727 so arrow keys work properly.
+
+ Test: fast/forms/date/calendar-picker-key-operations.html
+
+ * Resources/pagepopups/calendarPicker.js:
+ (DaysTable.prototype._maybeSetPreviousMonth):
+ (DaysTable.prototype._maybeSetNextMonth):
+
2012-09-18 John Mellor <[email protected]>
Text Autosizing: Ignore constrained heights in certain circumstances.
Modified: branches/chromium/1271/Source/WebCore/Resources/pagepopups/calendarPicker.js (129321 => 129322)
--- branches/chromium/1271/Source/WebCore/Resources/pagepopups/calendarPicker.js 2012-09-24 02:29:08 UTC (rev 129321)
+++ branches/chromium/1271/Source/WebCore/Resources/pagepopups/calendarPicker.js 2012-09-24 03:28:08 UTC (rev 129322)
@@ -985,10 +985,10 @@
* @return {!boolean}
*/
DaysTable.prototype._maybeSetPreviousMonth = function() {
- var year = global.yearMonthController.year();
- var month = global.yearMonthController.month();
+ var year = this.picker.yearMonthController.year();
+ var month = this.picker.yearMonthController.month();
var thisMonthStartTime = createUTCDate(year, month, 1).getTime();
- if (this.minimumDate.getTime() >= thisMonthStartTime)
+ if (this.picker.minimumDate.getTime() >= thisMonthStartTime)
return false;
if (month == 0) {
year--;
@@ -1003,8 +1003,8 @@
* @return {!boolean}
*/
DaysTable.prototype._maybeSetNextMonth = function() {
- var year = global.yearMonthController.year();
- var month = global.yearMonthController.month();
+ var year = this.picker.yearMonthController.year();
+ var month = this.picker.yearMonthController.month();
if (month == 11) {
year++;
month = 0;