Bug 1359834 Part 1: Force changes to shape-outside to trigger float reflow, similar to other float changes. r=dholbert

MozReview-Commit-ID: 7EgYZIu7aZ9

--HG--
extra : rebase_source : a611fcd77d926f1076dfa38b9b7ebf732021aa46
This commit is contained in:
Brad Werth 2017-07-12 12:28:29 -07:00
Родитель 9b07417b6b
Коммит 12c3fd32a2
1 изменённых файлов: 12 добавлений и 3 удалений

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

@ -3527,12 +3527,22 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
}
if (mFloat != aNewData.mFloat) {
// Changing which side we float on doesn't affect descendants directly
// Our descendants aren't impacted when our float area only changes
// placement but not size/shape. (e.g. if we change which side we float to).
// But our ancestors/siblings are potentially impacted, so we need to send
// the non-descendant reflow hints.
hint |= nsChangeHint_AllReflowHints &
~(nsChangeHint_ClearDescendantIntrinsics |
nsChangeHint_NeedDirtyReflow);
}
if (aNewData.mFloat != StyleFloat::None &&
!mShapeOutside.DefinitelyEquals(aNewData.mShapeOutside)) {
// If we are floating, and our shape-outside property changes, it requires
// the entire frame to be reconstructed.
hint |= nsChangeHint_ReconstructFrame;
}
if (mVerticalAlign != aNewData.mVerticalAlign) {
// XXX Can this just be AllReflowHints + RepaintFrame, and be included in
// the block below?
@ -3692,8 +3702,7 @@ nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
mAnimationFillModeCount != aNewData.mAnimationFillModeCount ||
mAnimationPlayStateCount != aNewData.mAnimationPlayStateCount ||
mAnimationIterationCountCount != aNewData.mAnimationIterationCountCount ||
mScrollSnapCoordinate != aNewData.mScrollSnapCoordinate ||
!mShapeOutside.DefinitelyEquals(aNewData.mShapeOutside))) {
mScrollSnapCoordinate != aNewData.mScrollSnapCoordinate)) {
hint |= nsChangeHint_NeutralChange;
}