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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f57e803d49928dc42d29d73c4a4993cc7554eef3
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Apr 22 13:56:28 2003 +0000

    WebFoundation:
    
            Reviewed by Darin
    
    	API changes in NSURLProtocol and its subclasses:
    
    	+canHandleURL: becomes +canInitWithRequest:
    	+canonicalURLForURL: becomes +canonicalRequestForRequest:
    	_protocolClassForURL: becomes _protocolClassForRequest:
    
    	Some other related changes include:
    
    	These two methods added to NSURLRequest SPI:
    	-(id)_copyReplacingURLWithURL:(NSURL *)URL;
    	-(BOOL)_URLHasScheme:(NSString *)scheme;
    
    	_web_canonicalize: method in NSURL extras has been updated
    	to work with new canonicalization scheme.
    
    	The process of canonicalizing URLs no longer unconditionally
    	makes a new URL. There is now additional smarts that checks
    	a URL before making a new one based on whether or not the
    	input URL is already in canonical form.
    
            * CacheLoader.subproj/NSURLConnection.m:
            (+[NSURLConnection canHandleRequest:]):
            (-[NSURLConnection _beginLoad]):
            * CacheLoader.subproj/NSURLProtocol.h:
            * CacheLoader.subproj/NSURLProtocol.m:
            (+[NSURLProtocol canInitWithRequest:]):
            (+[NSURLProtocol canonicalRequestForRequest:]):
            (+[NSURLProtocol registerClass:]):
            (+[NSURLProtocol _protocolClassForRequest:]):
            (+[NSURLProtocol _makeRequestCanonicalByMakingRequestURLCanonical:]):
            * CacheLoader.subproj/NSURLProtocolPrivate.h:
            * CacheLoader.subproj/NSURLRequest.m:
            (-[NSURLRequest _copyReplacingURLWithURL:]):
            (-[NSURLRequest _URLHasScheme:]):
            (-[NSMutableURLRequest copyWithZone:]):
            (-[NSMutableURLRequest _copyReplacingURLWithURL:]):
            * CacheLoader.subproj/NSURLRequestPrivate.h:
            * Misc.subproj/WebNSURLExtras.m:
            (-[NSURL _web_canonicalize]):
            * ProtocolHandlers.subproj/WebAboutProtocol.m:
            (+[WebAboutProtocol canInitWithRequest:]):
            (+[WebAboutProtocol canonicalRequestForRequest:]):
            (+[WebAboutProtocol _canonicalURLForURL:]):
            * ProtocolHandlers.subproj/WebCFNetworkHTTPProtocol.m:
            (+[WebCFNetworkHTTPProtocol canInitWithRequest:]):
            * ProtocolHandlers.subproj/WebFTPProtocol.m:
            (+[WebFTPProtocol canInitWithRequest:]):
            (+[WebFTPProtocol canonicalRequestForRequest:]):
            (+[WebFTPProtocol _canonicalURLForURL:]):
            * ProtocolHandlers.subproj/WebFileProtocol.m:
            (+[WebFileProtocol canInitWithRequest:]):
            (+[WebFileProtocol canonicalRequestForRequest:]):
            (+[WebFileProtocol _canonicalURLForURL:]):
            * ProtocolHandlers.subproj/WebHTTPProtocol.h:
            * ProtocolHandlers.subproj/WebHTTPProtocol.m:
            (+[WebHTTPProtocol canonicalRequestForRequest:]):
            (+[WebHTTPProtocol _canonicalURLForURL:]):
            (-[WebHTTPProtocol URL]):
            * ProtocolHandlers.subproj/WebSimpleHTTPProtocol.m:
            (+[WebSimpleHTTPProtocol canInitWithRequest:]):
    
    WebKit:
    
            Reviewed by Darin
    
            API changes in NSURLProtocol and its subclasses:
    
            +canHandleURL: becomes +canInitWithRequest:
            +canonicalURLForURL: becomes +canonicalRequestForRequest:
    
    	Added new _webIsDataProtocolURL: helper method.
    
            * WebView.subproj/WebBaseResourceHandleDelegate.m:
            (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
            * WebView.subproj/WebDataProtocol.h:
            * WebView.subproj/WebDataProtocol.m:
            (+[WebDataProtocol _webIsDataProtocolURL:]):
            (+[WebDataProtocol canInitWithRequest:]):
            (+[WebDataProtocol canonicalRequestForRequest:]):
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _addBackForwardItemClippedAtTarget:]):
            (-[WebFrame _transitionToCommitted:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4151 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 66c44ad..256b7b0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2003-04-21  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Darin
+
+        API changes in NSURLProtocol and its subclasses:
+
+        +canHandleURL: becomes +canInitWithRequest:
+        +canonicalURLForURL: becomes +canonicalRequestForRequest:
+
+	Added new _webIsDataProtocolURL: helper method.
+
+        * WebView.subproj/WebBaseResourceHandleDelegate.m:
+        (-[WebBaseResourceHandleDelegate connection:didReceiveResponse:]):
+        * WebView.subproj/WebDataProtocol.h:
+        * WebView.subproj/WebDataProtocol.m:
+        (+[WebDataProtocol _webIsDataProtocolURL:]):
+        (+[WebDataProtocol canInitWithRequest:]):
+        (+[WebDataProtocol canonicalRequestForRequest:]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _addBackForwardItemClippedAtTarget:]):
+        (-[WebFrame _transitionToCommitted:]):
+
 2003-04-21  Darin Adler  <darin at apple.com>
 
         * Plugins.subproj/WebNetscapePluginStream.m: Removed unnecessary #import of <WebFoundation/WebFoundation.h>.
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index 4f534c7..faa6b2a 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -197,7 +197,7 @@
 
     // If the URL is one of our whacky applewebdata URLs that
     // fake up a substitute URL to present to the delegate.
-    if([WebDataProtocol canHandleURL: [r URL]] != nil){
+    if([WebDataProtocol _webIsDataProtocolURL:[r URL]]) {
         NSURL *baseURL = [request _webDataRequestBaseURL];
         if (baseURL)
             [r setURL: baseURL];
diff --git a/WebKit/WebView.subproj/WebDataProtocol.h b/WebKit/WebView.subproj/WebDataProtocol.h
index ab444b7..d291030 100644
--- a/WebKit/WebView.subproj/WebDataProtocol.h
+++ b/WebKit/WebView.subproj/WebDataProtocol.h
@@ -14,6 +14,7 @@
 @interface WebDataProtocol : NSURLProtocol
 {
 }
++(BOOL)_webIsDataProtocolURL:(NSURL *)URL;
 @end
 
 @interface NSURLRequest (WebDataRequest)
diff --git a/WebKit/WebView.subproj/WebDataProtocol.m b/WebKit/WebView.subproj/WebDataProtocol.m
index 0638adb..7c77f91 100644
--- a/WebKit/WebView.subproj/WebDataProtocol.m
+++ b/WebKit/WebView.subproj/WebDataProtocol.m
@@ -7,6 +7,8 @@
 #import <WebFoundation/NSURLResponse.h>
 #import <WebFoundation/NSURLResponsePrivate.h>
 #import <WebFoundation/WebError.h>
+#import <WebFoundation/WebNSStringExtras.h>
+#import <WebFoundation/WebAssertions.h>
 
 NSString *WebDataProtocolScheme = @"applewebdata";
 
@@ -133,14 +135,24 @@ NSString *WebDataProtocolScheme = @"applewebdata";
 // that will handle our custom protocol.
 @implementation WebDataProtocol
 
-+ (BOOL)canHandleURL:(NSURL *)theURL
++(BOOL)_webIsDataProtocolURL:(NSURL *)URL
 {
-    return ([[theURL scheme] caseInsensitiveCompare: WebDataProtocolScheme] == NSOrderedSame);
+    ASSERT(URL);
+    NSString *scheme = [URL scheme];
+    return scheme && [scheme _web_isCaseInsensitiveEqualToString:WebDataProtocolScheme];
 }
 
-+ (NSURL *)canonicalURLForURL:(NSURL *)URL
++(BOOL)canInitWithRequest:(NSURLRequest *)request
 {
-    return URL;
+    NSURL *URL = [request URL];
+    ASSERT(request);
+    ASSERT(URL);
+    return [self _webIsDataProtocolURL:URL];
+}
+
++(NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
+{
+    return request;
 }
 
 - (void)startLoading
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index a15c8cb..0b0b95e 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -260,7 +260,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
 // helper method used in various nav cases below
 - (void)_addBackForwardItemClippedAtTarget:(BOOL)doClip
 {
-    if (![WebDataProtocol canHandleURL:[[[[[self webView] mainFrame] dataSource] response] URL]]){
+    if (![WebDataProtocol _webIsDataProtocolURL:[[[[[self webView] mainFrame] dataSource] response] URL]]) {
         WebHistoryItem *bfItem = [[[self webView] mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip];
         [[[self webView] backForwardList] addItem:bfItem];
     }
@@ -673,7 +673,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                 if (![ds _isClientRedirect]) {
                     // Add item to history.
 		    NSURL *URL = [[[ds _originalRequest] URL] _web_canonicalize];
-		    if ([[URL absoluteString] length] > 0 && ![WebDataProtocol canHandleURL:URL]) {
+		    if ([[URL absoluteString] length] > 0 && ![WebDataProtocol _webIsDataProtocolURL:URL]) {
 			entry = [[WebHistory sharedHistory] addItemForURL:URL];
 			if (ptitle)
 			    [entry setTitle: ptitle];
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index 4f534c7..faa6b2a 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -197,7 +197,7 @@
 
     // If the URL is one of our whacky applewebdata URLs that
     // fake up a substitute URL to present to the delegate.
-    if([WebDataProtocol canHandleURL: [r URL]] != nil){
+    if([WebDataProtocol _webIsDataProtocolURL:[r URL]]) {
         NSURL *baseURL = [request _webDataRequestBaseURL];
         if (baseURL)
             [r setURL: baseURL];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list