mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
Allow drag-and-drop loading of WebP images on RISC OS
This commit is contained in:
parent
84ec9c2b2a
commit
937446b95b
@ -39,6 +39,7 @@ static const struct type_entry type_map[] = {
|
||||
{0x188, "application/x-shockwave-flash"},
|
||||
{0x695, "image/gif"},
|
||||
{0x69c, "image/x-ms-bmp"},
|
||||
{0xa66, "image/webp"},
|
||||
{0xaad, "image/svg+xml"},
|
||||
{0xaff, "image/x-drawfile"},
|
||||
{0xb60, "image/png"},
|
||||
@ -269,6 +270,7 @@ int ro_content_native_type(struct hlcache_handle *c)
|
||||
case FILETYPE_BMP: /* bmp */
|
||||
case FILETYPE_ICO: /* ico */
|
||||
case FILETYPE_PNG: /* png */
|
||||
case FILETYPE_WEBP: /* webp */
|
||||
case 0xff9: /* sprite */
|
||||
return osfile_TYPE_SPRITE;
|
||||
case FILETYPE_SVG: /* svg */
|
||||
|
@ -67,6 +67,9 @@
|
||||
#ifndef FILETYPE_SVG
|
||||
#define FILETYPE_SVG 0xaad
|
||||
#endif
|
||||
#ifndef FILETYPE_WEBP
|
||||
#define FILETYPE_WEBP 0xa66
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Determine the MIME type of a local file.
|
||||
|
@ -827,6 +827,7 @@ static void ro_msg_dataload(wimp_message *message)
|
||||
case osfile_TYPE_TEXT:
|
||||
case FILETYPE_ARTWORKS:
|
||||
case FILETYPE_SVG:
|
||||
case FILETYPE_WEBP:
|
||||
/* display the actual file */
|
||||
error = netsurf_path_to_nsurl(message->data.data_xfer.file_name, &url);
|
||||
break;
|
||||
@ -929,7 +930,8 @@ static void ro_msg_datasave(wimp_message *message)
|
||||
case osfile_TYPE_SPRITE:
|
||||
case osfile_TYPE_TEXT:
|
||||
case FILETYPE_ARTWORKS:
|
||||
case FILETYPE_SVG: {
|
||||
case FILETYPE_SVG:
|
||||
case FILETYPE_WEBP: {
|
||||
os_error *error;
|
||||
|
||||
dataxfer->your_ref = dataxfer->my_ref;
|
||||
|
Loading…
Reference in New Issue
Block a user