[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 06:28:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 12ed2dcc5bf386d683a8b9aca82b1bcf328d346c
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 31 02:38:57 2002 +0000

    WebCore:
    
    	Fixes of various bugs that prevented Alexander from running the
    	Mozilla page load test.
    
    	- fixed 3008682 - Alexander cannot run Mozilla-PLT
    
            * khtml/misc/decoder.cpp:
            (Decoder::decode): Don't drop the accumulated buffer if the document
    	happens to be unicode!
    	* kwq/KWQCString.mm:
            (operator==): Fix reversed logic when comparing an empty QCString
    	to a const char *.
            * kwq/KWQKHTMLPartImpl.mm:
    	(KWQKHTMLPartImpl::slotData): Set complete flag later so that
    	initializing it to false doesn't clobber setting it.
            (KWQKHTMLPartImpl::begin): Initialize complete flag to false.
            (KWQKHTMLPartImpl::write): Don't buffer things up for the decoder -
    	the decoder does that internally.
            * kwq/WebCoreBridge.h, kwq/WebCoreBridge.mm: Remove setURL: method.
    
    WebKit:
    
    	Fixes of various bugs that prevented Alexander from running the
    	Mozilla page load test.
    
    	- fixed 3008682 - Alexander cannot run Mozilla-PLT
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge dataSourceChanged]): Don't call setURL: to set a URL
    	that we got from a redirect; just pass it directly to
    	openURL:. The inputURL is irrelevant.
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _setFinalURL:]): Don't call setURL: on the
    	bridge; instead, assert that the data source is committed, because
    	it would be a mistake to get a redirect after having received
    	data.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 33da5e7..f2f0adc 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,24 @@
+2002-07-30  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixes of various bugs that prevented Alexander from running the
+	Mozilla page load test.
+
+	- fixed 3008682 - Alexander cannot run Mozilla-PLT
+
+        * khtml/misc/decoder.cpp:
+        (Decoder::decode): Don't drop the accumulated buffer if the document
+	happens to be unicode!
+	* kwq/KWQCString.mm:
+        (operator==): Fix reversed logic when comparing an empty QCString
+	to a const char *.
+        * kwq/KWQKHTMLPartImpl.mm:
+	(KWQKHTMLPartImpl::slotData): Set complete flag later so that
+	initializing it to false doesn't clobber setting it.
+        (KWQKHTMLPartImpl::begin): Initialize complete flag to false.
+        (KWQKHTMLPartImpl::write): Don't buffer things up for the decoder -
+	the decoder does that internally.
+        * kwq/WebCoreBridge.h, kwq/WebCoreBridge.mm: Remove setURL: method.
+
 2002-07-30  Richard Williamson (local)  <rjw at apple.com>
 
         Don't create unnecessary unicode string.  Of the 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 33da5e7..f2f0adc 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,24 @@
+2002-07-30  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixes of various bugs that prevented Alexander from running the
+	Mozilla page load test.
+
+	- fixed 3008682 - Alexander cannot run Mozilla-PLT
+
+        * khtml/misc/decoder.cpp:
+        (Decoder::decode): Don't drop the accumulated buffer if the document
+	happens to be unicode!
+	* kwq/KWQCString.mm:
+        (operator==): Fix reversed logic when comparing an empty QCString
+	to a const char *.
+        * kwq/KWQKHTMLPartImpl.mm:
+	(KWQKHTMLPartImpl::slotData): Set complete flag later so that
+	initializing it to false doesn't clobber setting it.
+        (KWQKHTMLPartImpl::begin): Initialize complete flag to false.
+        (KWQKHTMLPartImpl::write): Don't buffer things up for the decoder -
+	the decoder does that internally.
+        * kwq/WebCoreBridge.h, kwq/WebCoreBridge.mm: Remove setURL: method.
+
 2002-07-30  Richard Williamson (local)  <rjw at apple.com>
 
         Don't create unnecessary unicode string.  Of the 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 33da5e7..f2f0adc 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2002-07-30  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixes of various bugs that prevented Alexander from running the
