[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:56:29 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fb4f8550c173f65efdd2dba91a75c2a7b032a47d
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 1 23:17:50 2002 +0000
WebFoundation:
* Misc.subproj/WebError.m:
WebKit:
- Moved plug-in error handling to WebResourceLoadDelegate
- Report plug-in load failure, java load failure, and plug-in not found errors.
- Added WebPluginError, subclass of WebError.
- Attempted fix: 3090675 - Standalone WMP (Window Media Player) content crashes Alexander
* English.lproj/Localizable.strings:
* Misc.subproj/WebKitErrors.h:
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView sendEvent:]): don't send event to null function
* Plugins.subproj/WebNetscapePluginDocumentView.m:
(-[WebNetscapePluginDocumentView setDataSource:]): report plug-in load failure
* Plugins.subproj/WebNullPluginView.h:
* Plugins.subproj/WebNullPluginView.m: take a WebPluginError
(-[WebNullPluginView dealloc]):
(-[WebNullPluginView viewDidMoveToWindow]):
* Plugins.subproj/WebPluginError.h: Added.
* Plugins.subproj/WebPluginError.m: Added.
(-[WebPluginErrorPrivate dealloc]):
(-[WebPluginError dealloc]):
(-[WebPluginError pluginPageURL]):
(-[WebPluginError pluginName]):
(-[WebPluginError MIMEType]):
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): report plug-in load failure
(-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): report plug-in load failure
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebController.m:
(-[WebResourceLoadDelegate pluginFailedWithError:dataSource:]): added, does nothing
* WebView.subproj/WebControllerPolicyDelegate.h:
* WebView.subproj/WebResourceLoadDelegate.h:
* WebView.subproj/WebView.m:
(+[WebView initialize]): added new error strings
WebBrowser:
- Moved plug-in error handling to WebResourceLoadDelegate
* BrowserWebController.m:
* English.lproj/Localizable.strings:
* LoadProgressMonitor.m:
(-[LoadProgressMonitor pluginNotFoundSheetEnded:returnCode:contextInfo:]):
(-[LoadProgressMonitor pluginFailedWithError:dataSource:]): display special sheets for new errors.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7d04c3d..488c1bc 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,38 @@
+2002-11-01 Chris Blumenberg <cblu at apple.com>
+
+ - Moved plug-in error handling to WebResourceLoadDelegate
+ - Report plug-in load failure, java load failure, and plug-in not found errors.
+ - Added WebPluginError, subclass of WebError.
+ - Attempted fix: 3090675 - Standalone WMP (Window Media Player) content crashes Alexander
+
+ * English.lproj/Localizable.strings:
+ * Misc.subproj/WebKitErrors.h:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView sendEvent:]): don't send event to null function
+ * Plugins.subproj/WebNetscapePluginDocumentView.m:
+ (-[WebNetscapePluginDocumentView setDataSource:]): report plug-in load failure
+ * Plugins.subproj/WebNullPluginView.h:
+ * Plugins.subproj/WebNullPluginView.m: take a WebPluginError
+ (-[WebNullPluginView dealloc]):
+ (-[WebNullPluginView viewDidMoveToWindow]):
+ * Plugins.subproj/WebPluginError.h: Added.
+ * Plugins.subproj/WebPluginError.m: Added.
+ (-[WebPluginErrorPrivate dealloc]):
+ (-[WebPluginError dealloc]):
+ (-[WebPluginError pluginPageURL]):
+ (-[WebPluginError pluginName]):
+ (-[WebPluginError MIMEType]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): report plug-in load failure
+ (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): report plug-in load failure
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebController.m:
+ (-[WebResourceLoadDelegate pluginFailedWithError:dataSource:]): added, does nothing
+ * WebView.subproj/WebControllerPolicyDelegate.h:
+ * WebView.subproj/WebResourceLoadDelegate.h:
+ * WebView.subproj/WebView.m:
+ (+[WebView initialize]): added new error strings
+
2002-11-01 John Sullivan <sullivan at apple.com>
- some weaning of WebBookmark API from WebBookmarkGroup
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 7d04c3d..488c1bc 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,38 @@
+2002-11-01 Chris Blumenberg <cblu at apple.com>
+
+ - Moved plug-in error handling to WebResourceLoadDelegate
+ - Report plug-in load failure, java load failure, and plug-in not found errors.
+ - Added WebPluginError, subclass of WebError.
+ - Attempted fix: 3090675 - Standalone WMP (Window Media Player) content crashes Alexander
+
+ * English.lproj/Localizable.strings:
+ * Misc.subproj/WebKitErrors.h:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView sendEvent:]): don't send event to null function
+ * Plugins.subproj/WebNetscapePluginDocumentView.m:
+ (-[WebNetscapePluginDocumentView setDataSource:]): report plug-in load failure
+ * Plugins.subproj/WebNullPluginView.h:
+ * Plugins.subproj/WebNullPluginView.m: take a WebPluginError
+ (-[WebNullPluginView dealloc]):
+ (-[WebNullPluginView viewDidMoveToWindow]):
+ * Plugins.subproj/WebPluginError.h: Added.
+ * Plugins.subproj/WebPluginError.m: Added.
+ (-[WebPluginErrorPrivate dealloc]):
+ (-[WebPluginError dealloc]):
+ (-[WebPluginError pluginPageURL]):
+ (-[WebPluginError pluginName]):
+ (-[WebPluginError MIMEType]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): report plug-in load failure
+ (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): report plug-in load failure
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebController.m:
+ (-[WebResourceLoadDelegate pluginFailedWithError:dataSource:]): added, does nothing
+ * WebView.subproj/WebControllerPolicyDelegate.h:
+ * WebView.subproj/WebResourceLoadDelegate.h:
+ * WebView.subproj/WebView.m:
+ (+[WebView initialize]): added new error strings
+
2002-11-01 John Sullivan <sullivan at apple.com>
- some weaning of WebBookmark API from WebBookmarkGroup
diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings
index eaaace1..43c1974 100644
Binary files a/WebKit/English.lproj/Localizable.strings and b/WebKit/English.lproj/Localizable.strings differ
diff --git a/WebKit/Misc.subproj/WebKitErrors.h b/WebKit/Misc.subproj/WebKitErrors.h
index 44e0878..538b320 100644
--- a/WebKit/Misc.subproj/WebKitErrors.h
+++ b/WebKit/Misc.subproj/WebKitErrors.h
@@ -40,5 +40,8 @@ enum {
WebErrorCannotShowURL = 10010,
WebErrorCannotNotFindApplicationForURL = 10011,
WebErrorLocationChangeInterruptedByPolicyChange = 10012,
- WebErrorResourceLoadInterruptedByPolicyChange = 10013
+ WebErrorResourceLoadInterruptedByPolicyChange = 10013,
+ WebErrorCannotFindPlugin = 10014,
+ WebErrorCannotLoadPlugin = 10015,
+ WebErrorJavaUnavailable = 10016
};
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 2c79277..eedcfa7 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -111,7 +111,11 @@
[[self controller] _setDefersCallbacks:YES];
}
- BOOL acceptedEvent = NPP_HandleEvent(instance, event);
+ BOOL acceptedEvent;
+
+ if(NPP_HandleEvent){
+ acceptedEvent= NPP_HandleEvent(instance, event);
+ }
if (!defers) {
[[self controller] _setDefersCallbacks:NO];
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index 59eaa3c..2acd4c3 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -7,10 +7,13 @@
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebFrame.h>
+#import <WebKit/WebKitErrors.h>
#import <WebKit/WebNetscapePluginDocumentView.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebNetscapePluginPackage.h>
#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPluginError.h>
+#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebView.h>
#import <WebFoundation/WebResourceResponse.h>
@@ -64,6 +67,13 @@
thePlugin = (WebNetscapePluginPackage *)[[WebPluginDatabase installedPlugins] pluginForMIMEType:MIME];
if (![thePlugin load]){
+ WebPluginError *error = [WebPluginError pluginErrorWithCode:WebErrorCannotLoadPlugin
+ URL:[theDataSource URL]
+ pluginPageURL:nil
+ pluginName:[thePlugin name]
+ MIMEType:MIME];
+
+ [[[theDataSource controller] resourceLoadDelegate] pluginFailedWithError:error dataSource:theDataSource];
return;
}
diff --git a/WebKit/Plugins.subproj/WebNullPluginView.h b/WebKit/Plugins.subproj/WebNullPluginView.h
index 755df91..018dac4 100644
--- a/WebKit/Plugins.subproj/WebNullPluginView.h
+++ b/WebKit/Plugins.subproj/WebNullPluginView.h
@@ -5,14 +5,14 @@
#import <AppKit/AppKit.h>
+ at class WebPluginError;
@interface WebNullPluginView : NSImageView
{
BOOL didSendError;
- NSString *MIMEType;
- NSURL *pluginPageURL;
+ WebPluginError *error;
}
-- initWithFrame:(NSRect)frame MIMEType:(NSString *)mime attributes:(NSDictionary *)attributes;
+- initWithFrame:(NSRect)frame error:(WebPluginError *)pluginError;
@end
diff --git a/WebKit/Plugins.subproj/WebNullPluginView.m b/WebKit/Plugins.subproj/WebNullPluginView.m
index 1290e43..7a67e59 100644
--- a/WebKit/Plugins.subproj/WebNullPluginView.m
+++ b/WebKit/Plugins.subproj/WebNullPluginView.m
@@ -3,12 +3,14 @@
Copyright 2002, Apple, Inc. All rights reserved.
*/
-#import <WebKit/WebNullPluginView.h>
-
-#import <WebKit/WebView.h>
#import <WebKit/WebController.h>
-#import <WebKit/WebControllerPolicyDelegate.h>
+#import <WebKit/WebDataSource.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebPluginError.h>
+#import <WebKit/WebNullPluginView.h>
#import <WebKit/WebNSViewExtras.h>
+#import <WebKit/WebResourceLoadDelegate.h>
+#import <WebKit/WebView.h>
#import <WebFoundation/WebNSURLExtras.h>
@@ -16,42 +18,39 @@ static NSImage *image = nil;
@implementation WebNullPluginView
-- initWithFrame:(NSRect)frame MIMEType:(NSString *)mime attributes:(NSDictionary *)attributes
+- initWithFrame:(NSRect)frame error:(WebPluginError *)pluginError;
{
self = [super initWithFrame:frame];
if (self) {
- // Set the view's image to the null plugin icon
+
if (!image) {
NSBundle *bundle = [NSBundle bundleForClass:[WebNullPluginView class]];
NSString *imagePath = [bundle pathForResource:@"nullplugin" ofType:@"tiff"];
image = [[NSImage alloc] initWithContentsOfFile:imagePath];
}
- [self setImage:image];
-
- MIMEType = [mime retain];
- NSString *pluginPageString = [attributes objectForKey:@"pluginspage"];
- if(pluginPageString){
- pluginPageURL = [[NSURL _web_URLWithString:pluginPageString] retain];
- }
+ [self setImage:image];
+
+ error = [pluginError retain];
}
return self;
}
- (void)dealloc
{
- [pluginPageURL release];
- [MIMEType release];
+ [error release];
[super dealloc];
}
- (void)viewDidMoveToWindow
{
- if(!didSendError){
+ if(!didSendError && _window){
didSendError = YES;
WebView *view = (WebView *)[self _web_superviewOfClass:[WebView class]];
WebController *controller = [view controller];
- [[controller policyDelegate] pluginNotFoundForMIMEType:MIMEType pluginPageURL:pluginPageURL];
+ WebDataSource *dataSource = [[controller frameForView:view] dataSource];
+
+ [[controller resourceLoadDelegate] pluginFailedWithError:error dataSource:dataSource];
}
}
diff --git a/WebKit/Plugins.subproj/WebPlugInError.h b/WebKit/Plugins.subproj/WebPlugInError.h
new file mode 100644
index 0000000..23fe286
--- /dev/null
+++ b/WebKit/Plugins.subproj/WebPlugInError.h
@@ -0,0 +1,37 @@
+//
+// WebPluginError.h
+// WebKit
+//
+// Created by Chris Blumenberg on Fri Nov 01 2002.
+// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <WebFoundation/WebError.h>
+
+ at class WebPluginErrorPrivate;
+
+ at interface WebPluginError : WebError
+{
+ at private
+ WebPluginErrorPrivate *_private;
+}
+
++ (WebPluginError *)pluginErrorWithCode:(int)code
+ URL:(NSURL *)URL
+ pluginPageURL:(NSURL *)URL
+ pluginName:(NSString *)pluginName
+ MIMEType:(NSString *)MIMEType;
+
+- initWithErrorWithCode:(int)code
+ URL:(NSURL *)URL
+ pluginPageURL:(NSURL *)pluginPageURL
+ pluginName:(NSString *)pluginName
+ MIMEType:(NSString *)MIMEType;
+
+- (NSURL *)pluginPageURL;
+- (NSString *)pluginName;
+- (NSString *)MIMEType;
+
+ at end
diff --git a/WebKit/Plugins.subproj/WebPlugInError.m b/WebKit/Plugins.subproj/WebPlugInError.m
new file mode 100644
index 0000000..84a0157
--- /dev/null
+++ b/WebKit/Plugins.subproj/WebPlugInError.m
@@ -0,0 +1,88 @@
+//
+// WebPluginError.m
+// WebKit
+//
+// Created by Chris Blumenberg on Fri Nov 01 2002.
+// Copyright (c) 2002 __MyCompanyName__. All rights reserved.
+//
+
+#import <WebKit/WebKitErrors.h>
+#import <WebKit/WebPluginError.h>
+
+
+ at interface WebPluginErrorPrivate : NSObject
+{
+ at public
+ NSString *MIMEType;
+ NSURL *pluginPageURL;
+ NSString *pluginName;
+}
+
+ at end
+
+ at implementation WebPluginErrorPrivate
+
+- (void)dealloc
+{
+ [MIMEType release];
+ [pluginPageURL release];
+ [pluginName release];
+}
+
+ at end
+
+ at implementation WebPluginError
+
++ (WebPluginError *)pluginErrorWithCode:(int)code
+ URL:(NSURL *)URL
+ pluginPageURL:(NSURL *)pluginPageURL
+ pluginName:(NSString *)pluginName
+ MIMEType:(NSString *)MIMEType;
+{
+ WebPluginError *error = [[WebPluginError alloc] initWithErrorWithCode:code
+ URL:URL
+ pluginPageURL:pluginPageURL
+ pluginName:pluginName
+ MIMEType:MIMEType];
+ return [error autorelease];
+}
+
+- initWithErrorWithCode:(int)code
+ URL:(NSURL *)URL
+ pluginPageURL:(NSURL *)pluginPageURL
+ pluginName:(NSString *)pluginName
+ MIMEType:(NSString *)MIMEType;
+{
+ [super initWithErrorCode:code inDomain:WebErrorDomainWebKit failingURL:[URL absoluteString]];
+
+ _private = [[WebPluginErrorPrivate alloc] init];
+ _private->pluginPageURL = [pluginPageURL retain];
+ _private->pluginName = [pluginName retain];
+ _private->MIMEType = [MIMEType retain];
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [_private release];
+ [super dealloc];
+}
+
+- (NSURL *)pluginPageURL
+{
+ return _private->pluginPageURL;
+}
+
+- (NSString *)pluginName
+{
+ return _private->pluginName;
+}
+
+- (NSString *)MIMEType
+{
+ return _private->MIMEType;
+}
+
+ at end
+
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index a65119c..df596ce 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -14,6 +14,7 @@
#import <WebKit/WebHistoryItem.h>
#import <WebKit/WebHTMLRepresentationPrivate.h>
#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebKitErrors.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebLocationChangeDelegate.h>
@@ -23,6 +24,7 @@
#import <WebKit/WebPlugin.h>
#import <WebKit/WebPluginController.h>
#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPluginError.h>
#import <WebKit/WebPluginPackage.h>
#import <WebKit/WebPluginViewFactory.h>
#import <WebKit/WebPreferences.h>
@@ -426,6 +428,8 @@
}
WebBasePluginPackage *pluginPackage;
+ NSView *view = nil;
+ int errorCode = 0;
if ([MIMEType length]) {
pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:MIMEType];
@@ -437,12 +441,12 @@
if (pluginPackage) {
if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
- return [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
+ view = [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
attributes:attributes
baseURL:baseURL];
}
else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
- return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSZeroRect
+ view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSZeroRect
plugin:(WebNetscapePluginPackage *)pluginPackage
URL:URL
baseURL:baseURL
@@ -451,45 +455,81 @@
}else{
[NSException raise:NSInternalInconsistencyException
format:@"Plugin package class not recognized"];
- return nil;
}
}else{
- return [[[WebNullPluginView alloc] initWithFrame:NSZeroRect MIMEType:MIMEType attributes:attributes] autorelease];
+ errorCode = WebErrorCannotFindPlugin;
}
+
+ if(!errorCode && !view){
+ errorCode = WebErrorCannotLoadPlugin;
+ }
+
+ if(errorCode){
+ NSString *pluginPageString = [attributes objectForKey:@"pluginspage"];
+ NSURL *pluginPageURL = nil;
+ if(pluginPageString){
+ pluginPageURL = [NSURL _web_URLWithString:pluginPageString];
+ }
+
+ WebPluginError *error = [WebPluginError pluginErrorWithCode:errorCode
+ URL:URL
+ pluginPageURL:pluginPageURL
+ pluginName:[pluginPackage name]
+ MIMEType:MIMEType];
+
+ view = [[[WebNullPluginView alloc] initWithFrame:NSZeroRect error:error] autorelease];
+ }
+
+ ASSERT(view);
+
+ return view;
}
- (NSView *)viewForJavaAppletWithFrame:(NSRect)theFrame attributes:(NSDictionary *)attributes baseURL:(NSURL *)baseURL
{
+ NSString *MIMEType = @"application/x-java-applet";
WebBasePluginPackage *pluginPackage;
+ NSView *view = nil;
+
+ pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:MIMEType];
- pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:@"application/x-java-applet"];
-
- if (!pluginPackage) {
- return nil;
+ if (pluginPackage) {
+ if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
+ NSMutableDictionary *theAttributes = [NSMutableDictionary dictionary];
+ [theAttributes addEntriesFromDictionary:attributes];
+ [theAttributes setObject:[NSString stringWithFormat:@"%d", (int)theFrame.size.width] forKey:@"width"];
+ [theAttributes setObject:[NSString stringWithFormat:@"%d", (int)theFrame.size.height] forKey:@"height"];
+
+ view = [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
+ attributes:theAttributes
+ baseURL:baseURL];
+ }
+ else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
+ view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:theFrame
+ plugin:(WebNetscapePluginPackage *)pluginPackage
+ URL:nil
+ baseURL:baseURL
+ MIMEType:MIMEType
+ attributes:attributes] autorelease];
+ }else{
+ [NSException raise:NSInternalInconsistencyException
+ format:@"Plugin package class not recognized"];
+ }
}
- if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
- NSMutableDictionary *theAttributes = [NSMutableDictionary dictionary];
- [theAttributes addEntriesFromDictionary:attributes];
- [theAttributes setObject:[NSString stringWithFormat:@"%d", (int)theFrame.size.width] forKey:@"width"];
- [theAttributes setObject:[NSString stringWithFormat:@"%d", (int)theFrame.size.height] forKey:@"height"];
-
- return [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
- attributes:theAttributes
- baseURL:baseURL];
- }
- else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
- return [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:theFrame
- plugin:(WebNetscapePluginPackage *)pluginPackage
- URL:nil
- baseURL:baseURL
- MIMEType:@"application/x-java-applet"
- attributes:attributes] autorelease];
- }else{
- [NSException raise:NSInternalInconsistencyException
- format:@"Plugin package class not recognized"];
- return nil;
+ if(!view){
+ WebPluginError *error = [WebPluginError pluginErrorWithCode:WebErrorJavaUnavailable
+ URL:nil
+ pluginPageURL:nil
+ pluginName:[pluginPackage name]
+ MIMEType:MIMEType];
+
+ view = [[[WebNullPluginView alloc] initWithFrame:theFrame error:error] autorelease];
}
+
+ ASSERT(view);
+
+ return view;
}
@end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 2f561cf..39e8257 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -298,6 +298,7 @@
832E26A2036F95CA005E2B4F,
832E26A5036F9614005E2B4F,
517FA6AC03709FCE00CA2D3A,
+ 830A567403731461000C720C,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -405,6 +406,7 @@
832E26A6036F9614005E2B4F,
517FA6AD03709FCE00CA2D3A,
517FA6AE03709FCE00CA2D3A,
+ 830A567503731461000C720C,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -1489,6 +1491,33 @@
//832
//833
//834
+ 830A567203731461000C720C = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = WebPluginError.h;
+ refType = 4;
+ };
+ 830A567303731461000C720C = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = WebPluginError.m;
+ refType = 4;
+ };
+ 830A567403731461000C720C = {
+ fileRef = 830A567203731461000C720C;
+ isa = PBXBuildFile;
+ settings = {
+ ATTRIBUTES = (
+ Public,
+ );
+ };
+ };
+ 830A567503731461000C720C = {
+ fileRef = 830A567303731461000C720C;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
832E269E036F952E005E2B4F = {
children = (
832E26A1036F95CA005E2B4F,
@@ -3245,6 +3274,8 @@
F5883BE1025E5E9D01000102,
F5F717200288493C018635CA,
F5F717210288493C018635CA,
+ 830A567203731461000C720C,
+ 830A567303731461000C720C,
);
isa = PBXGroup;
name = Plugins;
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 6bee4f4..57f6fbf 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -475,5 +475,9 @@ NSString *WebElementFrameKey = @"WebElementFrame";
{
}
+- (void)pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource
+{
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
index 1326c60..b68890f 100644
--- a/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebControllerPolicyDelegate.h
@@ -258,12 +258,4 @@ typedef enum {
*/
- (void)unableToImplementPolicy:(WebPolicy *)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
-/*!
- @method pluginNotFoundForMIMEType:pluginPageURL:
- @discussion Called when a plug-in for a certain mime type is not installed.
- @param mime The MIME type that no installed plug-in supports.
- @param URL The web page for the plug-in that supports the MIME type. Can be nil.
-*/
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)URL;
-
@end
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index fd821fc..700dd87 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -50,6 +50,9 @@ NSString *WebErrorDomainWebKit = @"WebErrorDomainWebKit";
#define WebErrorDescriptionCannotShowMIMEType UI_STRING("Cannot show content with specified mime type", "WebErrorCannotShowMIMEType description")
#define WebErrorDescriptionCannotShowURL UI_STRING("Cannot show URL", "WebErrorCannotShowURL description")
#define WebErrorDescriptionCannotFindApplicationForURL UI_STRING("Cannot find application for URL", "WebErrorCannotNotFindApplicationForURL description")
+#define WebErrorDescriptionWebErrorCannotFindPlugin UI_STRING("Cannot find plug-in", "WebErrorCannotFindPlugin description")
+#define WebErrorDescriptionWebErrorCannotLoadPlugin UI_STRING("Cannot load plug-in", "WebErrorCannotLoadPlugin description")
+#define WebErrorDescriptionWebErrorJavaUnavailable UI_STRING("Java is unavailable", "WebErrorJavaUnavailable description")
+ (void)initialize
{
@@ -66,6 +69,9 @@ NSString *WebErrorDomainWebKit = @"WebErrorDomainWebKit";
WebErrorDescriptionCannotShowMIMEType, [NSNumber numberWithInt: WebErrorCannotShowMIMEType],
WebErrorDescriptionCannotShowURL, [NSNumber numberWithInt: WebErrorCannotShowURL],
WebErrorDescriptionCannotFindApplicationForURL, [NSNumber numberWithInt: WebErrorCannotNotFindApplicationForURL],
+ WebErrorDescriptionWebErrorCannotFindPlugin, [NSNumber numberWithInt: WebErrorCannotFindPlugin],
+ WebErrorDescriptionWebErrorCannotLoadPlugin, [NSNumber numberWithInt: WebErrorCannotLoadPlugin],
+ WebErrorDescriptionWebErrorJavaUnavailable, [NSNumber numberWithInt: WebErrorJavaUnavailable],
nil];
[WebError addErrorsWithCodesAndDescriptions:dict inDomain:WebErrorDomainWebKit];
diff --git a/WebKit/WebView.subproj/WebPolicyDelegate.h b/WebKit/WebView.subproj/WebPolicyDelegate.h
index 1326c60..b68890f 100644
--- a/WebKit/WebView.subproj/WebPolicyDelegate.h
+++ b/WebKit/WebView.subproj/WebPolicyDelegate.h
@@ -258,12 +258,4 @@ typedef enum {
*/
- (void)unableToImplementPolicy:(WebPolicy *)policy error:(WebError *)error forURL:(NSURL *)URL inFrame:(WebFrame *)frame;
-/*!
- @method pluginNotFoundForMIMEType:pluginPageURL:
- @discussion Called when a plug-in for a certain mime type is not installed.
- @param mime The MIME type that no installed plug-in supports.
- @param URL The web page for the plug-in that supports the MIME type. Can be nil.
-*/
-- (void)pluginNotFoundForMIMEType:(NSString *)mime pluginPageURL:(NSURL *)URL;
-
@end
diff --git a/WebKit/WebView.subproj/WebResourceLoadDelegate.h b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
index b41cc8d..54c44d1 100644
--- a/WebKit/WebView.subproj/WebResourceLoadDelegate.h
+++ b/WebKit/WebView.subproj/WebResourceLoadDelegate.h
@@ -5,6 +5,7 @@
Public header file.
*/
@class WebDataSource;
+ at class WebPluginError;
@class WebResourceResponse;
@class WebResourceRequest;
@@ -84,8 +85,16 @@
@param dataSource The dataSource that initiated the load.
*/
-(void)resource:identifier didFailLoadingWithError:(WebError *)error fromDataSource:(WebDataSource *)dataSource;
- at end
+/*!
+ @method pluginFailedWithError:dataSource:
+ @discussion Called when a plug-in is not found, fails to load or is not available for some reason.
+ @param error The plug-in error.
+ @param dataSource The dataSource that contains the plug-in.
+*/
+- (void)pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource;
+
+ at end
/*!
@class WebResourceLoadDelegate
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 6bee4f4..57f6fbf 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -475,5 +475,9 @@ NSString *WebElementFrameKey = @"WebElementFrame";
{
}
+- (void)pluginFailedWithError:(WebPluginError *)error dataSource:(WebDataSource *)dataSource
+{
+}
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list