[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:36:56 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d61bd28cd47a33c515ee3fbce202d003f807b214
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Apr 14 18:03:41 2003 +0000

    	Fixed: 3162338 - Embedding SVG with <object type="image/svg+xml"> doesn't work
    
            Reviewed by dave.
    
            * WebCoreSupport.subproj/WebImageRendererFactory.m:
            (-[WebImageRendererFactory supportedMIMETypes]): code moved from +[WebImageView supportedImageMIMETypes]
            * WebView.subproj/WebImageView.m:
            (+[WebImageView supportedImageMIMETypes]): return -[WebImageRendererFactory supportedMIMETypes]
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4099 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 35b4817..77587dc 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-04-12  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 3162338 - Embedding SVG with <object type="image/svg+xml"> doesn't work
+
+        Reviewed by dave.
+
+        * WebCoreSupport.subproj/WebImageRendererFactory.m:
+        (-[WebImageRendererFactory supportedMIMETypes]): code moved from +[WebImageView supportedImageMIMETypes]
+        * WebView.subproj/WebImageView.m:
+        (+[WebImageView supportedImageMIMETypes]): return -[WebImageRendererFactory supportedMIMETypes]
+
 2003-04-13  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Trey.
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
index 209e896..7e03eb0 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
@@ -22,11 +22,12 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-#import <Cocoa/Cocoa.h>
 
 #import <WebKit/WebImageRendererFactory.h>
 #import <WebKit/WebImageRenderer.h>
+
 #import <WebFoundation/WebAssertions.h>
+#import <WebFoundation/WebFileTypeMappings.h>
 
 @implementation WebImageRendererFactory
 
@@ -80,5 +81,34 @@
     return imageRenderer;
 }
 
+- (NSArray *)supportedMIMETypes
+{
+    static NSArray *imageMIMETypes = nil;
+
+    if(!imageMIMETypes){
+        NSArray *unsupportedTypes = [NSArray arrayWithObjects:
+            @"application/pdf",
+            @"application/postscript",
+            nil];
+        
+        NSEnumerator *enumerator = [[NSImage imageFileTypes] objectEnumerator];
+        WebFileTypeMappings *mappings = [WebFileTypeMappings sharedMappings];
+        NSMutableSet *mimes = [NSMutableSet set];
+        NSString *type;
+
+        while ((type = [enumerator nextObject]) != nil) {
+            NSString *mime = [mappings MIMETypeForExtension:type];
+            if(mime && ![mime isEqualToString:@"application/octet-stream"] &&
+               ![unsupportedTypes containsObject:mime]){
+                [mimes addObject:mime];
+            }
+        }
+
+        imageMIMETypes = [[mimes allObjects] retain];
+    }
+
+    return imageMIMETypes;
+}
+
 
 @end
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 2bfdb00..a04e503 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -5,18 +5,18 @@
 
 #import <WebKit/WebImageView.h>
 
-#import <WebCore/WebCoreImageRenderer.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebFrameViewPrivate.h>
 #import <WebKit/WebImageRenderer.h>
+#import <WebKit/WebImageRendererFactory.h>
 #import <WebKit/WebImageRepresentation.h>
 #import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebViewPrivate.h>
 
-#import <WebFoundation/WebAssertions.h>
-#import <WebFoundation/WebFileTypeMappings.h>
+#import <WebCore/WebCoreImageRenderer.h>
 
+#import <WebFoundation/WebAssertions.h>
 
 @implementation WebImageView
 
@@ -25,36 +25,9 @@
     [NSApp registerServicesMenuSendTypes:[NSArray arrayWithObject:NSTIFFPboardType] returnTypes:nil];
 }
 
-+ (NSArray *)unsupportedImageMIMETypes
-{
-    return [NSArray arrayWithObjects:
-        @"application/pdf",
-        @"application/postscript",
-        nil];
-}
-
 + (NSArray *)supportedImageMIMETypes
 {
-    static NSArray *imageMIMETypes = nil;
-
-    if(!imageMIMETypes){
-        NSEnumerator *enumerator = [[NSImage imageFileTypes] objectEnumerator];
-        WebFileTypeMappings *mappings = [WebFileTypeMappings sharedMappings];
-        NSMutableSet *mimes = [NSMutableSet set];
-        NSString *type;
-
-        while ((type = [enumerator nextObject]) != nil) {
-            NSString *mime = [mappings MIMETypeForExtension:type];
-            if(mime && ![mime isEqualToString:@"application/octet-stream"] &&
-               ![[self unsupportedImageMIMETypes] containsObject:mime]){
-                [mimes addObject:mime];
-            }
-        }
-
-        imageMIMETypes = [[mimes allObjects] retain];
-    }
-
-    return imageMIMETypes;
+    return [[WebImageRendererFactory sharedFactory] supportedMIMETypes];
 }
 
 - (id)initWithFrame:(NSRect)frame

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list