[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 06:14:44 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 19ae96b3264bee29b6bb2d34c98e26320eb146b0
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 23 18:36:13 2002 +0000

    2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
    
            Fixes for these bugs:
    
            Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
            Radar 2935472 (Non-standard html pages don't always get decoded)
    
    	WebCore
    
            * khtml/khtml_part.cpp: Don't kill all timers. Just kill the ones for this object.
            (KHTMLPart::~KHTMLPart):
            * khtml/khtml_part.h: Modified interface to slotData to add a flag for when all data
              for a load has been received.
            * khtml/khtmlview.cpp:
            (KHTMLView::~KHTMLView): Don't kill all timers. Just kill the ones for this object.
            * kwq/KWQKHTMLPart.mm:
            (KHTMLPart::slotData): Senses when text encoding is not available, but all data has been received.
            (KHTMLPart::write): Ditto
            (KHTMLPart::scheduleRedirection):
            * libwebcore.exp: Changed symbol for slotData
    
    	WebKit:
    
            * WebView.subproj/IFMainURLHandleClient.h:
            * WebView.subproj/IFMainURLHandleClient.mm:
            (-[IFMainURLHandleClient setContentPolicy:]): Updated method to use new processData interface.
            (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Senses when all data has been received for a load.
            (-[IFMainURLHandleClient processData:isComplete:allDataReceived:]): Modified interface to add a flag
              for when all data for a load has been received.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 2429762..752dd4c 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
+
+        Fixes for these bugs:
+
+        Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
+        Radar 2935472 (Non-standard html pages don't always get decoded)
+
+	* khtml/khtml_part.cpp: Don't kill all timers. Just kill the ones for this object.
+	(KHTMLPart::~KHTMLPart):
+	* khtml/khtml_part.h: Modified interface to slotData to add a flag for when all data 
+          for a load has been received.
+	* khtml/khtmlview.cpp:
+	(KHTMLView::~KHTMLView): Don't kill all timers. Just kill the ones for this object.
+	* kwq/KWQKHTMLPart.mm:
+	(KHTMLPart::slotData): Senses when text encoding is not available, but all data has been received.
+	(KHTMLPart::write): Ditto
+	(KHTMLPart::scheduleRedirection):
+	* libwebcore.exp: Changed symbol for slotData
+
 2002-05-23  Shelley A Sheridan  <sheridan at apple.com>
 
 	* ChangeLog:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 2429762..752dd4c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
+
+        Fixes for these bugs:
+
+        Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
+        Radar 2935472 (Non-standard html pages don't always get decoded)
+
+	* khtml/khtml_part.cpp: Don't kill all timers. Just kill the ones for this object.
+	(KHTMLPart::~KHTMLPart):
+	* khtml/khtml_part.h: Modified interface to slotData to add a flag for when all data 
+          for a load has been received.
+	* khtml/khtmlview.cpp:
+	(KHTMLView::~KHTMLView): Don't kill all timers. Just kill the ones for this object.
+	* kwq/KWQKHTMLPart.mm:
+	(KHTMLPart::slotData): Senses when text encoding is not available, but all data has been received.
+	(KHTMLPart::write): Ditto
+	(KHTMLPart::scheduleRedirection):
+	* libwebcore.exp: Changed symbol for slotData
+
 2002-05-23  Shelley A Sheridan  <sheridan at apple.com>
 
 	* ChangeLog:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2429762..752dd4c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
+
+        Fixes for these bugs:
+
+        Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
+        Radar 2935472 (Non-standard html pages don't always get decoded)
+
+	* khtml/khtml_part.cpp: Don't kill all timers. Just kill the ones for this object.
+	(KHTMLPart::~KHTMLPart):
+	* khtml/khtml_part.h: Modified interface to slotData to add a flag for when all data 
+          for a load has been received.
+	* khtml/khtmlview.cpp:
+	(KHTMLView::~KHTMLView): Don't kill all timers. Just kill the ones for this object.
+	* kwq/KWQKHTMLPart.mm:
+	(KHTMLPart::slotData): Senses when text encoding is not available, but all data has been received.
+	(KHTMLPart::write): Ditto
+	(KHTMLPart::scheduleRedirection):
+	* libwebcore.exp: Changed symbol for slotData
+
 2002-05-23  Shelley A Sheridan  <sheridan at apple.com>
 
 	* ChangeLog:
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index a57f081..8b7fb67 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -250,7 +250,8 @@ KHTMLPart::~KHTMLPart()
 {
   //kdDebug(6050) << "KHTMLPart::~KHTMLPart " << this << endl;
 #ifdef APPLE_CHANGES
-  killTimers();
+  killTimer(d->m_redirectionTimer);
+  d->m_redirectionTimer = 0;
 #endif
 #ifndef APPLE_CHANGES
   if ( d->m_findDialog )
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 2485c9d..b0dc46b 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -1111,7 +1111,7 @@ public:
 
     void setView(KHTMLView *view);
 
-    void slotData(NSString *, const char *bytes, int length);
+    void slotData(NSString *, const char *bytes, int length, bool complete = false);
 
     void setBaseURL(const KURL &);
 
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index b6b8a4b..6f72acc 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -248,7 +248,10 @@ KHTMLView::~KHTMLView()
     if (m_part)
     {
 #ifdef APPLE_CHANGES
-        killTimers();
+        killTimer(d->timerId);
+        killTimer(d->repaintTimerId);
+        d->timerId = 0;
+        d->repaintTimerId = 0;
         m_part->deref();
 #endif
         
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 3ba0802..a184d6e 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -138,11 +138,18 @@ bool KHTMLPart::openURL( const KURL &url )
     return true;
 }
 
-void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
+void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length, bool complete)
 {
 // NOTE: This code emulates the interface used by the original khtml part  
     QString enc;
 
+    // This flag is used to tell when a load has completed so we can be sure
+    // to process the data even if we have not yet determined the proper
+    // encoding.
+    if (complete) {
+        d->m_bComplete = true;    
+    }
+
     if (!d->m_workingURL.isEmpty()) {
         //begin(d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset);
         begin(d->m_workingURL, 0, 0);
@@ -271,7 +278,7 @@ void KHTMLPart::write( const char *str, int len )
     }
 
 #endif APPLE_CHANGES
-
+    
     // begin lines added in lieu of big fixme    
     if ( !d->m_decoder ) {
         d->m_decoder = new khtml::Decoder();
@@ -303,8 +310,16 @@ void KHTMLPart::write( const char *str, int len )
         decoded = d->m_decoder->decode( d->m_documentSource, d->m_documentSource.length() );
 
     if(decoded.isEmpty()){
-        fprintf (stderr, "WARNING:  DECODER unable to decode string, length = %d, total length = %d\n", len, d->m_documentSource.length());
-        return;
+        // Check flag to tell whether the load has completed.
+        // If we get here, it means that no text encoding was available.
+        // Try to process what we have with the default encoding.
+        if (d->m_bComplete) {
+            decoded = d->m_documentSource;
+        }
+        else {
+            fprintf (stderr, "WARNING:  DECODER unable to decode string, length = %d, total length = %d\n", len, d->m_documentSource.length());
+            return;
+        }
     }
 
     d->m_decodingStarted = 1;
@@ -358,6 +373,9 @@ void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool )
 {
 	if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
 	{
+	    if (delay < 1) {
+	        delay = 1;
+	    }
 		d->m_delayRedirect = delay;
 		d->m_redirectURL = url;
 		killTimer(d->m_redirectionTimer);
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 3ba0802..a184d6e 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -138,11 +138,18 @@ bool KHTMLPart::openURL( const KURL &url )
     return true;
 }
 
-void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length)
+void KHTMLPart::slotData(NSString *encoding, const char *bytes, int length, bool complete)
 {
 // NOTE: This code emulates the interface used by the original khtml part  
     QString enc;
 
+    // This flag is used to tell when a load has completed so we can be sure
+    // to process the data even if we have not yet determined the proper
+    // encoding.
+    if (complete) {
+        d->m_bComplete = true;    
+    }
+
     if (!d->m_workingURL.isEmpty()) {
         //begin(d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset);
         begin(d->m_workingURL, 0, 0);
@@ -271,7 +278,7 @@ void KHTMLPart::write( const char *str, int len )
     }
 
 #endif APPLE_CHANGES
-
+    
     // begin lines added in lieu of big fixme    
     if ( !d->m_decoder ) {
         d->m_decoder = new khtml::Decoder();
@@ -303,8 +310,16 @@ void KHTMLPart::write( const char *str, int len )
         decoded = d->m_decoder->decode( d->m_documentSource, d->m_documentSource.length() );
 
     if(decoded.isEmpty()){
-        fprintf (stderr, "WARNING:  DECODER unable to decode string, length = %d, total length = %d\n", len, d->m_documentSource.length());
-        return;
+        // Check flag to tell whether the load has completed.
+        // If we get here, it means that no text encoding was available.
+        // Try to process what we have with the default encoding.
+        if (d->m_bComplete) {
+            decoded = d->m_documentSource;
+        }
+        else {
+            fprintf (stderr, "WARNING:  DECODER unable to decode string, length = %d, total length = %d\n", len, d->m_documentSource.length());
+            return;
+        }
     }
 
     d->m_decodingStarted = 1;
@@ -358,6 +373,9 @@ void KHTMLPart::scheduleRedirection( int delay, const QString &url, bool )
 {
 	if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
 	{
+	    if (delay < 1) {
+	        delay = 1;
+	    }
 		d->m_delayRedirect = delay;
 		d->m_redirectURL = url;
 		killTimer(d->m_redirectionTimer);
diff --git a/WebCore/libwebcore.exp b/WebCore/libwebcore.exp
index a4cd7b0..a1396d3 100644
--- a/WebCore/libwebcore.exp
+++ b/WebCore/libwebcore.exp
@@ -21,7 +21,7 @@ __ZN9KHTMLPart10setBaseURLERK4KURL
 __ZN9KHTMLPart13setDataSourceEP15IFWebDataSource
 __ZN9KHTMLPart14gotoBaseAnchorEv
 __ZN9KHTMLPart7setViewEP9KHTMLView
-__ZN9KHTMLPart8slotDataEP8NSStringPKci
+__ZN9KHTMLPart8slotDataEP8NSStringPKcib
 __ZN9KHTMLPartC1EP7QWidgetPKcP7QObjectS3_NS_10GUIProfileE
 __ZN9KHTMLView6layoutEv
 __ZN9KHTMLViewC1EP9KHTMLPartP7QWidgetPKc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3dafa31..d6775eb 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
+
+        Fixes for these bugs:
+
+        Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
+        Radar 2935472 (Non-standard html pages don't always get decoded)
+
+	* WebView.subproj/IFMainURLHandleClient.h:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient setContentPolicy:]): Updated method to use new processData interface.
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Senses when all data has been received for a load.
+	(-[IFMainURLHandleClient processData:isComplete:allDataReceived:]): Modified interface to add a flag 
+          for when all data for a load has been received.
+
 2002-05-23  Shelley A Sheridan  <sheridan at apple.com>
 
 	* ChangeLog:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3dafa31..d6775eb 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
+
+        Fixes for these bugs:
+
+        Radar 2883631 (need to implement support for META HTTP_EQUIV=REFRESH)
+        Radar 2935472 (Non-standard html pages don't always get decoded)
+
+	* WebView.subproj/IFMainURLHandleClient.h:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient setContentPolicy:]): Updated method to use new processData interface.
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Senses when all data has been received for a load.
+	(-[IFMainURLHandleClient processData:isComplete:allDataReceived:]): Modified interface to add a flag 
+          for when all data for a load has been received.
+
 2002-05-23  Shelley A Sheridan  <sheridan at apple.com>
 
 	* ChangeLog:
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.h b/WebKit/WebView.subproj/IFMainURLHandleClient.h
index e4291fb..f1ccc14 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.h
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.h
@@ -31,7 +31,7 @@ class KHTMLPart;
 - initWithDataSource: (IFWebDataSource *)ds part: (KHTMLPart *)p;
 - (void)setContentPolicy:(IFContentPolicy)theContentPolicy;
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete;
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived;
 - (void) finishProcessingData:(NSData *)data;
 @end
 
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 785c262..bb87f3d 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -63,7 +63,7 @@
     contentPolicy = theContentPolicy;
     
     if(loadFinished)
-        [self processData:resourceData isComplete:YES];
+        [self processData:resourceData isComplete:YES allDataReceived:loadFinished];
 }
 
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
@@ -142,10 +142,10 @@
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // process all data that has been received now that we have a content policy
-            [self processData:[sender resourceData] isComplete:NO];
+            [self processData:[sender resourceData] isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
             processedBufferedData = YES;
         }else{
-            [self processData:data isComplete:NO];
+            [self processData:data isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
         }
     }
     
@@ -198,7 +198,7 @@
 }
 
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived
 {
     NSString *fakeHTMLDocument;
     const char *fakeHTMLDocumentBytes;
@@ -209,7 +209,7 @@
         
         if(handlerType == IFMIMEHANDLERTYPE_NIL || handlerType == IFMIMEHANDLERTYPE_HTML) {
             // If data is html, send it to the part.
-            part->slotData(encoding, (const char *)[data bytes], [data length]);
+            part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
         }
         
         else if(handlerType == IFMIMEHANDLERTYPE_IMAGE  || 
@@ -221,14 +221,14 @@
                 contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:handlerType];
                 fakeHTMLDocument = [contentHandler HTMLDocument];
                 fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), allDataReceived);
                 [contentHandler release];
                 sentFakeDocForNonHTMLContentType = YES;
             }
             
             // For text documents, the incoming data is part of the main page.
             if(handlerType == IFMIMEHANDLERTYPE_TEXT){
-                part->slotData(encoding, (const char *)[data bytes], [data length]);
+                part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
             }
         }
     }
@@ -263,7 +263,7 @@
             contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:IFMIMEHANDLERTYPE_TEXT];
             fakeHTMLDocument = [contentHandler textHTMLDocumentBottom];
             fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), YES);
             [contentHandler release];
         }
     }
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.h b/WebKit/WebView.subproj/WebMainResourceClient.h
index e4291fb..f1ccc14 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.h
+++ b/WebKit/WebView.subproj/WebMainResourceClient.h
@@ -31,7 +31,7 @@ class KHTMLPart;
 - initWithDataSource: (IFWebDataSource *)ds part: (KHTMLPart *)p;
 - (void)setContentPolicy:(IFContentPolicy)theContentPolicy;
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete;
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived;
 - (void) finishProcessingData:(NSData *)data;
 @end
 
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 785c262..bb87f3d 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -63,7 +63,7 @@
     contentPolicy = theContentPolicy;
     
     if(loadFinished)
-        [self processData:resourceData isComplete:YES];
+        [self processData:resourceData isComplete:YES allDataReceived:loadFinished];
 }
 
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
@@ -142,10 +142,10 @@
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // process all data that has been received now that we have a content policy
-            [self processData:[sender resourceData] isComplete:NO];
+            [self processData:[sender resourceData] isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
             processedBufferedData = YES;
         }else{
-            [self processData:data isComplete:NO];
+            [self processData:data isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
         }
     }
     
@@ -198,7 +198,7 @@
 }
 
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived
 {
     NSString *fakeHTMLDocument;
     const char *fakeHTMLDocumentBytes;
@@ -209,7 +209,7 @@
         
         if(handlerType == IFMIMEHANDLERTYPE_NIL || handlerType == IFMIMEHANDLERTYPE_HTML) {
             // If data is html, send it to the part.
-            part->slotData(encoding, (const char *)[data bytes], [data length]);
+            part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
         }
         
         else if(handlerType == IFMIMEHANDLERTYPE_IMAGE  || 
@@ -221,14 +221,14 @@
                 contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:handlerType];
                 fakeHTMLDocument = [contentHandler HTMLDocument];
                 fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), allDataReceived);
                 [contentHandler release];
                 sentFakeDocForNonHTMLContentType = YES;
             }
             
             // For text documents, the incoming data is part of the main page.
             if(handlerType == IFMIMEHANDLERTYPE_TEXT){
-                part->slotData(encoding, (const char *)[data bytes], [data length]);
+                part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
             }
         }
     }
