Bug 83990 - Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
Summary: Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Major
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 53961
  Show dependency treegraph
 
Reported: 2012-04-14 18:54 PDT by Kent Tamura
Modified: 2019-05-02 16:24 PDT (History)
3 users (show)

See Also:


Attachments
Screenshot with firstDayOfWeek()==1 (Monday) (30.08 KB, image/png)
2012-04-14 18:54 PDT, Kent Tamura
no flags Details
Patch (2.80 KB, patch)
2012-04-14 19:29 PDT, Kent Tamura
haraken: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-04-14 18:54:17 PDT
Created attachment 137224 [details]
Screenshot with firstDayOfWeek()==1 (Monday)

Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
Comment 1 Kent Tamura 2012-04-14 19:29:11 PDT
Created attachment 137226 [details]
Patch
Comment 2 Kentaro Hara 2012-04-14 20:17:02 PDT
Comment on attachment 137226 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        We passed the "weekStartDay" proerty value as a

Nit: *property*

> Source/WebCore/html/shadow/CalendarPickerElement.cpp:163
> +static void addProperty(const char* name, unsigned value, DocumentWriter& writer)

I've not yet confirmed the spec, but should this be unsigned or int? What should happen if we pass a negative value for weekStartDay?
Comment 3 Kentaro Hara 2012-04-14 20:19:14 PDT
Comment on attachment 137226 [details]
Patch

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

> Source/WebCore/html/shadow/CalendarPickerElement.cpp:208
> +    addProperty("weekStartDay", firstDayOfWeek(), writer);

Nit: BTW, maybe we can rename firstDayOfWeek() to weekStartDay() in another patch.
Comment 4 Kent Tamura 2012-04-14 20:24:43 PDT
Comment on attachment 137226 [details]
Patch

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

>> Source/WebCore/ChangeLog:8
>> +        We passed the "weekStartDay" proerty value as a
> 
> Nit: *property*

will fix

>> Source/WebCore/html/shadow/CalendarPickerElement.cpp:163
>> +static void addProperty(const char* name, unsigned value, DocumentWriter& writer)
> 
> I've not yet confirmed the spec, but should this be unsigned or int? What should happen if we pass a negative value for weekStartDay?

This should be unsigned because WebCore::firstDayOfWeek() is unsigned. We need no signed numbers for now.
Comment 5 Kent Tamura 2012-04-14 20:32:04 PDT
Committed r114210: <http://trac.webkit.org/changeset/114210>