Bug 98228

Summary: Refactoring: DateTimeEditBuilder had better hold LayoutParameters
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: haraken, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 98227    
Attachments:
Description Flags
Patch haraken: review+

Description Kent Tamura 2012-10-02 20:51:12 PDT
Refactoring: DateTimeEditBuilder had better hold LayoutParameters
Comment 1 Kent Tamura 2012-10-02 21:05:28 PDT
Created attachment 166803 [details]
Patch
Comment 2 Kentaro Hara 2012-10-02 21:11:31 PDT
Comment on attachment 166803 [details]
Patch

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

Looks OK.

> Source/WebCore/ChangeLog:9
> +        constructor. This change improves code size and runtime cost.

This change increases the size of a DateTimeEditBuilder object. I don't think this is a big deal, but please just keep it in mind:

Before:
const StepRange m_stepRange;
Localizer& m_localizer;
const String m_placeholderForDay;
const String m_placeholderForMonth;
const String m_placeholderForYear;

After:
String dateTimeFormat;
String fallbackDateTimeFormat;
Localizer& localizer;
const StepRange stepRange;
String placeholderForMonth;
String placeholderForYear;

> Source/WebCore/ChangeLog:19
> +        Add m_parmaeters.

Typo: m_parmaeters
Comment 3 Kent Tamura 2012-10-02 21:18:13 PDT
Comment on attachment 166803 [details]
Patch

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

>> Source/WebCore/ChangeLog:9
>> +        constructor. This change improves code size and runtime cost.
> 
> This change increases the size of a DateTimeEditBuilder object. I don't think this is a big deal, but please just keep it in mind:
> 
> Before:
> const StepRange m_stepRange;
> Localizer& m_localizer;
> const String m_placeholderForDay;
> const String m_placeholderForMonth;
> const String m_placeholderForYear;
> 
> After:
> String dateTimeFormat;
> String fallbackDateTimeFormat;
> Localizer& localizer;
> const StepRange stepRange;
> String placeholderForMonth;
> String placeholderForYear;

No. m_parameters is a const reference, which is equivalent to one pointer internally.

>> Source/WebCore/ChangeLog:19
>> +        Add m_parmaeters.
> 
> Typo: m_parmaeters

oops. will fix.
Comment 4 Kentaro Hara 2012-10-02 21:19:27 PDT
(In reply to comment #3)
> (From update of attachment 166803 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=166803&action=review
> 
> No. m_parameters is a const reference, which is equivalent to one pointer internally.

Ah, got it.
Comment 5 Kent Tamura 2012-10-02 21:30:24 PDT
Committed r130246: <http://trac.webkit.org/changeset/130246>