[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 08:21:46 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit af788443ca25dc094f50d435dfd04e8584c9b0e6
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Jan 11 00:08:32 2004 +0000
Reviewed by John.
- fixed 3524906: REGRESSION (114-115): page with plug-in content never stops loading (travelking.com.tw)
Put the plug-in streams clients into their own separate set. Now a plug-in client is not considered part
of "loading", but it does participate in the callback deferral mechanism, which was the real goal of the
change I made that introduced this regression. Also remove the plug-in client in one case I had missed
before (cancel).
* WebView.subproj/WebDataSourcePrivate.h: Added a new set of plugInStreamClients.
* WebView.subproj/WebDataSource.m:
(-[WebDataSourcePrivate dealloc]): Release the set.
(-[WebDataSource _addPlugInStreamClient:]): Added. Adds to the set.
(-[WebDataSource _removePlugInStreamClient:]): Added. Removes from the set.
(-[WebDataSource _defersCallbacksChanged]): Added code to loop through plugInStreamClients too.
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream start]): Use _add/removePlugInStreamClient instead of _add/removeSubresourceClient.
(-[WebNetscapePluginConnectionDelegate connectionDidFinishLoading:]): Ditto.
(-[WebNetscapePluginConnectionDelegate connection:didFailWithError:]): Ditto.
(-[WebNetscapePluginConnectionDelegate cancelWithError:]): Override to call _removePlugInStreamClient and
then call super.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index fcb691d..a81ff8b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,28 @@
+2004-01-10 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - fixed 3524906: REGRESSION (114-115): page with plug-in content never stops loading (travelking.com.tw)
+
+ Put the plug-in streams clients into their own separate set. Now a plug-in client is not considered part
+ of "loading", but it does participate in the callback deferral mechanism, which was the real goal of the
+ change I made that introduced this regression. Also remove the plug-in client in one case I had missed
+ before (cancel).
+
+ * WebView.subproj/WebDataSourcePrivate.h: Added a new set of plugInStreamClients.
+ * WebView.subproj/WebDataSource.m:
+ (-[WebDataSourcePrivate dealloc]): Release the set.
+ (-[WebDataSource _addPlugInStreamClient:]): Added. Adds to the set.
+ (-[WebDataSource _removePlugInStreamClient:]): Added. Removes from the set.
+ (-[WebDataSource _defersCallbacksChanged]): Added code to loop through plugInStreamClients too.
+
+ * Plugins.subproj/WebNetscapePluginStream.m:
+ (-[WebNetscapePluginStream start]): Use _add/removePlugInStreamClient instead of _add/removeSubresourceClient.
+ (-[WebNetscapePluginConnectionDelegate connectionDidFinishLoading:]): Ditto.
+ (-[WebNetscapePluginConnectionDelegate connection:didFailWithError:]): Ditto.
+ (-[WebNetscapePluginConnectionDelegate cancelWithError:]): Override to call _removePlugInStreamClient and
+ then call super.
+
2004-01-09 Darin Adler <darin at apple.com>
- rolled out most of Dave's change for 3510669 and 3515442; it is not working yet
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginStream.m b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
index 180bdac..28d1bde 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
@@ -62,14 +62,14 @@
{
ASSERT(_startingRequest);
- [[_loader dataSource] _addSubresourceClient:_loader];
+ [[_loader dataSource] _addPlugInStreamClient:_loader];
BOOL succeeded = [_loader loadWithRequest:_startingRequest];
[_startingRequest release];
_startingRequest = nil;
if (!succeeded) {
- [[_loader dataSource] _removeSubresourceClient:_loader];
+ [[_loader dataSource] _removePlugInStreamClient:_loader];
}
}
@@ -148,10 +148,10 @@
- (void)connectionDidFinishLoading:(NSURLConnection *)con
{
- // Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
+ // Calling _removePlugInStreamClient will likely result in a call to release, so we must retain.
[self retain];
- [[self dataSource] _removeSubresourceClient:self];
+ [[self dataSource] _removePlugInStreamClient:self];
[[view webView] _finishedLoadingResourceFromDataSource:[self dataSource]];
[stream finishedLoadingWithData:resourceData];
[super connectionDidFinishLoading:con];
@@ -161,12 +161,12 @@
- (void)connection:(NSURLConnection *)con didFailWithError:(NSError *)error
{
- // Calling _removeSubresourceClient will likely result in a call to release, so we must retain.
+ // Calling _removePlugInStreamClient will likely result in a call to release, so we must retain.
// The other additional processing can do anything including possibly releasing self;
// one example of this is 3266216
[self retain];
- [[self dataSource] _removeSubresourceClient:self];
+ [[self dataSource] _removePlugInStreamClient:self];
[[view webView] _receivedError:error fromDataSource:[self dataSource]];
[stream receivedError:error];
[super connection:con didFailWithError:error];
@@ -174,4 +174,15 @@
[self release];
}
+- (void)cancelWithError:(NSError *)error
+{
+ // Calling _removePlugInStreamClient will likely result in a call to release, so we must retain.
+ [self retain];
+
+ [[self dataSource] _removePlugInStreamClient:self];
+ [super cancelWithError:error];
+
+ [self release];
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index b9461cc..b53ebb1 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -58,6 +58,7 @@
[originalRequestCopy release];
[mainClient release];
[subresourceClients release];
+ [plugInStreamClients release];
[pageTitle release];
[response release];
[mainDocumentError release];
@@ -220,6 +221,21 @@
[self _updateLoading];
}
+- (void)_addPlugInStreamClient:(WebBaseResourceHandleDelegate *)client
+{
+ if (_private->plugInStreamClients == nil) {
+ _private->plugInStreamClients = [[NSMutableArray alloc] init];
+ }
+ [_private->plugInStreamClients addObject:client];
+ [self _setLoading:YES];
+}
+
+- (void)_removePlugInStreamClient:(WebBaseResourceHandleDelegate *)client
+{
+ [_private->plugInStreamClients removeObject:client];
+ [self _updateLoading];
+}
+
- (BOOL)_isStopping
{
return _private->stopping;
@@ -673,6 +689,10 @@
while ((client = [e nextObject])) {
[client setDefersCallbacks:defers];
}
+ e = [_private->plugInStreamClients objectEnumerator];
+ while ((client = [e nextObject])) {
+ [client setDefersCallbacks:defers];
+ }
[[[self webFrame] childFrames] makeObjectsPerformSelector:@selector(_defersCallbacksChanged)];
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index d892987..a7620b2 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -51,6 +51,7 @@
// Clients for other resources.
NSMutableArray *subresourceClients;
+ NSMutableArray *plugInStreamClients;
// The time when the data source was told to start loading.
double loadingStartedTime;
@@ -125,6 +126,8 @@
- (void)_recursiveStopLoading;
- (void)_addSubresourceClient:(WebBaseResourceHandleDelegate *)client;
- (void)_removeSubresourceClient:(WebBaseResourceHandleDelegate *)client;
+- (void)_addPlugInStreamClient:(WebBaseResourceHandleDelegate *)client;
+- (void)_removePlugInStreamClient:(WebBaseResourceHandleDelegate *)client;
- (void)_setPrimaryLoadComplete:(BOOL)flag;
- (double)_loadingStartedTime;
- (void)_setTitle:(NSString *)title;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list