Skip to content

Commit

Permalink
Bug 1869738. Add a test for transformed stroked lines. r=lsalzman
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmuizel committed Dec 15, 2023
1 parent 89ca0b7 commit e016105
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layout/reftests/canvas/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,5 @@ fuzzy-if(winWidget,0-94,0-1575) fuzzy-if(cocoaWidget,0-1,0-34) == 1304353-text-g
== 1850284-1.html 1850284-1-ref.html

!= 1850727-1.html 1850727-1-ref.html

== transformed-line-stroke.html transformed-line-stroke-ref.html
15 changes: 15 additions & 0 deletions layout/reftests/canvas/transformed-line-stroke-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<canvas id=c></canvas>
<script>
const canvas = document.getElementById("c");
const ctx = canvas.getContext("2d");

canvas.width = 600;
canvas.height = 300;


ctx.strokeStyle = "rgba(0, 0, 0, 1)";
ctx.beginPath();
ctx.moveTo(87, 137.5);
ctx.lineTo(738, 137.5);
ctx.stroke();
</script>
16 changes: 16 additions & 0 deletions layout/reftests/canvas/transformed-line-stroke.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<canvas id=c></canvas>
<script>
const canvas = document.getElementById("c");
const ctx = canvas.getContext("2d");

canvas.width = 600;
canvas.height = 300;

ctx.translate(-5, 0);

ctx.strokeStyle = "rgba(0, 0, 0, 1)";
ctx.beginPath();
ctx.moveTo(93, 137.5);
ctx.lineTo(741, 137.5);
ctx.stroke();
</script>

0 comments on commit e016105

Please sign in to comment.