Bug 1169440 patch 5 - Adjust hints in CalcDifference methods to emit new nsChangeHint_ReflowChangesSizeOrPosition hint. r=heycam

Note that most of what is needed was actually taken care of by patch 1's
addition of the new hint to nsChangeHint_AllReflowHints.
This commit is contained in:
L. David Baron 2015-06-20 21:54:15 -07:00
Родитель b85494e6ac
Коммит 909c6fa960
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -333,8 +333,9 @@ nsChangeHint nsStyleMargin::CalcDifference(const nsStyleMargin& aOther) const
}
// Margin differences can't affect descendant intrinsic sizes and
// don't need to force children to reflow.
return NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_ClearAncestorIntrinsics);
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
nsStylePadding::nsStylePadding()

Просмотреть файл

@ -609,12 +609,13 @@ struct nsStyleMargin {
void RecalcData();
nsChangeHint CalcDifference(const nsStyleMargin& aOther) const;
static nsChangeHint MaxDifference() {
return NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_ClearAncestorIntrinsics);
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
static nsChangeHint DifferenceAlwaysHandledForDescendants() {
// CalcDifference can return both nsChangeHint_ClearAncestorIntrinsics and
// nsChangeHint_NeedReflow as hints not handled for descendants.
// CalcDifference can return all of the reflow hints sometimes not
// handled for descendants as hints not handled for descendants.
return nsChangeHint(0);
}