Skip to content

Commit

Permalink
Merge pull request #1177 from w3c/jgraham/whitespace/trailing/2dcontext
Browse files Browse the repository at this point in the history
2dcontext cleanup trailing whitespace; r=Ms2ger
  • Loading branch information
Ms2ger committed Aug 14, 2014
2 parents cf45429 + fb81d51 commit 88d37e0
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 43 deletions.
@@ -1,12 +1,12 @@
<!doctype HTML>
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: isPointInPath() unaffected by the current transformation matrix</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-ispointinpath" />
<meta name="assert" content="isPointInPath must check the point (x, y) as coordinates unaffected by the current transformation matrix." />
<script type="text/javascript">
function runTest()
function runTest()
{
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
Expand All @@ -16,7 +16,7 @@
ctx.rect(0, 0, 100, 50);

// Ensure that the coordinates passed to isPointInPath are unaffected by the current transformation matrix.
if (ctx.isPointInPath(125, 75) && !ctx.isPointInPath(25, 25))
if (ctx.isPointInPath(125, 75) && !ctx.isPointInPath(25, 25))
{
document.getElementById("testresult").firstChild.data = "PASS";
}
Expand Down
Expand Up @@ -4,7 +4,7 @@
<title>drawFocusIfNeeded() - AAPI test</title>
<link rel="author" title="Mark Sadecki" href="mark@w3.org">
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-drawFocusIfNeeded">

</head>
<body>
<h1>Description</h1>
Expand All @@ -16,7 +16,7 @@ <h1>Description</h1>
</canvas>
<p><a href="http://www.w3.org">Fourth focusable element</a></p>

<script>
<script>
var button1 = document.getElementById('button1');
var button2 = document.getElementById('button2');
var canvas = document.getElementById('canvas');
Expand Down
@@ -1,12 +1,12 @@
<!doctype HTML>
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: createlinearGradient() with two points same</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-createlineargradient" />
<meta name="assert" content="If the two points in a linear gradient have identical x,y coordinates, the canvas must paint nothing." />
<script type="text/javascript">
function runTest()
function runTest()
{
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
Expand Down
Expand Up @@ -22,7 +22,7 @@ <h1>2d.path.transformation.multiple</h1>
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);

ctx.fillStyle = '#f00';
ctx.fillStyle = '#f00';
ctx.translate(-100, 0);
ctx.rect(0, 0, 100, 50);
ctx.fill();
Expand Down
6 changes: 3 additions & 3 deletions 2dcontext/text-styles/canvas_text_font_001.htm
@@ -1,12 +1,12 @@
<!doctype HTML>
<!doctype HTML>
<html>
<head>
<title>HTML5 Canvas Test: Ignore property-independent style sheet syntax "inherit" in Text</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com" />
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-font" />
<meta name="assert" content=": Ignore 'inherit' property-independent style sheet syntax without assigning a new font value." />
<script type="text/javascript">
function runTest()
function runTest()
{
var canvas = document.getElementById("canvas1");
var ctx = canvas.getContext("2d");
Expand All @@ -20,7 +20,7 @@

// Assign a valid font which was used earlier.
ctx.font = "40px Times New Roman";
ctx.fillText("Test String", 5, 100);
ctx.fillText("Test String", 5, 100);
}
</script>
</head>
Expand Down
6 changes: 3 additions & 3 deletions 2dcontext/tools/current-work-canvas.xhtml
Expand Up @@ -540,7 +540,7 @@

<!-- v2: we're on v4.1. suggestions for next version are marked v5, v6. -->



<p>This specification defines the <dfn id="canvas-context-2d" title="canvas-context-2d"><code>2d</code></dfn> context type, whose
API is implemented using the <code><a href="#canvasrenderingcontext2d">CanvasRenderingContext2D</a></code>
Expand Down Expand Up @@ -3554,7 +3554,7 @@ function AddCloud(data, x, y) { ... }</pre>

</div>



</div><!--data-component-->

Expand Down Expand Up @@ -3690,4 +3690,4 @@ function AddCloud(data, x, y) { ... }</pre>



</body></html>
</body></html>
3 changes: 1 addition & 2 deletions 2dcontext/tools/spec.yaml
Expand Up @@ -55,7 +55,7 @@ assertions:
- id: toDataURL.lowercase
text: "User agents *must* convert the provided type to ASCII lowercase before establishing if they support that type<^>."
- id: toDataURL.jpeg
previously: [ 0, "image/png", false ]
previously: [ 0, "image/png", false ]
text: "image/jpeg<^>"
- id: toDataURL.jpeg.quality
text: "The second argument, if it is a number in the range 0.0 to 1.0 inclusive, *must* be treated as the desired quality level<^>."
Expand Down Expand Up @@ -715,4 +715,3 @@ assertions:
text: "Whenever the toDataURL() method of a canvas element whose origin-clean flag is set to false is called, the method *must* raise a SECURITY_ERR exception<^>."
- id: security.getImageData
text: "Whenever the getImageData() method of the 2D context of a canvas element whose origin-clean flag is set to false is called with otherwise correct arguments, the method *must* raise a SECURITY_ERR exception<^>."

3 changes: 1 addition & 2 deletions 2dcontext/tools/templates.yaml
Expand Up @@ -276,7 +276,7 @@ index: |
<p>Developed by <a href="mailto:excors&#64;gmail.com">Philip Taylor</a>.
Last updated %(updated)s.
<p>Based on the <a
href="http://www.whatwg.org/specs/web-apps/current-work/#the-canvas">HTML</a>
Draft Standard &mdash; 22 February 2010. See also the <a
Expand Down Expand Up @@ -376,4 +376,3 @@ results: |
<col id="col1">
<tr>
<th>Test
1 change: 0 additions & 1 deletion 2dcontext/tools/tests.yaml
Expand Up @@ -1029,4 +1029,3 @@
@assert throws SECURITY_ERR canvas.toDataURL();
canvas.width = 100;
@assert throws SECURITY_ERR canvas.toDataURL();
45 changes: 22 additions & 23 deletions 2dcontext/tools/tests2d.yaml
Expand Up @@ -599,7 +599,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
@assert pixel 50,25 == 0,255,0,255;
expected: green

Expand Down Expand Up @@ -709,7 +709,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
@assert pixel 50,25 == 0,255,0,255;
expected: green

Expand Down Expand Up @@ -740,7 +740,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
@assert pixel 50,25 == 0,255,0,255;
expected: green

Expand Down Expand Up @@ -823,7 +823,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
@assert pixel 50,25 == 0,255,0,255;
expected: green

Expand Down Expand Up @@ -890,7 +890,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
@assert pixel 50,25 == 0,255,0,255;
expected: green

Expand Down Expand Up @@ -3001,7 +3001,7 @@
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
var img = document.getElementById('green.png');
var pattern = ctx.createPattern(img, 'no-repeat');
ctx.fillStyle = pattern;
Expand Down Expand Up @@ -3360,7 +3360,7 @@
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
var img = document.getElementById('rrgg-256x256.png');
var pattern = ctx.createPattern(img, 'no-repeat');
ctx.fillStyle = pattern;
Expand All @@ -3385,7 +3385,7 @@
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
var canvas2 = document.createElement('canvas');
canvas2.width = 100;
canvas2.height = 50;
Expand Down Expand Up @@ -4411,7 +4411,7 @@
- 2d.shadow.blur.initial
code: |
@assert ctx.shadowBlur === 0;
- name: 2d.shadow.attributes.shadowBlur.valid
testing:
- 2d.shadow.blur.get
Expand All @@ -4422,13 +4422,13 @@
ctx.shadowBlur = 0.5;
@assert ctx.shadowBlur === 0.5;
ctx.shadowBlur = 1e6;
@assert ctx.shadowBlur === 1e6;
ctx.shadowBlur = 0;
@assert ctx.shadowBlur === 0;
- name: 2d.shadow.attributes.shadowBlur.invalid
testing:
- 2d.shadow.blur.invalid
Expand All @@ -4440,11 +4440,11 @@
ctx.shadowBlur = 1;
ctx.shadowBlur = Infinity;
@assert ctx.shadowBlur === 1;
ctx.shadowBlur = 1;
ctx.shadowBlur = -Infinity;
@assert ctx.shadowBlur === 1;
ctx.shadowBlur = 1;
ctx.shadowBlur = NaN;
@assert ctx.shadowBlur === 1;
Expand All @@ -4470,12 +4470,12 @@
ctx.shadowOffsetY = 0.25;
@assert ctx.shadowOffsetX === 0.5;
@assert ctx.shadowOffsetY === 0.25;
ctx.shadowOffsetX = -0.5;
ctx.shadowOffsetY = -0.25;
@assert ctx.shadowOffsetX === -0.5;
@assert ctx.shadowOffsetY === -0.25;
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;
@assert ctx.shadowOffsetX === 0;
Expand Down Expand Up @@ -4535,11 +4535,11 @@
ctx.shadowColor = '#00ff00';
ctx.shadowColor = 'bogus';
@assert ctx.shadowColor === '#00ff00';
ctx.shadowColor = '#00ff00';
ctx.shadowColor = 'red bogus';
@assert ctx.shadowColor === '#00ff00';
ctx.shadowColor = '#00ff00';
ctx.shadowColor = ctx;
@assert ctx.shadowColor === '#00ff00';
Expand Down Expand Up @@ -6817,7 +6817,7 @@
ctx.stroke();
@assert pixel 50,25 == 0,255,0,255;
expected: green

- name: 2d.path.arc.nonempty
desc: arc() with a non-empty path does draw a straight line to the start point
testing:
Expand Down Expand Up @@ -8045,7 +8045,7 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#f00';
ctx.fillStyle = '#f00';
ctx.translate(-100, 0);
ctx.rect(0, 0, 100, 50);
ctx.fill();
Expand Down Expand Up @@ -9310,7 +9310,7 @@
code: |
ctx.fillStyle = '#08f';
ctx.fillRect(0, 0, 100, 50);
var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
@assert imgdata1.data[0] === 0;
@assert imgdata1.data[1] === 0;
Expand Down Expand Up @@ -9379,7 +9379,7 @@
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#fff';
ctx.fillRect(20, 10, 60, 10);
var imgdata1 = ctx.getImageData(85, 25, -10, -10);
@assert imgdata1.data[0] === 255;
@assert imgdata1.data[1] === 255;
Expand Down Expand Up @@ -10028,4 +10028,3 @@
ctx.fill();
@assert pixel 50,25 ==~ 0,255,0,255;
expected: green

2 changes: 1 addition & 1 deletion 2dcontext/tools/tests2dtext.yaml
Expand Up @@ -30,7 +30,7 @@
# em ex px
# 2d.text.font.parse.size.length.absolute
# in cm mm pt pc

- name: 2d.text.font.parse.size.percentage
testing:
- 2d.text.font.parse
Expand Down

0 comments on commit 88d37e0

Please sign in to comment.