зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186061 patch 1 - Add feature to reftest harness to allow skipping the flush. r=mattwoodrow
This commit is contained in:
Родитель
676d79811c
Коммит
ee7c2b0554
|
@ -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");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче