mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 03:54:35 +00:00
Bug 1577258 - early-return for noop resizes. r=botond
This avoids doing wasted work and sending spurious resize events if this case would be hit. In practice, it cannot be hit yet, I think, because callers do check for this and bail out earlier. But there's no assertion to that respect so this shouldn't hurt. Differential Revision: https://phabricator.services.mozilla.com/D43798 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
19057e1f9d
commit
0ec0984d05
@ -1863,6 +1863,10 @@ nsresult PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight,
|
||||
ResizeReflowOptions aOptions) {
|
||||
MOZ_ASSERT(!mIsReflowing, "Shouldn't be in reflow here!");
|
||||
|
||||
if (aWidth == aOldWidth && aHeight == aOldHeight) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
|
||||
if (!rootFrame) {
|
||||
// If we don't have a root frame yet, that means we haven't had our initial
|
||||
|
Loading…
Reference in New Issue
Block a user