* WebView.subproj/WebDataSource.m: (+[WebDataSource _repTypesAllowImageTypeOm...
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2005 21:07:10 +0000 (21:07 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jan 2005 21:07:10 +0000 (21:07 +0000)
        Do the same check as for view types, so the representation types are consistent.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView.subproj/WebDataSource.m

index 3fe44b5959337575d25b8f0d2cd35e9cac15a403..7c9edb5386074c2c98def85abc77fe5c8eccd4e3 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-24  Darin Adler  <darin@apple.com>
+
+        * WebView.subproj/WebDataSource.m: (+[WebDataSource _repTypesAllowImageTypeOmission:]):
+        Do the same check as for view types, so the representation types are consistent.
+
 2005-01-24  Darin Adler  <darin@apple.com>
 
         Reviewed by John.
index 452adb868ac9d82f37455a195d305367abb3d4ec..f766c0533e4f6508b82e26490d0699ab5e3e562b 100644 (file)
             [WebHTMLRepresentation class], @"application/x-webarchive",
             [WebTextRepresentation class], @"text/",
             [WebTextRepresentation class], @"application/x-javascript",
+            nil];
+
 #ifndef OMIT_TIGER_FEATURES
-            [WebPDFRepresentation class], @"text/pdf",
-            [WebPDFRepresentation class], @"application/pdf",
+        // Since this is a "secret default" we don't both registering it.
+        BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];  
+        if (!omitPDFSupport) {
+            [repTypes setObject:[WebPDFRepresentation class] forKey:@"text/pdf"];
+            [repTypes setObject:[WebPDFRepresentation class] forKey:@"application/pdf"];
+        }
 #endif
-            nil];
     }
     
     if (!addedImageTypes && !allowImageTypeOmission) {