mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1353000 - Reftest to check that shaping rotated text does not disrupt non-rotated text due to cache pollution. r=jrmuizel
This commit is contained in:
parent
c336bff796
commit
8ef78da7ff
31
layout/reftests/canvas/1353000-1-ref.html
Normal file
31
layout/reftests/canvas/1353000-1-ref.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function draw(id, r, c) {
|
||||
var txt = "TryToTaLLY-" + id + "__________" + r;
|
||||
var ctx = document.getElementById(id).getContext('2d');
|
||||
ctx.font = '15px Arial';
|
||||
ctx.fillStyle = c;
|
||||
if (r) {
|
||||
ctx.save();
|
||||
ctx.rotate(Math.PI / 4);
|
||||
ctx.fillText(txt, 200, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
ctx.fillText(txt, 10, 20);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
canvas { border: 1px solid silver; margin: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="float:left; transform: translate(300px, 150px) scale(3)">
|
||||
<canvas id="c1" width="120" height="50"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
draw("c1", false, "red");
|
||||
draw("c1", false, "green");
|
||||
</script>
|
||||
</body>
|
31
layout/reftests/canvas/1353000-1.html
Normal file
31
layout/reftests/canvas/1353000-1.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function draw(id, r, c) {
|
||||
var txt = "TryToTaLLY-" + id + "__________" + r;
|
||||
var ctx = document.getElementById(id).getContext('2d');
|
||||
ctx.font = '15px Arial';
|
||||
ctx.fillStyle = c;
|
||||
if (r) {
|
||||
ctx.save();
|
||||
ctx.rotate(Math.PI / 4);
|
||||
ctx.fillText(txt, 200, 0);
|
||||
ctx.restore();
|
||||
}
|
||||
ctx.fillText(txt, 10, 20);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
canvas { border: 1px solid silver; margin: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="float:left; transform: translate(300px, 150px) scale(3)">
|
||||
<canvas id="c1" width="120" height="50"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
draw("c1", true, "red");
|
||||
draw("c1", false, "green");
|
||||
</script>
|
||||
</body>
|
@ -113,3 +113,4 @@ fuzzy-if(winWidget,94,1575) fuzzy-if(cocoaWidget,1,24) == 1304353-text-global-co
|
||||
== text-indent-1b.html text-indent-1-ref.html
|
||||
|
||||
== 1347147-1.html 1347147-1-ref.html
|
||||
== 1353000-1.html 1353000-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user