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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user