WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101449
Implement week picking to calendar picker
https://bugs.webkit.org/show_bug.cgi?id=101449
Summary
Implement week picking to calendar picker
Keishi Hattori
Reported
2012-11-07 04:53:18 PST
Implement week picking to calendar picker
Attachments
Patch
(30.81 KB, patch)
2012-11-07 05:29 PST
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(38.00 KB, patch)
2012-11-07 20:49 PST
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(36.73 KB, patch)
2012-11-07 21:24 PST
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(34.51 KB, patch)
2012-11-07 21:49 PST
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2012-11-07 05:29:07 PST
Created
attachment 172767
[details]
Patch
WebKit Review Bot
Comment 2
2012-11-07 06:22:09 PST
Comment on
attachment 172767
[details]
Patch
Attachment 172767
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14760349
New failing tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-mouse-operations.html
Kent Tamura
Comment 3
2012-11-07 17:55:22 PST
Comment on
attachment 172767
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=172767&action=review
> Source/WebCore/ChangeLog:45 > + (DaysTable.prototype._handleKey): Refactored to share the same structure as subclasses. > + (MonthPickerDaysTable.prototype._handleKey):
Would you make another patch for the refactoring of existing _handleKey please?
> Source/WebCore/Resources/pagepopups/calendarPicker.css:236 > +.week-mode .available.day-selected.monday {
Inconsistent space before '.'
> Source/WebCore/Resources/pagepopups/calendarPicker.css:262 > +.week-mode .week-column.unavailable.day-selected {
two spaces before '.'
> Source/WebCore/Resources/pagepopups/calendarPicker.js:200 > + var week = Week.parse(dateString); > + if (week) > + return week;
Need to update the jsdoc annotation.
> Source/WebCore/Resources/pagepopups/calendarPicker.js:333 > + var week = Week.createFromDate(new Date(arguments[0]));
arguments[0] is inconsistent. it should be valueOrWeekOrYear.
> Source/WebCore/Resources/pagepopups/calendarPicker.js:407 > + var MillisecondsPerWeek = 7 * 24 * 60 * 60 * 1000; > + return Math.floor((createUTCDate(year + 1, 0, 4).getTime() - Week.weekOneStartDateForYear(year)) / MillisecondsPerWeek);
This calculation appears in Week.createFromDate too. Please consider introducing another function.
> Source/WebCore/Resources/pagepopups/calendarPicker.js:1428 > + * @param {!boolean} keepSelectionPosition > * @return {!boolean} > */ > -DaysTable.prototype._maybeSetPreviousMonth = function() { > +DaysTable.prototype._maybeSetPreviousMonth = function(keepSelectionPosition) {
Boolean argument is not good for readability. Please provide a wrapper function, or an enum. Also, I think keepSelectionPosition argument should be optional in order to avoid existing callsites.
Kent Tamura
Comment 4
2012-11-07 17:57:56 PST
> Also, I think keepSelectionPosition argument should be optional in order to avoid existing callsites.
avoid updating existing callsites.
Keishi Hattori
Comment 5
2012-11-07 20:49:22 PST
Created
attachment 172924
[details]
Patch
Keishi Hattori
Comment 6
2012-11-07 20:51:07 PST
Comment on
attachment 172767
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=172767&action=review
>> Source/WebCore/Resources/pagepopups/calendarPicker.css:236 >> +.week-mode .available.day-selected.monday { > > Inconsistent space before '.'
I'm not sure what you mean.
Kent Tamura
Comment 7
2012-11-07 21:04:10 PST
Comment on
attachment 172767
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=172767&action=review
>>> Source/WebCore/Resources/pagepopups/calendarPicker.css:236 >>> +.week-mode .available.day-selected.monday { >> >> Inconsistent space before '.' > > I'm not sure what you mean.
Please ignore this comment. I though you meant .week-mode.available.day-selected.monday or .week-mode .available .day-selected .monday But your code is correct.
Kent Tamura
Comment 8
2012-11-07 21:13:34 PST
(In reply to
comment #3
)
> > Source/WebCore/ChangeLog:45 > > + (DaysTable.prototype._handleKey): Refactored to share the same structure as subclasses. > > + (MonthPickerDaysTable.prototype._handleKey): > > Would you make another patch for the refactoring of existing _handleKey please?
Don't you want to separate the patch?
Keishi Hattori
Comment 9
2012-11-07 21:24:05 PST
Created
attachment 172927
[details]
Patch
Keishi Hattori
Comment 10
2012-11-07 21:49:21 PST
Created
attachment 172929
[details]
Patch
Keishi Hattori
Comment 11
2012-11-07 21:50:29 PST
(In reply to
comment #8
)
> (In reply to
comment #3
) > > > Source/WebCore/ChangeLog:45 > > > + (DaysTable.prototype._handleKey): Refactored to share the same structure as subclasses. > > > + (MonthPickerDaysTable.prototype._handleKey): > > > > Would you make another patch for the refactoring of existing _handleKey please? > > Don't you want to separate the patch?
OK. I removed all changes to _handleKey.
Kent Tamura
Comment 12
2012-11-07 22:14:13 PST
Comment on
attachment 172929
[details]
Patch ok. Please don't forget smaller patches are better. Time to review a patch is superlinear. In this case, you can split the DaysTable.prototype.navigateToMonth argument change to another patch, and it would make this focus on the week support.
WebKit Review Bot
Comment 13
2012-11-07 22:36:26 PST
Comment on
attachment 172929
[details]
Patch Clearing flags on attachment: 172929 Committed
r133850
: <
http://trac.webkit.org/changeset/133850
>
WebKit Review Bot
Comment 14
2012-11-07 22:36:30 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug