Bug 1797703 - Fix frame constructor save state restoration. r=TYLin,layout-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D160523
This commit is contained in:
Emilio Cobos Álvarez
2022-10-27 21:20:02 +00:00
parent dc4ce2f23b
commit 4094a217ba
3 changed files with 58 additions and 1 deletions

View File

@@ -1313,9 +1313,9 @@ nsFrameConstructorSaveState::~nsFrameConstructorSaveState() {
MOZ_ASSERT(mState, "Can't have mList set without having a state!");
mState->ProcessFrameInsertions(*mList, mChildListID);
mState->mFixedPosIsAbsPos = mSavedFixedPosIsAbsPos;
if (mSavedFixedPosIsAbsPos) {
MOZ_ASSERT(mList == &mState->mAbsoluteList);
mState->mFixedPosIsAbsPos = mSavedFixedPosIsAbsPos;
// mAbsoluteList was moved to mFixedList, so move mFixedList back
// and repair the old mFixedList now.
mState->mAbsoluteList = std::move(mState->mFixedList);