diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html new file mode 100644 index 00000000000000..a78a280014edd4 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html @@ -0,0 +1,25 @@ + + +
Test if zero-lengthed closePath before and after arc are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html new file mode 100644 index 00000000000000..71876a029c7783 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html @@ -0,0 +1,35 @@ + + + +Test if zero-lengthed closePath before and after arc are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html new file mode 100644 index 00000000000000..4b867f821fa70f --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after bezier curve are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html new file mode 100644 index 00000000000000..e75aeb9529f053 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html @@ -0,0 +1,35 @@ + + + +Test if zero-lengthed closePath before and after bezier curve are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html new file mode 100644 index 00000000000000..87a99c79380036 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after line are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html new file mode 100644 index 00000000000000..5237c7ad199c53 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html @@ -0,0 +1,35 @@ + + + +Test if zero-lengthed closePath before and after line are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html new file mode 100644 index 00000000000000..03635b01483857 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.
+ + diff --git a/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html new file mode 100644 index 00000000000000..cd786944c50876 --- /dev/null +++ b/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html @@ -0,0 +1,35 @@ + + + +Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html new file mode 100644 index 00000000000000..a78a280014edd4 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after arc are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html new file mode 100644 index 00000000000000..f0e5ce2919c953 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html @@ -0,0 +1,38 @@ + + + +Test if zero-lengthed closePath before and after arc are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html new file mode 100644 index 00000000000000..86f13ec6b357ea --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html @@ -0,0 +1,52 @@ + + + + +Test if zero-lengthed closePath before and after arc are ignored corrected.
+ + + + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html new file mode 100644 index 00000000000000..4b867f821fa70f --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after bezier curve are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html new file mode 100644 index 00000000000000..1a42127db18887 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html @@ -0,0 +1,38 @@ + + + +Test if zero-lengthed closePath before and after bezier curve are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html new file mode 100644 index 00000000000000..8cf6726a92e8f5 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html @@ -0,0 +1,52 @@ + + + + +Test if zero-lengthed closePath before and after bezier curve are ignored corrected.
+ + + + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html new file mode 100644 index 00000000000000..87a99c79380036 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after line are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html new file mode 100644 index 00000000000000..b5a998072768bc --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html @@ -0,0 +1,38 @@ + + + +Test if zero-lengthed closePath before and after line are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html new file mode 100644 index 00000000000000..94f8f5041f1bdc --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html @@ -0,0 +1,52 @@ + + + + +Test if zero-lengthed closePath before and after line are ignored corrected.
+ + + + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html new file mode 100644 index 00000000000000..03635b01483857 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html @@ -0,0 +1,25 @@ + + +Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html new file mode 100644 index 00000000000000..344bcbc7596240 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html @@ -0,0 +1,38 @@ + + + +Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.
+ + diff --git a/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html new file mode 100644 index 00000000000000..417691c4703354 --- /dev/null +++ b/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html @@ -0,0 +1,52 @@ + + + + +Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.
+ + + + diff --git a/html/canvas/tools/yaml-new/path-objects.yaml b/html/canvas/tools/yaml-new/path-objects.yaml index 673c9085744279..3691915067e0a2 100644 --- a/html/canvas/tools/yaml-new/path-objects.yaml +++ b/html/canvas/tools/yaml-new/path-objects.yaml @@ -2879,6 +2879,157 @@ @assert pixel 50,25 == 0,255,0,255; expected: green +- name: 2d.path.stroke.prune.closePath.line + desc: Test if zero-lengthed closePath before and after line are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + + ctx.moveTo(50, 50); + ctx.lineTo(50, 50); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.bezierCurve + desc: Test if zero-lengthed closePath before and after bezier curve are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + + ctx.moveTo(20, 50); + ctx.lineTo(20, 50); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.quadraticCurve + desc: Test if zero-lengthed closePath before and after quadratic curve are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + + ctx.moveTo(50, 50); + ctx.lineTo(50, 50); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.arc + desc: Test if zero-lengthed closePath before and after arc are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(75, 20, 0, Math.PI); + ctx.closePath(); + + ctx.moveTo(50, 50); + ctx.lineTo(50, 50); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(75, 20, 0, Math.PI); + ctx.closePath(); + ctx.stroke(); - name: 2d.path.transformation.basic code: |