Bug 130985

Summary: ThemeMac should use std::array instead of IntSize* for control sizes
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Beth Dakin 2014-03-31 13:40:43 PDT
This bug is meant to address https://bugs.webkit.org/show_bug.cgi?id=130915#c2

ThemeMac should use std::array instead of IntSize* for control sizes.
Comment 1 Beth Dakin 2014-03-31 13:55:04 PDT
Created attachment 228199 [details]
Patch
Comment 2 Darin Adler 2014-03-31 13:57:46 PDT
Comment on attachment 228199 [details]
Patch

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

> Source/WebCore/platform/mac/ThemeMac.mm:158
> +static LengthSize sizeFromNSControlSize(NSControlSize nsControlSize, const LengthSize& zoomedSize, float zoomFactor,const std::array<IntSize, 3>& sizes)

Missing space after comma here.

> Source/WebCore/platform/mac/ThemeMac.mm:271
> +    static const std::array<IntSize, 3> sizes = { {IntSize(14, 14), IntSize(12, 12), IntSize(10, 10)} };

I think there should be spaces inside the inner "{}" here too, not just the outer ones.
Comment 3 Anders Carlsson 2014-03-31 13:57:57 PDT
Comment on attachment 228199 [details]
Patch

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

> Source/WebCore/platform/mac/ThemeMac.mm:271
> +    static const std::array<IntSize, 3> sizes = { {IntSize(14, 14), IntSize(12, 12), IntSize(10, 10)} };

Spaces after { and before }.
Comment 4 Beth Dakin 2014-03-31 14:01:56 PDT
(In reply to comment #2)
> (From update of attachment 228199 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=228199&action=review
> 
> > Source/WebCore/platform/mac/ThemeMac.mm:158
> > +static LengthSize sizeFromNSControlSize(NSControlSize nsControlSize, const LengthSize& zoomedSize, float zoomFactor,const std::array<IntSize, 3>& sizes)
> 
> Missing space after comma here.
> 

Ooh, good catch.

> > Source/WebCore/platform/mac/ThemeMac.mm:271
> > +    static const std::array<IntSize, 3> sizes = { {IntSize(14, 14), IntSize(12, 12), IntSize(10, 10)} };
> 
> I think there should be spaces inside the inner "{}" here too, not just the outer ones.

Okay! Fixed.

Thanks, Darin! http://trac.webkit.org/changeset/166523