[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:27:30 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 699ce4561aaaf8ca95f82e08ee702ed243e2f3bb
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 25 03:21:17 2004 +0000

    	I forgot to add these files in my last check-in.
    
            * WebView.subproj/WebResource.h: Added.
            * WebView.subproj/WebResource.m: Added.
            (-[WebResourcePrivate dealloc]):
            (-[WebResource initWithData:URL:MIMEType:textEncodingName:]):
            (-[WebResource dealloc]):
            (-[WebResource data]):
            (-[WebResource URL]):
            (-[WebResource MIMEType]):
            (-[WebResource textEncodingName]):
            (+[WebResource _resourcesFromPropertyLists:]):
            (+[WebResource _propertyListsFromResources:]):
            (-[WebResource _initWithPropertyList:]):
            (-[WebResource _initWithCachedResponse:originalURL:]):
            (-[WebResource _propertyListRepresentation]):
            (-[WebResource _cachedResponseRepresentation]):
            * WebView.subproj/WebResourcePrivate.h: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 8d3ee26..41c4b1f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,26 @@
 2004-02-24  Chris Blumenberg  <cblu at apple.com>
 
+	I forgot to add these files in my last check-in.
+
+        * WebView.subproj/WebResource.h: Added.
+        * WebView.subproj/WebResource.m: Added.
+        (-[WebResourcePrivate dealloc]):
+        (-[WebResource initWithData:URL:MIMEType:textEncodingName:]):
+        (-[WebResource dealloc]):
+        (-[WebResource data]):
+        (-[WebResource URL]):
+        (-[WebResource MIMEType]):
+        (-[WebResource textEncodingName]):
+        (+[WebResource _resourcesFromPropertyLists:]):
+        (+[WebResource _propertyListsFromResources:]):
+        (-[WebResource _initWithPropertyList:]):
+        (-[WebResource _initWithCachedResponse:originalURL:]):
+        (-[WebResource _propertyListRepresentation]):
+        (-[WebResource _cachedResponseRepresentation]):
+        * WebView.subproj/WebResourcePrivate.h: Added.
+
+2004-02-24  Chris Blumenberg  <cblu at apple.com>
+
 	Fixed: <rdar://problem/3565476>: design/implement new pasteboard type for HTML that includes subresources
 
         Reviewed by rjw.
@@ -1178,7 +1199,8 @@
         Reviewed by rjw.
 
         * WebView.subproj/WebTextView.m:
-        (-[WebTextView setFixedWidthFont]): Use [[WebTextRendererFactory sharedFactory] fontWithFamilies:traits:size:] to get the font since it takes the font family which is what we store in WebPreferences and it does fallback work. Only set the font if non-nil is returned.
+        (-[WebTextView setFixedWidthFont]): Use [[WebTextRendererFactory sharedFactory] fontWithFamilies:traits:size:] to get the font since it takes the font family which is what we store in WebPreferences and it does fallback work. Only set the font if 
+non-nil is returned.
 
 2003-11-21  Maciej Stachowiak  <mjs at apple.com>
 
@@ -1732,7 +1754,8 @@
         Reviewed by darin.
 
         * WebView.subproj/WebTextView.m:
-        (-[WebTextView menuForEvent:]): Made WebTextView's context menu behavior like WebHTMLView's context menu behavior with regards to selection. If the control-click was on a selection, show menu options for the selection like copy. If it was not on a selection, show menu options such as save and print. Don't select anything when control-clicking.
+        (-[WebTextView menuForEvent:]): Made WebTextView's context menu behavior like WebHTMLView's context menu behavior with regards to selection. If the control-click was on a selection, show menu options for the selection like copy. If it was not on a
+ selection, show menu options such as save and print. Don't select anything when control-clicking.
 
 2003-11-08  Chris Blumenberg  <cblu at apple.com>
 
@@ -2191,7 +2214,8 @@
         Reviewed by john.
 
         * WebView.subproj/WebFrame.m:
-        (-[WebFrame _isLoadComplete]): call _progressCompleted after we deliver the didFailLoadWithError or didFinishLoadForFrame message as we do in other places. This allows to be aware of the error (if there is one), when they get the WebViewProgressFinishedNotification notification.
+        (-[WebFrame _isLoadComplete]): call _progressCompleted after we deliver the didFailLoadWithError or didFinishLoadForFrame message as we do in other places. This allows to be aware of the error (if there is one), when they get the WebViewProgressFi
+nishedNotification notification.
 
 2003-10-27  Maciej Stachowiak  <mjs at apple.com>
 
@@ -2309,7 +2333,8 @@
         Reviewed by john.
 
         * WebView.subproj/WebView.m:
-	(+[WebView _viewClass:andRepresentationClass:forMIMEType:]): use _web_objectForMIMEType when getting an object for a MIME. Removed unnecessary code that checked for the document classes after loading the plug-in DB since it is not an optimization because the plug-in DB calls _viewTypesAllowImageTypeOmission:NO.
+	(+[WebView _viewClass:andRepresentationClass:forMIMEType:]): use _web_objectForMIMEType when getting an object for a MIME. Removed unnecessary code that checked for the document classes after loading the plug-in DB since it is not an optimization because
+ the plug-in DB calls _viewTypesAllowImageTypeOmission:NO.
 
 2003-10-23  Chris Blumenberg  <cblu at apple.com>
 
@@ -2330,7 +2355,8 @@
         (-[WebFrameView _makeDocumentViewForDataSource:]): tweak
         (+[WebFrameView _viewClassForMIMEType:]): call [WebView _viewClass:andRepresentationClass:forMIMEType:]
         * WebView.subproj/WebView.m:
-	(+[WebView _viewClass:andRepresentationClass:forMIMEType:]): new, central place for mapping from a MIME to the document classes. We now load the plug-in DB when a non-HTML MIME type is encountered instead of loading the plug-in DB when the class for the MIME type is not found. This is required to fully fix 3364036.
+	(+[WebView _viewClass:andRepresentationClass:forMIMEType:]): new, central place for mapping from a MIME to the document classes. We now load the plug-in DB when a non-HTML MIME type is encountered instead of loading the plug-in DB when the class for the 
+MIME type is not found. This is required to fully fix 3364036.
         (+[WebView canShowMIMEType:]): call [WebView _viewClass:andRepresentationClass:forMIMEType:]
         (+[WebView registerViewClass:representationClass:forMIMEType:]): tweak
         * WebView.subproj/WebViewPrivate.h:
@@ -2463,7 +2489,8 @@
         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.
+        (-[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 n
+o 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.
@@ -3134,7 +3161,8 @@
 
 2003-09-30  Richard Williamson   <rjw at apple.com>
 
-	Fixed 3420396.  If a frame targets _top and a URL that contains a fragment (very unusual, it's meaningless for a frameset to contain a named anchor point) the frameset won't be reloaded.  Our normal path is to just scroll to the anchor point.  This is only important because our Help folks oddly depend on the behavior.
+	Fixed 3420396.  If a frame targets _top and a URL that contains a fragment (very unusual, it's meaningless for a frameset to contain a named anchor point) the frameset won't be reloaded.  Our normal path is to just scroll to the anchor point.  This is on
+ly important because our Help folks oddly depend on the behavior.
 
         Reviewed by Chris.
 
@@ -3666,7 +3694,9 @@
 
 	Fixed: <rdar://problem/3412380>: REGRESSION (85-98): www.minoltan.com is decoded incorrectly on Japanese system
 
-	The default encoding that Safari uses is latin1 regardless of the current system encoding. This is how it's always been. The problem is that the UI is displaying shift JIS for the default text encoding instead of latin1. This is happening because WebKit is using "latin1" instead of "ISO-8859-1" for the default text encoding name. "ISO-8859-1" is the IANA character set name for latin1 and this is what the  WebKitDefaultTextEncodingNamePreferenceKey preference expects. This ends up confusing Safari, so Safari just ends up displaying the first item in the pop-up menu which is shift JIS.
+	The default encoding that Safari uses is latin1 regardless of the current system encoding. This is how it's always been. The problem is that the UI is displaying shift JIS for the default text encoding instead of latin1. This is happening because WebKit 
+is using "latin1" instead of "ISO-8859-1" for the default text encoding name. "ISO-8859-1" is the IANA character set name for latin1 and this is what the  WebKitDefaultTextEncodingNamePreferenceKey preference expects. This ends up confusing Safari, so Saf
+ari just ends up displaying the first item in the pop-up menu which is shift JIS.
 
         Reviewed by rjw.
 
@@ -3863,7 +3893,8 @@
 
 2003-08-29  Richard Williamson   <rjw at apple.com>
 
-	Fixed 3400807.  Don't release state associated with the current b/f item.  We shouldn't normally have page cache state associated with the current item (3401376).  This fix guarantees that we won't prematurely release the page cache state for the current item.
+	Fixed 3400807.  Don't release state associated with the current b/f item.  We shouldn't normally have page cache state associated with the current item (3401376).  This fix guarantees that we won't prematurely release the page cache state for the current
+ item.
 
         Reviewed byJohn Sullivan.
 
@@ -3899,7 +3930,8 @@
 
 2003-08-27  Richard Williamson   <rjw at apple.com>
 
-	Fixed 3398229.  When we request a font from NSFont by name we should use a case specific name.  We do case insensitve comparsion, but once a match is found we should use the actual font name, not the requested name.  Two layout tests are still failing, but I don't think the failures are font related.
+	Fixed 3398229.  When we request a font from NSFont by name we should use a case specific name.  We do case insensitve comparsion, but once a match is found we should use the actual font name, not the requested name.  Two layout tests are still failing, b
+ut I don't think the failures are font related.
 
         Reviewed by Hyatt.
 
@@ -5854,6 +5886,7 @@
         (-[WebFrame _continueAfterNavigationPolicy:]): don't call _prepareForProvisionalLoadWithDataSource::, call _setPolicyDataSource:nil after _continueLoadRequestAfterNavigationPolicy:: has used policyDataSource
         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): this method covers the regular load case. This is where we need to stop the load, set the load type and the provisional data source. Code was in _prepareForProvisionalLoadWithData
 
+
 Source::
         (-[WebFrame _loadDataSource:withLoadType:formState:]): set the policyLoadType and policyDataSource (the beginning of the regular load case)
 
@@ -5885,6 +5918,7 @@ Source::
         (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): if there is no request to continue with, don't reset things like the provisional data source since it was never unset in this case
         (-[WebFrame _loadDataSource:withLoadType:formState:]): don't call stopLoading, _setLoadType and _setProvisionalDataSource, since that stops the frame even for command-click and option-click. Do this work in _prepareForProvisionalLoadWithDataSource
 
+
 :loadType: instead.
 
 2003-06-10  Richard Williamson   <rjw at apple.com>
@@ -6152,8 +6186,10 @@ Source::
 	Eric Carlson:
 	The problem happens when you call NPP_SetWindow with a 0 width or height more than once. The first call to NPP_SetWindow always seems to have width and height set to 0, but the next call sometimes has it set to the correct values (those in the EMBED tag)
 
+
 . This is when it draws successfully. It seems to me that the fix is to always pass the correct width and height to NPP_SetWindow. You always position the plug-in far offscreen (1000000, -52) and set the clip region to an empty rect (48576, 52, 48576, 52)
 
+
  so there isn't really any danger of the plug-in drawing anyway. Additionally, you pass the correct width and height in the call to NPP_New before the first call to NPP_SetWindow.
 
         Reviewed by john, darin.
@@ -12098,6 +12134,7 @@ Source::
 
 
 
+
 is to retain the incomplete data even though the load ends in error.
 
         Reviewed by darin.
@@ -12162,6 +12199,7 @@ is to retain the incomplete data even though the load ends in error.
 
 
 
+
 e machinery in WebKit. The stream is only delivered once. This fix addresses that.
 
         Reviewed by trey.
@@ -12627,6 +12665,7 @@ e machinery in WebKit. The stream is only delivered once. This fix addresses tha
 
 
 
+
 t leak when we cancel a download.
         (-[WebDownload _setRequest:]): added
         (-[WebDownload _setResponse:]): added
@@ -12766,6 +12805,7 @@ t leak when we cancel a download.
 
 
 
+
 l.
         * Downloads.subproj/WebDownload.m:
         (-[WebDownloadPrivate dealloc]): release directory path
@@ -16567,6 +16607,7 @@ l.
 
 
 
+
 ts each with 60 timeouts. The event also cause the Finder to do a lot of work.
 
 	We should:
@@ -16589,6 +16630,7 @@ ts each with 60 timeouts. The event also cause the Finder to do a lot of work.
 
 
 
+
 nds 2 apple events both with a 60 second timeout. This method returns immediately.
         * WebKit.pbproj/project.pbxproj:
 
@@ -17222,6 +17264,7 @@ nds 2 apple events both with a 60 second timeout. This method returns immediatel
 
 
 
+
 en't providing the declared data. 
 
         * Misc.subproj/WebNSPasteboardExtras.h:
diff --git a/WebKit/WebView.subproj/WebResource.h b/WebKit/WebView.subproj/WebResource.h
new file mode 100644
index 0000000..0ca2dbe
--- /dev/null
+++ b/WebKit/WebView.subproj/WebResource.h
@@ -0,0 +1,27 @@
+/*	
+    WebResource.h
+    Copyright (C) 2004 Apple Computer, Inc. All rights reserved.    
+ 
+    Public header file.
+*/
+
+#import <Foundation/Foundation.h>
+
+ at class WebResourcePrivate;
+
+extern NSString *WebHTMLPboardType;
+
+ at interface WebResource : NSObject 
+{
+ at private
+    WebResourcePrivate *_private;
+}
+
+- (id)initWithData:(NSData *)data URL:(NSURL *)URL MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)textEncodingName;
+
+- (NSData *)data;
+- (NSURL *)URL;
+- (NSString *)MIMEType;
+- (NSString *)textEncodingName;
+
+ at end
diff --git a/WebKit/WebView.subproj/WebResource.m b/WebKit/WebView.subproj/WebResource.m
new file mode 100644
index 0000000..8ecba0a
--- /dev/null
+++ b/WebKit/WebView.subproj/WebResource.m
@@ -0,0 +1,177 @@
+/*	
+    WebResource.m
+    Copyright (C) 2004 Apple Computer, Inc. All rights reserved.    
+*/
+
+#import <WebKit/WebResourcePrivate.h>
+#import <WebKit/WebNSURLExtras.h>
+
+#import <Foundation/NSDictionary_NSURLExtras.h>
+
+NSString *WebHTMLPboardType =               @"Apple Web Kit pasteboard type";
+NSString *WebMainResourceKey =              @"WebMainResource";
+NSString *WebResourceDataKey =              @"WebResourceData";
+NSString *WebResourceMIMETypeKey =          @"WebResourceMIMEType";
+NSString *WebResourceURLKey =               @"WebResourceURL";
+NSString *WebResourceTextEncodingNameKey =  @"WebResourceTextEncodingName";
+NSString *WebSubresourcesKey =              @"WebSubresources";
+
+ at interface WebResourcePrivate : NSObject
+{
+ at public
+    NSData *data;
+    NSURL *URL;
+    NSString *MIMEType;
+    NSString *textEncodingName;
+}
+ at end
+
+ at implementation WebResourcePrivate
+
+- (void)dealloc
+{
+    [data release];
+    [URL release];
+    [MIMEType release];
+    [textEncodingName release];
+    [super dealloc];
+}
+
+ at end
+
+ at implementation WebResource
+
+- (id)initWithData:(NSData *)data URL:(NSURL *)URL MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)textEncodingName
+{
+    _private = [[WebResourcePrivate alloc] init];
+    
+    if (!data) {
+        [self release];
+        return nil;
+    }
+    _private->data = [data copy];
+    
+    if (!URL) {
+        [self release];
+        return nil;
+    }
+    _private->URL = [URL copy];
+    
+    if (!MIMEType) {
+        [self release];
+        return nil;
+    }
+    _private->MIMEType = [MIMEType copy];
+    
+    _private->textEncodingName = [textEncodingName copy];
+    
+    return self;
+}
+
+- (void)dealloc
+{
+    [_private release];
+    [super dealloc];
+}
+
+- (NSData *)data
+{
+    return _private->data;
+}
+
+- (NSURL *)URL
+{
+    return _private->URL;
+}
+
+- (NSString *)MIMEType
+{
+    return _private->MIMEType;
+}
+
+- (NSString *)textEncodingName
+{
+    return _private->textEncodingName;
+}
+
+ at end
+
+ at implementation WebResource (WebResourcePrivate)
+
++ (NSArray *)_resourcesFromPropertyLists:(NSArray *)propertyLists
+{
+    if (![propertyLists isKindOfClass:[NSArray class]]) {
+        return nil;
+    }
+    NSEnumerator *enumerator = [propertyLists objectEnumerator];
+    NSMutableArray *resources = [NSMutableArray array];
+    NSDictionary *propertyList;
+    while ((propertyList = [enumerator nextObject]) != nil) {
+        WebResource *resource = [[WebResource alloc] _initWithPropertyList:propertyList];
+        if (resource) {
+            [resources addObject:resource];
+            [resource release];
+        }
+    }
+    return resources;
+}
+
++ (NSArray *)_propertyListsFromResources:(NSArray *)resources
+{
+    NSEnumerator *enumerator = [resources objectEnumerator];
+    NSMutableArray *propertyLists = [NSMutableArray array];
+    WebResource *resource;
+    while ((resource = [enumerator nextObject]) != nil) {
+        [propertyLists addObject:[resource _propertyListRepresentation]];
+    }
+    return propertyLists;
+}
+
+- (id)_initWithPropertyList:(id)propertyList
+{
+    if (![propertyList isKindOfClass:[NSDictionary class]]) {
+        [self release];
+        return nil;
+    }
+    NSData *data = [propertyList objectForKey:WebResourceDataKey];
+    NSString *URLString = [propertyList _web_stringForKey:WebResourceURLKey];
+    return [self initWithData:[data isKindOfClass:[NSData class]] ? data : nil
+                          URL:URLString ? [NSURL _web_URLWithDataAsString:URLString] : nil
+                     MIMEType:[propertyList _web_stringForKey:WebResourceMIMETypeKey]
+             textEncodingName:[propertyList _web_stringForKey:WebResourceTextEncodingNameKey]];
+}
+
+- (id)_initWithCachedResponse:(NSCachedURLResponse *)cachedResponse originalURL:(NSURL *)originalURL
+{
+    NSURLResponse *response = [cachedResponse response];
+    return [self initWithData:[cachedResponse data]
+                          URL:originalURL
+                     MIMEType:[response MIMEType]
+             textEncodingName:[response textEncodingName]];
+}
+
+- (id)_propertyListRepresentation
+{
+    NSMutableDictionary *propertyList = [NSMutableDictionary dictionary];
+    [propertyList setObject:_private->data forKey:WebResourceDataKey];
+    [propertyList setObject:[_private->URL _web_originalDataAsString] forKey:WebResourceURLKey];
+    [propertyList setObject:_private->MIMEType forKey:WebResourceMIMETypeKey];
+    if (_private->textEncodingName) {
+        [propertyList setObject:_private->textEncodingName forKey:WebResourceTextEncodingNameKey];
+    }
+    return propertyList;
+}
+
+- (NSCachedURLResponse *)_cachedResponseRepresentation
+{
+    unsigned length = [_private->data length];
+    NSURLResponse *response = [[NSURLResponse alloc] initWithURL:_private->URL
+                                                        MIMEType:_private->MIMEType 
+                                           expectedContentLength:length
+                                                textEncodingName:_private->textEncodingName];
+    NSCachedURLResponse *cachedResponse = [[[NSCachedURLResponse alloc] initWithResponse:response data:_private->data] autorelease];
+    [response release];
+    return cachedResponse;
+}
+
+ at end
diff --git a/WebKit/WebView.subproj/WebResourcePrivate.h b/WebKit/WebView.subproj/WebResourcePrivate.h
new file mode 100644
index 0000000..d450b2a
--- /dev/null
+++ b/WebKit/WebView.subproj/WebResourcePrivate.h
@@ -0,0 +1,28 @@
+/*	
+    WebResourcePrivate.h
+    Copyright (C) 2004 Apple Computer, Inc. All rights reserved.    
+ 
+    Private header file.
+*/
+
+#import <WebKit/WebResource.h>
+
+extern NSString *WebMainResourceKey;
+extern NSString *WebResourceDataKey;
+extern NSString *WebResourceMIMETypeKey;
+extern NSString *WebResourceURLKey;
+extern NSString *WebResourceTextEncodingNameKey;
+extern NSString *WebSubresourcesKey;
+
+ at interface WebResource (WebResourcePrivate)
+
++ (NSArray *)_resourcesFromPropertyLists:(NSArray *)propertyLists;
++ (NSArray *)_propertyListsFromResources:(NSArray *)resources;
+
+- (id)_initWithPropertyList:(id)propertyList;
+- (id)_initWithCachedResponse:(NSCachedURLResponse *)response originalURL:(NSURL *)originalURL;
+
+- (id)_propertyListRepresentation;
+- (NSCachedURLResponse *)_cachedResponseRepresentation;
+
+ at end
\ No newline at end of file

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list