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


The following commit has been merged in the debian/unstable branch:
commit 39da6d96a621e7efab9397ce78f5c0a9e2c388ac
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 5 22:47:15 2002 +0000

    WebFoundation:
    
    	- fixed 3015360 -- google.com, click on images link, stop icon spins forever
    
            * CacheLoader.subproj/WebResourceHandle.m:
            (-[WebResourceHandle contentLengthReceived]): Fixed race condition where sizes of objects
    	would jump down to 0 by returning the length of resourceData here instead of the mark.
            (-[WebResourceHandle _setLoad:]): Added.
            (-[WebResourceHandle _load]): Added.
            (-[WebResourceHandle _notifyClientsDidCancelLoading]): Do the WebResourceHandleDidBeginLoading
    	calls outside the lock/unlock also.
    
            * CacheLoader.subproj/WebResourceHandlePrivate.h: Added _setLoad: and _load.
    
            * CacheLoader.subproj/WebResourceLoad.m:
            (-[WebResourceLoad handleCount]): Add call to checkForNewHandles.
            (-[WebResourceLoad _submittedAttributes]): Added.
            (-[WebResourceLoad cleanup]): Pass the load to loadDidFinish, rather than passing a handle.
    
            * CacheLoader.subproj/WebResourceLoadManager.m:
            (-[WebResourceLoadManagerInstanceVariables init]):
            (-[WebResourceLoadManagerInstanceVariables dealloc]):
            (-[WebResourceLoadManager invalidateURL:]):
            (-[WebResourceLoadManager addLoad:forHandle:]):
            (-[WebResourceLoadManager requestWithURLHandle:]):
            (-[WebResourceLoadManager cancelRequestWithURLHandle:]):
            (-[WebResourceLoadManager loadDidFinish:]):
    
           * CacheLoader.subproj/WebResourceLoadManager.m: Added new WebResourceLoadKey class, rather than
    	trying to trick handles themselves into acting as keys. This works better for the case where
    	a single load is shared by two handles. There's no telling which will be cancelled first, so
    	there's no obvious choice for which to use as the key.
            (-[WebResourceLoadManager requestWithURLHandle:]): Rewrote for new scheme. I think it's a little
    	less tricky than before, but it's also more terse.
            (-[WebResourceLoadManager cancelRequestWithURLHandle:]): Rewrote this too.
            (-[WebResourceLoadManager loadDidFinish:]): This too.
    
            * CacheLoader.subproj/WebResourceLoadManagerPrivate.h: Change parameter type of loadDidFinish to
    	WebResourceLoad. Removed unused cancelAllRequestsWithURL and cancelAllRequestsInGroup.
    
            * CacheLoader.subproj/WebResourceLoadPrivate.h: Removed unused removeAllHandles,
    	cancelIfServingOneHandle, and added _submittedAttributes.
    
            * CacheLoader.subproj/WebResourceLoad.h: Removed canonicalURL.
            * CacheLoader.subproj/WebFileProtocolHandler.m:
            * CacheLoader.subproj/WebHTTPProtocolHandlerPrivate.m:
            * CacheLoader.subproj/WebHTTPResourceLoader.m:
            * CacheLoader.subproj/WebResourceLoadQueue.m:
            [WebResourceLoad url] now always returns a canonical URL. Got rid of
    	[WebResourceLoad canonicalURL] and updated callers.
    
            * CacheLoader.subproj/WebResourceLoadManager.h: Tweak.
            * Misc.subproj/WebNSDictionaryExtras.m: Fix definitions to match header.
    
    WebKit:
    
    	- fixed 3014122 -- spinner never stops spinning when iframe has URL with bad path
    
            * WebView.subproj/WebFrame.m:
            (-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Initialize the
    	state in WebFramePrivate init instead.
            * WebView.subproj/WebFramePrivate.h: Remove WebFrameStateUninitialized.
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFramePrivate init]): Set initial state to WebFrameStateComplete.
            (-[WebFrame _transitionToLayoutAcceptable]): Remove WebFrameStateUninitialized case.
            (-[WebFrame _transitionToCommitted]): Remove WebFrameStateUninitialized case.
            (-[WebFrame _isLoadComplete]): Remove WebFrameStateUninitialized case.
    
            * WebView.subproj/WebDataSource.h: Tweak.
            * WebView.subproj/WebDataSource.m:
            (-[WebDataSource stopLoading]): Move downloadHandler logic from here into _stopLoading.
            (-[WebDataSource isLoading]): Rewrite for simplicity.
    
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _stopLoading]): Move downloadHandler logic here from stopLoading.
    	Also make this work even if handles are removed from the list during the stop process.
            (-[WebDataSource _recursiveStopLoading]): Simplify a lot by using WebFrame's stopLoading.
            (-[WebDataSource _setTitle:]): Use the committed boolean rather than the state to check
    	if the title change should be sent to the location change handler.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 42ef8cb..29eb144 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,29 @@