+	Mozilla page load test.
+
+	- fixed 3008682 - Alexander cannot run Mozilla-PLT
+
+        * khtml/misc/decoder.cpp:
+        (Decoder::decode): Don't drop the accumulated buffer if the document
+	happens to be unicode!
+	* kwq/KWQCString.mm:
+        (operator==): Fix reversed logic when comparing an empty QCString
+	to a const char *.
+        * kwq/KWQKHTMLPartImpl.mm:
+	(KWQKHTMLPartImpl::slotData): Set complete flag later so that
+	initializing it to false doesn't clobber setting it.
+        (KWQKHTMLPartImpl::begin): Initialize complete flag to false.
+        (KWQKHTMLPartImpl::write): Don't buffer things up for the decoder -
+	the decoder does that internally.
+        * kwq/WebCoreBridge.h, kwq/WebCoreBridge.mm: Remove setURL: method.
+
 2002-07-30  Richard Williamson (local)  <rjw at apple.com>
 
         Don't create unnecessary unicode string.  Of the 
diff --git a/WebCore/khtml/misc/decoder.cpp b/WebCore/khtml/misc/decoder.cpp
index 158dd31..b84308c 100644
--- a/WebCore/khtml/misc/decoder.cpp
+++ b/WebCore/khtml/misc/decoder.cpp
@@ -504,7 +504,13 @@ QString Decoder::decode(const char *data, int len)
     }
     QString out;
 
+#ifdef APPLE_CHANGES
+    // We don't need to special-case unicode like this, and doing so 
+    // will drop the buffer which is really bad!
+    if(!buffer.isEmpty()) {
+#else
     if(!buffer.isEmpty() && enc != "ISO-10646-UCS-2") {
+#endif
         out = m_decoder->toUnicode(buffer, buffer.length());
         buffer = "";
     } else {
@@ -520,7 +526,11 @@ QString Decoder::decode(const char *data, int len)
             }
         }
         out = m_decoder->toUnicode(data, len);
+#ifdef APPLE_CHANGES
+    } // need to balance braces for benefit of ChangeLog script
+#else
     }
+#endif
 
     if (out.isNull()) {
         fprintf(stderr, "ERROR:  decoded string is null\n");
diff --git a/WebCore/kwq/KWQCString.mm b/WebCore/kwq/KWQCString.mm
index 8a86c01..6fff275 100644
--- a/WebCore/kwq/KWQCString.mm
+++ b/WebCore/kwq/KWQCString.mm
@@ -293,10 +293,10 @@ QCString &QCString::operator+=(char c)
 bool operator==(const QCString &s1, const char *s2)
 {
     if (s1.size() == 0 && !s2) {
-        return FALSE;
+        return TRUE;
     }
     else if (s1.size() == 0 && s2) {
-        return TRUE;
+        return FALSE;
     }
     return (strcmp(s1, s2) == 0);
 }
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index dd8a518..6176e6d 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -103,13 +103,6 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, const char *bytes, int lengt
 // 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);
         part->begin(d->m_workingURL, 0, 0);
@@ -118,6 +111,13 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, const char *bytes, int lengt
         d->m_workingURL = KURL();
     }
 
+    // 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 (encoding != NULL) {
         enc = QString::fromCFString((CFStringRef) encoding);
         part->setEncoding(enc, true);
@@ -136,6 +136,7 @@ void KWQKHTMLPartImpl::begin( const KURL &url, int xOffset, int yOffset )
   args.yOffset = yOffset;
   d->m_extension->setURLArgs( args );
 
+  d->m_bComplete = false;
   // d->m_referrer = url.url();
   part->m_url = url;
   KURL baseurl;
@@ -250,16 +251,14 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     
-    // FIX ME:  This is very expensive.  We should be using the data object
+    // FIXME:  This is very expensive.  We should be using the data object
     // that represents the document, and only constructing the complete
     // string when requested.
     m_documentSource += QString(str, len);
 
     QString decoded;
-    if (m_decodingStarted)
-        decoded = d->m_decoder->decode( str, len );
-    else    
-        decoded = d->m_decoder->decode( m_documentSource.latin1(), m_documentSource.length() );
+    
+    decoded = d->m_decoder->decode( str, len );
 
     if(decoded.isEmpty()){
         // Check flag to tell whether the load has completed.
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index dd8a518..6176e6d 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -103,13 +103,6 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, const char *bytes, int lengt
 // 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);
         part->begin(d->m_workingURL, 0, 0);
@@ -118,6 +111,13 @@ void KWQKHTMLPartImpl::slotData(NSString *encoding, const char *bytes, int lengt
         d->m_workingURL = KURL();
     }
 
+    // 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 (encoding != NULL) {
         enc = QString::fromCFString((CFStringRef) encoding);
         part->setEncoding(enc, true);
@@ -136,6 +136,7 @@ void KWQKHTMLPartImpl::begin( const KURL &url, int xOffset, int yOffset )
   args.yOffset = yOffset;
   d->m_extension->setURLArgs( args );
 
+  d->m_bComplete = false;
   // d->m_referrer = url.url();
   part->m_url = url;
   KURL baseurl;
@@ -250,16 +251,14 @@ void KWQKHTMLPartImpl::write( const char *str, int len )
     double start = CFAbsoluteTimeGetCurrent();
 #endif
     
-    // FIX ME:  This is very expensive.  We should be using the data object
+    // FIXME:  This is very expensive.  We should be using the data object
     // that represents the document, and only constructing the complete
     // string when requested.
     m_documentSource += QString(str, len);
 
     QString decoded;
-    if (m_decodingStarted)
-        decoded = d->m_decoder->decode( str, len );
-    else    
-        decoded = d->m_decoder->decode( m_documentSource.latin1(), m_documentSource.length() );
+    
+    decoded = d->m_decoder->decode( str, len );
 
     if(decoded.isEmpty()){
         // Check flag to tell whether the load has completed.
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 12f0927..fc63d02 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -87,8 +87,6 @@ typedef khtml::RenderPart KHTMLRenderPart;
 - (void)installInFrame:(NSView *)view;
 - (void)removeFromFrame;
 
-- (void)setURL:(NSURL *)URL;
-
 - (void)scrollToBaseAnchor;
 
 - (NSString *)documentTextFromDOM;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 5dbb6a4..b3f2c6f 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -110,11 +110,6 @@ using namespace khtml;
     part->end();
 }
 
-- (void)setURL:(NSURL *)URL
-{
-    part->impl->setBaseURL([[URL absoluteString] cString]);
-}
-
 - (void)createKHTMLViewWithNSView:(NSView *)view
     width:(int)width height:(int)height
     marginWidth:(int)mw marginHeight:(int)mh
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 158ab71..8199b0f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2002-07-30  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixes of various bugs that prevented Alexander from running the
+	Mozilla page load test.
+
+	- fixed 3008682 - Alexander cannot run Mozilla-PLT
+	
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge dataSourceChanged]): Don't call setURL: to set a URL
+	that we got from a redirect; just pass it directly to
+	openURL:. The inputURL is irrelevant.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _setFinalURL:]): Don't call setURL: on the
+	bridge; instead, assert that the data source is committed, because
+	it would be a mistake to get a redirect after having received
+	data.
+
 2002-07-30  Richard Williamson (local)  <rjw at apple.com>
 
         Remove annoying log, it's really annoying.  Added FIX ME
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 158ab71..8199b0f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,20 @@
+2002-07-30  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixes of various bugs that prevented Alexander from running the
+	Mozilla page load test.
+
+	- fixed 3008682 - Alexander cannot run Mozilla-PLT
+	
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge dataSourceChanged]): Don't call setURL: to set a URL
+	that we got from a redirect; just pass it directly to
+	openURL:. The inputURL is irrelevant.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _setFinalURL:]): Don't call setURL: on the
+	bridge; instead, assert that the data source is committed, because
+	it would be a mistake to get a redirect after having received
+	data.
+
 2002-07-30  Richard Williamson (local)  <rjw at apple.com>
 
         Remove annoying log, it's really annoying.  Added FIX ME
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 1efa2f7..2e5ed4f 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -217,10 +217,9 @@
     if ([frame dataSource] == nil) {
 	[self openURL:nil];
     } else {
-	[self openURL:[[self dataSource] inputURL]];
-	if ([[self dataSource] redirectedURL]) {
-	    [self setURL:[[self dataSource] redirectedURL]];
-	}
+	[self openURL:[[self dataSource] redirectedURL] == nil ?
+	              [[self dataSource] inputURL] : 
+		      [[self dataSource] redirectedURL]];
     }
 }
 
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index c63a070..19f33d4 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -284,9 +284,12 @@
     [url retain];
     [_private->finalURL release];
     _private->finalURL = url;
-    if (_private->committed) {
-	[[self _bridge] setURL:url];
-    }
+
+    // We should never be getting a redirect callback after the data
+    // source is committed. It would be a WebFoundation bug if it sent
+    // a redirect callback after commit.
+    WEBKIT_ASSERT(!_private->committed);
+
     [[self _locationChangeHandler] serverRedirectTo:url forDataSource:self];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list