Bug 157037 - Use auto-generated operators in FontPlatformData
Summary: Use auto-generated operators in FontPlatformData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 10:57 PDT by Myles C. Maxfield
Modified: 2016-04-27 11:01 PDT (History)
1 user (show)

See Also:


Attachments
Patch (11.82 KB, patch)
2016-04-26 11:00 PDT, Myles C. Maxfield
ggaren: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff
Patch for committing (12.94 KB, patch)
2016-04-26 11:59 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.