Commit 6ec41d71 authored by Andrew Osmond's avatar Andrew Osmond
Browse files

Bug 1580534 - Add new test case to confirm WebRender snaps in the ideal fashion. r=jrmuizel

Historically there were kludges in how we chose to snap layers and
transforms, nominally for performance reasons (see bug 602200 comment
36). WebRender appears to render what was considered at the time the
ideal outcome, which also makes the most sense as a content author.
Given we are otherwise lacking a reason to continue with the old
behaviour, this patch adds a new test case to confirm WebRender snaps in
the ideal fashion, and non-WebRender does not.

Differential Revision: https://phabricator.services.mozilla.com/D55852

--HG--
extra : moz-landing-system : lando
parent 8eaec07a
<!DOCTYPE HTML>
<html>
<body>
<div style="width:10px; height:10px; background:black; border:1px solid red; position:absolute; top:0px; transform: translate(1px);"></div>
</body>
</html>
<!DOCTYPE HTML>
<html>
<body>
<div style="-moz-transform:translate(0.4px); position:absolute; top:0px;">
<canvas style="margin-left:0.4px; border:1px solid red; display:block" width="10" height="10" id="c"></canvas>
</div>
<script>
var c = document.getElementById("c");
var ctx = c.getContext('2d');
ctx.fillStyle = "black";
ctx.fillRect(0, 0, c.width, c.height);
</script>
</body>
</html>
......@@ -1582,8 +1582,12 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 600974-2.html 600974-1-r
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 600974-3.html 600974-1-ref.html # Bug 1392106
== 602200-1.html 602200-1-ref.html
== 602200-2.html 602200-2-ref.html
# Canvas with a fractional margin does not snap properly; see bug 1580534
# Canvas with a fractional margin and translate snaps differently; non-WebRender
# accepts a kludge for performance reasons, while WebRender is able to create
# the idealized rendering. As such we assume we fail the old test, and pass the
# new test. See bug 1580534 for more details.
fuzzy-if(Android,0-8,0-20) fails-if(webrender) == 602200-3.html 602200-3-ref.html
fails-if(!webrender) == 1580534.html 1580534-ref.html
== 602200-4.html 602200-4-ref.html
== 603423-1.html 603423-1-ref.html
== 604737.html 604737-ref.html
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment