Bug 1556769, ensure UnsuppressAndInvalidate is called even if paint suppression isn't used, r=emilio

UnsuppressAndInvalidate updates focus state among others, so it needs to be called even if paint suppression itself
isn't used. An example of a such case is when PresShell is created after Document's readyState is already Document::READYSTATE_COMPLETE.

Differential Revision: https://phabricator.services.mozilla.com/D34426

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Olli Pettay 2019-06-11 11:03:38 +00:00
parent 51415ba462
commit 963b9d833d

View File

@ -1824,10 +1824,10 @@ nsresult PresShell::Initialize() {
}
}
// If we get here and painting is not suppressed, then we can paint anytime
// and we should fire the before-first-paint notification
// If we get here and painting is not suppressed, we still want to run the
// unsuppression logic, so set mShouldUnsuppressPainting to true.
if (!mPaintingSuppressed) {
ScheduleBeforeFirstPaint();
mShouldUnsuppressPainting = true;
}
return NS_OK; // XXX this needs to be real. MMP