author | Timothy Nikkel <tnikkel@gmail.com> |
Wed, 06 Apr 2011 11:00:35 -0700 | |
changeset 67577 | f4faa30ceddc42f5ddc50e017715e2e6d5bc99d4 |
parent 67576 | 8a84d0956c5abdced0ba05e28b67f370faba7e39 |
child 67578 | 9de34ccb71ee2967797998227f57849c510c3ea2 |
push id | 1 |
push user | root |
push date | Tue, 26 Apr 2011 22:38:44 +0000 |
treeherder | mozilla-beta@bfdb6e623a36 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 642977 |
milestone | 2.2a1pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2767,21 +2767,24 @@ PresShell::InitialReflow(nscoord aWidth, } // For printing, we just immediately unsuppress. if (!mPresContext->IsPaginated()) { // Kick off a one-shot timer based off our pref value. When this timer // fires, if painting is still locked down, then we will go ahead and // trigger a full invalidate and allow painting to proceed normally. mPaintingSuppressed = PR_TRUE; - mPaintSuppressionTimer = do_CreateInstance("@mozilla.org/timer;1"); - if (!mPaintSuppressionTimer) - // Uh-oh. We must be out of memory. No point in keeping painting locked down. + // Don't suppress painting if the document isn't loading. + nsIDocument::ReadyState readyState = mDocument->GetReadyStateEnum(); + if (readyState != nsIDocument::READYSTATE_COMPLETE) { + mPaintSuppressionTimer = do_CreateInstance("@mozilla.org/timer;1"); + } + if (!mPaintSuppressionTimer) { mPaintingSuppressed = PR_FALSE; - else { + } else { // Initialize the timer. // Default to PAINTLOCK_EVENT_DELAY if we can't get the pref value. PRInt32 delay = nsContentUtils::GetIntPref("nglayout.initialpaint.delay", PAINTLOCK_EVENT_DELAY); mPaintSuppressionTimer->InitWithFuncCallback(sPaintSuppressionCallback,