@@ -263,7 +263,7 @@
             contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:IFMIMEHANDLERTYPE_TEXT];
             fakeHTMLDocument = [contentHandler textHTMLDocumentBottom];
             fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), YES);
             [contentHandler release];
         }
     }
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.h b/WebKit/WebView.subproj/WebMainResourceLoader.h
index e4291fb..f1ccc14 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.h
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.h
@@ -31,7 +31,7 @@ class KHTMLPart;
 - initWithDataSource: (IFWebDataSource *)ds part: (KHTMLPart *)p;
 - (void)setContentPolicy:(IFContentPolicy)theContentPolicy;
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete;
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived;
 - (void) finishProcessingData:(NSData *)data;
 @end
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 785c262..bb87f3d 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -63,7 +63,7 @@
     contentPolicy = theContentPolicy;
     
     if(loadFinished)
-        [self processData:resourceData isComplete:YES];
+        [self processData:resourceData isComplete:YES allDataReceived:loadFinished];
 }
 
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
@@ -142,10 +142,10 @@
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // process all data that has been received now that we have a content policy
-            [self processData:[sender resourceData] isComplete:NO];
+            [self processData:[sender resourceData] isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
             processedBufferedData = YES;
         }else{
-            [self processData:data isComplete:NO];
+            [self processData:data isComplete:NO allDataReceived:(contentLength == contentLengthReceived)];
         }
     }
     
@@ -198,7 +198,7 @@
 }
 
 
-- (void) processData:(NSData *)data isComplete:(BOOL)complete
+- (void) processData:(NSData *)data isComplete:(BOOL)complete allDataReceived:(BOOL)allDataReceived
 {
     NSString *fakeHTMLDocument;
     const char *fakeHTMLDocumentBytes;
@@ -209,7 +209,7 @@
         
         if(handlerType == IFMIMEHANDLERTYPE_NIL || handlerType == IFMIMEHANDLERTYPE_HTML) {
             // If data is html, send it to the part.
-            part->slotData(encoding, (const char *)[data bytes], [data length]);
+            part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
         }
         
         else if(handlerType == IFMIMEHANDLERTYPE_IMAGE  || 
@@ -221,14 +221,14 @@
                 contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:handlerType];
                 fakeHTMLDocument = [contentHandler HTMLDocument];
                 fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+                part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), allDataReceived);
                 [contentHandler release];
                 sentFakeDocForNonHTMLContentType = YES;
             }
             
             // For text documents, the incoming data is part of the main page.
             if(handlerType == IFMIMEHANDLERTYPE_TEXT){
-                part->slotData(encoding, (const char *)[data bytes], [data length]);
+                part->slotData(encoding, (const char *)[data bytes], [data length], allDataReceived);
             }
         }
     }
@@ -263,7 +263,7 @@
             contentHandler = [[IFContentHandler alloc] initWithURL:url MIMEType:MIMEType MIMEHandlerType:IFMIMEHANDLERTYPE_TEXT];
             fakeHTMLDocument = [contentHandler textHTMLDocumentBottom];
             fakeHTMLDocumentBytes = [fakeHTMLDocument cString];
-            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes));
+            part->slotData(encoding, (const char *)fakeHTMLDocumentBytes, strlen(fakeHTMLDocumentBytes), YES);
             [contentHandler release];
         }
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list