mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868498. Don't reframe for changes between position:static and position:relative. r=heycam
This commit is contained in:
parent
160820c8f3
commit
019984039a
@ -2213,18 +2213,34 @@ 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);
|
||||
|
||||
// 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
|
||||
|| mOverflowY != aOther.mOverflowY
|
||||
|| mResize != aOther.mResize)
|
||||
|| mResize != aOther.mResize) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user