Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: LayoutTests/fast/canvas/canvas-text-ideographic-space.html

Issue 293653002: Canvas fillText and measureText handle ideographic spaces differently. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add v/g/* test expectations Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charcode="utf-16">
5 <script src="../../resources/js-test.js"></script>
6 <style>
7
8 span {
9 padding : 0px;
10 font-size : 12px;
11 font-family : Arial;
12 display : inline;
13 }
14
15 </style>
16 </head>
17 <body>
18 <div><span>a&#x3000;b&#x3000;c</span></div>
19 <div><canvas></canvas></div>
20 <script>
21
22 var canvas = document.querySelector("canvas");
23 var context = canvas.getContext("2d");
24 var span = document.querySelector("span");
25
26 var abc = 'a' + '\u3000' + 'b' + '\u3000' + 'c';
27 context.font = "12px Arial";
28 context.fillText(abc, 0, 20);
29
30 spanWidth = span.offsetWidth;
31 canvasWidth = context.measureText(abc).width;
32 shouldBeTrue("spanWidth == canvasWidth");
33
34 </script>
35 </body>
36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698