| Differences between
and this patch
- a/Source/WebCore/ChangeLog +48 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-01-22  Keishi Hattori  <keishi@webkit.org>
2
3
        Adjust design of the Calendar Picker
4
        https://bugs.webkit.org/show_bug.cgi?id=107507
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Covered by existing calendar picker appearance tests.
9
10
        * Resources/pagepopups/calendarPicker.css:
11
        (body): Use bigger font.
12
        (.calendar-picker):
13
        (.month-selector):
14
        (.month-selector svg):
15
        (.month-selector-popup-contents):
16
        (.year-month-button-left .year-month-button):
17
        (.year-month-button-right .year-month-button):
18
        (.days-area-container):
19
        (.days-area):
20
        (.day-label):
21
        (.day):
22
        (.available):
23
        (.month-mode .day):
24
        (.today-clear-area .today-button):
25
        * Resources/pagepopups/calendarPicker.js:
26
        (CalendarPicker.prototype.fixWindowSize): Calculate the width of today-clear-area too.
27
        (YearMonthController.prototype.attachTo):
28
        (YearMonthController.prototype._attachLeftButtonsTo): Use svg icons inside buttons.
29
        (YearMonthController.prototype._attachRightButtonsTo): Use svg icons inside buttons.
30
        (YearMonthController.prototype.setMonth):
31
        (YearMonthController.prototype._handleButtonClick):
32
        * Resources/pagepopups/calendarPickerMac.css: Removed.
33
        * Resources/pagepopups/chromium/calendarPickerChromium.css: Added.
34
        (.year-month-button):
35
        (.days-area-container:focus):
36
        * Resources/pagepopups/chromium/pickerCommonChromium.css: Added. Use Chrome-style buttons.
37
        (button):
38
        (:enabled:hover:-webkit-any(button, input[type='button'])):
39
        (:enabled:active:-webkit-any(button, input[type='button'])):
40
        (:disabled:-webkit-any(button, input[type='button'])):
41
        (:enabled:focus:-webkit-any(button, input[type='button'])):
42
        * WebCore.gyp/WebCore.gyp: Include pickerCommonChromium.css and calendarPickerChromium.css.
43
        * rendering/RenderTheme.cpp: Remove extraCalendarPickerStyleSheet
44
        * rendering/RenderTheme.h: Ditto.
45
        * rendering/RenderThemeChromiumMac.h: Ditto.
46
        * rendering/RenderThemeChromiumMac.mm: Ditto.
47
        (WebCore):
48
1
2013-01-21  Dirk Schulze  <dschulze@adobe.com>
49
2013-01-21  Dirk Schulze  <dschulze@adobe.com>
2
50
3
        Add build flag for Canvas's Path object (disabled by default)
51
        Add build flag for Canvas's Path object (disabled by default)
- a/Source/WebKit/chromium/ChangeLog +10 lines
Lines 1-3 a/Source/WebKit/chromium/ChangeLog_sec1
1
2013-01-21  Keishi Hattori  <keishi@webkit.org>
2
3
        Adjust design of the Calendar Picker
4
        https://bugs.webkit.org/show_bug.cgi?id=107507
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * src/DateTimeChooserImpl.cpp:
9
        (WebKit::DateTimeChooserImpl::writeDocument):  Include pickerCommonChromium.css and calendarPickerChromium.css.
10
1
2013-01-21  Noel Gordon  <noel.gordon@gmail.com>
11
2013-01-21  Noel Gordon  <noel.gordon@gmail.com>
2
12
3
        [chromium] REGRESSION(r139347) roll chromium deps broke webkit-unit-tests
13
        [chromium] REGRESSION(r139347) roll chromium deps broke webkit-unit-tests
- a/Source/WebCore/Resources/pagepopups/calendarPicker.css -31 / +32 lines
Lines 31-37 a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec1
31
body {
31
body {
32
    -webkit-user-select: none;
32
    -webkit-user-select: none;
33
    background-color: white;
33
    background-color: white;
34
    font: -webkit-small-control;
34
    font: -webkit-control;
35
    margin: 0;
35
    margin: 0;
36
    overflow: hidden;
36
    overflow: hidden;
37
}
37
}
Lines 41-51 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec2
41
}
41
}
42
42
43
.calendar-picker {
43
.calendar-picker {
44
    border: 1px solid #bfbfbf;
45
    border-radius: 2px;
46
    position: absolute;
47
    padding: 10px;
44
    background-color: white;
48
    background-color: white;
45
    border: solid 1px #8899aa;
46
    box-shadow: inset 2px 2px 2px white,
47
        inset -2px -2px 1px rgba(0,0,0,0.1);
48
    padding: 6px;
49
    white-space: nowrap;
49
    white-space: nowrap;
50
    width: 500px;
50
    width: 500px;
51
}
51
}
Lines 72-82 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec3
72
    background-color: white;
72
    background-color: white;
73
    cursor: pointer;
73
    cursor: pointer;
74
    display: inline-block;
74
    display: inline-block;
75
    padding: 3px 6px 3px 6px;
75
    padding: 4px 6px 4px 6px;
