summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2011-05-09 19:26:31 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2011-05-09 19:26:31 +0000
commit4f2e8aa2e59c16364a3aeee634cb60855e7c6ffb (patch)
treeb6ace56e15dd03e588deb53a68fd930e3be0e002
parent1c753c0707a20edfb2adeb930b7bc453a7043a1a (diff)
downloadnetsurf-4f2e8aa2e59c16364a3aeee634cb60855e7c6ffb.tar.gz
netsurf-4f2e8aa2e59c16364a3aeee634cb60855e7c6ffb.tar.bz2
Skip image/gif when registering Apple Image handlers, to give precedence to nsgif since it handles animated GIF.
svn path=/trunk/netsurf/; revision=12354
-rw-r--r--cocoa/apple_image.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/cocoa/apple_image.m b/cocoa/apple_image.m
index 91a54ff06..9d69f3310 100644
--- a/cocoa/apple_image.m
+++ b/cocoa/apple_image.m
@@ -81,6 +81,12 @@ static nserror register_for_type( NSString *mime )
if (!reserve( 1 )) return NSERROR_NOMEM;
const char *type = [mime UTF8String];
+ /* nsgif has priority since it supports animated GIF */
+#ifdef WITH_GIF
+ if (strcmp(type, "image/gif") == 0)
+ return NSERROR_OK;
+#endif
+
lwc_error lerror = lwc_intern_string( type, strlen( type ), &apple_image_mime_types[types_count] );
if (lerror != lwc_error_ok) return NSERROR_NOMEM;