Last Comment Bug 762657 - Fix canvas tests to comply a bit more with the spec
: Fix canvas tests to comply a bit more with the spec
Status: RESOLVED FIXED
: addon-compat, dev-doc-complete
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Peter Van der Beken [:peterv] - away till Aug 1st
:
Mentors:
: 625804 (view as bug list)
Depends on: 773545 784809
Blocks: 762654
  Show dependency treegraph
 
Reported: 2012-06-07 13:39 PDT by Peter Van der Beken [:peterv] - away till Aug 1st
Modified: 2014-11-25 13:02 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (16.11 KB, patch)
2012-06-07 13:39 PDT, Peter Van der Beken [:peterv] - away till Aug 1st
Ms2ger: review+
Details | Diff | Splinter Review

Description Peter Van der Beken [:peterv] - away till Aug 1st 2012-06-07 13:39:08 PDT
Created attachment 631111 [details] [diff] [review]
v1
Comment 1 :Ms2ger (⌚ UTC+1/+2) 2012-06-15 12:14:31 PDT
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)
Comment 2 Peter Van der Beken [:peterv] - away till Aug 1st 2012-06-19 06:46:28 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/36171f976b95
Comment 3 Peter Van der Beken [:peterv] - away till Aug 1st 2012-06-19 06:47:25 PDT
*** Bug 625804 has been marked as a duplicate of this bug. ***
Comment 4 Ed Morley [:emorley] 2012-06-20 02:23:30 PDT
https://hg.mozilla.org/mozilla-central/rev/36171f976b95

Note You need to log in before you can comment on or make changes to this bug.