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

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:55:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c009f5fbb4111c46567fee73d8fa8250be0444cb
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 12 11:46:12 2002 +0000

    WebFoundation:
    	Implement "file:" URL scheme. Also, fix up a few bugs this turned up.
    
    	Implement new IFURLHandle and IFURLProtocolHandler subclasses for
    	`file:'. The protocol handler creates a new thread for each file
    	load which could be considered somewhat excessive, but
    	definitively avoids blocking, and allows for cancellation. Run
    	loop sources are used to report success or failure, to avoid
    	destroying the protocol handler before its work is done.
    
    	* CacheLoader.subproj/IFFileURLHandle.h:
    	* CacheLoader.subproj/IFFileURLHandle.m: (+[IFFileURLHandle canInitWithURL:]):
    	* CacheLoader.subproj/IFFileURLProtocolHandler.h:
    	* CacheLoader.subproj/IFFileURLProtocolHandler.m: (+[IFFileURLProtocolHandler
    	canInitWithURL:]), (-[IFFileURLProtocolHandler initWithURLLoad:]),
    	(-[IFFileURLProtocolHandler dealloc]), (-[IFFileURLProtocolHandler
    	fileLoadThread]), (-[IFFileURLProtocolHandler sendLoadNotification]),
    	(fileLoadThreadStart), (fileProtocolHandlerCopyDescription),
    	(sendFinishedMessage), (-[IFFileURLProtocolHandler beginLoadInBackground]),
    	(-[IFFileURLProtocolHandler endLoadInBackground]):
    
    	Stick to `http:' and `https:' URIs instead of accepting all:
    
    	* CacheLoader.subproj/IFHTTPURLHandle.m: (+[IFHTTPURLHandle canInitWithURL:]):
    	* CacheLoader.subproj/IFHTTPURLProtocolHandler.m: (+[IFHTTPURLProtocolHandler
    	canInitWithURL:]):
    
    	Register subclasses for `file:':
    
    	* CacheLoader.subproj/IFURLHandle.m: (+[IFURLHandle initialize]):
    	* CacheLoader.subproj/IFURLProtocolHandler.m: (+[IFURLProtocolHandler
    	initialize]):
    
    
    	* CacheLoader.subproj/IFURLLoad.m: (-[IFURLLoad beginOriginLoad]):
    	Lock the IFURLLoad object while kicking off the protocol handler
    	and examining the status code, otherwise a really fast protocol
    	handler can report completion and therefore destroy this load
    	object before it can look at the status. This leads to what we
    	technically refer to as "crashy crashy".
    
    
    	* WebFoundation.pbproj/project.pbxproj: Add new files to build.
    WebCore:
    	Make some tweaks to glue together KDE's and CF's concepts of URLs
    	a bit better. In particular, CF thinks "file:/some/path" is an
    	invalid URL, while KDE thinks this is the canonical form for a
    	file URL.
    
    	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::openURL), (KHTMLPart::closeURL),
    	(KHTMLPart::checkCompleted):
    	* src/kwq/KWQKjobclasses.mm:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 3ad7810..837c55b 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,16 @@
 2002-02-12  Maciej Stachowiak  <mjs at apple.com>
 
+	Make some tweaks to glue together KDE's and CF's concepts of URLs
+	a bit better. In particular, CF thinks "file:/some/path" is an
+	invalid URL, while KDE thinks this is the canonical form for a
+	file URL.
+
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::openURL), (KHTMLPart::closeURL),
+	(KHTMLPart::checkCompleted):
+	* src/kwq/KWQKjobclasses.mm:
+
+2002-02-12  Maciej Stachowiak  <mjs at apple.com>
+
 	Reimplemented QList, QVector and QCollection from
 	scratch. Implemented copy-on-write optimization for QMap.
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 3ad7810..837c55b 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,16 @@
 2002-02-12  Maciej Stachowiak  <mjs at apple.com>
 
+	Make some tweaks to glue together KDE's and CF's concepts of URLs
+	a bit better. In particular, CF thinks "file:/some/path" is an
+	invalid URL, while KDE thinks this is the canonical form for a
+	file URL.
+
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::openURL), (KHTMLPart::closeURL),
+	(KHTMLPart::checkCompleted):
+	* src/kwq/KWQKjobclasses.mm:
+
+2002-02-12  Maciej Stachowiak  <mjs at apple.com>
+
 	Reimplemented QList, QVector and QCollection from
 	scratch. Implemented copy-on-write optimization for QMap.
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 3ad7810..837c55b 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,16 @@
 2002-02-12  Maciej Stachowiak  <mjs at apple.com>
 
+	Make some tweaks to glue together KDE's and CF's concepts of URLs
+	a bit better. In particular, CF thinks "file:/some/path" is an
+	invalid URL, while KDE thinks this is the canonical form for a
+	file URL.
+
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::openURL), (KHTMLPart::closeURL),
+	(KHTMLPart::checkCompleted):
+	* src/kwq/KWQKjobclasses.mm:
+
+2002-02-12  Maciej Stachowiak  <mjs at apple.com>
+
 	Reimplemented QList, QVector and QCollection from
 	scratch. Implemented copy-on-write optimization for QMap.
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index aafef69..8f6ca21 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -389,6 +389,11 @@ bool KHTMLPart::openURL( const KURL &url )
     NSURL *theURL;
     
     urlString = [NSString stringWithCString:d->m_workingURL.url().latin1()];
+    // FIXME: temporary hack to make file: URLs work right
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -416,6 +421,10 @@ bool KHTMLPart::closeURL()
     NSString *urlString;
     
     urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -1665,22 +1674,26 @@ void KHTMLPart::checkCompleted()
 {
     int requests;
     
+    NSString *urlString;
+    urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+    
+    if ([urlString hasSuffix:@"/"]) {
+	urlString = [urlString substringToIndex:([urlString length] - 1)];
+    }
     
     // Still waiting for images/scripts from the loader ?
-    requests = khtml::Cache::loader()->numRequests(d->m_url.url().latin1());
+    requests = khtml::Cache::loader()->numRequests([urlString cString]);
     if (requests == 0) {
         // FIXME: check for same URL with slash appended
         // We should not have to do this
-        QString urlString = d->m_url.url();
-        urlString += '/';
-        requests = khtml::Cache::loader()->numRequests(urlString);
+        QString qurlString = [urlString cString];
+        qurlString += '/';
+        requests = khtml::Cache::loader()->numRequests(qurlString);
     }
     if (requests == 0) {
-        NSString *urlString;
-        urlString = [NSString stringWithCString:d->m_url.url().latin1()];
-        if ([urlString hasSuffix:@"/"]) {
-            urlString = [urlString substringToIndex:([urlString length] - 1)];
-        }
         // remove us from the notification center that checks for the end of a load
         [[NSNotificationCenter defaultCenter] removeObserver:d->m_recv name:urlString object:nil];
         // tell anyone who's interested that we're done
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index aafef69..8f6ca21 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -389,6 +389,11 @@ bool KHTMLPart::openURL( const KURL &url )
     NSURL *theURL;
     
     urlString = [NSString stringWithCString:d->m_workingURL.url().latin1()];
+    // FIXME: temporary hack to make file: URLs work right
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -416,6 +421,10 @@ bool KHTMLPart::closeURL()
     NSString *urlString;
     
     urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -1665,22 +1674,26 @@ void KHTMLPart::checkCompleted()
 {
     int requests;
     
+    NSString *urlString;
+    urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+    
+    if ([urlString hasSuffix:@"/"]) {
+	urlString = [urlString substringToIndex:([urlString length] - 1)];
+    }
     
     // Still waiting for images/scripts from the loader ?
-    requests = khtml::Cache::loader()->numRequests(d->m_url.url().latin1());
+    requests = khtml::Cache::loader()->numRequests([urlString cString]);
     if (requests == 0) {
         // FIXME: check for same URL with slash appended
         // We should not have to do this
-        QString urlString = d->m_url.url();
-        urlString += '/';
-        requests = khtml::Cache::loader()->numRequests(urlString);
+        QString qurlString = [urlString cString];
+        qurlString += '/';
+        requests = khtml::Cache::loader()->numRequests(qurlString);
     }
     if (requests == 0) {
-        NSString *urlString;
-        urlString = [NSString stringWithCString:d->m_url.url().latin1()];
-        if ([urlString hasSuffix:@"/"]) {
-            urlString = [urlString substringToIndex:([urlString length] - 1)];
-        }
         // remove us from the notification center that checks for the end of a load
         [[NSNotificationCenter defaultCenter] removeObserver:d->m_recv name:urlString object:nil];
         // tell anyone who's interested that we're done
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index b1dba47..558d085 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -94,6 +94,14 @@ public:
 
         // FIXME: create NSURL for now, later KURL and NSURL should play better together
         NSString *string = [NSString stringWithCString:kurl.url().latin1()];
+	// FIXME: temporary hack to make file: URLs work right
+	if ([string hasPrefix:@"file:/"] && [string characterAtIndex:6] != '/') {
+	    string = [@"file:///" stringByAppendingString:[string substringFromIndex:6]];
+	}
+	if ([string hasSuffix:@"/"]) {
+	    string = [string substringToIndex:([string length] - 1)];
+	}
+
         url = [[NSURL URLWithString:string] retain];
     }
 
@@ -174,3 +182,5 @@ void TransferJob::begin(id <WCURLHandleClient> client, void *userData)
 }
 
 } // namespace KIO
+
+
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index aafef69..8f6ca21 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -389,6 +389,11 @@ bool KHTMLPart::openURL( const KURL &url )
     NSURL *theURL;
     
     urlString = [NSString stringWithCString:d->m_workingURL.url().latin1()];
+    // FIXME: temporary hack to make file: URLs work right
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -416,6 +421,10 @@ bool KHTMLPart::closeURL()
     NSString *urlString;
     
     urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+
     if ([urlString hasSuffix:@"/"]) {
         urlString = [urlString substringToIndex:([urlString length] - 1)];
     }
@@ -1665,22 +1674,26 @@ void KHTMLPart::checkCompleted()
 {
     int requests;
     
+    NSString *urlString;
+    urlString = [NSString stringWithCString:d->m_url.url().latin1()];
+    if ([urlString hasPrefix:@"file:/"] && [urlString characterAtIndex:6] != '/') {
+	urlString = [@"file:///" stringByAppendingString:[urlString substringFromIndex:6]];
+    }
+    
+    if ([urlString hasSuffix:@"/"]) {
+	urlString = [urlString substringToIndex:([urlString length] - 1)];
+    }
     
     // Still waiting for images/scripts from the loader ?
-    requests = khtml::Cache::loader()->numRequests(d->m_url.url().latin1());
+    requests = khtml::Cache::loader()->numRequests([urlString cString]);
     if (requests == 0) {
         // FIXME: check for same URL with slash appended
         // We should not have to do this
-        QString urlString = d->m_url.url();
-        urlString += '/';
-        requests = khtml::Cache::loader()->numRequests(urlString);
+        QString qurlString = [urlString cString];
+        qurlString += '/';
+        requests = khtml::Cache::loader()->numRequests(qurlString);
     }
     if (requests == 0) {
-        NSString *urlString;
-        urlString = [NSString stringWithCString:d->m_url.url().latin1()];
-        if ([urlString hasSuffix:@"/"]) {
-            urlString = [urlString substringToIndex:([urlString length] - 1)];
-        }
         // remove us from the notification center that checks for the end of a load
         [[NSNotificationCenter defaultCenter] removeObserver:d->m_recv name:urlString object:nil];
         // tell anyone who's interested that we're done
diff --git a/WebCore/src/kwq/KWQKjobclasses.mm b/WebCore/src/kwq/KWQKjobclasses.mm
index b1dba47..558d085 100644
--- a/WebCore/src/kwq/KWQKjobclasses.mm
+++ b/WebCore/src/kwq/KWQKjobclasses.mm
@@ -94,6 +94,14 @@ public:
 
         // FIXME: create NSURL for now, later KURL and NSURL should play better together
         NSString *string = [NSString stringWithCString:kurl.url().latin1()];
+	// FIXME: temporary hack to make file: URLs work right
+	if ([string hasPrefix:@"file:/"] && [string characterAtIndex:6] != '/') {
+	    string = [@"file:///" stringByAppendingString:[string substringFromIndex:6]];
+	}
+	if ([string hasSuffix:@"/"]) {
+	    string = [string substringToIndex:([string length] - 1)];
+	}
+
         url = [[NSURL URLWithString:string] retain];
     }
 
@@ -174,3 +182,5 @@ void TransferJob::begin(id <WCURLHandleClient> client, void *userData)
 }
 
 } // namespace KIO
+
+

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list