Bug 1676301. Only set mResolutionUpdated if we are changing the resolution. r=kats

We incorrectly set it when going from the mResolution.isNothing() to the *mResolution == 1.f case.

Differential Revision: https://phabricator.services.mozilla.com/D97385
This commit is contained in:
Timothy Nikkel
2020-11-19 01:01:02 +00:00
parent 90a64280ca
commit 1121edb2e5
3 changed files with 23 additions and 1 deletions

View File

@@ -5385,6 +5385,11 @@ nsresult PresShell::SetResolutionAndScaleTo(float aResolution,
MOZ_ASSERT(mResolution.isSome());
return NS_OK;
}
// GetResolution handles mResolution being nothing by returning 1 so this
// is checking that the resolution is actually changing.
bool resolutionUpdated = (aResolution != GetResolution());
RenderingState state(this);
state.mResolution = Some(aResolution);
SetRenderingState(state);
@@ -5393,7 +5398,7 @@ nsresult PresShell::SetResolutionAndScaleTo(float aResolution,
}
if (aOrigin == ResolutionChangeOrigin::Apz) {
mResolutionUpdatedByApz = true;
} else {
} else if (resolutionUpdated) {
mResolutionUpdated = true;
}