Commit 96786684 authored by Noemi Erli's avatar Noemi Erli
Browse files

cBacked out changeset feff6d3ebdcd (bug 1743907) for causing reftest failures...

cBacked out changeset feff6d3ebdcd (bug 1743907) for causing reftest failures in short.mp4.firstframe.html CLOSED TREE
parent d99b4a41
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -44,10 +44,10 @@ pref(layout.css.motion-path.enabled,true) == stacking-context-offset-path-none-a
pref(layout.css.motion-path.enabled,true) == stacking-context-offset-path-none-in-delay.html stacking-context-animation-ref.html
pref(layout.css.motion-path.enabled,true) == stacking-context-offset-path-none-with-fill-backwards.html stacking-context-animation-ref.html
pref(layout.css.motion-path.enabled,true) == stacking-context-offset-path-none-with-fill-forwards.html stacking-context-animation-ref.html
== background-position-in-delay.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position currently creates an active layer from its delay phse, and reftest-opaque-layer only handles items assigned to PaintedLayers.
fails-if(layerChecksEnabled) == background-position-in-delay.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position currently creates an active layer from its delay phse, and reftest-opaque-layer only handles items assigned to PaintedLayers.
== background-position-after-finish.html background-position-ref.html
random-if(useDrawSnapshot) == background-position-running.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position currently creates an active layer, and reftest-opaque-layer only handles items assigned to PaintedLayers.
== background-position-important.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position overridden by a non-animated !important style also creates an active layer, and reftest-opaque-layer only handles items that are assigned to PaintedLayers.
fails-if(layerChecksEnabled) random-if(useDrawSnapshot) == background-position-running.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position currently creates an active layer, and reftest-opaque-layer only handles items assigned to PaintedLayers.
fails-if(layerChecksEnabled) == background-position-important.html background-position-ref.html # This test fails the reftest-opaque-layer check since animating background-position overridden by a non-animated !important style also creates an active layer, and reftest-opaque-layer only handles items that are assigned to PaintedLayers.

== mask-position-after-finish-1a.html mask-anim-ref.html
== mask-position-after-finish-1b.html mask-anim-ref.html
+10 −10
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ noautofuzz fuzzy(0-1,0-2) != fuzzy.html fuzzy-ref.html
noautofuzz fails fuzzy-if(false,0-2,0-1) == fuzzy.html fuzzy-ref.html

# Test that reftest-no-paint fails correctly.
== reftest-no-paint.html reftest-no-paint-ref.html
fails-if(layerChecksEnabled) == reftest-no-paint.html reftest-no-paint-ref.html

skip-if(!asyncPan||!browserIsRemote) == async-scroll-1a.html async-scroll-1-ref.html

@@ -188,28 +188,28 @@ fuzzy(0-112,0-800) skip-if(!Android) pref(apz.allow_zooming,true) == async-zoom-
== reftest-opaque-layer-pass.html reftest-opaque-layer-pass.html
!= reftest-opaque-layer-pass.html about:blank
!= about:blank reftest-opaque-layer-pass.html
== reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html
fails-if(layerChecksEnabled) == reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html

# If reftest-opaque-layer fails (no matter whether it fails in the test or in the reference),
# it shouldn't matter whether the test matches the reference.
fails != reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html
fails == reftest-opaque-layer-fail.html about:blank
fails == about:blank reftest-opaque-layer-fail.html
!= reftest-opaque-layer-fail.html about:blank
!= about:blank reftest-opaque-layer-fail.html
fails-if(layerChecksEnabled) != reftest-opaque-layer-fail.html about:blank
fails-if(layerChecksEnabled) != about:blank reftest-opaque-layer-fail.html