+2002-08-05  Darin Adler  <darin at apple.com>
+
+	- fixed 3014122 -- spinner never stops spinning when iframe has URL with bad path
+
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Initialize the
+	state in WebFramePrivate init instead.
+        * WebView.subproj/WebFramePrivate.h: Remove WebFrameStateUninitialized.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate init]): Set initial state to WebFrameStateComplete.
+        (-[WebFrame _transitionToLayoutAcceptable]): Remove WebFrameStateUninitialized case.
+        (-[WebFrame _transitionToCommitted]): Remove WebFrameStateUninitialized case.
+        (-[WebFrame _isLoadComplete]): Remove WebFrameStateUninitialized case.
+
+        * WebView.subproj/WebDataSource.h: Tweak.
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource stopLoading]): Move downloadHandler logic from here into _stopLoading.
+        (-[WebDataSource isLoading]): Rewrite for simplicity.
+
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _stopLoading]): Move downloadHandler logic here from stopLoading.
+	Also make this work even if handles are removed from the list during the stop process.
+        (-[WebDataSource _recursiveStopLoading]): Simplify a lot by using WebFrame's stopLoading.
+        (-[WebDataSource _setTitle:]): Use the committed boolean rather than the state to check
+	if the title change should be sent to the location change handler.
+
 2002-08-05  Maciej Stachowiak  <mjs at apple.com>
 
         * Misc.subproj/WebKitDebug.h: Put WEBKIT_ASSERT_NOT_REACHED()
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 42ef8cb..29eb144 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,29 @@
+2002-08-05  Darin Adler  <darin at apple.com>
+
+	- fixed 3014122 -- spinner never stops spinning when iframe has URL with bad path
+
+        * WebView.subproj/WebFrame.m:
+        (-[WebFrame initWithName:webView:provisionalDataSource:controller:]): Initialize the
+	state in WebFramePrivate init instead.
+        * WebView.subproj/WebFramePrivate.h: Remove WebFrameStateUninitialized.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate init]): Set initial state to WebFrameStateComplete.
+        (-[WebFrame _transitionToLayoutAcceptable]): Remove WebFrameStateUninitialized case.
+        (-[WebFrame _transitionToCommitted]): Remove WebFrameStateUninitialized case.
+        (-[WebFrame _isLoadComplete]): Remove WebFrameStateUninitialized case.
+
+        * WebView.subproj/WebDataSource.h: Tweak.
+        * WebView.subproj/WebDataSource.m:
+        (-[WebDataSource stopLoading]): Move downloadHandler logic from here into _stopLoading.
+        (-[WebDataSource isLoading]): Rewrite for simplicity.
+
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _stopLoading]): Move downloadHandler logic here from stopLoading.
+	Also make this work even if handles are removed from the list during the stop process.
+        (-[WebDataSource _recursiveStopLoading]): Simplify a lot by using WebFrame's stopLoading.
+        (-[WebDataSource _setTitle:]): Use the committed boolean rather than the state to check
+	if the title change should be sent to the location change handler.
+
 2002-08-05  Maciej Stachowiak  <mjs at apple.com>
 
         * Misc.subproj/WebKitDebug.h: Put WEBKIT_ASSERT_NOT_REACHED()
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 7941cd9..8521006 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -34,9 +34,9 @@
 }
 
 // Returns nil if object cannot be initialized due to a malformed URL (RFC 1808).
