Bug 1701807 - Partially revert the regressing bug for now, gotta find something smarter to do.

Differential Revision: https://phabricator.services.mozilla.com/D110180
This commit is contained in:
Emilio Cobos Álvarez
2021-03-30 00:05:14 +00:00
parent 83a115e782
commit 38d9e03fb7
3 changed files with 1 additions and 56 deletions

View File

@@ -1822,14 +1822,10 @@ void PresShell::InitPaintSuppressionTimer() {
int32_t delay = inProcess
? StaticPrefs::nglayout_initialpaint_delay()
: StaticPrefs::nglayout_initialpaint_delay_in_oopif();
if (mPaintSuppressionAttempts) {
delay += mPaintSuppressionAttempts *
StaticPrefs::nglayout_initialpaint_retry_extra_delay();
}
mPaintSuppressionTimer->InitWithNamedFuncCallback(
[](nsITimer* aTimer, void* aPresShell) {
RefPtr<PresShell> self = static_cast<PresShell*>(aPresShell);
self->UnsuppressPaintingFromTimer();
self->UnsuppressPainting();
},
this, delay, nsITimer::TYPE_ONE_SHOT,
"PresShell::sPaintSuppressionCallback");
@@ -3912,28 +3908,6 @@ void PresShell::CancelPaintSuppressionTimer() {
}
}
void PresShell::UnsuppressPaintingFromTimer() {
if (mIsDocumentGone || !mPaintingSuppressed) {
CancelPaintSuppressionTimer();
return;
}
if (!StaticPrefs::nglayout_initialpaint_unsuppress_with_no_background()) {
if (mPresContext->IsRootContentDocumentCrossProcess()) {
UpdateCanvasBackground();
if (!mHasCSSBackgroundColor) {
// We don't unsuppress painting if the page has a transparent
// background, as that usually means that the page is unstyled.
if (mPaintSuppressionAttempts++ <
StaticPrefs::nglayout_initialpaint_retry_max_retry_count()) {
InitPaintSuppressionTimer();
return;
}
}
}
}
UnsuppressPainting();
}
void PresShell::UnsuppressPainting() {
CancelPaintSuppressionTimer();