Bug 110454 - Add methods to date types for new calendar picker
Summary: Add methods to date types for new calendar picker
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keishi Hattori
URL:
Keywords:
Depends on:
Blocks: 109439
  Show dependency treegraph
 
Reported: 2013-02-21 03:41 PST by Keishi Hattori
Modified: 2013-02-24 08:44 PST (History)
2 users (show)

See Also:


Attachments
Patch (53.07 KB, patch)
2013-02-21 03:58 PST, Keishi Hattori
no flags Details | Formatted Diff | Diff
Patch (51.62 KB, patch)
2013-02-21 20:32 PST, Keishi Hattori
no flags Details | Formatted Diff | Diff
Patch (51.59 KB, patch)
2013-02-22 03:34 PST, Keishi Hattori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keishi Hattori 2013-02-21 03:41:22 PST
Add methods to date types for new calendar picker
Comment 1 Keishi Hattori 2013-02-21 03:58:48 PST
Created attachment 189505 [details]
Patch
Comment 2 Kent Tamura 2013-02-21 06:49:16 PST
Comment on attachment 189505 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=189505&action=review

> Source/WebCore/Resources/pagepopups/calendarPicker.js:224
>      this.year = dateObject.getUTCFullYear();    
>      this.month = dateObject.getUTCMonth();
>      this.date = dateObject.getUTCDate();

Data members should have JsDoc comments in the constructor.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:249
> + * @param {!number} value
> + * @return {!Day}
> + */
> +Day.createFromValue = function(value) {

'value' has almost no information.   It should be 'milliseconds' or something.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:268
> +    return day.copy();

Can we just return this?
AFAIK, Day objects are immutable, right?

> Source/WebCore/Resources/pagepopups/calendarPicker.js:332
> +    return this.copy();

Ditto.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:339
> +    return this.copy();

Ditto.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:346
> +    return this.copy();

Ditto.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:389
> +    this.year = year;
> +    this.week = week;

Data members should have JsDoc comments in the constructor.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:487
> +        return Day.Minimum.copy();

Do we need to copy?

> Source/WebCore/Resources/pagepopups/calendarPicker.js:616
> +    this.year = year + Math.floor(month / MonthsPerYear);
> +    this.month = month % MonthsPerYear < 0 ? month % MonthsPerYear + MonthsPerYear : month % MonthsPerYear;

Data members should have JsDoc comments in the constructor.

> Source/WebCore/Resources/pagepopups/calendarPicker.js:642
> + * @param {!number} value

Need more meaningful name.  monthsSinceEpoch?

> Source/WebCore/Resources/pagepopups/calendarPicker.js:752
> +        return Day.Maximum.copy();

Do we need to copy?
Comment 3 Keishi Hattori 2013-02-21 20:32:59 PST
Created attachment 189667 [details]
Patch
Comment 4 Kent Tamura 2013-02-21 23:03:05 PST
Comment on attachment 189667 [details]
Patch

ok
Comment 5 Keishi Hattori 2013-02-22 03:34:40 PST
Created attachment 189735 [details]
Patch
Comment 6 WebKit Review Bot 2013-02-22 05:23:10 PST
Comment on attachment 189735 [details]
Patch

Rejecting attachment 189735 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=gce-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 189735, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:

fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Failed to run "['Tools/Scripts/update-webkit', '--chromium', '--force-update']" exit_code: 2

Updating OpenSource
fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Failed to run "['Tools/Scripts/update-webkit', '--chromium', '--force-update']" exit_code: 2
Updating OpenSource
fatal: read error: Connection reset by peer
Died at Tools/Scripts/update-webkit line 151.

Full output: http://queues.webkit.org/results/16700795
Comment 7 WebKit Review Bot 2013-02-24 08:44:30 PST
Comment on attachment 189735 [details]
Patch

Clearing flags on attachment: 189735

Committed r143867: <http://trac.webkit.org/changeset/143867>
Comment 8 WebKit Review Bot 2013-02-24 08:44:33 PST
All reviewed patches have been landed.  Closing bug.