--(id)initWithURL:(NSURL *)inputURL;
--(id)initWithURL:(NSURL *)theURL attributes:(NSDictionary *)theAttributes;
--(id)initWithURL:(NSURL *)theURL attributes:(NSDictionary *)theAttributes flags:(unsigned)theFlags;
+-(id)initWithURL:(NSURL *)URL;
+-(id)initWithURL:(NSURL *)URL attributes:(NSDictionary *)theAttributes;
+-(id)initWithURL:(NSURL *)URL attributes:(NSDictionary *)theAttributes flags:(unsigned)theFlags;
 
 #ifdef TENTATIVE_API
 - initWithData: (NSData *)data;
@@ -68,7 +68,7 @@
 // associated with a frame set or iframe.
 - (NSArray *)children;
 
-- (WebFrame *)frameNamed: (NSString *)frameName;
+- (WebFrame *)frameNamed:(NSString *)frameName;
 
 // Returns an array of NSStrings or nil.  The NSStrings corresponds to
 // frame names.  If this data source is the main document and has no
@@ -77,11 +77,11 @@
 
 // findDataSourceForFrameNamed: returns the child data source associated with
 // the frame named 'name', or nil. 
-- (WebDataSource *) findDataSourceForFrameNamed: (NSString *)name;
+- (WebDataSource *)findDataSourceForFrameNamed:(NSString *)name;
 
 - (BOOL)frameExists: (NSString *)name;
 
-- (void)openURL: (NSURL *)url inFrameNamed: (NSString *)frameName;
+- (void)openURL:(NSURL *)URL inFrameNamed:(NSString *)frameName;
 
 // Set the controller for this data source.  NOTE:  The controller is not retained by the
 // data source.  Perhaps setController: should be private?  Perhaps the back pointers
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index e067ecd..1e51760 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -22,17 +22,17 @@
 
 @implementation WebDataSource
 
--(id)initWithURL:(NSURL *)theURL
+-(id)initWithURL:(NSURL *)URL
 {
-    return [self initWithURL:theURL attributes:nil flags:0];
+    return [self initWithURL:URL attributes:nil flags:0];
 }
 
--(id)initWithURL:(NSURL *)theURL attributes:(NSDictionary *)theAttributes
+-(id)initWithURL:(NSURL *)URL attributes:(NSDictionary *)theAttributes
 {
-    return [self initWithURL:theURL attributes:theAttributes flags:0];
+    return [self initWithURL:URL attributes:theAttributes flags:0];
 }
 
