diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index ac2a581b1b0..8a88cf57387 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -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