remove more parameters (style, weight, stretch) to nsFont constructor

RESOLVED FIXED in Firefox 45

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
mozilla45
Points:
---

Firefox Tracking Flags

(firefox45 fixed)

Details

Attachments

(1 attachment)

In https://hg.mozilla.org/integration/mozilla-inbound/rev/e1fd92eeb5ba I removed a parameter to the nsFont constructor.

But there are three other parameters that are passed as the same value by all callers of those constructors.  Given that long constructors are pretty unreadable anyway, and most if not all C++ callers want "NORMAL" for style, weight, and stretch (choosing the font style in a C++ constructor is a bit silly anyway), may as well remove them too.
Comment on attachment 8693449 [details] [diff] [review]
Remove style, weight, and stretch parameters from nsFont constructor

Review of attachment 8693449 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8693449 - Flags: review?(jdaggett) → review+

Comment 4

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/99a32ec308b8
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox45: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Is there any particular reason why we want to leave members uninitialized?
Flags: needinfo?(dbaron)
for nsFont::nsFont().
Probably to avoid spending the time to initialize them... though it's not necessarily a good reason.

I also don't think that constructor was used much; it might be worth seeing if it could be removed.
Flags: needinfo?(dbaron)
You need to log in before you can comment on or make changes to this bug.