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

Unified Diff: third_party/WebKit/Source/core/html/ImageData.idl

Issue 2555213002: Implement color management for ImageData (Closed)
Patch Set: Addressing comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3b2e7bc11e3c04c106115ff4bc5fa1bfec313ea3 100644
--- a/third_party/WebKit/Source/core/html/ImageData.idl
+++ b/third_party/WebKit/Source/core/html/ImageData.idl
@@ -28,14 +28,16 @@
// https://html.spec.whatwg.org/#dom-imagedata
+enum ImageDataColorSpace { "legacy-srgb", "srgb", "linear-rgb" };
+
[
- Constructor(unsigned long sw, unsigned long sh),
- Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh),
+ Constructor(unsigned long sw, unsigned long sh, optional ImageDataColorSpace colorSpace = "legacy-srgb"),
Justin Novosad 2016/12/08 20:58:59 We need to hide this behind a flag. To do this, i
zakerinasab 2016/12/08 22:13:52 Done.
+ Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh, optional ImageDataColorSpace colorSpace),
Justin Novosad 2016/12/08 20:58:59 same here.
zakerinasab 2016/12/08 22:13:52 Done.
Exposed=(Window,Worker),
RaisesException=Constructor,
] interface ImageData {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
- // TODO(foolip): Expose data.
- // readonly attribute Uint8ClampedArray data;
+ readonly attribute Uint8ClampedArray data;
+ readonly attribute ImageDataColorSpace colorSpace;
};

Powered by Google App Engine
This is Rietveld 408576698