Closed Bug 1727376 Opened 3 years ago Closed 3 years ago

Capitalize template parameters for data structure used in layout and gfx

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: TYLin, Assigned: rzvncj, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file)

According to https://google.github.io/styleguide/cppguide.html#Type_Names,
The names of all types — classes, structs, type aliases, enums, and type template parameters — have the same naming convention. Type names should start with a capital letter and have a capital letter for each new word. No underscores.

So we should adapt this naming convention for the template parameters of data structure used in layout and gfx. To name a few here:
https://searchfox.org/mozilla-central/rev/7bafa9b9c2156018ec1d410194f9bf4b5b23e77f/gfx/2d/Coord.h#88,103
https://searchfox.org/mozilla-central/rev/7bafa9b9c2156018ec1d410194f9bf4b5b23e77f/gfx/2d/Point.h#72

Let's make this a mentored bug, it can be a good introduction to the contribution process for someone

Mentor: botond
Keywords: good-first-bug

Do you mean all headers (*.h files) in gfx/ and layout/? Or are there specific ones you could maybe point out that you know suffer from this problem?

I think what we had in mind for this is mostly the headers in gfx/2d (especially class units, class coord, class primitive), and layout/base/Units.h (has a lot of class src, class dst).

Modified headers:

gfx/2d/{Coord.h,Point.h,Rect.h}
layout/base/Units.h

Assignee: nobody → rzvncj
Status: NEW → ASSIGNED
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2b747d2a932 Capitalize template parameters in a few headers from layout and gfx. r=botond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: