[Webkit-unassigned] [Bug 39962] Remove hand-rolled JSC bindings for CanvasRenderingContext2D

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 13 12:35:34 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39962





--- Comment #17 from Andreas Kling <andreas.kling at nokia.com>  2010-06-13 12:35:32 PST ---
Remaining failures from original test:

> ctx.fillText() should throw SyntaxError: Syntax error. Was undefined.
> ctx.fillText('moo') should throw SyntaxError: Syntax error. Was undefined.
> ctx.fillText('moo',0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.fillText('moo',0,0,0,0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.strokeText() should throw SyntaxError: Syntax error. Was undefined.
> ctx.strokeText('moo') should throw SyntaxError: Syntax error. Was undefined.
> ctx.strokeText('moo',0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.strokeText('moo',0,0,0,0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.setStrokeColor(0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.setStrokeColor(0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.setFillColor(0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.setFillColor(0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(imageElement, 0, 0) should be undefined. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1
> ctx.drawImage(canvasElement, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0) should throw Error: INDEX_SIZE_ERR: DOM Exception 1. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Was undefined.
> ctx.createImageData(0, 0, 0) should be null. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1

Auto-generated code is more permissive than custom bindings.

> ctx.setStrokeColor() should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.setFillColor() should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.createImageData(0) should throw Error: NOT_SUPPORTED_ERR: DOM Exception 9. Threw exception TypeError: Type error.
> ctx.drawImage(imageElement) should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.drawImage(imageElement, 0) should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.drawImage(imageElement, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(imageElement, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) should throw SyntaxError: Syntax error. Threw exception Error: INDEX_SIZE_ERR: DOM Exception 1.
> ctx.drawImage(canvasElement) should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.drawImage(canvasElement, 0) should throw SyntaxError: Syntax error. Threw exception TypeError: Type error.
> ctx.createPattern(imageElement) should throw Error: SYNTAX_ERR: DOM Exception 12. Threw exception TypeError: Type error.
> ctx.createPattern(canvasElement) should throw Error: SYNTAX_ERR: DOM Exception 12. Threw exception TypeError: Type error.

Auto-generated and custom bindings both throw, but different exceptions.

> ctx.createImageData() should be null. Threw exception TypeError: Type error

This one would need some finagling with making the first argument optional etc.

> ctx.putImageData(imageData, 0, 0, 0) should be undefined. Threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9
> ctx.putImageData(imageData, 0, 0, 0, 0) should be undefined. Threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9
> ctx.putImageData(imageData, 0, 0, 0, 0, 0) should be undefined. Threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9

Missing arguments become NaN instead of 0, hence the NOT_SUPPORTED_ERR.
I guess we could add some custom IDL attribute like [PassZeroForMissingArguments].

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list