# HG changeset patch # User Qiankun Miao # Date 1331015515 -28800 # Node ID caebdbee2c93465b35ed2fac1dc7701d013ea899 # Parent c3f2f7da0bfb5e30531768f6905002570d0deb06 canvas: update 2d.text.draw.space.collapse.nonspace case according spec In CSS3 spec, there is an update about non-space control character processing. "Control characters (Unicode class Cc) other than tab (U+0009), line feed (U+000A), and carriage return (U+000D) are ignored for the purpose of rendering". Please refer: http://www.w3.org/TR/css3-text/#white-space-processing. diff -r c3f2f7da0bfb -r caebdbee2c93 tests/submission/PhilipTaylor/tools/canvas/tests2dtext.yaml --- a/tests/submission/PhilipTaylor/tools/canvas/tests2dtext.yaml Mon Mar 05 18:42:32 2012 +0100 +++ b/tests/submission/PhilipTaylor/tools/canvas/tests2dtext.yaml Tue Mar 06 14:31:55 2012 +0800 @@ -874,7 +874,7 @@ expected: green - name: 2d.text.draw.space.collapse.nonspace - desc: Non-space characters are not converted to U+0020 and collapsed + desc: Non-space control characters are ignored for the purpose of rendering testing: - 2d.text.draw.spaces fonts: @@ -886,7 +886,7 @@ ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; - ctx.fillText('E\x0b EE', -150, 37.5); + ctx.fillText('E\x0b EE', -100, 37.5); @assert pixel 25,25 ==~ 0,255,0,255; @assert pixel 75,25 ==~ 0,255,0,255; }), 500);