diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 34932f95f6cf..fc0a62ee3872 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -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; } diff --git a/layout/base/crashtests/1676301-1.html b/layout/base/crashtests/1676301-1.html new file mode 100644 index 000000000000..9ca79823f819 --- /dev/null +++ b/layout/base/crashtests/1676301-1.html @@ -0,0 +1,16 @@ + + + + +
    +
    diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index c69e0c7159d5..b1b2caee0c27 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -554,3 +554,4 @@ load 1586600.html load 1599518.html load 1599532.html pref(layout.accessiblecaret.enabled,true) load 1606492.html +load 1676301-1.html