mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228357 - When saving/restoring a scrollframe's state, only save/restore resolution for the root scrollframe. r=roc
This commit is contained in:
parent
f19e775073
commit
79db8a28eb
@ -5359,9 +5359,12 @@ ScrollFrameHelper::SaveState() const
|
||||
pt = mRestorePos;
|
||||
}
|
||||
state->SetScrollState(pt);
|
||||
nsIPresShell* shell = mOuter->PresContext()->PresShell();
|
||||
state->SetResolution(shell->GetResolution());
|
||||
state->SetScaleToResolution(shell->ScaleToResolution());
|
||||
if (mIsRoot) {
|
||||
// Only save resolution properties for root scroll frames
|
||||
nsIPresShell* shell = mOuter->PresContext()->PresShell();
|
||||
state->SetResolution(shell->GetResolution());
|
||||
state->SetScaleToResolution(shell->ScaleToResolution());
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -5372,8 +5375,9 @@ ScrollFrameHelper::RestoreState(nsPresState* aState)
|
||||
mDidHistoryRestore = true;
|
||||
mLastPos = mScrolledFrame ? GetLogicalScrollPosition() : nsPoint(0,0);
|
||||
|
||||
// Scaling-to-resolution should only be used on root scroll frames.
|
||||
MOZ_ASSERT(mIsRoot || !aState->GetScaleToResolution());
|
||||
// Resolution properties should only exist on root scroll frames.
|
||||
MOZ_ASSERT(mIsRoot || (!aState->GetScaleToResolution() &&
|
||||
aState->GetResolution() == 1.0));
|
||||
|
||||
if (mIsRoot) {
|
||||
nsIPresShell* presShell = mOuter->PresContext()->PresShell();
|
||||
|
Loading…
Reference in New Issue
Block a user