[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:25:25 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f504300f8de299045971abff912c12aacb50cbac
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 19 10:43:38 2002 +0000

            More refactoring: Use assertions to make sure a provisional data
    	source's bridge is never used - and then fix the places where it
    	would have been used. :-)
    
    	* WebView.subproj/WebDataSource.m:
            (-[WebDataSource documentTextFromDOM]): Return nil if the document
    	is not committed.
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _stopLoading]): Don't tell the bridge to stop
    	if we're provisional, because we won't have one.
            (-[WebDataSource _setFinalURL:]): Don't try to set the bridge URL
    	if we are not committed - it will get set at commit time.
            (-[WebDataSource _removeFromFrame]): Assert that the data soource is
    	committed - a provisional data source should never be removed from a frame
    	because it should never be in a frame in the first place.
            (-[WebDataSource _bridge]): Assert that the view is committed.
            (-[WebDataSource _commitIfReady]): Do nothing if already committed.
            (-[WebDataSource _receivedData:]): Notice that first byte was read,
    	if appropriate, and commit when ready.
            * WebView.subproj/WebMainResourceClient.m:
            (-[WebMainResourceClient WebResourceHandle:didRedirectToURL:]):
    	Simplify code by using [WebDataSource _receivedData:]
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1597 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c317973..6e75d02 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,30 @@
 2002-07-19  Maciej Stachowiak  <mjs at apple.com>
 
+        More refactoring: Use assertions to make sure a provisional data
+	source's bridge is never used - and then fix the places where it
+	would have been used. :-)
+
+	* WebView.subproj/WebDataSource.m:
+        (-[WebDataSource documentTextFromDOM]): Return nil if the document
+	is not committed.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _stopLoading]): Don't tell the bridge to stop
+	if we're provisional, because we won't have one.
+        (-[WebDataSource _setFinalURL:]): Don't try to set the bridge URL
+	if we are not committed - it will get set at commit time.
+        (-[WebDataSource _removeFromFrame]): Assert that the data soource is
+	committed - a provisional data source should never be removed from a frame
+	because it should never be in a frame in the first place.
+        (-[WebDataSource _bridge]): Assert that the view is committed.
+        (-[WebDataSource _commitIfReady]): Do nothing if already committed.
+        (-[WebDataSource _receivedData:]): Notice that first byte was read,
+	if appropriate, and commit when ready.
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient WebResourceHandle:didRedirectToURL:]):
+	Simplify code by using [WebDataSource _receivedData:]
+
+2002-07-19  Maciej Stachowiak  <mjs at apple.com>
+
         Fix a regression caused by a previous commit that broke frames.
 
 	* WebCoreSupport.subproj/WebBridge.m:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index c317973..6e75d02 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,30 @@
 2002-07-19  Maciej Stachowiak  <mjs at apple.com>
 
+        More refactoring: Use assertions to make sure a provisional data
+	source's bridge is never used - and then fix the places where it
+	would have been used. :-)
+
+	* WebView.subproj/WebDataSource.m:
+        (-[WebDataSource documentTextFromDOM]): Return nil if the document
+	is not committed.
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _stopLoading]): Don't tell the bridge to stop
+	if we're provisional, because we won't have one.
+        (-[WebDataSource _setFinalURL:]): Don't try to set the bridge URL
+	if we are not committed - it will get set at commit time.
+        (-[WebDataSource _removeFromFrame]): Assert that the data soource is
+	committed - a provisional data source should never be removed from a frame
+	because it should never be in a frame in the first place.
+        (-[WebDataSource _bridge]): Assert that the view is committed.
+        (-[WebDataSource _commitIfReady]): Do nothing if already committed.
+        (-[WebDataSource _receivedData:]): Notice that first byte was read,
+	if appropriate, and commit when ready.
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient WebResourceHandle:didRedirectToURL:]):
+	Simplify code by using [WebDataSource _receivedData:]
+
+2002-07-19  Maciej Stachowiak  <mjs at apple.com>
+
         Fix a regression caused by a previous commit that broke frames.
 
 	* WebCoreSupport.subproj/WebBridge.m:
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 11df412..bdf438f 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -253,6 +253,10 @@
 // FIXME: Move to representation
 - (NSString *)documentTextFromDOM
 {
+    if (_private->committed) {
+	return nil;
+    }
+
     return [[self _bridge] documentTextFromDOM];
 }
 
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index a05d0f1..6e759b4 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -210,7 +210,9 @@
         [[_private->urlHandles objectAtIndex: i] cancelLoadInBackground];
     }
 
-    [[self _bridge] closeURL];        
+    if (_private->committed) {
+	[[self _bridge] closeURL];        
+    }
 }
 
 - (void)_recursiveStopLoading
@@ -270,6 +272,10 @@
     [url retain];
     [_private->finalURL release];
     _private->finalURL = url;
+    if (_private->committed) {
+	[[self _bridge] setURL:url];
+    }
+    [[self _locationChangeHandler] serverRedirectTo:url forDataSource:self];
 }
 
 - (id <WebLocationChangeHandler>)_locationChangeHandler
@@ -401,6 +407,7 @@
 
 - (void)_removeFromFrame
 {
+    WEBKIT_ASSERT(_private->committed);
     [[self _bridge] removeFromFrame];
     [self _setController:nil];
     [self _setLocationChangeHandler:nil];
@@ -408,13 +415,14 @@
 
 - (WebBridge *)_bridge
 {
+    WEBKIT_ASSERT(_private->committed);
     id representation = [self representation];
     return [representation respondsToSelector:@selector(_bridge)] ? [representation _bridge] : nil;
 }
 
 -(void)_commitIfReady
 {
-    if (_private->contentPolicy == WebContentPolicyShow && _private->gotFirstByte) {
+    if (_private->contentPolicy == WebContentPolicyShow && _private->gotFirstByte && !_private->committed) {
         WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "committed resource = %s\n", [[[self inputURL] absoluteString] cString]);
 	_private->committed = TRUE;
 	[self _makeRepresentation];
@@ -447,11 +455,8 @@
 
 -(void)_receivedData:(NSData *)data
 {
-    if (!_private->gotFirstByte) {
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "got first byte for resource = %s\n", [[[self inputURL] absoluteString] cString]);
-	_private->gotFirstByte = YES;
-	[self _commitIfReady];
-    }
+    _private->gotFirstByte = YES;
+    [self _commitIfReady];
 
     [[self representation] receivedData:data withDataSource:self];
     [[[[self webFrame] webView] documentView] dataSourceUpdated:self];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index a9f0102..9a08009 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -255,11 +255,7 @@
     WEBKIT_ASSERT(currentURL != nil);
     WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
     
-    [[dataSource _bridge] setURL:URL];
-    
     [dataSource _setFinalURL:URL];
-    
-    [[dataSource _locationChangeHandler] serverRedirectTo:URL forDataSource:dataSource];
 
     [self didStopLoading];
     [self didStartLoadingWithURL:URL];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index a9f0102..9a08009 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -255,11 +255,7 @@
     WEBKIT_ASSERT(currentURL != nil);
     WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
     
-    [[dataSource _bridge] setURL:URL];
-    
     [dataSource _setFinalURL:URL];
-    
-    [[dataSource _locationChangeHandler] serverRedirectTo:URL forDataSource:dataSource];
 
     [self didStopLoading];
     [self didStartLoadingWithURL:URL];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list