зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1225018 part 1 - Trigger reflow on some text emphasis changes for line height calculation. r=dbaron
--HG-- extra : source : 96f505fe488a4345906f362beab47db5af94e894
This commit is contained in:
Родитель
a816a8a87e
Коммит
e0157f6d78
|
@ -3632,14 +3632,21 @@ nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aOther) const
|
|||
(mTabSize != aOther.mTabSize))
|
||||
return NS_STYLE_HINT_REFLOW;
|
||||
|
||||
if (HasTextEmphasis() != aOther.HasTextEmphasis() ||
|
||||
(HasTextEmphasis() &&
|
||||
mTextEmphasisPosition != aOther.mTextEmphasisPosition)) {
|
||||
// Text emphasis position change could affect line height calculation.
|
||||
return nsChangeHint_AllReflowHints |
|
||||
nsChangeHint_RepaintFrame;
|
||||
}
|
||||
|
||||
if (!AreShadowArraysEqual(mTextShadow, aOther.mTextShadow)) {
|
||||
return nsChangeHint_UpdateSubtreeOverflow |
|
||||
nsChangeHint_SchedulePaint |
|
||||
nsChangeHint_RepaintFrame;
|
||||
}
|
||||
|
||||
if (mTextEmphasisPosition != aOther.mTextEmphasisPosition ||
|
||||
mTextEmphasisStyle != aOther.mTextEmphasisStyle ||
|
||||
if (mTextEmphasisStyle != aOther.mTextEmphasisStyle ||
|
||||
mTextEmphasisStyleString != aOther.mTextEmphasisStyleString) {
|
||||
return nsChangeHint_UpdateOverflow |
|
||||
nsChangeHint_SchedulePaint |
|
||||
|
@ -3657,6 +3664,10 @@ nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aOther) const
|
|||
nsChangeHint_RepaintFrame;
|
||||
}
|
||||
|
||||
if (mTextEmphasisPosition != aOther.mTextEmphasisPosition) {
|
||||
return nsChangeHint_NeutralChange;
|
||||
}
|
||||
|
||||
return NS_STYLE_HINT_NONE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче