Bug 1186061 patch 1 - Add feature to reftest harness to allow skipping the flush. r=mattwoodrow

This commit is contained in:
L. David Baron 2015-07-22 08:58:42 -07:00
Родитель 676d79811c
Коммит ee7c2b0554
2 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -491,6 +491,16 @@ In a reftest-wait test, to disable testing of invalidation and force the final
snapshot to be taken of the whole window, set the "reftest-snapshot-all"
class on the root element.
Avoid triggering flushes: class="reftest-no-flush"
==================================================
The reftest harness normally triggers flushes by calling
getBoundingClientRect on the root element. If the root element of the
test has class="reftest-no-flush", it doesn't do this.
This is useful for testing animations on the compositor thread, since
the flushing will cause a main thread style update.
Zoom Tests: reftest-zoom="<float>"
==================================

Просмотреть файл

@ -402,10 +402,11 @@ function FlushRendering() {
.getInterface(CI.nsIDOMWindowUtils);
var afterPaintWasPending = utils.isMozAfterPaintPending;
if (win.document.documentElement) {
var root = win.document.documentElement;
if (root && !root.classList.contains("reftest-no-flush")) {
try {
// Flush pending restyles and reflows for this window
win.document.documentElement.getBoundingClientRect();
root.getBoundingClientRect();
} catch (e) {
LogWarning("flushWindow failed: " + e + "\n");
}