mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09: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:
parent
84cc1f3239
commit
c15f982d7a
11 changed files with 149 additions and 651 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue