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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:59:48 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit aa70db1bcac691f8d7a43e7c043f2a795d63dc79
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 13 23:32:48 2002 +0000

    WebCore:
    
    	- fixed 3083982 -- Logging into AOL gives null view
    
    	Turns out AOL was using a refresh header, which we were not supporting.
    
            * khtml/khtml_part.h: Declare receivedFirstData, a private member function.
            * khtml/khtml_part.cpp:
            (KHTMLPart::receivedFirstData): Separate out the part of slotData we
    	want to share, which really seems kinda separate anyway.
            (KHTMLPart::slotData): More of the same.
    
            * kwq/KWQKHTMLPart.h: Declare addMetaData.
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
    	thing ourselves.
            (KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
    
            * kwq/KWQKHTMLPartBrowserExtension.mm:
            (KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
    	openURL: but meant to call loadURL:.
    
            * kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
    	This method is big enough that I should probably move the guts to KWQKHTMLPart.
    
    	- other things
    
            * kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
    	while doing my "bug fix" in here a while back. Change an assignment statement
    	to an assert.
    
    WebKit:
    
    	- fixed 3083982 -- Logging into AOL gives null view
    
    	Turns out AOL was using a refresh header, which we were not supporting.
    
            * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
    	Call openURL: and pass headers in.
    
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:isFormSubmission:]):
    	Pass nil for headers in this case, since we know it's just an anchor change.
    
    	- other things
    
            * WebCoreSupport.subproj/WebBridge.h: Remove dataSourceChanged and dataSource
    	methods. We try to keep the bridge methods down to actual bridging.
            * WebCoreSupport.subproj/WebBridge.m: Remove dataSourceChanged altogether,
    	and move dataSource up in the file.
    
            * WebView.subproj/WebHTMLRepresentation.m:
            (-[WebHTMLRepresentation setDataSource:]): Keep the data source around, so we
    	don't need to ask the bridge for it.
            (-[WebHTMLRepresentation documentSource]): Use it here.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2660 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 85cf8d5..846667f 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,36 @@
+2002-11-13  Darin Adler  <darin at apple.com>
+
+	- fixed 3083982 -- Logging into AOL gives null view
+
+	Turns out AOL was using a refresh header, which we were not supporting.
+
+        * khtml/khtml_part.h: Declare receivedFirstData, a private member function.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::receivedFirstData): Separate out the part of slotData we
+	want to share, which really seems kinda separate anyway.
+        (KHTMLPart::slotData): More of the same.
+
+        * kwq/KWQKHTMLPart.h: Declare addMetaData.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
+	thing ourselves.
+        (KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
+	openURL: but meant to call loadURL:.
+
+        * kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
+	This method is big enough that I should probably move the guts to KWQKHTMLPart.
+
+	- other things
+
+        * kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
+	while doing my "bug fix" in here a while back. Change an assignment statement
+	to an assert.
+
 2002-11-13  David Hyatt  <hyatt at apple.com>
 
 	Fix for floats. Force relayout if collapsing margins
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 85cf8d5..846667f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,36 @@
+2002-11-13  Darin Adler  <darin at apple.com>
+
+	- fixed 3083982 -- Logging into AOL gives null view
+
+	Turns out AOL was using a refresh header, which we were not supporting.
+
+        * khtml/khtml_part.h: Declare receivedFirstData, a private member function.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::receivedFirstData): Separate out the part of slotData we
+	want to share, which really seems kinda separate anyway.
+        (KHTMLPart::slotData): More of the same.
+
+        * kwq/KWQKHTMLPart.h: Declare addMetaData.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
+	thing ourselves.
+        (KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
+	openURL: but meant to call loadURL:.
+
+        * kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
+	This method is big enough that I should probably move the guts to KWQKHTMLPart.
+
+	- other things
+
+        * kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
+	while doing my "bug fix" in here a while back. Change an assignment statement
+	to an assert.
+
 2002-11-13  David Hyatt  <hyatt at apple.com>
 
 	Fix for floats. Force relayout if collapsing margins
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 85cf8d5..846667f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,36 @@
+2002-11-13  Darin Adler  <darin at apple.com>
+
+	- fixed 3083982 -- Logging into AOL gives null view
+
+	Turns out AOL was using a refresh header, which we were not supporting.
+
+        * khtml/khtml_part.h: Declare receivedFirstData, a private member function.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::receivedFirstData): Separate out the part of slotData we
+	want to share, which really seems kinda separate anyway.
+        (KHTMLPart::slotData): More of the same.
+
+        * kwq/KWQKHTMLPart.h: Declare addMetaData.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
+	thing ourselves.
+        (KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
+	openURL: but meant to call loadURL:.
+
+        * kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
+	This method is big enough that I should probably move the guts to KWQKHTMLPart.
+
+	- other things
+
+        * kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
+	while doing my "bug fix" in here a while back. Change an assignment statement
+	to an assert.
+
 2002-11-13  David Hyatt  <hyatt at apple.com>
 
 	Fix for floats. Force relayout if collapsing margins
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 0ea29ef..4d17d8d 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1002,21 +1002,15 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
     return 0;
 }
 
-#if !APPLE_CHANGES
-
 /*bool KHTMLPart::isSSLInUse() const
 {
   return d->m_ssl_in_use;
 }*/
 
-void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
+void KHTMLPart::receivedFirstData()
 {
-  assert ( d->m_job == kio_job );
-
-  //kdDebug( 6050 ) << "slotData: " << data.size() << endl;
-  // The first data ?
-  if ( !d->m_workingURL.isEmpty() )
-  {
+    // Leave indented one extra for easier merging.
+    
       //kdDebug( 6050 ) << "begin!" << endl;
 
     begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
@@ -1028,6 +1022,9 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
     d->m_cacheId = KHTMLPageCache::self()->createCacheEntry();
 
     // When the first data arrives, the metadata has just been made available
+#if APPLE_CHANGES
+    QString qData;
+#else
     d->m_bSecurityInQuestion = false;
     d->m_ssl_in_use = (d->m_job->queryMetaData("ssl_in_use") == "TRUE");
     kdDebug(6050) << "SSL in use? " << d->m_job->queryMetaData("ssl_in_use") << endl;
@@ -1062,6 +1059,7 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
     QString qData = d->m_job->queryMetaData("charset");
     if ( !qData.isEmpty() && !d->m_haveEncoding ) // only use information if the user didn't override the settings
        d->m_encoding = qData;
+#endif // APPLE_CHANGES
 
     // Support for http-refresh
     qData = d->m_job->queryMetaData("http-refresh");
@@ -1110,7 +1108,18 @@ void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
     // Support for http last-modified
     d->m_lastModified = d->m_job->queryMetaData("modified");
     //kdDebug() << "KHTMLPart::slotData metadata modified: " << d->m_lastModified << endl;
-  }
+}
+
+#if !APPLE_CHANGES
+
+void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
+{
+  assert ( d->m_job == kio_job );
+
+  //kdDebug( 6050 ) << "slotData: " << data.size() << endl;
+  // The first data ?
+  if ( !d->m_workingURL.isEmpty() )
+    receivedFirstData( );
 
   KHTMLPageCache::self()->addData(d->m_cacheId, data);
   write( data.data(), data.size() );
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index e35c8d2..75aeddb 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -1076,6 +1076,8 @@ private:
 
   void checkEmitLoadEvent();
   void emitLoadEvent();
+  
+  void receivedFirstData();
 
   KHTMLPartPrivate *d;
   friend class KHTMLPartPrivate;
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index f9ad038..0cde4dd 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -147,6 +147,8 @@ public:
 
     void setCurrentEvent(NSEvent *event);
     
+    void addMetaData(const QString &key, const QString &value);
+    
 private:
     void setPolicyBaseURL(const DOM::DOMString &);
 
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 21517e0..75395c6 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -37,6 +37,7 @@
 #import "WebCoreViewFactory.h"
 
 #import "KWQDummyView.h"
+#import "KWQKJobClasses.h"
 #import "KWQLogging.h"
 
 #undef _KWQ_TIMING
@@ -180,8 +181,7 @@ void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
 void KWQKHTMLPart::slotData(NSString *encoding, bool forceEncoding, const char *bytes, int length, bool complete)
 {
     if (!d->m_workingURL.isEmpty()) {
-        part->begin(d->m_workingURL, 0, 0);
-        d->m_workingURL = KURL();
+        part->receivedFirstData();
     }
     
     ASSERT(d->m_doc);
@@ -567,3 +567,8 @@ void KWQKHTMLPart::setCurrentEvent(NSEvent *event)
     [_currentEvent release];
     _currentEvent = event;
 }
+
+void KWQKHTMLPart::addMetaData(const QString &key, const QString &value)
+{
+    d->m_job->addMetaData(key, value);
+}
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index d765a01..9a6ae2b 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -69,7 +69,7 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
 	bridge = [m_part->kwq->bridge() findFramedNamed:frameName];
 	if (bridge != nil) {
 	    if (!url.isEmpty()) {
-		[bridge openURL:url.getNSURL()];
+		[bridge loadURL:url.getNSURL() reload:urlArgs.reload triggeringEvent:nil isFormSubmission:NO];
 	    }
 	    *partResult = [bridge part];
 	    return;
diff --git a/WebCore/kwq/KWQListImpl.mm b/WebCore/kwq/KWQListImpl.mm
index a5559db..0a64188 100644
--- a/WebCore/kwq/KWQListImpl.mm
+++ b/WebCore/kwq/KWQListImpl.mm
@@ -93,7 +93,7 @@ KWQListImpl::~KWQListImpl()
     for (KWQListIteratorImpl *it = iterators; it != NULL; it = next) {
         next = it->next;
         it->list = NULL;
-        it->node = NULL;
+        ASSERT(it->node == NULL);
         it->next = NULL;
         it->prev = NULL;
     }
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 27a772c..da5672c 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -94,7 +94,7 @@ enum FrameBorderStyle {
 
 - (void)setParent:(WebCoreBridge *)parent;
 
-- (void)openURL:(NSURL *)URL;
+- (void)openURL:(NSURL *)URL withHeaders:(NSDictionary *)headers;
 - (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
 - (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding;
 - (void)closeURL;
@@ -102,8 +102,6 @@ enum FrameBorderStyle {
 - (void)restoreDocumentState;
 - (void)end;
 
-- (void)setContentType:(NSString*)contentType;
-
 - (NSURL *)URL;
 - (NSString *)referrer;
 
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 6fed3ff..9c55cf0 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -108,9 +108,24 @@ using khtml::RenderPart;
     _part->setParent([parent part]);
 }
 
-- (void)openURL:(NSURL *)URL
-{
+- (void)openURL:(NSURL *)URL withHeaders:(NSDictionary *)headers
+{
+    // Content-Type
+    NSString *contentType = [headers objectForKey:@"Content-Type"];
+    if (contentType) {
+        KParts::URLArgs args(_part->browserExtension()->urlArgs());
+        args.serviceType = QString::fromNSString(contentType);
+        _part->browserExtension()->setURLArgs(args);
+    }
+
+    // URL
     _part->openURL([[URL absoluteString] cString]);
+    
+    // Refresh
+    NSString *refreshHeader = [headers objectForKey:@"Refresh"];
+    if (refreshHeader) {
+        _part->kwq->addMetaData("http-refresh", QString::fromNSString(refreshHeader));
+    }
 }
 
 - (void)addData:(NSData *)data withEncoding:(NSString *)encoding
@@ -749,13 +764,6 @@ static NSAttributedString *attributedString(DOM::NodeImpl *_startNode, int start
     return _part->kwq->selectionEndOffset();
 }
 
-- (void)setContentType:(NSString*)contentType
-{
-    KParts::URLArgs args( _part->browserExtension()->urlArgs() );
-    args.serviceType = QString::fromNSString(contentType);
-    _part->browserExtension()->setURLArgs(args);
-}
-
 - (void)setName:(NSString *)name
 {
     _part->setName(QString::fromNSString(name));
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1cef826..4854ef4 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,28 @@
+2002-11-13  Darin Adler  <darin at apple.com>
+
+	- fixed 3083982 -- Logging into AOL gives null view
+
+	Turns out AOL was using a refresh header, which we were not supporting.
+
+        * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
+	Call openURL: and pass headers in.
+
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:isFormSubmission:]):
+	Pass nil for headers in this case, since we know it's just an anchor change.
+
+	- other things
+
+        * WebCoreSupport.subproj/WebBridge.h: Remove dataSourceChanged and dataSource
+	methods. We try to keep the bridge methods down to actual bridging.
+        * WebCoreSupport.subproj/WebBridge.m: Remove dataSourceChanged altogether,
+	and move dataSource up in the file.
+
+        * WebView.subproj/WebHTMLRepresentation.m:
+        (-[WebHTMLRepresentation setDataSource:]): Keep the data source around, so we
+	don't need to ask the bridge for it.
+        (-[WebHTMLRepresentation documentSource]): Use it here.
+
 2002-11-13  Trey Matteson  <trey at apple.com>
 
 	Fixed 3100084 - REGRESSION: web page is not first responder after visiting web page
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 1cef826..4854ef4 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,28 @@
+2002-11-13  Darin Adler  <darin at apple.com>
+
+	- fixed 3083982 -- Logging into AOL gives null view
+
+	Turns out AOL was using a refresh header, which we were not supporting.
+
+        * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady]):
+	Call openURL: and pass headers in.
+
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _loadURL:loadType:clientRedirect:triggeringEvent:isFormSubmission:]):
+	Pass nil for headers in this case, since we know it's just an anchor change.
+
+	- other things
+
+        * WebCoreSupport.subproj/WebBridge.h: Remove dataSourceChanged and dataSource
+	methods. We try to keep the bridge methods down to actual bridging.
+        * WebCoreSupport.subproj/WebBridge.m: Remove dataSourceChanged altogether,
+	and move dataSource up in the file.
+
+        * WebView.subproj/WebHTMLRepresentation.m:
+        (-[WebHTMLRepresentation setDataSource:]): Keep the data source around, so we
+	don't need to ask the bridge for it.
+        (-[WebHTMLRepresentation documentSource]): Use it here.
+
 2002-11-13  Trey Matteson  <trey at apple.com>
 
 	Fixed 3100084 - REGRESSION: web page is not first responder after visiting web page
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index a54bf6f..70b3d92 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -19,8 +19,4 @@
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
 - (void)setFrame:(WebFrame *)webFrame;
 
-- (void)dataSourceChanged;
-- (WebDataSource *)dataSource;
-
 @end
-
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 5747135..85a13be 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -158,6 +158,17 @@
     return [[[frame controller] windowOperationsDelegate] window];
 }
 
+- (WebDataSource *)dataSource
+{
+    ASSERT(frame != nil);
+    WebDataSource *dataSource = [frame dataSource];
+
+    ASSERT(dataSource != nil);
+    ASSERT([dataSource _isCommitted]);
+
+    return dataSource;
+}
+
 - (void)setTitle:(NSString *)title
 {
     [[self dataSource] _setTitle:[title _web_stringByCollapsingNonPrintingCharacters]];
@@ -243,22 +254,6 @@
     }
 }
 
-- (void)dataSourceChanged
-{
-    [self openURL:[[self dataSource] URL]];
-}
-
-- (WebDataSource *)dataSource
-{
-    ASSERT(frame != nil);
-    WebDataSource *dataSource = [frame dataSource];
-
-    ASSERT(dataSource != nil);
-    ASSERT([dataSource _isCommitted]);
-
-    return dataSource;
-}
-
 - (void)unfocusWindow
 {
     if ([[self window] isKeyWindow] || [[[self window] attachedSheet] isKeyWindow]) {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 175f8d0..6c974bc 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -28,6 +28,7 @@
 #import <WebKit/WebViewPrivate.h>
 
 #import <WebFoundation/WebError.h>
+#import <WebFoundation/WebHTTPResourceResponse.h>
 #import <WebFoundation/WebNSDictionaryExtras.h>
 #import <WebFoundation/WebNSStringExtras.h>
 #import <WebFoundation/WebNSURLExtras.h>
@@ -425,9 +426,13 @@
     if (![self isDownloading] && _private->gotFirstByte && !_private->committed) {
         LOG(Loading, "committed resource = %@", [[self request] URL]);
 	_private->committed = TRUE;
+        
         [self _makeRepresentation];
         [[self webFrame] _transitionToCommitted];
-	[[self _bridge] dataSourceChanged];
+	[[self _bridge] openURL:[_private->response URL]
+                    withHeaders:[_private->response isKindOfClass:[WebHTTPResourceResponse class]]
+                        ? [(WebHTTPResourceResponse *)_private->response headers] : nil];
+        
         // Must do this after dataSourceChanged.  makeRep installs a new view, which blows away
         // scroll state, which is saved within _transitionToCommitted
     }
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 21716e5..2f5d513 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -1080,7 +1080,7 @@ static const char * const stateNames[] = {
 
         ASSERT(![_private previousItem]);
         // will save form state to current item, since prevItem not set
-        [_private->bridge openURL:URL];
+        [_private->bridge openURL:URL withHeaders:nil];
         [dataSrc _setURL:URL];
         // NB: must happen after _setURL, since we add based on the current request
         [self _addBackForwardItemClippedAtTarget:NO];
diff --git a/WebKit/WebView.subproj/WebHTMLRepresentation.m b/WebKit/WebView.subproj/WebHTMLRepresentation.m
index fb5c4a8..cb4ecdf 100644
--- a/WebKit/WebView.subproj/WebHTMLRepresentation.m
+++ b/WebKit/WebView.subproj/WebHTMLRepresentation.m
@@ -14,6 +14,7 @@
 @interface WebHTMLRepresentationPrivate : NSObject
 {
 @public
+    WebDataSource *dataSource;
     WebBridge *bridge;
 }
 @end
@@ -50,8 +51,8 @@
 
 - (void)setDataSource:(WebDataSource *)dataSource
 {
+    _private->dataSource = dataSource;
     _private->bridge = [[dataSource webFrame] _bridge];
-    [_private->bridge setContentType: [[dataSource response] contentType]];
 }
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
@@ -70,7 +71,7 @@
 
 - (NSString *)documentSource
 {
-    return [WebBridge stringWithData:[[_private->bridge dataSource] data] textEncoding:[_private->bridge textEncoding]];
+    return [WebBridge stringWithData:[_private->dataSource data] textEncoding:[_private->bridge textEncoding]];
 }
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list