diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-07 22:06:24 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-07 22:06:24 +0100 |
commit | 6992106dc7894fab3f620263e99b4083b36bf9e8 (patch) | |
tree | 2a3554cf7bfabfeee0cc56ca58b04773a902cb76 /image/DecoderFactory.cpp | |
parent | 0b6d9a47051be9ef4d064c6f7c60717da91d0bc2 (diff) | |
download | uxp-6992106dc7894fab3f620263e99b4083b36bf9e8.tar.gz |
Use existing image decoders to handle clipboard BMP data.
This gets rid of the old nsImageClipboard widget code in favor of using
the nsBMPDecoder in imglib.
Diffstat (limited to 'image/DecoderFactory.cpp')
-rw-r--r-- | image/DecoderFactory.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/image/DecoderFactory.cpp b/image/DecoderFactory.cpp index 2085fb7c45..dffe4dc211 100644 --- a/image/DecoderFactory.cpp +++ b/image/DecoderFactory.cpp @@ -58,6 +58,10 @@ DecoderFactory::GetDecoderType(const char* aMimeType) } else if (!strcmp(aMimeType, IMAGE_BMP_MS)) { type = DecoderType::BMP; + // BMP_CLIPBOARD + } else if (!strcmp(aMimeType, IMAGE_BMP_MS_CLIPBOARD)) { + type = DecoderType::BMP_CLIPBOARD; + // ICO } else if (!strcmp(aMimeType, IMAGE_ICO)) { type = DecoderType::ICO; @@ -100,6 +104,9 @@ DecoderFactory::GetDecoder(DecoderType aType, case DecoderType::BMP: decoder = new nsBMPDecoder(aImage); break; + case DecoderType::BMP_CLIPBOARD: + decoder = new nsBMPDecoder(aImage, /* aForClipboard */ true); + break; case DecoderType::ICO: decoder = new nsICODecoder(aImage); break; |