Bug 1441713 - Skip SynchronizeForSnapshot in the case of 'reftest-no-flush'. r?dbaron draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 28 Feb 2018 08:49:42 +0900
changeset 760697 34671db96b538d43bdf59c03575741a959142234
parent 760606 505bafeafb66b0083ce1fca8eec2d061f1a5ebb7
push id100722
push userhikezoe@mozilla.com
push dateTue, 27 Feb 2018 23:50:03 +0000
reviewersdbaron
bugs1441713
milestone60.0a1
Bug 1441713 - Skip SynchronizeForSnapshot in the case of 'reftest-no-flush'. r?dbaron Since updateLayerTree flushes styles. MozReview-Commit-ID: 22NtsRTYTZe
layout/tools/reftest/reftest-content.js
--- a/layout/tools/reftest/reftest-content.js
+++ b/layout/tools/reftest/reftest-content.js
@@ -1087,17 +1087,19 @@ function SynchronizeForSnapshot(flags)
         gCurrentTestType == TYPE_LOAD ||
         gCurrentTestType == TYPE_PRINT) {
         // Script, load-only, and PDF-print tests do not need any snapshotting.
         return;
     }
 
     if (flags & SYNC_ALLOW_DISABLE) {
         var docElt = content.document.documentElement;
-        if (docElt && docElt.hasAttribute("reftest-no-sync-layers")) {
+        if (docElt &&
+            (docElt.hasAttribute("reftest-no-sync-layers") ||
+             docElt.classList.contains("reftest-no-flush"))) {
             LogInfo("Test file chose to skip SynchronizeForSnapshot");
             return;
         }
     }
 
     windowUtils().updateLayerTree();
 
     // Setup async scroll offsets now, because any scrollable layers should