--(id)initWithURL:(NSURL *)theURL attributes:(NSDictionary *)theAttributes flags:(unsigned)theFlags;
+-(id)initWithURL:(NSURL *)URL attributes:(NSDictionary *)theAttributes flags:(unsigned)theFlags;
 {
     self = [super init];
     if (!self) {
@@ -40,7 +40,7 @@
     }
     
     _private = [[WebDataSourcePrivate alloc] init];
-    _private->inputURL = [theURL retain];
+    _private->inputURL = [URL retain];
     _private->mainHandle = [[WebResourceHandle alloc] initWithURL: _private->inputURL attributes:theAttributes flags:theFlags];
     
     ++WebDataSourceCount;
@@ -203,9 +203,6 @@
 // method will also stop loads that may be loading in child frames.
 - (void)stopLoading
 {
-    // stop download here because we can't rely on WebResourceHandleDidCancelLoading
-    // as it isn't sent when the app quits
-    [[_private->mainResourceHandleClient downloadHandler] cancel];
     [self _recursiveStopLoading];
 }
 
@@ -213,38 +210,36 @@
 // Returns YES if there are any pending loads.
 - (BOOL)isLoading
 {
-    int i, count;
+    // FIXME: This comment says that the state check is just an optimization, but that's
+    // not true. There's a window where the state is complete, but primaryLoadComplete
+    // is still NO and loading is still YES, because _setPrimaryLoadComplete has not yet
+    // been called. We should fix that and simplify this code here.
     
-    // First check to see if the datasource's frame is in the complete state
-    if ([[self webFrame] _state] == WebFrameStateComplete)
+    // As an optimization, check to see if the frame is in the complete state.
+    // If it is, we aren't loading, so we don't have to check all the child frames.    
+    if ([[self webFrame] _state] == WebFrameStateComplete) {
         return NO;
-        
-    //WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "frame %s: primaryLoadComplete %d, [data->urlHandles count] = %d, URL = %s\n", [[[self webFrame] name] cString], (int)_private->primaryLoadComplete, [_private->urlHandles count], [[[self inputURL] absoluteString] cString]);
-    if (_private->primaryLoadComplete == NO && _private->loading)
-        return YES;
-        
-    if ([_private->urlHandles count])
-        return YES;
+    }
     
-    count = [[self children] count];
-    for (i = 0; i < count; i++){
-        WebFrame *childFrame;
-        
-        childFrame = [[self children] objectAtIndex: i];
-        if ([[childFrame dataSource] isLoading])
-            return YES;
-        if ([[childFrame provisionalDataSource] isLoading])
+    if (!_private->primaryLoadComplete && _private->loading) {
+        return YES;
+    }
+    if ([_private->urlHandles count]) {
+	return YES;
+    }
+     
+    NSEnumerator *e = [[self children] objectEnumerator];
+    WebFrame *childFrame;
+    while ((childFrame = [e nextObject])) {
+        if ([[childFrame dataSource] isLoading] || [[childFrame provisionalDataSource] isLoading]) {
             return YES;
+        }
     }
+    
     return NO;
 }
 
 
-#ifdef TENTATIVE_API
-// Get DOM access to the document.
-- (WebDOMDocument *)document;
-#endif
-
 - (BOOL)isDocumentHTML
 {
     return [[self representation] isKindOfClass: [WebHTMLRepresentation class]];
@@ -254,8 +249,8 @@
 // FIXME: Move to WebHTMLRepresentation
 - (NSString *)documentSource
 {
-    // FIMXE: other encodings
-    if([self isDocumentHTML]){
+    // FIMXE: Converting to string with ASCII encoding is not appropriate, although it works for some pages.
+    if ([self isDocumentHTML]) {
         return [[[NSString alloc] initWithData:[self data] encoding:NSASCIIStringEncoding] autorelease];
     }
     return nil;
@@ -282,12 +277,12 @@
 }
 
 // Style sheet
-- (void)setUserStyleSheetFromURL: (NSURL *)url
+- (void)setUserStyleSheetFromURL:(NSURL *)url
 {
     [NSException raise:WebMethodNotYetImplemented format:@"WebDataSource::setUserStyleSheetFromURL: is not implemented"];
 }
 
-- (void)setUserStyleSheetFromString: (NSString *)sheet
+- (void)setUserStyleSheetFromString:(NSString *)sheet
 {
     [NSException raise:WebMethodNotYetImplemented format:@"WebDataSource::setUserStyleSheetFromString: is not implemented"];
 }
@@ -297,7 +292,7 @@
 // that WebCore also has dependencies on the appkit.
 - (NSImage *)icon
 {
-    [NSException raise:WebMethodNotYetImplemented format:@"WebDataSource::setUserStyleSheetFromString: is not implemented"];
+    [NSException raise:WebMethodNotYetImplemented format:@"WebDataSource::icon is not implemented"];
     return nil;
 }
 
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index f05932f..1901679 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -9,6 +9,7 @@
 #import <WebKit/WebDataSourcePrivate.h>
 
 #import <WebKit/WebDocument.h>
+#import <WebKit/WebDownloadHandler.h>
 #import <WebKit/WebException.h>
 #import <WebKit/WebHTMLRepresentation.h>
 #import <WebKit/WebHTMLViewPrivate.h>
@@ -201,8 +202,11 @@
 
 - (void)_stopLoading
 {
-    int i, count;
-    WebResourceHandle *handle;
+    NSArray *handles;
+
+    // Stop download here because we can't rely on WebResourceHandleDidCancelLoading
+    // as it isn't sent when the app quits.
+    [[_private->mainResourceHandleClient downloadHandler] cancel];
 
     if (!_private->loading) {
 	return;
@@ -212,13 +216,9 @@
     
     [_private->mainHandle cancelLoadInBackground];
     
-    // Tell all handles to stop loading.
-    count = [_private->urlHandles count];
-    for (i = 0; i < count; i++) {
-        handle = [_private->urlHandles objectAtIndex: i];
-        WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "cancelling %s\n", [[[handle url] absoluteString] cString] );
-        [[_private->urlHandles objectAtIndex: i] cancelLoadInBackground];
-    }
+    handles = [_private->urlHandles copy];
+    [handles makeObjectsPerformSelector:@selector(cancelLoadInBackground)];
+    [handles release];
 
     if (_private->committed) {
 	[[self _bridge] closeURL];        
@@ -229,22 +229,8 @@
 
 - (void)_recursiveStopLoading
 {
-    NSArray *frames;
-    WebFrame *nextFrame;
-    int i, count;
-    WebDataSource *childDataSource, *childProvisionalDataSource;
-    
     [self _stopLoading];
-    
-    frames = [self children];
-    count = [frames count];
-    for (i = 0; i < count; i++){
-        nextFrame = [frames objectAtIndex: i];
-        childDataSource = [nextFrame dataSource];
-        [childDataSource _recursiveStopLoading];
-        childProvisionalDataSource = [nextFrame provisionalDataSource];
-        [childProvisionalDataSource _recursiveStopLoading];
-    }
+    [[self children] makeObjectsPerformSelector:@selector(stopLoading)];
 }
 
 - (double)_loadingStartedTime
@@ -273,24 +259,23 @@
     [_private->pageTitle release];
     _private->pageTitle = [trimmed copy];
     
-    // The title doesn't get communicated to the controller until
-    // we reach the committed state for this data source's frame.
-    if ([[self webFrame] _state] >= WebFrameStateCommittedPage)
+    // The title doesn't get communicated to the controller until we are committed.
+    if (_private->committed)
         [[_private->controller locationChangeHandler] receivedPageTitle:_private->pageTitle forDataSource:self];
 }
 
-- (void)_setFinalURL: (NSURL *)url
+- (void)_setFinalURL:(NSURL *)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);
 
-    [url retain];
+    [URL retain];
     [_private->finalURL release];
-    _private->finalURL = url;
+    _private->finalURL = URL;
 
-    [[_private->controller locationChangeHandler] serverRedirectTo:url forDataSource:self];
+    [[_private->controller locationChangeHandler] serverRedirectTo:URL forDataSource:self];
 }
 
 - (void) _setContentPolicy:(WebContentPolicy *)policy
@@ -471,22 +456,20 @@
     }
 }
 
-- (void)_setIconURL:(NSURL *)url
+- (void)_setIconURL:(NSURL *)URL
 {
-    // Lower priority than typed icon, so ignore this if we
-    // already have an iconURL
+    // Lower priority than typed icon, so ignore this if we already have an iconURL.
     if (_private->iconURL == nil) {
 	[_private->iconURL release];
-	_private->iconURL = [url retain];
+	_private->iconURL = [URL retain];
     }
 }
 
-- (void)_setIconURL:(NSURL *)url withType:(NSString *)iconType
+- (void)_setIconURL:(NSURL *)URL withType:(NSString *)iconType
 {
-    // FIXME: should check to make sure the type is one we know how to
-    // handle
+    // FIXME: Should check to make sure the type is one we know how to handle.
     [_private->iconURL release];
-    _private->iconURL = [url retain];
+    _private->iconURL = [URL retain];
 }
 
 - (WebResourceHandle*)_mainHandle
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 7dacb9b..5f28364 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -35,8 +35,6 @@
 
     _private = [[WebFramePrivate alloc] init];
 
-    [self _setState: WebFrameStateUninitialized];    
-
     [self setController: c];
 
     [self _changeBridge];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 29518ff..f84299c 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -16,19 +16,16 @@
 @protocol WebDocumentLoading;
 
 typedef enum {
-    WebFrameStateUninitialized = 1,
-    WebFrameStateProvisional = 2,
+    WebFrameStateProvisional,
     
     // This state indicates we are ready to commit to a page,
-    // that means the view will transition to use the new
-    // datasource.
-    WebFrameStateCommittedPage = 3,
+    // which means the view will transition to use the new data source.
+    WebFrameStateCommittedPage,
     
-    // This state indicates that it is reasonable to perform
-    // a layout.
-    WebFrameStateLayoutAcceptable = 4,
+    // This state indicates that it is reasonable to perform a layout.
+    WebFrameStateLayoutAcceptable,
     
-    WebFrameStateComplete = 5
+    WebFrameStateComplete
 } WebFrameState;
 
 typedef enum {
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index b8cb2a0..c22318a 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -26,9 +26,7 @@
 #import <WebFoundation/WebNSURLExtras.h>
 #import <WebFoundation/WebFoundation.h>
 
-static const char * const stateNames[6] = {
-    "zero state",
-    "WebFrameStateUninitialized",
+static const char * const stateNames[] = {
     "WebFrameStateProvisional",
     "WebFrameStateCommittedPage",
     "WebFrameStateLayoutAcceptable",
@@ -37,6 +35,18 @@ static const char * const stateNames[6] = {
 
 @implementation WebFramePrivate
 
+- init
+{
+    self = [super init];
+    if (!self) {
+        return nil;
+    }
+    
+    state = WebFrameStateComplete;
+    
+    return self;
+}
+
 - (void)dealloc
 {
     [scheduledLayoutTimer invalidate];
@@ -74,10 +84,9 @@ static const char * const stateNames[6] = {
 - (WebDataSource *)dataSource { return dataSource; }
 - (void)setDataSource: (WebDataSource *)d
 {
-    if (dataSource != d) {
-        [dataSource release];
-        dataSource = [d retain];
-    }
+    [d retain];
+    [dataSource release];
+    dataSource = d;
 }
 
 - (WebController *)controller { return controller; }
@@ -224,7 +233,6 @@ static const char * const stateNames[6] = {
             break;
         }
         
-        case WebFrameStateUninitialized:
         default:
         {
 	    WEBKIT_ASSERT_NOT_REACHED();
@@ -305,7 +313,6 @@ static const char * const stateNames[6] = {
             break;
         }
         
-        case WebFrameStateUninitialized:
         case WebFrameStateCommittedPage:
         case WebFrameStateLayoutAcceptable:
         case WebFrameStateComplete:
@@ -355,12 +362,6 @@ static const char * const stateNames[6] = {
     WEBKIT_ASSERT ([self controller] != nil);
 
     switch ([self _state]) {
-        // Shouldn't ever be in this state.
-        case WebFrameStateUninitialized:
-        {
-	    WEBKIT_ASSERT_NOT_REACHED();
-        }
-        
         case WebFrameStateProvisional:
         {
             WebDataSource *pd = [self provisionalDataSource];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list