Fixed:
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Sep 2004 01:32:15 +0000 (01:32 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Sep 2004 01:32:15 +0000 (01:32 +0000)
<rdar://problem/3763832> Safari-155: Non-Embeded movies fail to open in Cocoa QT plug-in
<rdar://problem/3820517> "*** -[WebPluginPackage NPP_New]: selector not recognized [self = 0x5552c10]"

        Reviewed by rjw.

        * History.subproj/WebHistoryItem.m:
        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_firstResponderCausesFocusDisplay]):
        (-[NSView _webView]):
        (-[NSView _frame]):
        (-[NSView _bridge]):
        (-[NSView _dataSource]):
        * Plugins.subproj/WebBasePluginPackage.h:
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage hash]):
        (-[WebBasePluginPackage isQuickTimePlugIn]):
        * Plugins.subproj/WebNetscapePluginDocumentView.m:
        (-[WebNetscapePluginDocumentView setDataSource:]):
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        * Plugins.subproj/WebPluginController.h:
        * Plugins.subproj/WebPluginController.m:
        (-[WebPluginController initWithDocumentView:]):
        (-[WebPluginController addPlugin:]):
        (-[WebPluginController destroyAllPlugins]):
        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
        (-[WebPluginController webPlugInContainerShowStatus:]):
        (-[WebPluginController webPlugInContainerSelectionColor]):
        (-[WebPluginController webFrame]):
        * Plugins.subproj/WebPluginDatabase.h:
        * Plugins.subproj/WebPluginDatabase.m:
        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
        (-[WebPluginDatabase refresh]):
        (WebPluginDocumentView::while):
        * Plugins.subproj/WebPluginDocumentView.h: Added.
        * Plugins.subproj/WebPluginDocumentView.m: Added.
        (-[WebPluginDocumentView initWithFrame:]):
        (-[WebPluginDocumentView dealloc]):
        (-[WebPluginDocumentView drawRect:]):
        (-[WebPluginDocumentView setDataSource:]):
        (-[WebPluginDocumentView setNeedsLayout:]):
        (-[WebPluginDocumentView layout]):
        (-[WebPluginDocumentView currentWindow]):
        (-[WebPluginDocumentView viewWillMoveToWindow:]):
        (-[WebPluginDocumentView viewDidMoveToWindow]):
        (-[WebPluginDocumentView viewWillMoveToHostWindow:]):
        (-[WebPluginDocumentView viewDidMoveToHostWindow]):
        (-[WebPluginDocumentView receivedData:withDataSource:]):
        (-[WebPluginDocumentView receivedError:withDataSource:]):
        (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
        (-[WebPluginDocumentView canProvideDocumentSource]):
        (-[WebPluginDocumentView documentSource]):
        (-[WebPluginDocumentView title]):
        * Plugins.subproj/npapi.m:
        (NPN_ReleaseVariantValue):
        (NPN_GetStringIdentifier):
        (NPN_GetStringIdentifiers):
        (NPN_GetIntIdentifier):
        (NPN_IdentifierIsString):
        (NPN_UTF8FromIdentifier):
        (NPN_IntFromIdentifier):
        (NPN_CreateObject):
        (NPN_RetainObject):
        (NPN_ReleaseObject):
        (NPN_Invoke):
        (NPN_InvokeDefault):
        (NPN_Evaluate):
        (NPN_GetProperty):
        (NPN_SetProperty):
        (NPN_RemoveProperty):
        (NPN_HasProperty):
        (NPN_HasMethod):
        (NPN_SetException):
        (NPN_Call):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge frameRequiredForMIMEType:URL:]):
        * WebCoreSupport.subproj/WebViewFactory.m:
        * WebKit.exp:
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebDebugDOMNode.m:
        * WebView.subproj/WebDocumentInternal.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView initWithFrame:]):
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebRenderNode.m:
        * WebView.subproj/WebView.m:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
WebKit/ChangeLog
WebKit/History.subproj/WebHistoryItem.m
WebKit/Misc.subproj/WebNSViewExtras.h
WebKit/Misc.subproj/WebNSViewExtras.m
WebKit/Plugins.subproj/WebBasePluginPackage.h
WebKit/Plugins.subproj/WebBasePluginPackage.m
WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
WebKit/Plugins.subproj/WebNetscapePluginRepresentation.m
WebKit/Plugins.subproj/WebPluginController.h
WebKit/Plugins.subproj/WebPluginController.m
WebKit/Plugins.subproj/WebPluginDatabase.h
WebKit/Plugins.subproj/WebPluginDatabase.m
WebKit/Plugins.subproj/WebPluginDocumentView.h [new file with mode: 0644]
WebKit/Plugins.subproj/WebPluginDocumentView.m [new file with mode: 0644]
WebKit/Plugins.subproj/npapi.m
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebCoreSupport.subproj/WebViewFactory.m
WebKit/WebKit.exp
WebKit/WebKit.pbproj/project.pbxproj
WebKit/WebView.subproj/WebDebugDOMNode.m
WebKit/WebView.subproj/WebDocumentInternal.h
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebHTMLViewPrivate.h
WebKit/WebView.subproj/WebImageRepresentation.h
WebKit/WebView.subproj/WebRenderNode.m
WebKit/WebView.subproj/WebView.m

index acedd1c190188ddf9ed040e6cd00deb7e44323bc..a4c6e51af9afb20041fad87dfca56586d7e77bb7 100644 (file)
@@ -1,3 +1,94 @@
+2004-09-29  Chris Blumenberg  <cblu@apple.com>
+       
+       Fixed:
+       <rdar://problem/3763832> Safari-155: Non-Embeded movies fail to open in Cocoa QT plug-in
+       <rdar://problem/3820517> "*** -[WebPluginPackage NPP_New]: selector not recognized [self = 0x5552c10]"
+
+        Reviewed by rjw.
+
+        * History.subproj/WebHistoryItem.m:
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        (-[NSView _web_firstResponderCausesFocusDisplay]):
+        (-[NSView _webView]):
+        (-[NSView _frame]):
+        (-[NSView _bridge]):
+        (-[NSView _dataSource]):
+        * Plugins.subproj/WebBasePluginPackage.h:
+        * Plugins.subproj/WebBasePluginPackage.m:
+        (-[WebBasePluginPackage hash]):
+        (-[WebBasePluginPackage isQuickTimePlugIn]):
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):
+        * Plugins.subproj/WebNetscapePluginRepresentation.m:
+        * Plugins.subproj/WebPluginController.h:
+        * Plugins.subproj/WebPluginController.m:
+        (-[WebPluginController initWithDocumentView:]):
+        (-[WebPluginController addPlugin:]):
+        (-[WebPluginController destroyAllPlugins]):
+        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
+        (-[WebPluginController webPlugInContainerShowStatus:]):
+        (-[WebPluginController webPlugInContainerSelectionColor]):
+        (-[WebPluginController webFrame]):
+        * Plugins.subproj/WebPluginDatabase.h:
+        * Plugins.subproj/WebPluginDatabase.m:
+        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
+        (-[WebPluginDatabase refresh]):
+        (WebPluginDocumentView::while):
+        * Plugins.subproj/WebPluginDocumentView.h: Added.
+        * Plugins.subproj/WebPluginDocumentView.m: Added.
+        (-[WebPluginDocumentView initWithFrame:]):
+        (-[WebPluginDocumentView dealloc]):
+        (-[WebPluginDocumentView drawRect:]):
+        (-[WebPluginDocumentView setDataSource:]):
+        (-[WebPluginDocumentView setNeedsLayout:]):
+        (-[WebPluginDocumentView layout]):
+        (-[WebPluginDocumentView currentWindow]):
+        (-[WebPluginDocumentView viewWillMoveToWindow:]):
+        (-[WebPluginDocumentView viewDidMoveToWindow]):
+        (-[WebPluginDocumentView viewWillMoveToHostWindow:]):
+        (-[WebPluginDocumentView viewDidMoveToHostWindow]):
+        (-[WebPluginDocumentView receivedData:withDataSource:]):
+        (-[WebPluginDocumentView receivedError:withDataSource:]):
+        (-[WebPluginDocumentView finishedLoadingWithDataSource:]):
+        (-[WebPluginDocumentView canProvideDocumentSource]):
+        (-[WebPluginDocumentView documentSource]):
+        (-[WebPluginDocumentView title]):
+        * Plugins.subproj/npapi.m:
+        (NPN_ReleaseVariantValue):
+        (NPN_GetStringIdentifier):
+        (NPN_GetStringIdentifiers):
+        (NPN_GetIntIdentifier):
+        (NPN_IdentifierIsString):
+        (NPN_UTF8FromIdentifier):
+        (NPN_IntFromIdentifier):
+        (NPN_CreateObject):
+        (NPN_RetainObject):
+        (NPN_ReleaseObject):
+        (NPN_Invoke):
+        (NPN_InvokeDefault):
+        (NPN_Evaluate):
+        (NPN_GetProperty):
+        (NPN_SetProperty):
+        (NPN_RemoveProperty):
+        (NPN_HasProperty):
+        (NPN_HasMethod):
+        (NPN_SetException):
+        (NPN_Call):
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge frameRequiredForMIMEType:URL:]):
+        * WebCoreSupport.subproj/WebViewFactory.m:
+        * WebKit.exp:
+        * WebKit.pbproj/project.pbxproj:
+        * WebView.subproj/WebDebugDOMNode.m:
+        * WebView.subproj/WebDocumentInternal.h:
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView initWithFrame:]):
+        * WebView.subproj/WebHTMLViewPrivate.h:
+        * WebView.subproj/WebImageRepresentation.h:
+        * WebView.subproj/WebRenderNode.m:
+        * WebView.subproj/WebView.m:
+
 2004-09-29  Richard Williamson   <rjw@apple.com>
 
        Fixed <rdar://problem/3779998> bringing window to front or sending to back does not send focus/blur events to JavaScript window object
index a42dbb3fc274bd85249c82b0ff40fb865126fa73..c9eecf6032d0c1ab53a1399172ee973a5fcd9dfc 100644 (file)
@@ -14,6 +14,7 @@
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebNSURLExtras.h>
+#import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebPluginController.h>
 
 #import <Foundation/NSDictionary_NSURLExtras.h>
index e42a955b0bb761bfa877b451cb1e2ac880d03f62..eea324644e1419c57037590f3c1d5fac23a5679e 100644 (file)
@@ -1,6 +1,6 @@
 /*
     WebNSViewExtras.h
-       Copyright (c) 2002, Apple, Inc. All rights reserved.
+    Copyright (c) 2002, Apple, Inc. All rights reserved.
 */
 
 #import <AppKit/AppKit.h>
@@ -8,6 +8,9 @@
 #define WebDragImageAlpha    0.75
 
 @class WebArchive;
+@class WebBridge;
+@class WebDataSource;
+@class WebFrame;
 @class WebFrameView;
 @class WebImageRenderer;
 @class WebView;
 - (BOOL)_web_firstResponderCausesFocusDisplay;
 
 @end
+
+@interface NSView (WebDocumentViewExtras)
+
+- (WebView *)_webView;
+- (WebFrame *)_frame;
+- (WebBridge *)_bridge;
+- (WebDataSource *)_dataSource;
+
+@end
index 914aca3dc15f8a957dd90db00062e044671c4eb5..09934a7f0a7c0da2c848de1e31efa216c1def3eb 100644 (file)
@@ -5,6 +5,7 @@
 
 #import <WebKit/WebNSViewExtras.h>
 
+#import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebFrameViewInternal.h>
 #import <WebKit/WebImageRenderer.h>
 #import <WebKit/WebNSImageExtras.h>
@@ -26,7 +27,6 @@
 @interface NSObject (Foo)
 - (void*)_renderFramePart;
 - (id)_frameForView: (id)aView;
-- (id)_webView;
 @end
 #endif
 
 }
 
 @end
+
+@implementation NSView (WebDocumentViewExtras)
+
+- (WebView *)_webView
+{
+    // We used to use the view hierarchy exclusively here, but that won't work
+    // right when the first viewDidMoveToSuperview call is done, and this wil.
+    return [[self _frame] webView];
+}
+
+- (WebFrame *)_frame
+{
+    WebFrameView *webFrameView = [self _web_parentWebFrameView];
+    return [webFrameView webFrame];
+}
+
+// Required so view can access the part's selection.
+- (WebBridge *)_bridge
+{
+    return [[self _frame] _bridge];
+}
+
+- (WebDataSource *)_dataSource
+{
+    return [[self _frame] dataSource];
+}
+
+@end
index cb51fe3526a7e2a8a1919a843c3738fe7babc7b1..2623855d71bcf50c26f5460ce0149ac575a4fe61 100644 (file)
@@ -62,4 +62,6 @@
 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary;
 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary;
 
+- (BOOL)isQuickTimePlugIn;
+
 @end
index 27e7b6f1a463fed7919bd8ef34a58d677012e5a6..37141d25b4ba57151874e56612fa11147e7b938e 100644 (file)
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebPluginPackage.h>
 
+#import <Foundation/NSString_NSURLExtras.h>
+
+#define QuickTimeCarbonPluginIdentifier       @"com.apple.QuickTime Plugin.plugin"
+#define QuickTimeCocoaPluginIdentifier        @"com.apple.qtcocoaplugin"
+
 @interface NSArray (WebPluginExtensions)
 - (NSArray *)_web_lowercaseStrings;
 @end;
     return [[name stringByAppendingString:[lastModifiedDate description]] hash];
 }
 
+- (BOOL)isQuickTimePlugIn
+{
+    NSString *bundleIdentifier = [[self bundle] bundleIdentifier];
+    return [bundleIdentifier _web_isCaseInsensitiveEqualToString:QuickTimeCarbonPluginIdentifier] || 
+        [bundleIdentifier _web_isCaseInsensitiveEqualToString:QuickTimeCocoaPluginIdentifier];
+}
+
 @end
 
 @implementation NSArray (WebPluginExtensions)
index 20202b7a680cb77b959f680a2d26ccc365b0cadc..a6da399c0ef93a608b59ba7bce399a976bbe7627 100644 (file)
@@ -77,6 +77,7 @@
 
     WebNetscapePluginPackage *thePlugin;
     thePlugin = (WebNetscapePluginPackage *)[[WebPluginDatabase installedPlugins] pluginForMIMEType:MIME];
+    ASSERT([plugin isKindOfClass:[WebNetscapePluginPackage class]]);
 
     if (![thePlugin load]) {
         NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorCannotLoadPlugIn
index 5f7589313d1797834d12643b9262a55735b483de..f3c555c2cf5690f9be05f3d968377d5cae75cadc 100644 (file)
@@ -3,16 +3,17 @@
        Copyright 2002, Apple, Inc. All rights reserved.
 */
 
+#import <WebKit/WebNetscapePluginRepresentation.h>
+
+#import <WebKit/WebAssertions.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebFrame.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebKitErrorsPrivate.h>
 #import <WebKit/WebNetscapePluginDocumentView.h>
 #import <WebKit/WebNetscapePluginPackage.h>
-#import <WebKit/WebNetscapePluginRepresentation.h>
 
 #import <Foundation/NSURLResponse.h>
-#import <WebKit/WebAssertions.h>
 #import <Foundation/NSError_NSURLExtras.h>
 
 @implementation WebNetscapePluginRepresentation
index a9ca254756f0083c0e4a8eca0ee662b8769f3e6e..73099e6875e3726aa60c7393fd7a403049bb3b24 100644 (file)
 
 @interface WebPluginController : NSObject
 {
-    WebHTMLView *_HTMLView;
+    NSView *_documentView;
     NSMutableArray *_views;
     BOOL _started;
 }
 
-- (id)initWithHTMLView:(WebHTMLView *)HTMLView;
+- (id)initWithDocumentView:(NSView *)view;
 
 - (void)addPlugin:(NSView *)view;
 
index 7e7979d37c626836948ce9f22a121c8fa818d9e6..e69891230142925188f09c78bbfcc310b9787f81 100644 (file)
@@ -13,6 +13,7 @@
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
 #import <WebKit/WebKitLogging.h>
+#import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebPlugin.h>
 #import <WebKit/WebPluginContainer.h>
 #import <WebKit/WebViewPrivate.h>
 
 @implementation WebPluginController
 
-- initWithHTMLView:(WebHTMLView *)HTMLView
+- (id)initWithDocumentView:(NSView *)view
 {
     [super init];
-    _HTMLView = HTMLView;
+    _documentView = view;
     _views = [[NSMutableArray alloc] init];
     return self;
 }
@@ -89,7 +90,7 @@
 
 - (void)addPlugin:(NSView *)view
 {
-    if (!_HTMLView) {
+    if (!_documentView) {
         ERROR("can't add a plug-in to a defunct WebPluginController");
         return;
     }
                 [view pluginStart];
             
             if ([view respondsToSelector:@selector(setContainingWindow:)])
-                [view setContainingWindow:[_HTMLView window]];
+                [view setContainingWindow:[_documentView window]];
         }
     }
 }
     [_views release];
     _views = nil;
 
-    _HTMLView = nil;
+    _documentView = nil;
 }
 
 - (void)webPlugInContainerLoadRequest:(NSURLRequest *)request inFrame:(NSString *)target
         ERROR("nil URL passed");
         return;
     }
-    if (!_HTMLView) {
+    if (!_documentView) {
         ERROR("could not load URL %@ because plug-in has already been destroyed", request);
         return;
     }
-    WebFrame *frame = [_HTMLView _frame];
+    WebFrame *frame = [_documentView _frame];
     if (!frame) {
         ERROR("could not load URL %@ because plug-in has already been stopped", request);
         return;
     if (!message) {
         message = @"";
     }
-    if (!_HTMLView) {
+    if (!_documentView) {
         ERROR("could not show status message (%@) because plug-in has already been destroyed", message);
         return;
     }
-    WebView *v = [_HTMLView _webView];
+    WebView *v = [_documentView _webView];
     [[v _UIDelegateForwarder] webView:v setStatusText:message];
 }
 
 
 - (NSColor *)webPlugInContainerSelectionColor
 {
-    return [[_HTMLView _bridge] selectionColor];
+    return [[_documentView _bridge] selectionColor];
 }
 
 // For compatibility only.
 
 - (WebFrame *)webFrame
 {
-    return [_HTMLView _frame];
+    return [_documentView _frame];
 }
 
 @end
index 16d94803533798648b2a0ed14594af1d623ff0a8..793123e4ccd612b70601582ac46eb53036ffcd8f 100644 (file)
@@ -10,7 +10,6 @@
 @interface WebPluginDatabase : NSObject
 {
     NSMutableSet *plugins;
-    NSMutableSet *pendingPluginLoads;
 }
 
 + (WebPluginDatabase *)installedPlugins;
@@ -23,8 +22,6 @@
 
 - (void)refresh;
 
-- (void)loadPluginIfNeededForMIMEType:(NSString *)MIMEType;
-
 @end
 
 @interface NSObject (WebPlugInDatabase)
index 03847f4d155a309cac88939167a95df6fba1f9a8..dbae10e7c41f14e60b39d228c99dd6e434d3c1fc 100644 (file)
@@ -14,6 +14,7 @@
 #import <WebKit/WebNetscapePluginDocumentView.h>
 #import <WebKit/WebNetscapePluginPackage.h>
 #import <WebKit/WebNetscapePluginRepresentation.h>
+#import <WebKit/WebPluginDocumentView.h>
 #import <WebKit/WebPluginPackage.h>
 #import <WebKit/WebViewPrivate.h>
 
 #import <Foundation/NSString_NSURLExtras.h>
 #import <Foundation/NSURLFileTypeMappings.h>
 
-#define QuickTimePluginIdentifier       @"com.apple.QuickTime Plugin.plugin"
 #define JavaCocoaPluginIdentifier      @"com.apple.JavaPluginCocoa"
 #define JavaCarbonPluginIdentifier     @"com.apple.JavaAppletPlugin"
 #define JavaCFMPluginFilename          @"Java Applet Plugin Enabler"
 #define JavaCarbonPluginBadVersion     @"1.0.0"
 
-
-
 @implementation WebPluginDatabase
 
 static WebPluginDatabase *database = nil;
@@ -42,73 +40,15 @@ static WebPluginDatabase *database = nil;
     return database;
 }
 
-static BOOL sIsCocoaIsValid = FALSE;
-static BOOL sIsCocoa = FALSE;
-
-- (void)initIsCocoa
-{
-    const CPSProcessSerNum thisProcess = { 0, kCPSCurrentProcess };
-    
-    CPSProcessInfoRec *info = (CPSProcessInfoRec *) malloc(sizeof(CPSProcessInfoRec));
-    CPSGetProcessInfo((const CPSProcessSerNum*)&thisProcess, info, NULL, 0, NULL, NULL, 0);
-    
-    sIsCocoa = (info != NULL && info->Flavour == kCPSCocoaApp);
-    sIsCocoaIsValid = TRUE;
-    
-    free(info);
-}
-
-- (BOOL)isCocoa
-{
-    if (!sIsCocoaIsValid) {
-        [self initIsCocoa];
-    }
-    return sIsCocoa;
-}
-
-- (BOOL)canUsePlugin:(WebBasePluginPackage *)plugin
-{
-    // Current versions of the Java plug-ins will not work in a Carbon environment (3283210).
-    
-    if (!plugin) {
-        return NO;
-    }
-    
-    if ([self isCocoa]) {
-        return YES;
-    }
-    
-    NSBundle *bundle = [plugin bundle];
-    if (bundle) {
-        NSString *bundleIdentifier = [bundle bundleIdentifier];
-        if ([bundleIdentifier isEqualToString:JavaCocoaPluginIdentifier]) {
-            // The Cocoa version of the Java plug-in will never work.
-            return NO;
-        } else if ([bundleIdentifier isEqualToString:JavaCarbonPluginIdentifier] &&
-                   [[[bundle infoDictionary] objectForKey:@"CFBundleVersion"] isEqualToString:JavaCarbonPluginBadVersion]) {
-            // The current version of the mach-o Java plug-in won't work.
-            return NO;
-        }
-    } else {
-        if ([[plugin filename] isEqualToString:JavaCFMPluginFilename]) {
-            // Future versions of the CFM plug-in may work, but there is no way to check its version.
-            return NO;
-        }
-    }
-    return YES;
-}
-
 - (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
 {
-    WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil, *webPlugin=nil, *QTPlugin=nil;
+    WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil, *webPlugin=nil;
     NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
     key = [key lowercaseString];
 
     while ((plugin = [pluginEnumerator nextObject]) != nil) {
         if ([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:key]) {
-            if ([[[plugin bundle] bundleIdentifier] _web_isCaseInsensitiveEqualToString:QuickTimePluginIdentifier]) {
-                QTPlugin = plugin;
-            } else if ([plugin isKindOfClass:[WebPluginPackage class]]) {
+            if ([plugin isKindOfClass:[WebPluginPackage class]]) {
                 if (webPlugin == nil) {
                     webPlugin = plugin;
                 }
@@ -118,7 +58,7 @@ static BOOL sIsCocoa = FALSE;
                     if (CFMPlugin == nil) {
                         CFMPlugin = plugin;
                     }
-                } else if(executableType == WebMachOExecutableType) {
+                } else if (executableType == WebMachOExecutableType) {
                     if (machoPlugin == nil) {
                         machoPlugin = plugin;
                     }
@@ -133,17 +73,20 @@ static BOOL sIsCocoa = FALSE;
 
     // Allow other plug-ins to win over QT because if the user has installed a plug-in that can handle a type
     // that the QT plug-in can handle, they probably intended to override QT.
-    if ([self canUsePlugin:webPlugin]) {
+    if (webPlugin && ![webPlugin isQuickTimePlugIn]) {
+        return webPlugin;
+    } else if (machoPlugin && ![machoPlugin isQuickTimePlugIn]) {
+        return machoPlugin;
+    } else if (CFMPlugin && ![CFMPlugin isQuickTimePlugIn]) {
+        return CFMPlugin;
+    } else if (webPlugin) {
         return webPlugin;
     } else if (machoPlugin) {
         return machoPlugin;
     } else if (CFMPlugin) {
         return CFMPlugin;
-    } else if (QTPlugin) {
-        return QTPlugin;
-    } else {
-        return nil;
     }
+    return nil;
 }
 
 - (WebBasePluginPackage *)pluginForMIMEType:(NSString *)MIMEType
@@ -183,7 +126,6 @@ static NSArray *extensionPlugInPaths;
     }
 }
 
-
 static NSArray *pluginLocations(void)
 {
     // Plug-ins are found in order of precedence.
@@ -270,53 +212,46 @@ static NSArray *pluginLocations(void)
     NSEnumerator *keyEnumerator = [MIMEToViewClass keyEnumerator];
     NSString *MIMEType;
     while ((MIMEType = [keyEnumerator nextObject]) != nil) {
-        if ([MIMEToViewClass objectForKey:MIMEType] == [WebNetscapePluginDocumentView class]) {
+        Class class = [MIMEToViewClass objectForKey:MIMEType];
+        if (class == [WebNetscapePluginDocumentView class] || class == [WebPluginDocumentView class]) {
             [WebView _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
         }
     }
     
-    // Register netscape plug-in WebDocumentViews and WebDocumentRepresentations
+    // Build a list of MIME types.
+    NSMutableSet *MIMETypes = [[NSMutableSet alloc] init];
     NSEnumerator *pluginEnumerator = [plugins objectEnumerator];
     WebBasePluginPackage *plugin;
     while ((plugin = [pluginEnumerator nextObject]) != nil) {
+        [MIMETypes addObjectsFromArray:[[plugin MIMETypeEnumerator] allObjects]];
+    }
+    
+    // Register plug-in WebDocumentViews and WebDocumentRepresentations.
+    NSEnumerator *MIMEEnumerator = [[MIMETypes allObjects] objectEnumerator];
+    [MIMETypes release];
+    while ((MIMEType = [MIMEEnumerator nextObject]) != nil) {
+        if ([WebView canShowMIMETypeAsHTML:MIMEType]) {
+            // Don't allow plug-ins to override our core HTML types.
+            continue;
+        }
+        plugin = [self pluginForMIMEType:MIMEType];
+        if ([plugin isQuickTimePlugIn] && [[WebFrameView _viewTypesAllowImageTypeOmission:NO] objectForKey:MIMEType] != nil) {
+            // Don't allow the QT plug-in to override any types because it claims many that we can handle ourselves.
+            continue;
+        }
         if ([plugin isKindOfClass:[WebNetscapePluginPackage class]]) {
-            BOOL isQuickTime = [[[plugin bundle] bundleIdentifier] _web_isCaseInsensitiveEqualToString:QuickTimePluginIdentifier];
-            NSEnumerator *MIMEEnumerator = [plugin MIMETypeEnumerator];
-            while ((MIMEType = [MIMEEnumerator nextObject]) != nil) {
-                if ([WebView canShowMIMETypeAsHTML:MIMEType] || (isQuickTime && [MIMEToViewClass objectForKey:MIMEType] != nil)) {
-                    // Don't allow plug-ins to override our core HTML types and don't allow the QT plug-in to override any types 
-                    // because it claims many that we can handle ourselves.
-                    continue;
-                }
-                [WebView registerViewClass:[WebNetscapePluginDocumentView class] representationClass:[WebNetscapePluginRepresentation class] forMIMEType:MIMEType];
-            }
+            [WebView registerViewClass:[WebNetscapePluginDocumentView class] representationClass:[WebNetscapePluginRepresentation class] forMIMEType:MIMEType];
         } else {
-            if (![plugin isLoaded]) {
-                if (!pendingPluginLoads) {
-                    pendingPluginLoads = [[NSMutableSet alloc] init];
-                }
-                [pendingPluginLoads addObject:plugin];
-            }
-        }
-    }
-}
-
-- (void)loadPluginIfNeededForMIMEType: (NSString *)MIMEType
-{
-    NSEnumerator *pluginEnumerator = [pendingPluginLoads objectEnumerator];
-    WebBasePluginPackage *plugin;
-    while ((plugin = [pluginEnumerator nextObject]) != nil) {
-        if ([[[plugin MIMETypeEnumerator] allObjects] containsObject:MIMEType]) {
-            [plugin load];
-            [pendingPluginLoads removeObject:plugin];
+            ASSERT([plugin isKindOfClass:[WebPluginPackage class]]);
+            [WebView registerViewClass:[WebPluginDocumentView class] representationClass:[WebPluginDocumentView class] forMIMEType:MIMEType];
         }
+        
     }
 }
 
 - (void)dealloc
 {
     [plugins release];
-    [pendingPluginLoads release];
     [super dealloc];
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginDocumentView.h b/WebKit/Plugins.subproj/WebPluginDocumentView.h
new file mode 100644 (file)
index 0000000..6b3f049
--- /dev/null
@@ -0,0 +1,16 @@
+/*     
+    WebPluginDocumentView.h
+    Copyright 2004, Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/WebDocument.h>
+
+@class WebPluginController;
+
+@interface WebPluginDocumentView : NSView <WebDocumentView, WebDocumentRepresentation>
+{
+    WebPluginController *pluginController;
+    BOOL needsLayout;
+}
+
+@end
diff --git a/WebKit/Plugins.subproj/WebPluginDocumentView.m b/WebKit/Plugins.subproj/WebPluginDocumentView.m
new file mode 100644 (file)
index 0000000..317cdb5
--- /dev/null
@@ -0,0 +1,154 @@
+/*     
+    WebPluginDocumentView.m
+    Copyright 2004, Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/WebPluginDocumentView.h>
+
+#import <WebKit/WebAssertions.h>
+#import <WebKit/WebDataSource.h>
+#import <WebKit/WebFrameView.h>
+#import <WebKit/WebNSURLExtras.h>
+#import <WebKit/WebNSViewExtras.h>
+#import <WebKit/WebPluginController.h>
+#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPluginPackage.h>
+#import <WebKit/WebPluginViewFactory.h>
+#import <WebKit/WebView.h>
+
+@implementation WebPluginDocumentView
+
+- initWithFrame:(NSRect)frame
+{
+    [super initWithFrame:frame];
+    [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+    needsLayout = YES;
+    pluginController = [[WebPluginController alloc] initWithDocumentView:self];
+    return self;
+}
+
+- (void)dealloc
+{
+    [pluginController destroyAllPlugins];
+    [pluginController release];
+    [super dealloc];
+}
+
+- (void)drawRect:(NSRect)rect
+{
+    if (needsLayout) {
+        [self layout];
+    }
+    [super drawRect:rect];
+}
+
+- (void)setDataSource:(WebDataSource *)dataSource
+{
+    NSURLResponse *response = [dataSource response];
+    
+    NSString *MIMEType = [response MIMEType];    
+    WebPluginPackage *plugin = (WebPluginPackage *)[[WebPluginDatabase installedPlugins] pluginForMIMEType:MIMEType];
+    ASSERT([plugin isKindOfClass:[WebPluginPackage class]]);
+    
+    NSURL *URL = [response URL];
+    NSString *URLString = [URL _web_originalDataAsString];
+    NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:MIMEType, @"type", URLString, @"src", nil];
+    NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
+        URL,                WebPlugInBaseURLKey,
+        attributes,         WebPlugInAttributesKey,
+        pluginController,   WebPlugInContainerKey,
+        nil];
+    [attributes release];
+    NSView *view = [[plugin viewFactory] plugInViewWithArguments:arguments];
+    [arguments release];
+
+    ASSERT(view != nil);
+
+    [self addSubview:view];
+    [pluginController addPlugin:view];
+    [view setFrame:[self frame]];
+    [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
+}
+
+- (void)dataSourceUpdated:(WebDataSource *)dataSource;
+{
+    
+}
+
+- (void)setNeedsLayout:(BOOL)flag
+{
+    needsLayout = flag;
+}
+
+- (void)layout
+{
+    NSRect superFrame = [[self _web_superviewOfClass:[WebFrameView class]] frame];
+    [self setFrame:NSMakeRect(0, 0, NSWidth(superFrame), NSHeight(superFrame))];
+    needsLayout = NO;    
+}
+
+- (NSWindow *)currentWindow
+{
+    NSWindow *window = [self window];
+    return window != nil ? window : [[self _webView] hostWindow];
+}
+
+- (void)viewWillMoveToWindow:(NSWindow *)window
+{
+    if ([[self _webView] hostWindow] == nil) {
+        [pluginController stopAllPlugins];
+    }
+}
+
+- (void)viewDidMoveToWindow
+{
+    if ([self currentWindow] != nil) {
+        [pluginController startAllPlugins];
+    }
+}
+
+- (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow
+{
+    if ([self window] == nil) {
+        [pluginController stopAllPlugins];
+    }
+}
+
+- (void)viewDidMoveToHostWindow
+{
+    if ([self currentWindow] != nil) {
+        [pluginController startAllPlugins];
+    }    
+}
+
+- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource
+{
+    
+}
+
+- (void)receivedError:(NSError *)error withDataSource:(WebDataSource *)dataSource
+{
+    
+}
+
+- (void)finishedLoadingWithDataSource:(WebDataSource *)dataSource
+{
+    
+}
+
+- (BOOL)canProvideDocumentSource
+{
+    return NO;
+}
+
+- (NSString *)documentSource
+{
+    return nil;
+}
+
+- (NSString *)title
+{
+    return nil;
+}
+
+@end
index ab880be1d7df13cfc4abcff5e598402ed4c7f962..c114b22e9576d0af4f4becbf1ee60feaf306ea9f 100644 (file)
@@ -5,8 +5,10 @@
 
 #import "npapi.h"
 
+#import <WebKit/WebBaseNetscapePluginViewPrivate.h>
 #import <WebKit/WebKitLogging.h>
-#import "WebBaseNetscapePluginViewPrivate.h"
+
+#import <JavaScriptCore/npruntime_impl.h>
 
 WebBaseNetscapePluginView *pluginViewForInstance(NPP instance);
 
@@ -139,3 +141,104 @@ void* NPN_GetJavaPeer(NPP instance)
     return NULL;
 }
 
+void NPN_ReleaseVariantValue(NPVariant *variant)
+{
+    _NPN_ReleaseVariantValue(variant);
+}
+
+NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
+{
+    return _NPN_GetStringIdentifier(name);
+}
+
+void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
+{
+    _NPN_GetStringIdentifiers(names, nameCount, identifiers);
+}
+
+NPIdentifier NPN_GetIntIdentifier(int32_t intid)
+{
+    return _NPN_GetIntIdentifier(intid);
+}
+
+bool NPN_IdentifierIsString(NPIdentifier identifier)
+{
+    return _NPN_IdentifierIsString(identifier);
+}
+
+NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
+{
+    return _NPN_UTF8FromIdentifier(identifier);
+}
+
+int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
+{
+    return _NPN_IntFromIdentifier(identifier);
+}
+
+NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
+{
+    return _NPN_CreateObject(npp, aClass);
+}
+
+NPObject *NPN_RetainObject(NPObject *obj)
+{
+    return _NPN_RetainObject(obj);
+}
+
+void NPN_ReleaseObject(NPObject *obj)
+{
+    _NPN_ReleaseObject(obj);
+}
+
+bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result)
+{
+    return _NPN_Invoke(npp, npobj, methodName, args, argCount, result);
+}
+
+bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
+{
+    return _NPN_InvokeDefault(npp, npobj, args, argCount, result);
+}
+
+bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result)
+{
+    return _NPN_Evaluate(npp, npobj, script, result);
+}
+
+bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result)
+{
+    return _NPN_GetProperty(npp, npobj,  propertyName, result);
+}
+
+bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value)
+{
+    return _NPN_SetProperty(npp, npobj, propertyName, value);
+}
+
+bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName)
+{
+    return _NPN_RemoveProperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName)
+{
+    return _NPN_HasProperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName)
+{
+    return _NPN_HasMethod(npp, npobj, methodName);
+}
+
+void NPN_SetException(NPObject *obj, NPString *message)
+{
+    _NPN_SetException(obj, message);
+}
+
+bool NPN_Call(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
+
+bool NPN_Call(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result)
+{
+    return _NPN_Invoke(npp, npobj, methodName, args, argCount, result);
+}
index c07ed965f1ce89062478defb58b879184ea28467..0b780cadd833ad2fab6a93e1d475de09ef748339 100644 (file)
@@ -36,6 +36,7 @@
 #import <WebKit/WebPlugin.h>
 #import <WebKit/WebPluginController.h>
 #import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPluginDocumentView.h>
 #import <WebKit/WebPluginPackage.h>
 #import <WebKit/WebPluginViewFactory.h>
 #import <WebKit/WebNetscapePluginDocumentView.h>
@@ -1018,8 +1019,8 @@ static BOOL loggedObjectCacheSize = NO;
     // If we're a supported type other than a plugin, we want to make a frame.
     // Ultimately we should just use frames for all mime types (plugins and HTML/XML/text documents),
     // but for now we're burdened with making a distinction between the two.
-    return !([viewClass isSubclassOfClass:[WebNetscapePluginDocumentView class]] ||
-             [viewClass respondsToSelector:@selector(webPlugInInitialize)] || [viewClass respondsToSelector:@selector(pluginInitialize)] );
+    return !([viewClass isSubclassOfClass:[WebNetscapePluginDocumentView class]] || 
+             [viewClass isSubclassOfClass:[WebPluginDocumentView class]]);
 }
 
 - (void)loadEmptyDocumentSynchronously
index b7ced213b6685c8f8a2c3ca62fc467df847a46b4..e2b2bc5a29f6e318c0c366cab937764a709636fc 100644 (file)
@@ -14,6 +14,7 @@
 #import <WebKit/WebControllerSets.h>
 #import <WebKit/WebHTMLViewPrivate.h>
 #import <WebKit/WebLocalizableStrings.h>
+#import <WebKit/WebNSViewExtras.h>
 #import <WebKit/WebPluginDatabase.h>
 
 @interface NSMenu (WebViewFactoryAdditions)
index da4ce895869da4a7452e41ee9ea4504d4c08da46..b635fbfacce2e1c88f84b63a966af5789b2cb7ec 100644 (file)
@@ -94,3 +94,24 @@ _HIWebViewCreate
 _WebConvertNSImageToCGImageRef
 _WebInitForCarbon
 
+## FIXME: These symbols are here so that the QT plug-in can use them. They should not be using them directly.
+_NPN_ReleaseVariantValue
+_NPN_GetStringIdentifier
+_NPN_GetStringIdentifiers
+_NPN_GetIntIdentifier
+_NPN_IdentifierIsString
+_NPN_UTF8FromIdentifier
+_NPN_IntFromIdentifier
+_NPN_CreateObject
+_NPN_RetainObject
+_NPN_ReleaseObject
+_NPN_Invoke
+_NPN_InvokeDefault
+_NPN_Evaluate
+_NPN_GetProperty
+_NPN_SetProperty
+_NPN_RemoveProperty
+_NPN_HasProperty
+_NPN_HasMethod
+_NPN_SetException
+_NPN_Call
index bcb86714dcc677f10aef0f6f7e3d75e5a6892d8c..1c6f1a3f1903524749db6871e7d2c2680a73f02f 100644 (file)
                                EDE850CE06ECC79E005FAB05,
                                51C6513806EFCD9300969825,
                                9305892B070868B300E79D96,
+                               832D7E050709D8FB00F49B61,
                        );
                        isa = PBXHeadersBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                                83634A7306DA5ECD0026E290,
                                93B641FB06E292BC0055F610,
                                51C6513906EFCD9300969825,
+                               832D7E060709D8FB00F49B61,
                        );
                        isa = PBXSourcesBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                                );
                        };
                };
+               832D7E030709D8FB00F49B61 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = WebPluginDocumentView.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               832D7E040709D8FB00F49B61 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = WebPluginDocumentView.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               832D7E050709D8FB00F49B61 = {
+                       fileRef = 832D7E030709D8FB00F49B61;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               832D7E060709D8FB00F49B61 = {
+                       fileRef = 832D7E040709D8FB00F49B61;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
                833987810543012D00EE146E = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                                848DFF850365FE6A00CA2ACA,
                                8467275C0367158500CA2ACA,
                                8467275D0367158500CA2ACA,
+                               832D7E030709D8FB00F49B61,
+                               832D7E040709D8FB00F49B61,
                                83E4AF4B036659440000E506,
                                83E4AF4C036659440000E506,
                                848DFF860365FE6A00CA2ACA,
                        isa = PBXGroup;
                        name = "WebCore Support";
                        path = WebCoreSupport.subproj;
-                       refType = 4;
-                       sourceTree = "<group>";
+                       refType = 2;
+                       sourceTree = SOURCE_ROOT;
                };
                F5B36B410281DF55018635CB = {
                        fileEncoding = 4;
index 1ce0d28231b9a7e7b486a675e434933fc5f6f242..4a206ba09ed32b5d211b047a9a6a607f85210a28 100644 (file)
@@ -8,6 +8,7 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebNSViewExtras.h>
 
 @interface WebKitDOMTreeCopier : NSObject <WebCoreDOMTreeCopier>
 @end
index 1c7ae04b7d4fec51aecaa9280bdb93837622591c..36d539d7ec1a7151d2a350f0ec2073263dbae863 100644 (file)
@@ -32,4 +32,3 @@
 - (NSArray *)pasteboardTypesForSelection;
 - (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
 @end
-
index 80fb881a8496d86db1f2c5b9d253edad94cc97ea..69a88d62494d0ab26141397bd97d53daf2aff798 100644 (file)
@@ -460,30 +460,6 @@ static BOOL forceRealHitTest = NO;
     [WebImageRenderer stopAnimationsInView:self];
 }
 
-- (WebView *)_webView
-{
-    // We used to use the view hierarchy exclusively here, but that won't work
-    // right when the first viewDidMoveToSuperview call is done, and this wil.
-    return [[self _frame] webView];
-}
-
-- (WebFrame *)_frame
-{
-    WebFrameView *webFrameView = [self _web_parentWebFrameView];
-    return [webFrameView webFrame];
-}
-
-// Required so view can access the part's selection.
-- (WebBridge *)_bridge
-{
-    return [[self _frame] _bridge];
-}
-
-- (WebDataSource *)_dataSource
-{
-    return [[self _frame] dataSource];
-}
-
 + (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent
 {
     NSEvent *fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
@@ -1375,7 +1351,7 @@ static WebHTMLView *lastHitView = nil;
     
     _private = [[WebHTMLViewPrivate alloc] init];
 
-    _private->pluginController = [[WebPluginController alloc] initWithHTMLView:self];
+    _private->pluginController = [[WebPluginController alloc] initWithDocumentView:self];
     _private->needsLayout = YES;
 
     return self;
index ae502a169eee66d2d9b537e332c1b70908c0cb22..b8c129c9fddd86288ab7e56748a1c74ead905def 100644 (file)
 @interface WebHTMLView (WebPrivate)
 
 - (void)_reset;
-- (WebView *)_webView;
-- (WebFrame *)_frame;
-- (WebBridge *)_bridge;
-- (WebDataSource *)_dataSource;
 
 // Modifier (flagsChanged) tracking SPI
 + (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
index b78504b56bd5c6ed348536c51ffd3be17de84679..e4f3bca697456b6ad24181b9869e4fe3e9cd6a2a 100644 (file)
@@ -1,6 +1,6 @@
 /*     
     WebImageRepresentation.h
-       Copyright 2002, Apple, Inc. All rights reserved.
+    Copyright 2002, Apple, Inc. All rights reserved.
 */
 
 #import <Cocoa/Cocoa.h>
index 220444a90452d6c6485c7538ee1350402778da69..17481348aff0e0bc98178a6708dc7fec18a0168d 100644 (file)
@@ -11,6 +11,7 @@
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebNSViewExtras.h>
 
 @interface WebKitRenderTreeCopier : NSObject <WebCoreRenderTreeCopier>
 @end
index cd9776210f6a02c835ea8efb6800b59f83a6be56..2435e4e9107de97bfa34b2a419d90c8d1a9a086d 100644 (file)
@@ -220,8 +220,8 @@ NSString *_WebMainFrameURLKey =         @"mainFrameURL";
     }
     
     // Load the plug-in DB allowing plug-ins to install types.
-    [[WebPluginDatabase installedPlugins] loadPluginIfNeededForMIMEType:MIMEType];
-    
+    [WebPluginDatabase installedPlugins];
+        
     // Load the image types and get the view class and rep class. This should be the fullest picture of all handled types.
     viewClass = [[WebFrameView _viewTypesAllowImageTypeOmission:NO] _web_objectForMIMEType:MIMEType];
     repClass = [[WebDataSource _repTypesAllowImageTypeOmission:NO] _web_objectForMIMEType:MIMEType];