Commit cb221b0d authored by justing's avatar justing
Browse files

Reviewed by john

        Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
        We were adding the movie to the document twice after the changes were added to handle fallback content.
        There are some errors for which we should not render fall back content

        * Misc.subproj/WebKitErrorsPrivate.h:
        Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
        to prevent loading plugin content twice

        * Plugins.subproj/WebPluginDocumentView.m:
        (-[WebPluginDocumentView dataSourceUpdated:]): Ditto

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _receivedMainResourceError:complete:]):
        Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bbfac8be
2005-09-14 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
We were adding the movie to the document twice after the changes were added to handle fallback content.
There are some errors for which we should not render fall back content
* Misc.subproj/WebKitErrorsPrivate.h:
Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
to prevent loading plugin content twice
* Plugins.subproj/WebPluginDocumentView.m:
(-[WebPluginDocumentView dataSourceUpdated:]): Ditto
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _receivedMainResourceError:complete:]):
Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel
2005-09-14 Timothy Hatcher <thatcher@apple.com>
 
Reviewed by Eric.
......@@ -29,6 +29,8 @@
#import <WebKit/WebKitErrors.h>
#define WebKitErrorPlugInCancelledConnection 203
// FIXME: WebKitErrorPlugInWillHandleLoad is used for the cancel we do to prevent loading plugin content twice. See <rdar://problem/4258008>
#define WebKitErrorPlugInWillHandleLoad 204
@interface NSError (WebKitExtras)
+ (NSError *)_webKitErrorWithCode:(int)code failingURL:(NSString *)URL;
......
......@@ -105,7 +105,8 @@ - (void)dataSourceUpdated:(WebDataSource *)dataSource;
{
// Cancel the load since WebKit plug-ins do their own loading.
NSURLResponse *response = [dataSource response];
NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInCancelledConnection
// FIXME: See <rdar://problem/4258008>
NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInWillHandleLoad
contentURL:[response URL]
pluginPageURL:nil
pluginName:[plugin name]
......
......@@ -794,7 +794,9 @@ - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
if (isComplete) {
// Can't call [self _bridge] because we might not have commited yet
[[[self webFrame] _bridge] stop];
[[[self webFrame] _bridge] mainResourceError];
// FIXME: WebKitErrorPlugInWillHandleLoad is a workaround for the cancel we do to prevent loading plugin content twice. See <rdar://problem/4258008>
if ([error code] != NSURLErrorCancelled && [error code] != WebKitErrorPlugInWillHandleLoad)
[[[self webFrame] _bridge] handleFallbackContent];
}
[[self webFrame] _receivedMainResourceError:error];
......
......@@ -271,7 +271,7 @@ -(void)continueAfterContentPolicy:(WebPolicyAction)contentPolicy response:(NSURL
int status = [(NSHTTPURLResponse *)r statusCode];
if (status < 200 || status >= 300) {
// Handle <object> fallback for error cases.
[[[dataSource webFrame] _bridge] mainResourceError];
[[[dataSource webFrame] _bridge] handleFallbackContent];
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment