[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 05:54:44 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8adc2c41fa406578a552732146f26ee016e74e89
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 30 00:32:04 2002 +0000

    2002-01-29  Kenneth Kocienda  <kocienda at apple.com>
    
            - Some work on response headers.
            - Some work on progress indication/content length.
            - Some beginning of support for synchronous loads.
            - Worked around a smasher that results from not having
            the no-copy NSData object ready yet.
    
            * CacheLoader.subproj/WKHTTPURLHandle.h:
            * CacheLoader.subproj/WKHTTPURLHandle.m: (-[WKHTTPURLHandle
            setRequestHeader:forKey:]), (-[WKHTTPURLHandle setRequestHeaders:]),
            (-[WKHTTPURLHandle removeRequestHeaderForKey:]), (-[WKHTTPURLHandle
            contentLength]):
            * CacheLoader.subproj/WKHTTPURLProtocolHandler.m: (-[WKHTTPURLProtocolHandler
            performStreamRead:]):
            * CacheLoader.subproj/WKURLHandle.h:
            * CacheLoader.subproj/WKURLHandle.m: (-[WKURLHandleSynchronousClient init]),
            (-[WKURLHandleSynchronousClient WKURLHandleResourceDidBeginLoading:]),
            (-[WKURLHandleSynchronousClient WKURLHandleResourceDidCancelLoading:]),
            (-[WKURLHandleSynchronousClient WKURLHandleResourceDidFinishLoading:]),
            (-[WKURLHandleSynchronousClient
            WKURLHandle:resourceDataDidBecomeAvailable:offset:length:]),
            (-[WKURLHandleSynchronousClient WKURLHandle:resourceDidFailLoadingWithResult:]),
            (-[WKURLHandleSynchronousClient loadFinished]), (-[WKURLHandleSynchronousClient
            lock]), (-[WKURLHandleSynchronousClient unlock]), (-[WKURLHandleSynchronousClient
            waitInterval:]), (-[WKURLHandle loadInForeground]), (-[WKURLHandle
            loadInForeground:]), (-[WKURLHandle contentLength]), (-[WKURLHandle
            contentLengthReceived]), (-[WKURLHandle percentComplete]), (-[WKURLHandle
            dealloc]):
            * CacheLoader.subproj/WKURLLoad.m: (-[WKURLLoad dealloc]):
    
            - Added in a dummy protocol to clean up a warning that results
            from calling a method on an id.
            - Cleaned up handle variable in KWQKHTMLPart. This can now be freed
            once we get a proper notification that a load is done.
            - Support for reading text encoding from HTTP headers added back in.
    
            * include/WCURLHandle.h:
            * src/kwq/KWQKHTMLPart.mm: (encodingFromContentType), (KHTMLPart::slotData),
            (KHTMLPart::openURL), (KHTMLPart::closeURL):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 6df7dde..1288b19 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-01-29  Kenneth Kocienda  <kocienda at apple.com>
+
+        - Added in a dummy protocol to clean up a warning that results
+        from calling a method on an id.
+        - Cleaned up handle variable in KWQKHTMLPart. This can now be freed
+        once we get a proper notification that a load is done.
+        - Support for reading text encoding from HTTP headers added back in.
+        
+	* include/WCURLHandle.h:
+	* src/kwq/KWQKHTMLPart.mm: (encodingFromContentType), (KHTMLPart::slotData),
+	(KHTMLPart::openURL), (KHTMLPart::closeURL):
+
 2002-01-29  Richard Williamson  <rjw at apple.com>
 
     First pass as frame code.  Still needs cleanup.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6df7dde..1288b19 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-01-29  Kenneth Kocienda  <kocienda at apple.com>
+
+        - Added in a dummy protocol to clean up a warning that results
+        from calling a method on an id.
+        - Cleaned up handle variable in KWQKHTMLPart. This can now be freed
+        once we get a proper notification that a load is done.
+        - Support for reading text encoding from HTTP headers added back in.
+        
+	* include/WCURLHandle.h:
+	* src/kwq/KWQKHTMLPart.mm: (encodingFromContentType), (KHTMLPart::slotData),
+	(KHTMLPart::openURL), (KHTMLPart::closeURL):
+
 2002-01-29  Richard Williamson  <rjw at apple.com>
 
     First pass as frame code.  Still needs cleanup.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6df7dde..1288b19 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-01-29  Kenneth Kocienda  <kocienda at apple.com>
+
+        - Added in a dummy protocol to clean up a warning that results
+        from calling a method on an id.
+        - Cleaned up handle variable in KWQKHTMLPart. This can now be freed
+        once we get a proper notification that a load is done.
+        - Support for reading text encoding from HTTP headers added back in.
+        
+	* include/WCURLHandle.h:
+	* src/kwq/KWQKHTMLPart.mm: (encodingFromContentType), (KHTMLPart::slotData),
+	(KHTMLPart::openURL), (KHTMLPart::closeURL):
+
 2002-01-29  Richard Williamson  <rjw at apple.com>
 
     First pass as frame code.  Still needs cleanup.
diff --git a/WebCore/include/WCURLHandle.h b/WebCore/include/WCURLHandle.h
index 5ff3606..3090819 100644
--- a/WebCore/include/WCURLHandle.h
+++ b/WebCore/include/WCURLHandle.h
@@ -17,6 +17,9 @@
 
 @end
 
+ at protocol WCHTTPURLHandle
+-(NSString *)responseHeaderForKey:(NSString *)key;
+ at end
 
 #if defined(__cplusplus)
 extern "C" {
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index d6307ec..c354746 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -160,6 +160,7 @@ public:
     
     KHTMLPart *m_part;
     KHTMLPartLoadClient *m_recv;
+    id m_handle;
 
     bool m_bFirstData:1;
     bool m_haveEncoding:1;
@@ -207,6 +208,7 @@ public:
         m_haveEncoding = false;
         m_recv = [[KHTMLPartLoadClient alloc] init];
         m_recv->m_part = part;
+        m_handle = nil;
         
         m_jscript = 0L;
         m_runningScripts = 0;
@@ -260,7 +262,6 @@ KHTMLPart::~KHTMLPart()
     NSLog(@"destructing KHTMLPart");
 }
 
-#if 0
 static NSString *
 encodingFromContentType (NSString *contentType)
 {
@@ -281,12 +282,11 @@ encodingFromContentType (NSString *contentType)
 
     return result;
 }
-#endif
 
 // NOTE: This code emulates the interface used by the original khtml part  
 void KHTMLPart::slotData(id handle, const char *bytes, int length)
 {
-    //NSString *encoding;
+    NSString *encoding;
     QString enc;
 
     if (!d->m_workingURL.isEmpty()) {
@@ -294,17 +294,15 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
         begin(d->m_workingURL, 0, 0);
         d->m_workingURL = KURL();
     }
-    
-    // FIXME: need to turn this back on
-    #if 0
-    encoding = encodingFromContentType ([[data headers] objectForKey:@"Content-Type"]);
-    if (encoding != NULL) {
-        enc = QString::fromCFString((CFStringRef) encoding);
 
-        setEncoding (enc, true);
+    if (!d->m_encoding && [handle respondsToSelector:@selector(responseHeaderForKey:)]) {
+        encoding = encodingFromContentType([handle responseHeaderForKey:@"Content-Type"]);
+        if (encoding != NULL) {
+            enc = QString::fromCFString((CFStringRef) encoding);
+            setEncoding (enc, true);
+        }
     }
-    #endif
-    
+
     write(bytes, length);
 }
 
@@ -336,7 +334,6 @@ bool KHTMLPart::openURL( const KURL &url )
     d->m_workingURL = url;
     d->m_url = url;
 
-    id handle;
     NSString *urlString;
     NSURL *theURL;
     
@@ -346,8 +343,8 @@ bool KHTMLPart::openURL( const KURL &url )
     }
     theURL = [NSURL URLWithString:urlString];
     
-    handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
-    [handle loadInBackground];
+    d->m_handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
+    [d->m_handle loadInBackground];
     
     [[NSNotificationCenter defaultCenter] addObserver:d->m_recv
         selector:@selector(checkCompleted:) name:urlString object:nil];
@@ -376,7 +373,6 @@ bool KHTMLPart::closeURL()
     // Reset the the current working URL to the default URL.
     d->m_workingURL = KURL();
     
-
     //d->m_doc = 0;
     
     return true;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index d6307ec..c354746 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -160,6 +160,7 @@ public:
     
     KHTMLPart *m_part;
     KHTMLPartLoadClient *m_recv;
+    id m_handle;
 
     bool m_bFirstData:1;
     bool m_haveEncoding:1;
@@ -207,6 +208,7 @@ public:
         m_haveEncoding = false;
         m_recv = [[KHTMLPartLoadClient alloc] init];
         m_recv->m_part = part;
+        m_handle = nil;
         
         m_jscript = 0L;
         m_runningScripts = 0;
@@ -260,7 +262,6 @@ KHTMLPart::~KHTMLPart()
     NSLog(@"destructing KHTMLPart");
 }
 
-#if 0
 static NSString *
 encodingFromContentType (NSString *contentType)
 {
@@ -281,12 +282,11 @@ encodingFromContentType (NSString *contentType)
 
     return result;
 }
-#endif
 
 // NOTE: This code emulates the interface used by the original khtml part  
 void KHTMLPart::slotData(id handle, const char *bytes, int length)
 {
-    //NSString *encoding;
+    NSString *encoding;
     QString enc;
 
     if (!d->m_workingURL.isEmpty()) {
@@ -294,17 +294,15 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
         begin(d->m_workingURL, 0, 0);
         d->m_workingURL = KURL();
     }
-    
-    // FIXME: need to turn this back on
-    #if 0
-    encoding = encodingFromContentType ([[data headers] objectForKey:@"Content-Type"]);
-    if (encoding != NULL) {
-        enc = QString::fromCFString((CFStringRef) encoding);
 
-        setEncoding (enc, true);
+    if (!d->m_encoding && [handle respondsToSelector:@selector(responseHeaderForKey:)]) {
+        encoding = encodingFromContentType([handle responseHeaderForKey:@"Content-Type"]);
+        if (encoding != NULL) {
+            enc = QString::fromCFString((CFStringRef) encoding);
+            setEncoding (enc, true);
+        }
     }
-    #endif
-    
+
     write(bytes, length);
 }
 
@@ -336,7 +334,6 @@ bool KHTMLPart::openURL( const KURL &url )
     d->m_workingURL = url;
     d->m_url = url;
 
-    id handle;
     NSString *urlString;
     NSURL *theURL;
     
@@ -346,8 +343,8 @@ bool KHTMLPart::openURL( const KURL &url )
     }
     theURL = [NSURL URLWithString:urlString];
     
