The default bug view has changed. See this FAQ.

Fix canvas tests to comply a bit more with the spec

RESOLVED FIXED in mozilla16

Status

()

Core
Canvas: 2D
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: peterv, Assigned: peterv)

Tracking

({addon-compat, dev-doc-complete})

Trunk
mozilla16
addon-compat, dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 631111 [details] [diff] [review]
v1
(Assignee)

Updated

5 years ago
Attachment #631111 - Flags: review?(Ms2ger)
Comment on attachment 631111 [details] [diff] [review]
v1

Review of attachment 631111 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with these nits fixed.

::: content/canvas/src/CustomQS_Canvas.h
@@ +37,5 @@
>    xpc_qsSelfRef imageDataRef;
> +  nsresult rv = xpc_qsUnwrapArg<nsIDOMImageData>(cx, imageData, &domImageData,
> +                                                 &imageDataRef.ptr, &imageData);
> +  if (NS_FAILED(rv)) {
> +      return xpc_qsThrow(cx, rv);

Indentation

@@ -50,5 @@
> -  // TODO - bug 625804: Remove support for duck-typed ImageData.
> -  JSObject& dataObject = imageData.toObject();
> -
> -  if (!GetPositiveInt(cx, dataObject, "width", width) ||
> -      !GetPositiveInt(cx, dataObject, "height", height)) {

Remove GetPositiveInt; those are the only calls.

::: content/canvas/test/test_canvas.html
@@ +3695,2 @@
>  
>  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

Remove this; it was necessary to get at Components.results.NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL.

@@ +15970,5 @@
>  var ctx = canvas.getContext('2d');
>  
> +var _thrown = undefined; try {
> +  ctx.createPattern(canvas, null);
> +} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError");

(Pushed this upstream: http://dvcs.w3.org/hg/html/rev/4e230b0f13dd)
Attachment #631111 - Flags: review?(Ms2ger) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/36171f976b95
(Assignee)

Updated

5 years ago
Duplicate of this bug: 625804
(Assignee)

Updated

5 years ago
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/36171f976b95
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Keywords: addon-compat
Depends on: 773545
Depends on: 784809
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.putImageData#Compatibility_notes
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.createPattern#Compatibility_notes
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.