remove nsFont::decorations

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

(5 attachments)

While looking through CalcDifference methods for bug 1026820, I was reminded that we should remove nsFont::decorations, which I believe has been unused since time immemorial, and causes us to have extra code in various places to avoid including it in comparisons.
Created attachment 8692851 [details] [diff] [review]
patch 1 - Remove decorations parameter to nsFont constructors

The removed parameter is always 0.
Attachment #8692851 - Flags: review?(jdaggett)
Created attachment 8692852 [details] [diff] [review]
patch 2 - Remove nsFont::decorations member variable

The member variable was always set to 0 or to NS_FONT_DECORATION_NONE,
which is 0.

Although this does leave a gap in the structure, I don't see any
opportunities for reordering members to actually shrink nsFont.
Attachment #8692852 - Flags: review?(jdaggett)
Created attachment 8692853 [details] [diff] [review]
patch 3 - Remove nsFont::BaseEquals

BaseEquals and Equals were made the same by patch 2, so BaseEquals can
be removed.

(operator== is also defined as an inlined call to Equals.)
Attachment #8692853 - Flags: review?(jdaggett)
Created attachment 8692854 [details] [diff] [review]
patch 4 - Remove nsStyleFont::CalcFontDifference, which now duplicates the list of tests in nsFont::Equals
Attachment #8692854 - Flags: review?(jdaggett)
Created attachment 8692855 [details] [diff] [review]
patch 5 - Remove NS_FONT_DECORATION_* constants

Decorations in Gecko are associated with the CSS 'text-decoration'
property, so the constants should live in nsStyleConsts.h, as they
largely already do (since the names defined there are the vast majority
of the uses).
Attachment #8692855 - Flags: review?(jdaggett)

Updated

3 years ago
Attachment #8692851 - Flags: review?(jdaggett) → review+

Updated

3 years ago
Attachment #8692852 - Flags: review?(jdaggett) → review+

Updated

3 years ago
Attachment #8692853 - Flags: review?(jdaggett) → review+

Updated

3 years ago
Attachment #8692854 - Flags: review?(jdaggett) → review+

Updated

3 years ago
Attachment #8692855 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1fd92eeb5ba40ef5ecf50793b911397fd9816d0
Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/3a3cd254f508e87d384d7598b67751489370812a
Bug 1228501 patch 2 - Remove nsFont::decorations member variable.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/6c478d7a9467d8336d431cb383402af93da39c0d
Bug 1228501 patch 3 - Remove nsFont::BaseEquals.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/ec79945130ff962575dba5d4579071b7a3b38346
Bug 1228501 patch 4 - Remove nsStyleFont::CalcFontDifference, which now duplicates the list of tests in nsFont::Equals.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/cce90c9b7d1d3066919856d63de581865676aabd
Bug 1228501 patch 5 - Remove NS_FONT_DECORATION_* constants.  r=jdaggett
https://hg.mozilla.org/integration/mozilla-inbound/rev/43b52e48aec387fedbce10dc6d9bd8e2620d47f7
Bug 1228501 patch 1 - Remove decorations parameter to nsFont constructors.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/2879aebe0ccaf474600b27aa698de0385b43def9
Bug 1228501 patch 2 - Remove nsFont::decorations member variable.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/16798ce74d1e41d4cf87efd2db1604529acef19e
Bug 1228501 patch 3 - Remove nsFont::BaseEquals.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/d197e2ef0123e53cf40dedc2b9c9a317d1082973
Bug 1228501 patch 4 - Remove nsStyleFont::CalcFontDifference, which now duplicates the list of tests in nsFont::Equals.  r=jdaggett

https://hg.mozilla.org/integration/mozilla-inbound/rev/c15544b94db594a4619d63329704a0252e4e22b0
Bug 1228501 patch 5 - Remove NS_FONT_DECORATION_* constants.  r=jdaggett
(Assignee)

Updated

3 years ago
Flags: needinfo?(dbaron)
You need to log in before you can comment on or make changes to this bug.