[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 08:04:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9c6e4c4b857cb34e1a2a3525d2a2569bf390c436
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 21 18:47:50 2003 +0000

    WebCore:
    
    	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
    
            Reviewed by rjw.
    
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL:
            * kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL:
    
    WebKit:
    
    	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
    
            Reviewed by rjw.
    
            * Plugins.subproj/WebPluginDatabase.m:
            (-[WebPluginDatabase pluginForExtension:]): If no plug-in is found from the extension, attempt to map from the extension to a MIME type using our mappings and find a plug-in from the MIME type. This improves our chances of finding a plug-in when no MIME type is specified.
            * WebCoreSupport.subproj/WebBridge.m:
    	(-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): If the passed MIME is empty, nil it out so that clients only need to check for nil. This avoids error sheets complaining about "" MIME types.
            (-[WebBridge frameRequiredForMIMEType:URL:]): Renamed to include URL. If no MIME is specified, only create a plug-in view if we can map from the extension.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5232 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 212f911..4fdf2e2 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2003-10-21  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
+
+        Reviewed by rjw.
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL:
+        * kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL:
+
 2003-10-20  David Hyatt  <hyatt at apple.com>
 
 	Fix generated content (before/after) so that it no longer has any restrictions on it.   CSS2.1 lifted 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 212f911..4fdf2e2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-10-21  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
+
+        Reviewed by rjw.
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL:
+        * kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL:
+
 2003-10-20  David Hyatt  <hyatt at apple.com>
 
 	Fix generated content (before/after) so that it no longer has any restrictions on it.   CSS2.1 lifted 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 6e6b3fe..0c9a37e 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -653,7 +653,7 @@ class KWQPluginPart : public ReadOnlyPart
 
 ReadOnlyPart *KWQKHTMLPart::createPart(const ChildFrame &child, const KURL &url, const QString &mimeType)
 {
-    BOOL needFrame = [_bridge frameRequiredForMIMEType: mimeType.getNSString()];
+    BOOL needFrame = [_bridge frameRequiredForMIMEType:mimeType.getNSString() URL:url.getNSURL()];
     if (child.m_type == ChildFrame::Object && !needFrame) {
         NSMutableArray *attributesArray = [NSMutableArray arrayWithCapacity:child.m_params.count()];
         for (uint i = 0; i < child.m_params.count(); i++) {
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 6ad2e28..b37f155 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -321,7 +321,7 @@ typedef enum {
 
 - (int)getObjectCacheSize;
 
-- (BOOL)frameRequiredForMIMEType:(NSString*)mimeType;
+- (BOOL)frameRequiredForMIMEType:(NSString*)MIMEType URL:(NSURL *)URL;
 
 - (void)loadEmptyDocumentSynchronously;
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 504a991..1dec757 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-21  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
+	
+        Reviewed by rjw.
+
+        * Plugins.subproj/WebPluginDatabase.m:
+        (-[WebPluginDatabase pluginForExtension:]): If no plug-in is found from the extension, attempt to map from the extension to a MIME type using our mappings and find a plug-in from the MIME type. This improves our chances of finding a plug-in when no MIME type is specified.
+        * WebCoreSupport.subproj/WebBridge.m:
+	(-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): If the passed MIME is empty, nil it out so that clients only need to check for nil. This avoids error sheets complaining about "" MIME types.
+        (-[WebBridge frameRequiredForMIMEType:URL:]): Renamed to include URL. If no MIME is specified, only create a plug-in view if we can map from the extension.
+
 2003-10-20  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3457627>: empty Flash plugin at tvguide.com
diff --git a/WebKit/Plugins.subproj/WebPluginDatabase.m b/WebKit/Plugins.subproj/WebPluginDatabase.m
index fd2b0f1..f57346b 100644
--- a/WebKit/Plugins.subproj/WebPluginDatabase.m
+++ b/WebKit/Plugins.subproj/WebPluginDatabase.m
@@ -17,6 +17,8 @@
 
 #import <CoreGraphics/CPSProcesses.h>
 
+#import <Foundation/NSURLFileTypeMappings.h>
+
 #define JavaCocoaPluginIdentifier 	@"com.apple.JavaPluginCocoa"
 
 #define JavaCarbonPluginIdentifier 	@"com.apple.JavaAppletPlugin"
@@ -142,8 +144,18 @@ static BOOL sIsCocoa = FALSE;
 
 - (WebBasePluginPackage *)pluginForExtension:(NSString *)extension
 {
-    return [self pluginForKey:[extension lowercaseString]
-       withEnumeratorSelector:@selector(extensionEnumerator)];
+    WebBasePluginPackage *plugin = [self pluginForKey:[extension lowercaseString]
+                               withEnumeratorSelector:@selector(extensionEnumerator)];
+    if (!plugin) {
+        // If no plug-in was found from the extension, attempt to map from the extension to a MIME type
+        // and find the a plug-in from the MIME type. This is done in case the plug-in has not fully specified
+        // an extension <-> MIME type mapping.
+        NSString *MIMEType = [[NSURLFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+        if ([MIMEType length] > 0) {
+            plugin = [self pluginForMIMEType:MIMEType];
+        }
+    }
+    return plugin;
 }
 
 - (NSArray *)plugins
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 2bfd471..6b36243 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -654,8 +654,10 @@
     NSView *view = nil;
     int errorCode = 0;
     
-    if ([MIMEType length] != 0) {
+    if ([MIMEType length] > 0) {
         pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:MIMEType];
+    } else {
+        MIMEType = nil;
     }
     
     NSString *extension = [[URL path] pathExtension];
@@ -795,11 +797,17 @@ static BOOL loggedObjectCacheSize = NO;
     return cacheSize * multiplier;
 }
 
-- (BOOL)frameRequiredForMIMEType:(NSString*)MIMEType
+- (BOOL)frameRequiredForMIMEType:(NSString *)MIMEType URL:(NSURL *)URL
 {
-    // Assume a plugin is required. Don't make a frame.
     if ([MIMEType length] == 0) {
-        return NO;
+        NSString *extension = [[URL path] pathExtension];
+        if ([extension length] > 0 && [[WebPluginDatabase installedPlugins] pluginForExtension:extension] != nil) {
+            // If no MIME type is specified, use a plug-in if we have one that can handle the extension.
+            return NO;
+        } else {
+            // Else, create a frame and attempt to load the URL in there.
+            return YES;
+        }
     }
     
     // Have the plug-in DB register document views.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list