Bug 83990

Summary: Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Major CC: haraken, morrita, sherlockholmesthegamechanger
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 53961    
Attachments:
Description Flags
Screenshot with firstDayOfWeek()==1 (Monday)
none
Patch haraken: review+

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>