mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Backed out changeset 3a3cd254f508 (bug 1228501)
This commit is contained in:
parent
d76b6dfebd
commit
7cbe00e2e7
@ -48,6 +48,7 @@ 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;
|
||||
@ -64,6 +65,7 @@ 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;
|
||||
@ -116,6 +118,15 @@ 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;
|
||||
@ -123,6 +134,7 @@ 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,6 +66,10 @@ 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;
|
||||
|
||||
@ -123,11 +127,8 @@ struct nsFont {
|
||||
return Equals(aOther);
|
||||
}
|
||||
|
||||
// FIXME (in patch 3): These are now the same. Remove BaseEquals!
|
||||
bool Equals(const nsFont& aOther) const
|
||||
{
|
||||
return BaseEquals(aOther);
|
||||
}
|
||||
bool Equals(const nsFont& aOther) const ;
|
||||
// Compare ignoring differences in 'variant' and 'decoration'
|
||||
bool BaseEquals(const nsFont& aOther) const;
|
||||
|
||||
nsFont& operator=(const nsFont& aOther);
|
||||
|
@ -3413,6 +3413,7 @@ 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,7 +251,10 @@ nsChangeHint nsStyleFont::CalcFontDifference(const nsFont& aFont1, const nsFont&
|
||||
(aFont1.fontFeatureSettings == aFont2.fontFeatureSettings) &&
|
||||
(aFont1.languageOverride == aFont2.languageOverride) &&
|
||||
(aFont1.systemFont == aFont2.systemFont)) {
|
||||
return NS_STYLE_HINT_NONE;
|
||||
if ((aFont1.decorations == aFont2.decorations)) {
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
return nsChangeHint_RepaintFrame;
|
||||
}
|
||||
return NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user