Bug 1161215 - Don't fire spurious resize events to content when the size didn't actually change. r=smaug

This commit is contained in:
Kartikaya Gupta 2015-05-07 16:02:38 -04:00
parent 8b49142b57
commit 09504ce74e

View File

@ -2029,8 +2029,11 @@ TabChild::RecvUpdateDimensions(const nsIntRect& rect, const ScreenIntSize& size,
bool initialSizing = !HasValidInnerSize()
&& (size.width != 0 && size.height != 0);
bool sizeChanged = true;
if (initialSizing) {
mHasValidInnerSize = true;
} else if (mInnerSize == size) {
sizeChanged = false;
}
mOrientation = orientation;
@ -2051,7 +2054,9 @@ TabChild::RecvUpdateDimensions(const nsIntRect& rect, const ScreenIntSize& size,
InitializeRootMetrics();
}
HandlePossibleViewportChange(oldScreenSize);
if (sizeChanged) {
HandlePossibleViewportChange(oldScreenSize);
}
return true;
}