# reftest-opaque-layer and reftest-wait
== reftest-opaque-layer-wait-pass.html reftest-opaque-layer-pass.html
!= reftest-opaque-layer-wait-pass.html about:blank
== reftest-opaque-layer-wait-fail.html reftest-opaque-layer-fail.html
!= reftest-opaque-layer-wait-fail.html about:blank
fails-if(layerChecksEnabled) == reftest-opaque-layer-wait-fail.html reftest-opaque-layer-fail.html
fails-if(layerChecksEnabled) != reftest-opaque-layer-wait-fail.html about:blank

# reftest-assigned-layer
!= reftest-assigned-layer-pass.html about:blank
!= reftest-assigned-layer-fail-1.html about:blank
!= reftest-assigned-layer-fail-2.html about:blank
!= reftest-assigned-layer-fail-3.html about:blank
!= reftest-assigned-layer-fail-4.html about:blank
fails-if(layerChecksEnabled) != reftest-assigned-layer-fail-1.html about:blank
fails-if(layerChecksEnabled) != reftest-assigned-layer-fail-2.html about:blank
fails-if(layerChecksEnabled) != reftest-assigned-layer-fail-3.html about:blank
fails-if(layerChecksEnabled) != reftest-assigned-layer-fail-4.html about:blank

# reftest-resolution
pref(apz.allow_zooming,true) fails-if(useDrawSnapshot) == reftest-resolution.html reftest-resolution-ref.html
+3 −0
Original line number Diff line number Diff line
@@ -503,8 +503,11 @@ function BuildConditionSandbox(aURL) {
      g.windowUtils.layerManagerType == "OpenGL";
    sandbox.swgl =
      g.windowUtils.layerManagerType.startsWith("WebRender (Software");
    sandbox.webrender =
      g.windowUtils.layerManagerType.startsWith("WebRender");
    sandbox.layersOMTC =
      g.windowUtils.layerManagerRemote == true;
    sandbox.layerChecksEnabled = !sandbox.webrender;

    // Shortcuts for widget toolkits.
    sandbox.Android = xr.OS == "Android";
+71 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ Cu.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/CustomElementsListener.jsm", null);

var gBrowserIsRemote;
var gIsWebRenderEnabled;
var gHaveCanvasSnapshot = false;
var gCurrentURL;
var gCurrentURLRecordResults;
@@ -864,6 +865,7 @@ function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements, f
                    }
                }
              }
              CheckLayerAssertions(contentRootElement);
            }

            if (!IsSnapshottableTestType()) {
@@ -998,6 +1000,7 @@ async function OnDocumentLoad(uri)
            // Go into reftest-wait mode belatedly.
            WaitForTestEnd(contentRootElement, inPrintMode, [], uri);
        } else {
            CheckLayerAssertions(contentRootElement);
            CheckForProcessCrashExpectation(contentRootElement);
            RecordResult(uri);
        }
@@ -1027,6 +1030,63 @@ async function OnDocumentLoad(uri)
    }
}

