зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228501 patch 2 - Remove nsFont::decorations member variable. r=jdaggett
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. --HG-- extra : commitid : 9INFKtizQnt
This commit is contained in:
Родитель
c3ea47d074
Коммит
07d1584bd9
|
@ -48,7 +48,6 @@ nsFont::Init()
|
|||
sizeAdjust = -1.0f;
|
||||
kerning = NS_FONT_KERNING_AUTO;
|
||||
synthesis = NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE;
|
||||
decorations = 0;
|
||||
|
||||
variantAlternates = 0;
|
||||
variantCaps = NS_FONT_VARIANT_CAPS_NORMAL;
|
||||
|
@ -65,7 +64,6 @@ nsFont::nsFont(const nsFont& aOther)
|
|||
systemFont = aOther.systemFont;
|
||||
weight = aOther.weight;
|
||||
stretch = aOther.stretch;
|
||||
decorations = aOther.decorations;
|
||||
smoothing = aOther.smoothing;
|
||||
size = aOther.size;
|
||||
sizeAdjust = aOther.sizeAdjust;
|
||||
|
@ -118,15 +116,6 @@ bool nsFont::BaseEquals(const nsFont& aOther) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool nsFont::Equals(const nsFont& aOther) const
|
||||
{
|
||||
if (BaseEquals(aOther) &&
|
||||
(decorations == aOther.decorations)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
nsFont& nsFont::operator=(const nsFont& aOther)
|
||||
{
|
||||
fontlist = aOther.fontlist;
|
||||
|
@ -134,7 +123,6 @@ nsFont& nsFont::operator=(const nsFont& aOther)
|
|||
systemFont = aOther.systemFont;
|
||||
weight = aOther.weight;
|
||||
stretch = aOther.stretch;
|
||||
decorations = aOther.decorations;
|
||||
smoothing = aOther.smoothing;
|
||||
size = aOther.size;
|
||||
sizeAdjust = aOther.sizeAdjust;
|
||||
|
|
|
@ -66,10 +66,6 @@ struct nsFont {
|
|||
// -- bitmask for both enumerated and functional propvals
|
||||
uint16_t variantAlternates;
|
||||
|
||||
// The decorations on the font (underline, overline,
|
||||
// line-through). The decorations can be binary or'd together.
|
||||
uint8_t decorations;
|
||||
|
||||
// Smoothing - controls subpixel-antialiasing (currently OSX only)
|
||||
uint8_t smoothing;
|
||||
|
||||
|
@ -127,8 +123,11 @@ struct nsFont {
|
|||
return Equals(aOther);
|
||||
}
|
||||
|
||||
bool Equals(const nsFont& aOther) const ;
|
||||
// Compare ignoring differences in 'variant' and 'decoration'
|
||||
// FIXME (in patch 3): These are now the same. Remove BaseEquals!
|
||||
bool Equals(const nsFont& aOther) const
|
||||
{
|
||||
return BaseEquals(aOther);
|
||||
}
|
||||
bool BaseEquals(const nsFont& aOther) const;
|
||||
|
||||
nsFont& operator=(const nsFont& aOther);
|
||||
|
|
|
@ -3413,7 +3413,6 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
|
|||
systemFont.systemFont = fontStyle.systemFont;
|
||||
systemFont.weight = fontStyle.weight;
|
||||
systemFont.stretch = fontStyle.stretch;
|
||||
systemFont.decorations = NS_FONT_DECORATION_NONE;
|
||||
systemFont.size =
|
||||
NSFloatPixelsToAppUnits(fontStyle.size,
|
||||
aPresContext->DeviceContext()->
|
||||
|
|
|
@ -251,10 +251,7 @@ nsChangeHint nsStyleFont::CalcFontDifference(const nsFont& aFont1, const nsFont&
|
|||
(aFont1.fontFeatureSettings == aFont2.fontFeatureSettings) &&
|
||||
(aFont1.languageOverride == aFont2.languageOverride) &&
|
||||
(aFont1.systemFont == aFont2.systemFont)) {
|
||||
if ((aFont1.decorations == aFont2.decorations)) {
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
return nsChangeHint_RepaintFrame;
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
return NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче