Backed out changeset f713a828fe36 (bug 894931) since the backout it performed was already landed on mozilla-central (and wasn't identical)

This commit is contained in:
Ed Morley 2013-07-18 15:00:36 +01:00
Родитель 1c7eb2843f
Коммит 5ab829f932
1 изменённых файлов: 14 добавлений и 1 удалений

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

@ -2213,6 +2213,13 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource)
mPerspectiveOrigin[1] = aSource.mPerspectiveOrigin[1];
}
static uint8_t
MapRelativePositionToStatic(uint8_t aPositionValue)
{
return aPositionValue == NS_STYLE_POSITION_RELATIVE ?
NS_STYLE_POSITION_STATIC : aPositionValue;
}
nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
{
nsChangeHint hint = nsChangeHint(0);
@ -2220,7 +2227,8 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
// Changes between position:static and position:relative don't need
// to reconstruct frames.
if (!EqualURIs(mBinding, aOther.mBinding)
|| mPosition != aOther.mPosition
|| MapRelativePositionToStatic(mPosition) !=
MapRelativePositionToStatic(aOther.mPosition)
|| mDisplay != aOther.mDisplay
|| (mFloats == NS_STYLE_FLOAT_NONE) != (aOther.mFloats == NS_STYLE_FLOAT_NONE)
|| mOverflowX != aOther.mOverflowX
@ -2229,6 +2237,11 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);
}
if (mPosition != aOther.mPosition) {
NS_UpdateHint(hint,
NS_CombineHint(nsChangeHint_NeedReflow, nsChangeHint_RepaintFrame));
}
if (mFloats != aOther.mFloats) {
// Changing which side we float on doesn't affect descendants directly
NS_UpdateHint(hint,