mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 23:18:26 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user