Bug 157037

Summary: Use auto-generated operators in FontPlatformData
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ggaren: review+, achristensen: commit-queue-
Patch for committing none

Description Myles C. Maxfield 2016-04-26 10:57:59 PDT
Use auto-generated operators in FontPlatformData
Comment 1 Myles C. Maxfield 2016-04-26 11:00:48 PDT
Created attachment 277400 [details]
Patch
Comment 2 Geoffrey Garen 2016-04-26 11:09:15 PDT
Comment on attachment 277400 [details]
Patch

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

> Source/WebCore/platform/graphics/FontPlatformData.h:170
> +    FontPlatformData& operator=(const FontPlatformData&) = default;

Is this default declaration required, or can it be automatic?
Comment 3 Myles C. Maxfield 2016-04-26 11:12:11 PDT
Comment on attachment 277400 [details]
Patch

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

>> Source/WebCore/platform/graphics/FontPlatformData.h:170
>> +    FontPlatformData& operator=(const FontPlatformData&) = default;
> 
> Is this default declaration required, or can it be automatic?

It isn't required, but I still think it's valuable to be explicit in this case.
Comment 4 Said Abou-Hallawa 2016-04-26 11:43:12 PDT
Comment on attachment 277400 [details]
Patch

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

> Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp:89
> +    m_scaledFont = adoptRef(cairo_scaled_font_create(fontFace, &fontMatrix, &ctm, options));

Wrong spacing at the beginning.

> Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp:-49
> -#endif

You removed the #endif.
Comment 5 Myles C. Maxfield 2016-04-26 11:59:30 PDT
Created attachment 277404 [details]
Patch for committing
Comment 6 WebKit Commit Bot 2016-04-26 12:48:54 PDT
Comment on attachment 277404 [details]
Patch for committing

Clearing flags on attachment: 277404

Committed r200104: <http://trac.webkit.org/changeset/200104>
Comment 7 Darin Adler 2016-04-27 11:01:58 PDT
Comment on attachment 277400 [details]
Patch

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

>>> Source/WebCore/platform/graphics/FontPlatformData.h:170
>>> +    FontPlatformData& operator=(const FontPlatformData&) = default;
>> 
>> Is this default declaration required, or can it be automatic?
> 
> It isn't required, but I still think it's valuable to be explicit in this case.

I don’t understand why you say that. Personally I would like to see it removed.

> Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp:46
>      , m_cgFont(0)

Initializing this and many other members in the class definition would be beneficial.