Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Issue 1496683005: Make callback arg non-nullable on canvas.toBlob (Closed)

Created:
5 years ago by xlai (Olivia)
Modified:
5 years ago
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make callback arg non-nullable on canvas.toBlob Recent spec change (https://github.com/whatwg/html/pull/377) says that toBlob() callback argument should be non-nullable. BUG=67587 Committed: https://crrev.com/de0c737213ae5df1ae88b666723639820432d19c Cr-Commit-Position: refs/heads/master@{#364403}

Patch Set 1 #

Patch Set 2 : Adding layout test #

Total comments: 1

Patch Set 3 : Small correction #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html View 1 2 1 chunk +18 lines, -0 lines 1 comment Download
A third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid-expected.txt View 1 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (7 generated)
xlai (Olivia)
After this change, calling canvas.toBlob(null) will correctly throw such an error in the JavaScript console: ...
5 years ago (2015-12-03 21:59:25 UTC) #2
Justin Novosad
This is missing a test. Actually, the original CL was missing a test, and I ...
5 years ago (2015-12-03 22:08:36 UTC) #3
Justin Novosad
Here is an example of a test that does this: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-getContext-invalid.js
5 years ago (2015-12-03 22:13:16 UTC) #4
xlai (Olivia)
5 years ago (2015-12-04 18:17:18 UTC) #5
Justin Novosad
lgtm with minor correction. https://codereview.chromium.org/1496683005/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html (right): https://codereview.chromium.org/1496683005/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html#newcode7 third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html:7: <script src="script-tests/canvas-toBlob-invalid.js"></script> This is an ...
5 years ago (2015-12-08 02:12:28 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1496683005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1496683005/40001
5 years ago (2015-12-10 16:34:53 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-10 18:22:52 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/de0c737213ae5df1ae88b666723639820432d19c Cr-Commit-Position: refs/heads/master@{#364403}
5 years ago (2015-12-10 18:23:52 UTC) #14
Noel Gordon
5 years ago (2015-12-11 01:01:46 UTC) #16
Message was sent while issue was closed.
LGTM

https://codereview.chromium.org/1496683005/diff/40001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html
(right):

https://codereview.chromium.org/1496683005/diff/40001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/fast/canvas/canvas-toBlob-invalid.html:12:
shouldThrow("canvas.toBlob(undefined);");
The way it's going, we should add 

shouldThrow("canvas.toBlob(42);");

for posterity :)

Powered by Google App Engine
This is Rietveld 408576698