mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 12:13:22 +00:00
Bug 1023618 - Always call FlushRendering in the reftest harness. r=roc
This commit is contained in:
parent
43e9352610
commit
ae3dab62d4
@ -321,12 +321,7 @@ const STATE_WAITING_FOR_SPELL_CHECKS = 2;
|
||||
const STATE_WAITING_TO_FINISH = 3;
|
||||
const STATE_COMPLETED = 4;
|
||||
|
||||
function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) {
|
||||
var stopAfterPaintReceived = false;
|
||||
var currentDoc = content.document;
|
||||
var state = STATE_WAITING_TO_FIRE_INVALIDATE_EVENT;
|
||||
|
||||
function FlushRendering() {
|
||||
function FlushRendering() {
|
||||
var anyPendingPaintsGeneratedInDescendants = false;
|
||||
|
||||
function flushWindow(win) {
|
||||
@ -357,7 +352,12 @@ function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) {
|
||||
!windowUtils().isMozAfterPaintPending) {
|
||||
LogWarning("Internal error: descendant frame generated a MozAfterPaint event, but the root document doesn't have one!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) {
|
||||
var stopAfterPaintReceived = false;
|
||||
var currentDoc = content.document;
|
||||
var state = STATE_WAITING_TO_FIRE_INVALIDATE_EVENT;
|
||||
|
||||
function AfterPaintListener(event) {
|
||||
LogInfo("AfterPaintListener in " + event.target.document.location.href);
|
||||
@ -597,6 +597,9 @@ function OnDocumentLoad(event)
|
||||
var contentRootElement =
|
||||
content.document ? content.document.documentElement : null;
|
||||
|
||||
// Flush the document in case it got modified in a load event handler.
|
||||
FlushRendering();
|
||||
|
||||
// Take a snapshot now. We need to do this before we check whether
|
||||
// we should wait, since this might trigger dispatching of
|
||||
// MozPaintWait events and make shouldWaitForExplicitPaintWaiters() true
|
||||
|
Loading…
x
Reference in New Issue
Block a user