зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228501 patch 4 - Remove nsStyleFont::CalcFontDifference, which now duplicates the list of tests in nsFont::Equals. r=jdaggett
--HG-- extra : commitid : DKp1CfndZTd
This commit is contained in:
Родитель
f194309cac
Коммит
150c18deae
|
@ -123,6 +123,10 @@ struct nsFont {
|
|||
return Equals(aOther);
|
||||
}
|
||||
|
||||
bool operator!=(const nsFont& aOther) const {
|
||||
return !Equals(aOther);
|
||||
}
|
||||
|
||||
bool Equals(const nsFont& aOther) const;
|
||||
|
||||
nsFont& operator=(const nsFont& aOther);
|
||||
|
|
|
@ -173,6 +173,7 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aOther) const
|
|||
MOZ_ASSERT(mAllowZoom == aOther.mAllowZoom,
|
||||
"expected mAllowZoom to be the same on both nsStyleFonts");
|
||||
if (mSize != aOther.mSize ||
|
||||
mFont != aOther.mFont ||
|
||||
mLanguage != aOther.mLanguage ||
|
||||
mExplicitLanguage != aOther.mExplicitLanguage ||
|
||||
mMathVariant != aOther.mMathVariant ||
|
||||
|
@ -181,11 +182,6 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aOther) const
|
|||
return NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
|
||||
nsChangeHint hint = CalcFontDifference(mFont, aOther.mFont);
|
||||
if (hint) {
|
||||
return hint;
|
||||
}
|
||||
|
||||
// XXX Should any of these cause a non-nsChangeHint_NeutralChange change?
|
||||
if (mGenericID != aOther.mGenericID ||
|
||||
mScriptLevel != aOther.mScriptLevel ||
|
||||
|
@ -229,33 +225,6 @@ nsStyleFont::GetLanguage(nsPresContext* aPresContext)
|
|||
return language.forget();
|
||||
}
|
||||
|
||||
nsChangeHint nsStyleFont::CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2)
|
||||
{
|
||||
if ((aFont1.size == aFont2.size) &&
|
||||
(aFont1.sizeAdjust == aFont2.sizeAdjust) &&
|
||||
(aFont1.style == aFont2.style) &&
|
||||
(aFont1.weight == aFont2.weight) &&
|
||||
(aFont1.stretch == aFont2.stretch) &&
|
||||
(aFont1.smoothing == aFont2.smoothing) &&
|
||||
(aFont1.fontlist == aFont2.fontlist) &&
|
||||
(aFont1.kerning == aFont2.kerning) &&
|
||||
(aFont1.synthesis == aFont2.synthesis) &&
|
||||
(aFont1.variantAlternates == aFont2.variantAlternates) &&
|
||||
(aFont1.alternateValues == aFont2.alternateValues) &&
|
||||
(aFont1.featureValueLookup == aFont2.featureValueLookup) &&
|
||||
(aFont1.variantCaps == aFont2.variantCaps) &&
|
||||
(aFont1.variantEastAsian == aFont2.variantEastAsian) &&
|
||||
(aFont1.variantLigatures == aFont2.variantLigatures) &&
|
||||
(aFont1.variantNumeric == aFont2.variantNumeric) &&
|
||||
(aFont1.variantPosition == aFont2.variantPosition) &&
|
||||
(aFont1.fontFeatureSettings == aFont2.fontFeatureSettings) &&
|
||||
(aFont1.languageOverride == aFont2.languageOverride) &&
|
||||
(aFont1.systemFont == aFont2.systemFont)) {
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
return NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
|
||||
static bool IsFixedData(const nsStyleSides& aSides, bool aEnumOK)
|
||||
{
|
||||
NS_FOR_CSS_SIDES(side) {
|
||||
|
|
|
@ -117,7 +117,6 @@ struct nsStyleFont {
|
|||
nsChangeHint_ReflowChangesSizeOrPosition |
|
||||
nsChangeHint_ClearAncestorIntrinsics;
|
||||
}
|
||||
static nsChangeHint CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2);
|
||||
|
||||
/**
|
||||
* Return aSize multiplied by the current text zoom factor (in aPresContext).
|
||||
|
|
Загрузка…
Ссылка в новой задаче