-    handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
-    [handle loadInBackground];
+    d->m_handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
+    [d->m_handle loadInBackground];
     
     [[NSNotificationCenter defaultCenter] addObserver:d->m_recv
         selector:@selector(checkCompleted:) name:urlString object:nil];
@@ -376,7 +373,6 @@ bool KHTMLPart::closeURL()
     // Reset the the current working URL to the default URL.
     d->m_workingURL = KURL();
     
-
     //d->m_doc = 0;
     
     return true;
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index d6307ec..c354746 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -160,6 +160,7 @@ public:
     
     KHTMLPart *m_part;
     KHTMLPartLoadClient *m_recv;
+    id m_handle;
 
     bool m_bFirstData:1;
     bool m_haveEncoding:1;
@@ -207,6 +208,7 @@ public:
         m_haveEncoding = false;
         m_recv = [[KHTMLPartLoadClient alloc] init];
         m_recv->m_part = part;
+        m_handle = nil;
         
         m_jscript = 0L;
         m_runningScripts = 0;
@@ -260,7 +262,6 @@ KHTMLPart::~KHTMLPart()
     NSLog(@"destructing KHTMLPart");
 }
 
-#if 0
 static NSString *
 encodingFromContentType (NSString *contentType)
 {
@@ -281,12 +282,11 @@ encodingFromContentType (NSString *contentType)
 
     return result;
 }
-#endif
 
 // NOTE: This code emulates the interface used by the original khtml part  
 void KHTMLPart::slotData(id handle, const char *bytes, int length)
 {
-    //NSString *encoding;
+    NSString *encoding;
     QString enc;
 
     if (!d->m_workingURL.isEmpty()) {
@@ -294,17 +294,15 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
         begin(d->m_workingURL, 0, 0);
         d->m_workingURL = KURL();
     }
-    
-    // FIXME: need to turn this back on
-    #if 0
-    encoding = encodingFromContentType ([[data headers] objectForKey:@"Content-Type"]);
-    if (encoding != NULL) {
-        enc = QString::fromCFString((CFStringRef) encoding);
 
-        setEncoding (enc, true);
+    if (!d->m_encoding && [handle respondsToSelector:@selector(responseHeaderForKey:)]) {
+        encoding = encodingFromContentType([handle responseHeaderForKey:@"Content-Type"]);
+        if (encoding != NULL) {
+            enc = QString::fromCFString((CFStringRef) encoding);
+            setEncoding (enc, true);
+        }
     }
-    #endif
-    
+
     write(bytes, length);
 }
 
@@ -336,7 +334,6 @@ bool KHTMLPart::openURL( const KURL &url )
     d->m_workingURL = url;
     d->m_url = url;
 
-    id handle;
     NSString *urlString;
     NSURL *theURL;
     
@@ -346,8 +343,8 @@ bool KHTMLPart::openURL( const KURL &url )
     }
     theURL = [NSURL URLWithString:urlString];
     
-    handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
-    [handle loadInBackground];
+    d->m_handle = WCURLHandleCreate(theURL, d->m_recv, NULL);
+    [d->m_handle loadInBackground];
     
     [[NSNotificationCenter defaultCenter] addObserver:d->m_recv
         selector:@selector(checkCompleted:) name:urlString object:nil];
@@ -376,7 +373,6 @@ bool KHTMLPart::closeURL()
     // Reset the the current working URL to the default URL.
     d->m_workingURL = KURL();
     
-
     //d->m_doc = 0;
     
     return true;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list