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

Issue 20748002: Blob creation methods for ImageBitmap. (Closed)

Created:
7 years, 5 months ago by arbesfeld
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Visibility:
Public.

Description

Blob creation methods for ImageBitmap. Error handling for non-image blobs will be done in a future patch, once promises have been implemented. BUG=260984, 166658 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156101

Patch Set 1 #

Total comments: 4

Patch Set 2 : Read blob as ArrayBuffer. Refactor into ImageBitmapFactories. #

Total comments: 2

Patch Set 3 : Create interface for holding onto ImageBitmapLoader ref. #

Patch Set 4 : Fix leaked ptr. #

Patch Set 5 : Make ImageBitmapFactories a class. #

Total comments: 11

Patch Set 6 : Review comments. #

Patch Set 7 : Fix leaked ptr. #

Patch Set 8 : Move ImageBitmapFactories to modules, add supplementable. #

Patch Set 9 : Add OWNERS file. #

Total comments: 3

Patch Set 10 : Review comment fixes. #

Total comments: 2

Patch Set 11 : Mark debug test as Timeout #

Patch Set 12 : ImageBitmapLoaders now self-destruct. #

Patch Set 13 : Do not pass "this" to PassRefPtr... #

Total comments: 2

Patch Set 14 : Use IntRect() instead of IntRect(0, 0, 0, 0) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1125 lines, -399 lines) Patch
M LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html View 1 11 5 chunks +22 lines, -9 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-expected.txt View 1 11 1 chunk +500 lines, -0 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-createImageBitmap-immutable.html View 1 3 chunks +61 lines, -27 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-createImageBitmap-immutable-expected.html View 1 1 chunk +5 lines, -3 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-createImageBitmap-invalid-args.html View 1 2 3 4 5 6 7 5 chunks +39 lines, -10 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-createImageBitmap-invalid-args-expected.txt View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 2 chunks +0 lines, -3 lines 0 comments Download
M Source/core/page/ImageBitmap.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/page/ImageBitmap.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +22 lines, -10 lines 0 comments Download
M Source/core/page/ImageBitmapFactories.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -65 lines 0 comments Download
M Source/core/page/ImageBitmapFactories.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -223 lines 0 comments Download
M Source/core/page/ImageBitmapFactories.idl View 1 2 3 4 5 6 7 1 chunk +0 lines, -48 lines 0 comments Download
A Source/modules/imagebitmap/ImageBitmapFactories.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +119 lines, -0 lines 0 comments Download
A Source/modules/imagebitmap/ImageBitmapFactories.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +344 lines, -0 lines 0 comments Download
A + Source/modules/imagebitmap/ImageBitmapFactories.idl View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A Source/modules/imagebitmap/OWNERS View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
arbesfeld
PTAL. Thanks in advance.
7 years, 5 months ago (2013-07-26 15:33:01 UTC) #1
Justin Novosad
https://codereview.chromium.org/20748002/diff/1/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html File LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html (right): https://codereview.chromium.org/20748002/diff/1/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html#newcode144 LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html:144: eventSender.mouseUp(); This is a weird indirect way to get ...
7 years, 5 months ago (2013-07-26 18:15:58 UTC) #2
arbesfeld
New patch for review.
7 years, 4 months ago (2013-08-06 17:41:01 UTC) #3
Justin Novosad
https://codereview.chromium.org/20748002/diff/8001/Source/core/page/DOMWindow.h File Source/core/page/DOMWindow.h (right): https://codereview.chromium.org/20748002/diff/8001/Source/core/page/DOMWindow.h#newcode248 Source/core/page/DOMWindow.h:248: void loadBlobAsync(ImageBitmapLoader*, Blob*); Why does this need to live ...
7 years, 4 months ago (2013-08-07 19:35:12 UTC) #4
arbesfeld
On 2013/08/07 19:35:12, junov wrote: > https://codereview.chromium.org/20748002/diff/8001/Source/core/page/DOMWindow.h > File Source/core/page/DOMWindow.h (right): > > https://codereview.chromium.org/20748002/diff/8001/Source/core/page/DOMWindow.h#newcode248 > ...
7 years, 4 months ago (2013-08-07 21:18:48 UTC) #5
Justin Novosad
On 2013/08/07 21:18:48, arbesfeld wrote: > Unless I am missing something, the .idl "implements" only ...
7 years, 4 months ago (2013-08-08 15:50:33 UTC) #6
arbesfeld
Ah, of course. Done.
7 years, 4 months ago (2013-08-08 17:42:39 UTC) #7
Justin Novosad
This is looking tremendously better than the previous iteration. You need to remove the pattern.png ...
7 years, 4 months ago (2013-08-08 19:05:54 UTC) #8
arbesfeld
Still need an OWNER. Stephen?
7 years, 4 months ago (2013-08-12 14:14:32 UTC) #9
Stephen White
On 2013/08/12 14:14:32, arbesfeld wrote: > Still need an OWNER. Stephen? This looks ok to ...
7 years, 4 months ago (2013-08-12 14:53:24 UTC) #10
do-not-use
https://codereview.chromium.org/20748002/diff/29001/Source/core/page/DOMWindow.h File Source/core/page/DOMWindow.h (right): https://codereview.chromium.org/20748002/diff/29001/Source/core/page/DOMWindow.h#newcode83 Source/core/page/DOMWindow.h:83: class DOMWindow : public RefCounted<DOMWindow>, public ScriptWrappable, public EventTarget, ...
7 years, 4 months ago (2013-08-12 15:02:19 UTC) #11
arbesfeld
On 2013/08/12 15:02:19, Christophe Dumez wrote: > https://codereview.chromium.org/20748002/diff/29001/Source/core/page/DOMWindow.h > File Source/core/page/DOMWindow.h (right): > > https://codereview.chromium.org/20748002/diff/29001/Source/core/page/DOMWindow.h#newcode83 ...
7 years, 4 months ago (2013-08-12 15:08:14 UTC) #12
do-not-use
On 2013/08/12 15:08:14, arbesfeld wrote: > On 2013/08/12 15:02:19, Christophe Dumez wrote: > > > ...
7 years, 4 months ago (2013-08-12 15:15:44 UTC) #13
do-not-use
https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp File Source/core/page/ImageBitmap.cpp (right): https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp#newcode171 Source/core/page/ImageBitmap.cpp:171: RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(image, normalizedCropRect))); nit: we don't really need ...
7 years, 4 months ago (2013-08-12 15:15:59 UTC) #14
do-not-use
https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmapFactories.h File Source/core/page/ImageBitmapFactories.h (right): https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmapFactories.h#newcode80 Source/core/page/ImageBitmapFactories.h:80: static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories* factory, PassRefPtr<ScriptPromiseResolver> resolver, IntRect* cropRect) It ...
7 years, 4 months ago (2013-08-12 15:36:14 UTC) #15
arbesfeld
https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp File Source/core/page/ImageBitmap.cpp (right): https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp#newcode171 Source/core/page/ImageBitmap.cpp:171: RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(image, normalizedCropRect))); On 2013/08/12 15:15:59, Christophe Dumez ...
7 years, 4 months ago (2013-08-12 15:49:39 UTC) #16
do-not-use
On 2013/08/12 15:49:39, arbesfeld wrote: > https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp > File Source/core/page/ImageBitmap.cpp (right): > > https://codereview.chromium.org/20748002/diff/29001/Source/core/page/ImageBitmap.cpp#newcode171 > ...
7 years, 4 months ago (2013-08-12 15:56:49 UTC) #17
arbesfeld
I didn't know about the Supplement class. Since ImageBitmapFactories will also be implemented by WorkerGlobalScope, ...
7 years, 4 months ago (2013-08-12 16:07:57 UTC) #18
do-not-use
On 2013/08/12 16:07:57, arbesfeld wrote: > I didn't know about the Supplement class. Since ImageBitmapFactories ...
7 years, 4 months ago (2013-08-12 17:03:42 UTC) #19
arbesfeld
Merged with https://codereview.chromium.org/22906002/ ImageBitmapFactories now implements supplementable and lives in the modules/ directory.
7 years, 4 months ago (2013-08-12 21:11:10 UTC) #20
do-not-use
LGTM. https://codereview.chromium.org/20748002/diff/57001/Source/core/page/ImageBitmap.cpp File Source/core/page/ImageBitmap.cpp (right): https://codereview.chromium.org/20748002/diff/57001/Source/core/page/ImageBitmap.cpp#newcode177 Source/core/page/ImageBitmap.cpp:177: RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(image, normalizedCropRect))); nit: Useless local variable. ...
7 years, 4 months ago (2013-08-12 21:46:19 UTC) #21
arbesfeld
On 2013/08/12 21:46:19, Christophe Dumez wrote: > LGTM. > > https://codereview.chromium.org/20748002/diff/57001/Source/core/page/ImageBitmap.cpp > File Source/core/page/ImageBitmap.cpp (right): ...
7 years, 4 months ago (2013-08-12 21:50:21 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/20748002/68001
7 years, 4 months ago (2013-08-12 21:52:05 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/20748002/84001
7 years, 4 months ago (2013-08-12 23:40:20 UTC) #24
arbesfeld
Please review the latest patch. The drawImage test was failing in the Debug build due ...
7 years, 4 months ago (2013-08-13 20:02:56 UTC) #25
do-not-use
On 2013/08/13 20:02:56, arbesfeld wrote: > Please review the latest patch. The drawImage test was ...
7 years, 4 months ago (2013-08-14 07:55:07 UTC) #26
do-not-use
https://codereview.chromium.org/20748002/diff/68001/Source/modules/imagebitmap/ImageBitmapFactories.cpp File Source/modules/imagebitmap/ImageBitmapFactories.cpp (right): https://codereview.chromium.org/20748002/diff/68001/Source/modules/imagebitmap/ImageBitmapFactories.cpp#newcode197 Source/modules/imagebitmap/ImageBitmapFactories.cpp:197: RefPtr<ImageBitmapLoader> loader = ImageBitmapFactories::ImageBitmapLoader::create(from(eventTarget->toDOMWindow()), resolver, cropRect); e.g. You would ...
7 years, 4 months ago (2013-08-14 08:10:29 UTC) #27
arbesfeld
On 2013/08/14 08:10:29, Christophe Dumez wrote: > https://codereview.chromium.org/20748002/diff/68001/Source/modules/imagebitmap/ImageBitmapFactories.cpp > File Source/modules/imagebitmap/ImageBitmapFactories.cpp (right): > > https://codereview.chromium.org/20748002/diff/68001/Source/modules/imagebitmap/ImageBitmapFactories.cpp#newcode197 ...
7 years, 4 months ago (2013-08-14 14:31:45 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/20748002/104001
7 years, 4 months ago (2013-08-14 14:36:33 UTC) #29
Stephen White
https://codereview.chromium.org/20748002/diff/104001/Source/modules/imagebitmap/ImageBitmapFactories.cpp File Source/modules/imagebitmap/ImageBitmapFactories.cpp (right): https://codereview.chromium.org/20748002/diff/104001/Source/modules/imagebitmap/ImageBitmapFactories.cpp#newcode270 Source/modules/imagebitmap/ImageBitmapFactories.cpp:270: provideTo(window, supplementName(), adoptPtr(supplement)); Nit: kind of a style thing, ...
7 years, 4 months ago (2013-08-14 14:39:13 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/arbesfeld@chromium.org/20748002/118001
7 years, 4 months ago (2013-08-14 15:04:11 UTC) #31
Stephen White
https://codereview.chromium.org/20748002/diff/104001/Source/modules/imagebitmap/ImageBitmapFactories.cpp File Source/modules/imagebitmap/ImageBitmapFactories.cpp (right): https://codereview.chromium.org/20748002/diff/104001/Source/modules/imagebitmap/ImageBitmapFactories.cpp#newcode270 Source/modules/imagebitmap/ImageBitmapFactories.cpp:270: provideTo(window, supplementName(), adoptPtr(supplement)); On 2013/08/14 14:39:13, Stephen White wrote: ...
7 years, 4 months ago (2013-08-14 15:16:17 UTC) #32
commit-bot: I haz the power
7 years, 4 months ago (2013-08-14 16:09:28 UTC) #33
Message was sent while issue was closed.
Change committed as 156101

Powered by Google App Engine
This is Rietveld 408576698