76
}
76
}
77
.month-selector:after {
77
78
    content: " ▼";
78
.month-selector svg {
79
    font-size: smaller;
79
    margin: 0 6px 2px 6px;
80
}
80
}
81
81
82
.month-selector-popup {
82
.month-selector-popup {
Lines 97-102 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec4
97
97
98
.month-selector-popup-contents {
98
.month-selector-popup-contents {
99
    display: table;
99
    display: table;
100
    text-align: left;
101
    border: 1px solid #bfbfbf;
102
    margin: -1px 0 0 -1px;
100
}
103
}
101
104
102
.month-selector-popup-entry {
105
.month-selector-popup-entry {
Lines 137-151 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec5
137
    display: inline-block;
140
    display: inline-block;
138
}
141
}
139
142
143
.year-month-button-left .year-month-button {
144
    margin-right: 4px;
145
}
146
140
.year-month-button-right {
147
.year-month-button-right {
141
    display: inline-block;
148
    display: inline-block;
142
}
149
}
143
150
151
.year-month-button-right .year-month-button {
152
    margin-left: 4px;
153
}
154
144
.days-area-container {
155
.days-area-container {
145
    background-color: white;
156
    background-color: white;
146
    border: solid 1px black;
157
    border: 1px solid #bfbfbf;
147
    margin-bottom: 4px;
158
    margin-bottom: 8px;
148
    margin-top: 4px;
159
    margin-top: 10px;
149
    overflow: hidden;
160
    overflow: hidden;
150
}
161
}
151
162
Lines 153-171 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec6
153
    background-color: white;
164
    background-color: white;
154
    border-collapse: separate;
165
    border-collapse: separate;
155
    border-spacing: 0px;
166
    border-spacing: 0px;
156
    font: -webkit-small-control;
167
    font: -webkit-control;
157
    /* table-layout:fixed and width:100% are added in the JS code. */
168
    /* table-layout:fixed and width:100% are added in the JS code. */
158
}
169
}
159
170
160
.day-label { /* <th> */
171
.day-label { /* <th> */
161
    -webkit-box-sizing: border-box;
172
    -webkit-box-sizing: border-box;
162
    background-color: #e3e9ff;
173
    background-color: #f5f5f5;
163
    border-left-color: #f0f4ff;
164
    border-top-color: #f0f4ff;
165
    border: solid 1px #d0d4f0;
166
    color: #20c;
167
    font-weight: normal;
174
    font-weight: normal;
168
    text-align: center;
175
    text-align: center;
176
    border-bottom: 1px solid #bfbfbf;
177
    height: 2.1em;
169
}
178
}
170
179
171
.day { /* <td> */
180
.day { /* <td> */
Lines 174-179 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec7
174
    background-color: white;
183
    background-color: white;
175
    border: 1px solid white;
184
    border: 1px solid white;
176
    -webkit-box-sizing: border-box;
185
    -webkit-box-sizing: border-box;
186
    line-height: 1.4em;
177
}
187
}
178
188
179
@media (pointer:coarse) {
189
@media (pointer:coarse) {
Lines 185-194 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec8
185
195
186
.available {
196
.available {
187
    cursor: default;
197
    cursor: default;
188
    font-weight: 700;
189
    background-color: white;
198
    background-color: white;
190
    border: 1px solid white;
199
    border: 1px solid white;
191
    border-radius: 5px;
192
    -webkit-transition: all 0.2s ease;
200
    -webkit-transition: all 0.2s ease;
193
}
201
}
194
202
Lines 228-248 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec9
228
.week-mode .day,
236
.week-mode .day,
229
.month-mode .day {
237
.month-mode .day {
230
    -webkit-transition: none;
238
    -webkit-transition: none;
231
    border-radius: 0;
232
    border: none;
239
    border: none;
233
    padding: 2px;
240
    padding: 2px;
234
}
241
}
235
242
236
.week-mode .available.day-selected.monday {
237
    border-top-left-radius: 5px;
238
    border-bottom-left-radius: 5px;
239
}
240
241
.week-mode .available.day-selected.sunday {
242
    border-top-right-radius: 5px;
243
    border-bottom-right-radius: 5px;
244
}
245
246
.week-mode .unavailable.day-selected {
243
.week-mode .unavailable.day-selected {
247
    padding: 1px 2px;
244
    padding: 1px 2px;
248
    border-top: 1px solid highlight;
245
    border-top: 1px solid highlight;
Lines 273-275 body { a/Source/WebCore/Resources/pagepopups/calendarPicker.css_sec10
273
    border-right: 1px solid #999;
270
    border-right: 1px solid #999;
274
    padding-right: 1px;
271
    padding-right: 1px;
275
}
272
}
273
274
.today-clear-area .today-button {
275
    margin-right: 8px;
276
}
- a/Source/WebCore/Resources/pagepopups/calendarPicker.js -30 / +34 lines
Lines 760-765 CalendarPicker.prototype.handleClear = function() { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec1
760
CalendarPicker.prototype.fixWindowSize = function() {
760
CalendarPicker.prototype.fixWindowSize = function() {
761
    var yearMonthRightElement = this._element.getElementsByClassName(ClassNames.YearMonthButtonRight)[0];
761
    var yearMonthRightElement = this._element.getElementsByClassName(ClassNames.YearMonthButtonRight)[0];
762
    var daysAreaElement = this._element.getElementsByClassName(ClassNames.DaysArea)[0];
762
    var daysAreaElement = this._element.getElementsByClassName(ClassNames.DaysArea)[0];
763
    var clearButton = this._element.getElementsByClassName(ClassNames.ClearButton)[0];
763
    var headers = daysAreaElement.getElementsByClassName(ClassNames.DayLabel);
764
    var headers = daysAreaElement.getElementsByClassName(ClassNames.DayLabel);
764
    var maxCellWidth = 0;
765
    var maxCellWidth = 0;
765
    for (var i = 1; i < headers.length; ++i) {
766
    for (var i = 1; i < headers.length; ++i) {
Lines 773-790 CalendarPicker.prototype.fixWindowSize = function() { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec2
773
    var DaysAreaContainerBorder = 1;
774
    var DaysAreaContainerBorder = 1;
774
    var yearMonthEnd;
775
    var yearMonthEnd;
775
    var daysAreaEnd;
776
    var daysAreaEnd;
777
    var todayClearAreaEnd;
776
    if (global.params.isLocaleRTL) {
778
    if (global.params.isLocaleRTL) {
777
        var startOffset = this._element.offsetLeft + this._element.offsetWidth;
779
        var startOffset = this._element.offsetLeft + this._element.offsetWidth;
778
        yearMonthEnd = startOffset - yearMonthRightElement.offsetLeft;
780
        yearMonthEnd = startOffset - yearMonthRightElement.offsetLeft;
779
        daysAreaEnd = startOffset - (daysAreaElement.offsetLeft + daysAreaElement.offsetWidth) + weekColumnWidth + maxCellWidth * 7 + DaysAreaContainerBorder;
781
        daysAreaEnd = startOffset - (daysAreaElement.offsetLeft + daysAreaElement.offsetWidth) + weekColumnWidth + maxCellWidth * 7 + DaysAreaContainerBorder;
782
        todayClearAreaEnd = startOffset - clearButton.offsetLeft;
780
    } else {
783
    } else {
781
        yearMonthEnd = yearMonthRightElement.offsetLeft + yearMonthRightElement.offsetWidth;
784
        yearMonthEnd = yearMonthRightElement.offsetLeft + yearMonthRightElement.offsetWidth;
782
        daysAreaEnd = daysAreaElement.offsetLeft + weekColumnWidth + maxCellWidth * 7 + DaysAreaContainerBorder;
785
        daysAreaEnd = daysAreaElement.offsetLeft + weekColumnWidth + maxCellWidth * 7 + DaysAreaContainerBorder;
786
        todayClearAreaEnd = clearButton.offsetLeft + clearButton.offsetWidth;
783
    }
787
    }
784
    var maxEnd = Math.max(yearMonthEnd, daysAreaEnd);
788
    var maxEnd = Math.max(yearMonthEnd, daysAreaEnd, todayClearAreaEnd);
785
    var MainPadding = 6; // FIXME: Fix name.
789
    var MainPadding = 10; // FIXME: Fix name.
786
    var MainBorder = 1;
790
    var MainBorder = 1;
787
    var desiredBodyWidth = maxEnd + MainPadding + MainBorder;
791
    var desiredBodyWidth = maxEnd + MainPadding + MainBorder * 2;
788
792
789
    var elementHeight = this._element.offsetHeight;
793
    var elementHeight = this._element.offsetHeight;
790
    this._element.style.width = "auto";
794
    this._element.style.width = "auto";
Lines 881-886 YearMonthController.prototype.attachTo = function(element) { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec3
881
    this._monthPopup.appendChild(this._monthPopupContents);
885
    this._monthPopup.appendChild(this._monthPopupContents);
882
    box.appendChild(this._monthPopup);
886
    box.appendChild(this._monthPopup);
883
    this._month = createElement("div", ClassNames.MonthSelector);
887
    this._month = createElement("div", ClassNames.MonthSelector);
888
    this._monthLabel = createElement("span");
889
    this._month.appendChild(this._monthLabel);
890
    var disclosureTriangle = createElement("span");
891
    disclosureTriangle.innerHTML = "<svg width='7' height='5'><polygon points='0,1 7,1 3.5,5' style='fill:#000000;' /></svg>";
892
    this._month.appendChild(disclosureTriangle);
884
    this._month.addEventListener("click", this._showPopup.bind(this), false);
893
    this._month.addEventListener("click", this._showPopup.bind(this), false);
885
    box.appendChild(this._month);
894
    box.appendChild(this._month);
886
895
Lines 894-906 YearMonthController.prototype.attachTo = function(element) { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec4
894
    var month = this.picker.maximumMonth;
903
    var month = this.picker.maximumMonth;
895
    var maxWidth = 0;
904
    var maxWidth = 0;
896
    for (var m = 0; m < 12; ++m) {
905
    for (var m = 0; m < 12; ++m) {
897
        this._month.textContent = month.toLocaleString();
906
        this._monthLabel.textContent = month.toLocaleString();
898
        maxWidth = Math.max(maxWidth, this._month.offsetWidth);
907
        maxWidth = Math.max(maxWidth, this._month.offsetWidth);
899
        month = month.previous();
908
        month = month.previous();
900
    }
909
    }
901
    if (getLanguage() == "ja" && ImperialEraLimit < this.picker.maximumMonth.year) {
910
    if (getLanguage() == "ja" && ImperialEraLimit < this.picker.maximumMonth.year) {
902
        for (var m = 0; m < 12; ++m) {
911
        for (var m = 0; m < 12; ++m) {
903
            this._month.textContent = new Month(ImperialEraLimit, m).toLocaleString();
912
            this._monthLabel.textContent = new Month(ImperialEraLimit, m).toLocaleString();
904
            maxWidth = Math.max(maxWidth, this._month.offsetWidth);
913
            maxWidth = Math.max(maxWidth, this._month.offsetWidth);
905
        }
914
        }
906
    }
915
    }
Lines 919-940 YearMonthController.prototype._attachLeftButtonsTo = function(parent) { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec5
919
    parent.appendChild(container);
928
    parent.appendChild(container);
920
929
921
    if (YearMonthController.addTenYearsButtons) {
930
    if (YearMonthController.addTenYearsButtons) {
922
        this._left3 = createElement("input", ClassNames.YearMonthButton);
931
        this._left3 = createElement("button", ClassNames.YearMonthButton);
923
        this._left3.type = "button";
932
        this._left3.textContent = "<<<";
924
        this._left3.value = "<<<";
925
        this._left3.addEventListener("click", this._handleButtonClick.bind(this), false);
933
        this._left3.addEventListener("click", this._handleButtonClick.bind(this), false);
926
        container.appendChild(this._left3);
934
        container.appendChild(this._left3);
927
    }
935
    }
928
936
929
    this._left2 = createElement("input", ClassNames.YearMonthButton);
937
    this._left2 = createElement("button", ClassNames.YearMonthButton);
930
    this._left2.type = "button";
938
    this._left2.innerHTML = "<svg width='9' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /><polygon points='5,3.5 9,7 9,0' style='fill:#6e6e6e;' /></svg>";
931
    this._left2.value = "<<";
932
    this._left2.addEventListener("click", this._handleButtonClick.bind(this), false);
939
    this._left2.addEventListener("click", this._handleButtonClick.bind(this), false);
933
    container.appendChild(this._left2);
940
    container.appendChild(this._left2);
934
941
935
    this._left1 = createElement("input", ClassNames.YearMonthButton);
942
    this._left1 = createElement("button", ClassNames.YearMonthButton);
936
    this._left1.type = "button";
943
    this._left1.innerHTML = "<svg width='4' height='7'><polygon points='0,3.5 4,7 4,0' style='fill:#6e6e6e;' /></svg>";
937
    this._left1.value = "<";
938
    this._left1.addEventListener("click", this._handleButtonClick.bind(this), false);
944
    this._left1.addEventListener("click", this._handleButtonClick.bind(this), false);
939
    container.appendChild(this._left1);
945
    container.appendChild(this._left1);
940
};
946
};
Lines 945-966 YearMonthController.prototype._attachLeftButtonsTo = function(parent) { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec6
945
YearMonthController.prototype._attachRightButtonsTo = function(parent) {
951
YearMonthController.prototype._attachRightButtonsTo = function(parent) {
946
    var container = createElement("div", ClassNames.YearMonthButtonRight);
952
    var container = createElement("div", ClassNames.YearMonthButtonRight);
947
    parent.appendChild(container);
953
    parent.appendChild(container);
948
    this._right1 = createElement("input", ClassNames.YearMonthButton);
954
    this._right1 = createElement("button", ClassNames.YearMonthButton);
949
    this._right1.type = "button";
955
    this._right1.innerHTML = "<svg width='4' height='7'><polygon points='0,7 0,0, 4,3.5' style='fill:#6e6e6e;' /></svg>";
950
    this._right1.value = ">";
951
    this._right1.addEventListener("click", this._handleButtonClick.bind(this), false);
956
    this._right1.addEventListener("click", this._handleButtonClick.bind(this), false);
952
    container.appendChild(this._right1);
957
    container.appendChild(this._right1);
953
958
954
    this._right2 = createElement("input", ClassNames.YearMonthButton);
959
    this._right2 = createElement("button", ClassNames.YearMonthButton);
955
    this._right2.type = "button";
960
    this._right2.innerHTML = "<svg width='9' height='7'><polygon points='4,3.5 0,7 0,0' style='fill:#6e6e6e;' /><polygon points='9,3.5 5,7 5,0' style='fill:#6e6e6e;' /></svg>";
956
    this._right2.value = ">>";
957
    this._right2.addEventListener("click", this._handleButtonClick.bind(this), false);
961
    this._right2.addEventListener("click", this._handleButtonClick.bind(this), false);
958
    container.appendChild(this._right2);
962
    container.appendChild(this._right2);
959
963
960
    if (YearMonthController.addTenYearsButtons) {
964
    if (YearMonthController.addTenYearsButtons) {
961
        this._right3 = createElement("input", ClassNames.YearMonthButton);
965
        this._right3 = createElement("button", ClassNames.YearMonthButton);
962
        this._right3.type = "button";
966
        this._right3.textContent = ">>>";
963
        this._right3.value = ">>>";
964
        this._right3.addEventListener("click", this._handleButtonClick.bind(this), false);
967
        this._right3.addEventListener("click", this._handleButtonClick.bind(this), false);
965
        container.appendChild(this._right3);
968
        container.appendChild(this._right3);
966
    }
969
    }
Lines 979-985 YearMonthController.prototype.setMonth = function(month) { a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec7
979
    this._right2.disabled = !this.picker.shouldShowMonth(new Month(monthValue + 2));
982
    this._right2.disabled = !this.picker.shouldShowMonth(new Month(monthValue + 2));
980
    if (this._right3)
983
    if (this._right3)
981
        this._left3.disabled = !this.picker.shouldShowMonth(new Month(monthValue + 13));
984
        this._left3.disabled = !this.picker.shouldShowMonth(new Month(monthValue + 13));
982
    this._month.innerText = month.toLocaleString();
985
    this._monthLabel.innerText = month.toLocaleString();
983
    while (this._monthPopupContents.hasChildNodes())
986
    while (this._monthPopupContents.hasChildNodes())
984
        this._monthPopupContents.removeChild(this._monthPopupContents.firstChild);
987
        this._monthPopupContents.removeChild(this._monthPopupContents.firstChild);
985
988
Lines 1149-1169 YearMonthController.NextTenYears = 120; a/Source/WebCore/Resources/pagepopups/calendarPicker.js_sec8
1149
 * @param {Event} event
1152
 * @param {Event} event
1150
 */
1153
 */
1151
YearMonthController.prototype._handleButtonClick = function(event) {
1154
YearMonthController.prototype._handleButtonClick = function(event) {
1152
    if (event.target == this._left3)
1155
    var button = enclosingNodeOrSelfWithClass(event.target, ClassNames.YearMonthButton);
1156
    if (button == this._left3)
1153
        this.moveRelatively(YearMonthController.PreviousTenYears);
1157
        this.moveRelatively(YearMonthController.PreviousTenYears);
1154
    else if (event.target == this._left2) {
1158
    else if (button == this._left2) {
1155
        this.picker.recordAction(CalendarPicker.Action.ClickedBackwardYearButton);
1159
        this.picker.recordAction(CalendarPicker.Action.ClickedBackwardYearButton);
1156
        this.moveRelatively(YearMonthController.PreviousYear);
1160
        this.moveRelatively(YearMonthController.PreviousYear);
1157
    } else if (event.target == this._left1) {
1161
    } else if (button == this._left1) {
1158
        this.picker.recordAction(CalendarPicker.Action.ClickedBackwardMonthButton);
1162
        this.picker.recordAction(CalendarPicker.Action.ClickedBackwardMonthButton);
1159
        this.moveRelatively(YearMonthController.PreviousMonth);
1163
        this.moveRelatively(YearMonthController.PreviousMonth);
1160
    } else if (event.target == this._right1) {
1164
    } else if (button == this._right1) {
1161
        this.picker.recordAction(CalendarPicker.Action.ClickedForwardMonthButton);
1165
        this.picker.recordAction(CalendarPicker.Action.ClickedForwardMonthButton);
1162
        this.moveRelatively(YearMonthController.NextMonth)
1166
        this.moveRelatively(YearMonthController.NextMonth)
1163
    } else if (event.target == this._right2) {
1167
    } else if (button == this._right2) {
1164
        this.picker.recordAction(CalendarPicker.Action.ClickedForwardYearButton);
1168
        this.picker.recordAction(CalendarPicker.Action.ClickedForwardYearButton);
1165
        this.moveRelatively(YearMonthController.NextYear);
1169
        this.moveRelatively(YearMonthController.NextYear);
1166
    } else if (event.target == this._right3)
1170
    } else if (button == this._right3)
1167
        this.moveRelatively(YearMonthController.NextTenYears);
1171
        this.moveRelatively(YearMonthController.NextTenYears);
1168
    else
1172
    else
1169
        return;
1173
        return;
- a/Source/WebCore/Resources/pagepopups/calendarPickerMac.css -49 lines
Lines 1-49 a/Source/WebCore/Resources/pagepopups/calendarPickerMac.css_sec1
1
/*
2
 * Copyright (C) 2012 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
.year-month-button {
32
    -webkit-appearance: none;
33
    background: -webkit-gradient(linear, left top, left bottom, from(#fff), color-stop(0.3, #fff), color-stop(0.35, #f7f7f7), color-stop(0.49, #f7f7f7), color-stop(0.5, #ededed), to(#ededed));
34
    border: solid 1px #a6a6a6;
35
    border-radius: 4px;
36
    box-shadow: inset 1px 1px 1px rgba(255,255,255,0.4), inset -1px -1px 1px rgba(255,255,255,0.4);
37
    padding-left: 3px;
38
    padding-right: 3px;
39
}
40
41
.year-month-button:active {
42
    background: -webkit-gradient(linear, left top, left bottom, from(#a3bfef), color-stop(0.49,  #6ba3ef), color-stop(0.5, #4491ef), to(#a3d1ef));
43
    border: solid 1px #4d4d50;
44
}
45
46
.year-month-button:disabled {
47
    color: #888;
48
    border: solid 1px #d1d1d1;
49
}
- a/Source/WebCore/Resources/pagepopups/chromium/calendarPickerChromium.css +14 lines
Line 0 a/Source/WebCore/Resources/pagepopups/chromium/calendarPickerChromium.css_sec1
1
.year-month-button {
2
    width: 24px;
3
    height: 24px;
4
    min-width: 0;
5
    padding: 0;
6
}
7
8
.days-area-container:focus {
9
    -webkit-transition: border-color 200ms;
10
    /* We use border color because it follows the border radius (unlike outline).
11
    * This is particularly noticeable on mac. */
12
    border-color: -webkit-focus-ring-color;
13
    outline: none;
14
}
- a/Source/WebCore/Resources/pagepopups/chromium/pickerCommonChromium.css +46 lines
Line 0 a/Source/WebCore/Resources/pagepopups/chromium/pickerCommonChromium.css_sec1
1
input[type='button'],
2
button {
3
    -webkit-appearance: none;
4
    -webkit-user-select: none;
5
    background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
6
    border: 1px solid rgba(0, 0, 0, 0.25);
7
    border-radius: 2px;
8
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08),
9
    inset 0 1px 2px rgba(255, 255, 255, 0.75);
10
    color: #444;
11
    font: inherit;
12
    text-shadow: 0 1px 0 rgb(240, 240, 240);
13
    min-height: 2em;
14
    min-width: 4em;
15
    -webkit-padding-end: 10px;
16
    -webkit-padding-start: 10px;
17
    margin: 0;
18
}
19
20
:enabled:hover:-webkit-any(button, input[type='button']) {
21
    background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
22
    border-color: rgba(0, 0, 0, 0.3);
23
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95);
24
    color: black;
25
}
26
27
:enabled:active:-webkit-any(button, input[type='button']) {
28
    background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
29
    box-shadow: none;
30
    text-shadow: none;
31
}
32
33
:disabled:-webkit-any(button, input[type='button']) {
34
    background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
35
    border-color: rgba(80, 80, 80, 0.2);
36
    box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
37
    color: #aaa;
38
}
39
40
:enabled:focus:-webkit-any(button, input[type='button']) {
41
    -webkit-transition: border-color 200ms;
42
    /* We use border color because it follows the border radius (unlike outline).
43
    * This is particularly noticeable on mac. */
44
    border-color: -webkit-focus-ring-color;
45
    outline: none;
46
}
- a/Source/WebCore/WebCore.gyp/WebCore.gyp -21 / +2 lines
Lines 971-976 a/Source/WebCore/WebCore.gyp/WebCore.gyp_sec1
971
          'inputs': [
971
          'inputs': [
972
            '../Resources/pagepopups/calendarPicker.css',
972
            '../Resources/pagepopups/calendarPicker.css',
973
            '../Resources/pagepopups/calendarPicker.js',
973
            '../Resources/pagepopups/calendarPicker.js',
974
            '../Resources/pagepopups/chromium/calendarPickerChromium.css',
975
            '../Resources/pagepopups/chromium/pickerCommonChromium.css',
974
            '../Resources/pagepopups/suggestionPicker.css',
976
            '../Resources/pagepopups/suggestionPicker.css',
975
            '../Resources/pagepopups/suggestionPicker.js',
977
            '../Resources/pagepopups/suggestionPicker.js',
976
          ],
978
          ],
Lines 988-1011 a/Source/WebCore/WebCore.gyp/WebCore.gyp_sec2
988
          ],
990
          ],
989
        },
991
        },
990
        {
992
        {
991
          'action_name': 'CalendarPickerMac',
992
          'inputs': [
993
            '../Resources/pagepopups/calendarPickerMac.css',
994
          ],
995
          'outputs': [
996
            '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
997
            '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
998
          ],
999
          'action': [
1000
            'python',
1001
            '../make-file-arrays.py',
1002
            '--condition=ENABLE(CALENDAR_PICKER)',
1003
            '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
1004
            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
1005
            '<@(_inputs)',
1006
          ],
1007
        },
1008
        {
1009
          'action_name': 'ColorSuggestionPicker',
993
          'action_name': 'ColorSuggestionPicker',
1010
          'inputs': [
994
          'inputs': [
1011
            '../Resources/pagepopups/colorSuggestionPicker.css',
995
            '../Resources/pagepopups/colorSuggestionPicker.css',
Lines 1348-1356 a/Source/WebCore/WebCore.gyp/WebCore.gyp_sec3
1348
          'include_dirs': [
1332
          'include_dirs': [
1349
            '<(chromium_src_dir)/third_party/apple_webkit',
1333
            '<(chromium_src_dir)/third_party/apple_webkit',
1350
          ],
1334
          ],
1351
          'sources': [
1352
            '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
1353
          ],
1354
        }],
1335
        }],
1355
        ['OS=="win"', {
1336
        ['OS=="win"', {
1356
          'defines': [
1337
          'defines': [
- a/Source/WebCore/rendering/RenderTheme.cpp -7 lines
Lines 632-644 Color RenderTheme::platformInactiveListBoxSelectionForegroundColor() const a/Source/WebCore/rendering/RenderTheme.cpp_sec1
632
    return platformInactiveSelectionForegroundColor();
632
    return platformInactiveSelectionForegroundColor();
633
}
633
}
634
634
635
#if ENABLE(CALENDAR_PICKER)
636
CString RenderTheme::extraCalendarPickerStyleSheet()
637
{
638
    return CString();
639
}
640
#endif
641
642
int RenderTheme::baselinePosition(const RenderObject* o) const
635
int RenderTheme::baselinePosition(const RenderObject* o) const
643
{
636
{
644
    if (!o->isBox())
637
    if (!o->isBox())
- a/Source/WebCore/rendering/RenderTheme.h -3 lines
Lines 95-103 public: a/Source/WebCore/rendering/RenderTheme.h_sec1
95
#if ENABLE(FULLSCREEN_API)
95
#if ENABLE(FULLSCREEN_API)
96
    virtual String extraFullScreenStyleSheet() { return String(); };
96
    virtual String extraFullScreenStyleSheet() { return String(); };
97
#endif
97
#endif
98
#if ENABLE(CALENDAR_PICKER)
99
    virtual CString extraCalendarPickerStyleSheet();
100
#endif
101
98
102
    // A method to obtain the baseline position for a "leaf" control.  This will only be used if a baseline
99
    // A method to obtain the baseline position for a "leaf" control.  This will only be used if a baseline
103
    // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
100
    // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
- a/Source/WebCore/rendering/RenderThemeChromiumMac.h -3 lines
Lines 74-82 private: a/Source/WebCore/rendering/RenderThemeChromiumMac.h_sec1
74
#if ENABLE(DATALIST_ELEMENT)
74
#if ENABLE(DATALIST_ELEMENT)
75
    virtual LayoutUnit sliderTickSnappingThreshold() const OVERRIDE;
75
    virtual LayoutUnit sliderTickSnappingThreshold() const OVERRIDE;
76
#endif
76
#endif
77
#if ENABLE(CALENDAR_PICKER)
78
    virtual CString extraCalendarPickerStyleSheet() OVERRIDE;
79
#endif
80
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
77
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
81
    virtual bool supportsCalendarPicker(const AtomicString& type) const OVERRIDE;
78
    virtual bool supportsCalendarPicker(const AtomicString& type) const OVERRIDE;
82
#endif
79
#endif
- a/Source/WebCore/rendering/RenderThemeChromiumMac.mm -8 lines
Lines 20-26 a/Source/WebCore/rendering/RenderThemeChromiumMac.mm_sec1
20
20
21
#import "config.h"
21
#import "config.h"
22
22
23
#import "CalendarPickerMac.h"
24
#import "LayoutTestSupport.h"
23
#import "LayoutTestSupport.h"
25
#import "LocalCurrentGraphicsContext.h"
24
#import "LocalCurrentGraphicsContext.h"
26
#import "RenderThemeChromiumMac.h"
25
#import "RenderThemeChromiumMac.h"
Lines 182-194 LayoutUnit RenderThemeChromiumMac::sliderTickSnappingThreshold() const a/Source/WebCore/rendering/RenderThemeChromiumMac.mm_sec2
182
}
181
}
183
#endif
182
#endif
184
183
185
#if ENABLE(CALENDAR_PICKER)
186
CString RenderThemeChromiumMac::extraCalendarPickerStyleSheet()
187
{
188
    return CString(calendarPickerMacCss, WTF_ARRAY_LENGTH(calendarPickerMacCss));
189
}
190
#endif
191
192
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
184
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
193
bool RenderThemeChromiumMac::supportsCalendarPicker(const AtomicString& type) const
185
bool RenderThemeChromiumMac::supportsCalendarPicker(const AtomicString& type) const
194
{
186
{
- a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp -3 / +2 lines
Lines 120-130 void DateTimeChooserImpl::writeDocument(WebCore::DocumentWriter& writer) a/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp_sec1
120
120
121
    addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
121
    addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer);
122
    writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss));
122
    writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss));
123
    writer.addData(WebCore::pickerCommonChromiumCss, sizeof(WebCore::pickerCommonChromiumCss));
123
    writer.addData(WebCore::suggestionPickerCss, sizeof(WebCore::suggestionPickerCss));
124
    writer.addData(WebCore::suggestionPickerCss, sizeof(WebCore::suggestionPickerCss));
124
    writer.addData(WebCore::calendarPickerCss, sizeof(WebCore::calendarPickerCss));
125
    writer.addData(WebCore::calendarPickerCss, sizeof(WebCore::calendarPickerCss));
125
    CString extraStyle = WebCore::RenderTheme::defaultTheme()->extraCalendarPickerStyleSheet();
126
    writer.addData(WebCore::calendarPickerChromiumCss, sizeof(WebCore::calendarPickerChromiumCss));
126
    if (extraStyle.length())
127
        writer.addData(extraStyle.data(), extraStyle.length());
128
    addString("</style></head><body><div id=main>Loading...</div><script>\n"
127
    addString("</style></head><body><div id=main>Loading...</div><script>\n"
129
               "window.dialogArguments = {\n", writer);
128
               "window.dialogArguments = {\n", writer);
130
    addProperty("anchorRectInScreen", anchorRectInScreen, writer);
129
    addProperty("anchorRectInScreen", anchorRectInScreen, writer);
- a/LayoutTests/ChangeLog +16 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2013-01-21  Keishi Hattori  <keishi@webkit.org>
2
3
        Adjust design of the Calendar Picker
4
        https://bugs.webkit.org/show_bug.cgi?id=107507
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-expected.png:
9
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png:
10
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png:
11
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/month-picker-appearance-expected.png:
12
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/month-picker-appearance-step-expected.png:
13
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.png:
14
        * platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.png:
15
        * platform/chromium/TestExpectations: Marking calendar picker appearance tests as needing rebaseline.
16
1
2013-01-21  Noel Gordon  <noel.gordon@gmail.com>
17
2013-01-21  Noel Gordon  <noel.gordon@gmail.com>
2
18
3
        [chromium] Update webaudio/realtimeanalyser-fft-sizing.html expectation on Win
19
        [chromium] Update webaudio/realtimeanalyser-fft-sizing.html expectation on Win
- a/LayoutTests/platform/chromium/TestExpectations +9 lines
Lines 4261-4266 webkit.org/b/106426 [ Win ] inspector/geolocation-success.html [ Failure Pass ] a/LayoutTests/platform/chromium/TestExpectations_sec1
4261
webkit.org/b/106426 [ Win ] inspector/geolocation-watchPosition.html [ Failure Pass ]
4261
webkit.org/b/106426 [ Win ] inspector/geolocation-watchPosition.html [ Failure Pass ]
4262
crbug.com/166932 [ Debug ] plugins/embed-attributes-setting.html [ Crash Pass ]
4262
crbug.com/166932 [ Debug ] plugins/embed-attributes-setting.html [ Crash Pass ]
4263
4263
4264
# Needs rebaseline.
4265
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step.html [ ImageOnlyFailure Pass ]
4266
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/week-picker-appearance.html [ ImageOnlyFailure Pass ]
4267
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru.html [ ImageOnlyFailure Pass ]
4268
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/month-picker-appearance-step.html [ ImageOnlyFailure Pass ]
4269
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/month-picker-appearance.html [ ImageOnlyFailure Pass ]
4270
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step.html [ ImageOnlyFailure Pass ]
4271
webkit.org/b/107508 platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance.html [ ImageOnlyFailure Pass ]
4272
                    
4264
# Broken by Skia flag changes in r139445
4273
# Broken by Skia flag changes in r139445
4265
crbug.com/169550 [ Debug ] fast/lists/big-list-marker.html [ Crash ]
4274
crbug.com/169550 [ Debug ] fast/lists/big-list-marker.html [ Crash ]
4266
crbug.com/169550 [ Debug ] platform/chromium/virtual/deferred/fast/images/icon-decoding.html [ Crash ]
4275
crbug.com/169550 [ Debug ] platform/chromium/virtual/deferred/fast/images/icon-decoding.html [ Crash ]
- a/ChangeLog +9 lines
Lines 1-3 a/ChangeLog_sec1
1
2013-01-21  Keishi Hattori  <keishi@webkit.org>
2
3
        Adjust design of the Calendar Picker
4
        https://bugs.webkit.org/show_bug.cgi?id=107507
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * ManualTests/forms/calendar-picker.html: Use pickerCommonChromium.css and calendarPickerChromium.css.
9
1
2013-01-21  Dirk Schulze  <dschulze@adobe.com>
10
2013-01-21  Dirk Schulze  <dschulze@adobe.com>
2
11
3
        Add build flag for Canvas's Path object (disabled by default)
12
        Add build flag for Canvas's Path object (disabled by default)
- a/ManualTests/forms/calendar-picker.html +9 lines
Lines 262-267 function openCalendar(args) { a/ManualTests/forms/calendar-picker.html_sec1
262
    commonCssLink.rel = 'stylesheet';
262
    commonCssLink.rel = 'stylesheet';
263
    commonCssLink.href = '../../Source/WebCore/Resources/pagepopups/pickerCommon.css?' + (new Date()).getTime();
263
    commonCssLink.href = '../../Source/WebCore/Resources/pagepopups/pickerCommon.css?' + (new Date()).getTime();
264
    doc.head.appendChild(commonCssLink);
264
    doc.head.appendChild(commonCssLink);
265
    var commonChromiumCssLink = doc.createElement('link');
266
    commonChromiumCssLink.rel = 'stylesheet';
267
    commonChromiumCssLink.href = '../../Source/WebCore/Resources/pagepopups/chromium/pickerCommonChromium.css?' + (new Date()).getTime();
268
    doc.head.appendChild(commonChromiumCssLink);
265
    var suggestionPickerCssLink = doc.createElement('link');
269
    var suggestionPickerCssLink = doc.createElement('link');
266
    suggestionPickerCssLink.rel = 'stylesheet';
270
    suggestionPickerCssLink.rel = 'stylesheet';
267
    suggestionPickerCssLink.href = '../../Source/WebCore/Resources/pagepopups/suggestionPicker.css?' + (new Date()).getTime();
271
    suggestionPickerCssLink.href = '../../Source/WebCore/Resources/pagepopups/suggestionPicker.css?' + (new Date()).getTime();
Lines 270-275 function openCalendar(args) { a/ManualTests/forms/calendar-picker.html_sec2
270
    link.rel = 'stylesheet';
274
    link.rel = 'stylesheet';
271
    link.href = '../../Source/WebCore/Resources/pagepopups/calendarPicker.css?' + (new Date()).getTime();
275
    link.href = '../../Source/WebCore/Resources/pagepopups/calendarPicker.css?' + (new Date()).getTime();
272
    doc.head.appendChild(link);
276
    doc.head.appendChild(link);
277
    var calendarPickerChromiumCssLink = doc.createElement('link');
278
    calendarPickerChromiumCssLink.rel = 'stylesheet';
279
    calendarPickerChromiumCssLink.href = '../../Source/WebCore/Resources/pagepopups/chromium/calendarPickerChromium.css?' + (new Date()).getTime();
280
    doc.head.appendChild(calendarPickerChromiumCssLink);
273
    var commonJsScript = doc.createElement('script');
281
    var commonJsScript = doc.createElement('script');
274
    commonJsScript.src = '../../Source/WebCore/Resources/pagepopups/pickerCommon.js?' + (new Date()).getTime();
282
    commonJsScript.src = '../../Source/WebCore/Resources/pagepopups/pickerCommon.js?' + (new Date()).getTime();
275
    doc.body.appendChild(commonJsScript);
283
    doc.body.appendChild(commonJsScript);
Lines 291-296 function openCalendar(args) { a/ManualTests/forms/calendar-picker.html_sec3
291
                return numString.toLocaleString();
299
                return numString.toLocaleString();
292
            return numString.toString();
300
            return numString.toString();
293
        },
301
        },
302
        histogramEnumeration: function() {},
294
        formatMonth: function(year, zeroBaseMonth) {
303
        formatMonth: function(year, zeroBaseMonth) {
295
            var monthLabels = ['<January>', '<February>', '<March>', '<April>', '<May>', '<June>',
304
            var monthLabels = ['<January>', '<February>', '<March>', '<April>', '<May>', '<June>',
296
                               '<July>', '<August>', '<September>', '<October>', '<November>', '<December>'];
305
                               '<July>', '<August>', '<September>', '<October>', '<November>', '<December>'];

Return to Bug 107507