Bug 524925 - Make all transform style changes update the overflow and repaint instead of reflow. part=3/6 r=roc

This commit is contained in:
Mats Palmgren 2012-01-18 21:04:51 +01:00
parent a1873efda5
commit 76336e0616

View File

@ -2249,30 +2249,26 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
nsChangeHint_UpdateTransformLayer));
}
const nsChangeHint kUpdateOverflowAndRepaintHint =
NS_CombineHint(nsChangeHint_UpdateOverflow, nsChangeHint_RepaintFrame);
for (PRUint8 index = 0; index < 3; ++index)
if (mTransformOrigin[index] != aOther.mTransformOrigin[index]) {
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_RepaintFrame));
NS_UpdateHint(hint, kUpdateOverflowAndRepaintHint);
break;
}
for (PRUint8 index = 0; index < 2; ++index)
if (mPerspectiveOrigin[index] != aOther.mPerspectiveOrigin[index]) {
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_RepaintFrame));
NS_UpdateHint(hint, kUpdateOverflowAndRepaintHint);
break;
}
if (mChildPerspective != aOther.mChildPerspective)
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_RepaintFrame));
if (mChildPerspective != aOther.mChildPerspective ||
mTransformStyle != aOther.mTransformStyle)
NS_UpdateHint(hint, kUpdateOverflowAndRepaintHint);
if (mBackfaceVisibility != aOther.mBackfaceVisibility)
NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
if (mTransformStyle != aOther.mTransformStyle)
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_RepaintFrame));
}
// Note: Our current behavior for handling changes to the