Skip to content

Commit e016105

Browse files
committed
Bug 1869738. Add a test for transformed stroked lines. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D196350
1 parent 89ca0b7 commit e016105

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

layout/reftests/canvas/reftest.list

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,5 @@ fuzzy-if(winWidget,0-94,0-1575) fuzzy-if(cocoaWidget,0-1,0-34) == 1304353-text-g
125125
== 1850284-1.html 1850284-1-ref.html
126126

127127
!= 1850727-1.html 1850727-1-ref.html
128+
129+
== transformed-line-stroke.html transformed-line-stroke-ref.html
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<canvas id=c></canvas>
2+
<script>
3+
const canvas = document.getElementById("c");
4+
const ctx = canvas.getContext("2d");
5+
6+
canvas.width = 600;
7+
canvas.height = 300;
8+
9+
10+
ctx.strokeStyle = "rgba(0, 0, 0, 1)";
11+
ctx.beginPath();
12+
ctx.moveTo(87, 137.5);
13+
ctx.lineTo(738, 137.5);
14+
ctx.stroke();
15+
</script>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<canvas id=c></canvas>
2+
<script>
3+
const canvas = document.getElementById("c");
4+
const ctx = canvas.getContext("2d");
5+
6+
canvas.width = 600;
7+
canvas.height = 300;
8+
9+
ctx.translate(-5, 0);
10+
11+
ctx.strokeStyle = "rgba(0, 0, 0, 1)";
12+
ctx.beginPath();
13+
ctx.moveTo(93, 137.5);
14+
ctx.lineTo(741, 137.5);
15+
ctx.stroke();
16+
</script>

0 commit comments

Comments
 (0)