function CheckLayerAssertions(contentRootElement)
{
    if (!contentRootElement) {
        return;
    }
    if (gIsWebRenderEnabled) {
        // WebRender doesn't use layers, so let's not try checking layers
        // assertions.
        return;
    }

    var opaqueLayerElements = getOpaqueLayerElements(contentRootElement);
    for (var i = 0; i < opaqueLayerElements.length; ++i) {
        var elem = opaqueLayerElements[i];
        try {
            if (!windowUtils().isPartOfOpaqueLayer(elem)) {
                SendFailedOpaqueLayer(elementDescription(elem) + ' is not part of an opaque layer');
            }
        } catch (e) {
            SendFailedOpaqueLayer('got an exception while checking whether ' + elementDescription(elem) + ' is part of an opaque layer');
        }
    }
    var layerNameToElementsMap = getAssignedLayerMap(contentRootElement);
    var oneOfEach = [];
    // Check that elements with the same reftest-assigned-layer share the same PaintedLayer.
    for (var layerName in layerNameToElementsMap) {
        try {
            var elements = layerNameToElementsMap[layerName];
            oneOfEach.push(elements[0]);
            var numberOfLayers = windowUtils().numberOfAssignedPaintedLayers(elements);
            if (numberOfLayers !== 1) {
                SendFailedAssignedLayer('these elements are assigned to ' + numberOfLayers +
                                        ' different layers, instead of sharing just one layer: ' +
                                        elements.map(elementDescription).join(', '));
            }
        } catch (e) {
            SendFailedAssignedLayer('got an exception while checking whether these elements share a layer: ' +
                                    elements.map(elementDescription).join(', '));
        }
    }
    // Check that elements with different reftest-assigned-layer are assigned to different PaintedLayers.
    if (oneOfEach.length > 0) {
        try {
            var numberOfLayers = windowUtils().numberOfAssignedPaintedLayers(oneOfEach);
            if (numberOfLayers !== oneOfEach.length) {
                SendFailedAssignedLayer('these elements are assigned to ' + numberOfLayers +
                                        ' different layers, instead of having none in common (expected ' +
                                        oneOfEach.length + ' different layers): ' +
                                        oneOfEach.map(elementDescription).join(', '));
            }
        } catch (e) {
            SendFailedAssignedLayer('got an exception while checking whether these elements are assigned to different layers: ' +
                                    oneOfEach.map(elementDescription).join(', '));
        }
    }
}

function CheckForProcessCrashExpectation(contentRootElement)
{
    if (contentRootElement &&
@@ -1321,6 +1381,14 @@ function SendContentReady()

    let info = {};

    // The webrender check has to be separate from the d2d checks
    // since the d2d checks will throw an exception on non-windows platforms.
    try {
        gIsWebRenderEnabled = gfxInfo.WebRenderEnabled;
    } catch (e) {
        gIsWebRenderEnabled = false;
    }

    try {
        info.D2DEnabled = gfxInfo.D2DEnabled;
        info.DWriteEnabled = gfxInfo.DWriteEnabled;
@@ -1480,13 +1548,14 @@ async function SendUpdateCanvasForEvent(forURL, rectList, contentRootElement)

    var message;

    if (!windowUtils().isMozAfterPaintPending) {
    if ((gIsWebRenderEnabled || shouldNotFlush(contentRootElement)) &&
        !windowUtils().isMozAfterPaintPending) {
        // Webrender doesn't have invalidation, and animations on the compositor
        // don't invoke any MozAfterEvent which means we have no invalidated
        // rect so we just invalidate the whole screen once we don't have
        // anymore paints pending. This will force the snapshot.

        LogInfo("Sending update whole canvas for invalidation");
        LogInfo("Webrender enabled, sending update whole canvas for invalidation");
        message = "reftest:UpdateWholeCanvasForInvalidation";
    } else {
        LogInfo("SendUpdateCanvasForEvent with " + rectList.length + " rects");
+4 −3
Original line number Diff line number Diff line
@@ -70,12 +70,13 @@ function TestBuffer(str)
  g.testLog.push(str);
}

function isAndroidDevice() {
function isWebRenderOnAndroidDevice() {
  var xr = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
  // This is the best we can do for now; maybe in the future we'll have
  // more correct detection of this case.
  return xr.OS == "Android" &&
      g.browserIsRemote;
      g.browserIsRemote &&
      g.windowUtils.layerManagerType.startsWith("WebRender");
}

function FlushTestBuffer()
@@ -1213,7 +1214,7 @@ function RecordResult(testRunTime, errorMsg, typeSpecificResults)

            if (g.urls[0].noAutoFuzz) {
                // Autofuzzing is disabled
            } else if (isAndroidDevice() && maxDifference.value <= 2 && differences > 0) {
            } else if (isWebRenderOnAndroidDevice() && maxDifference.value <= 2 && differences > 0) {
                // Autofuzz for WR on Android physical devices: Reduce any
                // maxDifference of 2 to 0, because we get a lot of off-by-ones
                // and off-by-twos that are very random and hard to annotate.
Loading