Closed
Bug 1228934
Opened 9 years ago
Closed 9 years ago
remove more parameters (style, weight, stretch) to nsFont constructor
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(1 file)
6.35 KB,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8693449 -
Flags: review?(jdaggett)
Comment 2•9 years ago
|
||
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+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/99a32ec308b8229bf6daf9815d66b6e12fdcd817 Bug 1228934 - Remove style, weight, and stretch parameters from nsFont constructor. r=jdaggett
Comment 4•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/99a32ec308b8
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 5•8 years ago
|
||
Is there any particular reason why we want to leave members uninitialized?
Flags: needinfo?(dbaron)
Comment 6•8 years ago
|
||
for nsFont::nsFont().
Assignee | ||
Comment 7•8 years ago
|
||
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.
Description
•