From b630dc38b356056d13d25dd5f6e4e1ced73b7413 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Fri, 9 Mar 2018 15:16:52 +0900 Subject: [PATCH] Bug 1442063 - Don't call FlushRendering() after we reached the state of STATE_WAITING_TO_FINISH. r=dbaron Once we reached the state of STATE_WAITING_TO_FINISH, we just need to wait for the final MozAfterPaint which is corresponding to flushRendering() after "reftest-wait" removal. MozReview-Commit-ID: EJxDYUnqbmr --HG-- extra : rebase_source : fdb5c30142def4c0138bc6af2c510d85f30ed7f3 --- layout/tools/reftest/reftest-content.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/tools/reftest/reftest-content.js b/layout/tools/reftest/reftest-content.js index 28cce1d57b0c..e21383bf5b4a 100644 --- a/layout/tools/reftest/reftest-content.js +++ b/layout/tools/reftest/reftest-content.js @@ -582,7 +582,11 @@ function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) { return; } - FlushRendering(); + // We don't need to flush styles any more when we are in the state + // after reftest-wait has removed. + if (state != STATE_WAITING_TO_FINISH) { + FlushRendering(); + } switch (state) { case STATE_WAITING_TO_FIRE_INVALIDATE_EVENT: {