From 474ef54378a077eee77db6c32b8b6f18aa776fd0 Mon Sep 17 00:00:00 2001 From: Miko Mynttinen Date: Tue, 17 Apr 2018 14:22:42 -0400 Subject: [PATCH] Bug 1452800 - Trigger a layout flush in forceLayerTreeToCompositor. r=kats This ensures we don't take the early-exit codepath introduced by the PAINT_IDENTICAL_DISPLAY_LIST check, which breaks the behaviour desired by forceLayerTreeToCompositor. MozReview-Commit-ID: ECe6d0ZHZzt --HG-- extra : rebase_source : 48d3f7d9b5df81ba165c0e52d1a7b78909c58774 --- gfx/layers/apz/test/mochitest/apz_test_utils.js | 2 +- gfx/layers/apz/test/mochitest/helper_bug1151663.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gfx/layers/apz/test/mochitest/apz_test_utils.js b/gfx/layers/apz/test/mochitest/apz_test_utils.js index 62ea8577a77e..c1dd50ad20d6 100644 --- a/gfx/layers/apz/test/mochitest/apz_test_utils.js +++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js @@ -359,7 +359,7 @@ async function forceLayerTreeToCompositor() { utils.restoreNormalRefresh(); } } - await promiseAllPaintsDone(); + await promiseAllPaintsDone(null, true); await promiseApzRepaintsFlushed(); } diff --git a/gfx/layers/apz/test/mochitest/helper_bug1151663.html b/gfx/layers/apz/test/mochitest/helper_bug1151663.html index d343ddb7c5c9..280a08484f3b 100644 --- a/gfx/layers/apz/test/mochitest/helper_bug1151663.html +++ b/gfx/layers/apz/test/mochitest/helper_bug1151663.html @@ -16,6 +16,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663 var SimpleTest = window.opener.SimpleTest; var utils = SpecialPowers.getDOMWindowUtils(window); + function flushLayout() { + document.body.style.left = "1px"; + } + // -------------------------------------------------------------------- // The actual logic for testing bug 1151663. // @@ -54,7 +58,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663 window.opener.finishTest(); } - waitUntilApzStable().then(forceLayerTreeToCompositor).then(testBug1151663); + waitUntilApzStable().then(flushLayout).then(forceLayerTreeToCompositor).then(testBug1151663);