Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/ImageData.idl |
| diff --git a/third_party/WebKit/Source/core/html/ImageData.idl b/third_party/WebKit/Source/core/html/ImageData.idl |
| index d52d253a70049da153f86574ce21973a3bae0ad3..673f6cb7fbb77163bb15e0f8e553d67734a76cf1 100644 |
| --- a/third_party/WebKit/Source/core/html/ImageData.idl |
| +++ b/third_party/WebKit/Source/core/html/ImageData.idl |
| @@ -27,6 +27,9 @@ |
| */ |
| // https://html.spec.whatwg.org/#dom-imagedata |
| +// https://github.com/junov/CanvasColorSpace/blob/master/CanvasColorSpaceProposal.md#imagedata |
| + |
| +enum ImageDataColorSpace { "legacy-srgb", "srgb", "linear-rgb" }; |
| [ |
| Constructor(unsigned long sw, unsigned long sh), |
| @@ -34,8 +37,15 @@ |
| Exposed=(Window,Worker), |
| RaisesException=Constructor, |
| ] interface ImageData { |
| + |
| + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace); |
| + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(Uint8ClampedArray data, unsigned long sw, ImageDataColorSpace colorSpace); |
| + [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(Uint8ClampedArray data, unsigned long sw, unsigned long sh, ImageDataColorSpace colorSpace); |
| + |
| readonly attribute unsigned long width; |
| readonly attribute unsigned long height; |
| - // TODO(foolip): Expose data. |
| - // readonly attribute Uint8ClampedArray data; |
| + readonly attribute Uint8ClampedArray data; |
|
Justin Novosad
2016/12/16 18:38:11
Do you understand how this worked before, without
zakerinasab1
2016/12/19 19:57:39
Not yet. I've asked foolip about this but he could
|
| + readonly attribute ImageDataColorSpace colorSpace; |
| }; |
| + |
| + |
|
Justin Novosad
2016/12/16 18:38:11
remove whitespace
zakerinasab1
2016/12/19 19:57:39
Done.
|