Bug 137354

Summary: TextRun::length() should return an unsigned
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, d-r, esprehn+autocc, fmalita, glenn, gyuyoung.kim, jonlee, koivisto, kondapallykalyan, pdr, schenney, sergio, simon.fraser, thorton, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch koivisto: review+

Description Myles C. Maxfield 2014-10-02 12:53:28 PDT
TextRun::length() should return an unsigned
Comment 1 Myles C. Maxfield 2014-10-02 13:03:26 PDT
Created attachment 239131 [details]
Patch
Comment 2 Myles C. Maxfield 2014-10-02 15:57:45 PDT
Created attachment 239149 [details]
Patch
Comment 3 Myles C. Maxfield 2014-10-02 16:12:22 PDT
Created attachment 239150 [details]
Patch
Comment 4 Antti Koivisto 2014-10-03 01:53:37 PDT
Comment on attachment 239150 [details]
Patch

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

> Source/WebCore/platform/graphics/GlyphBuffer.h:127
> +    static const unsigned kNoOffset = UINT_MAX;

You could drop the initial 'k'. That doesn't match our current style. 
Using std::numeric_limits<unsigned>::max() would be more stylish than UINT_MAX.
Comment 5 Myles C. Maxfield 2014-10-03 09:22:31 PDT
Comment on attachment 239150 [details]
Patch

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

>> Source/WebCore/platform/graphics/GlyphBuffer.h:127
>> +    static const unsigned kNoOffset = UINT_MAX;
> 
> You could drop the initial 'k'. That doesn't match our current style. 
> Using std::numeric_limits<unsigned>::max() would be more stylish than UINT_MAX.

The Microsoft compiler doesn't support constexpr, which means that it errors when it sees something that looks like a function here :( Originally it was std::numeric_limits<unsigned>::max() but I had to change it when the windows EFL bot went red.
Comment 6 Myles C. Maxfield 2014-10-03 09:30:36 PDT
Comment on attachment 239150 [details]
Patch

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

>>> Source/WebCore/platform/graphics/GlyphBuffer.h:127
>>> +    static const unsigned kNoOffset = UINT_MAX;
>> 
>> You could drop the initial 'k'. That doesn't match our current style. 
>> Using std::numeric_limits<unsigned>::max() would be more stylish than UINT_MAX.
> 
> The Microsoft compiler doesn't support constexpr, which means that it errors when it sees something that looks like a function here :( Originally it was std::numeric_limits<unsigned>::max() but I had to change it when the windows EFL bot went red.

***Windows EWS bot
Comment 7 Myles C. Maxfield 2014-10-03 09:57:44 PDT
http://trac.webkit.org/changeset/174269
Comment 8 Brent Fulgham 2014-10-03 10:56:55 PDT
Windows build fix checked in under <http://trac.webkit.org/changeset/174272>.