-
rdar://problem/7254127mitz@apple.com authored
plug-ins are disabled Reviewed by Anders Carlsson. Ensure that the shared WebPluginDatabase is not instantiated if no WebViews are used that have plug-ins enabled. * DefaultDelegates/WebDefaultPolicyDelegate.m: (-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): Call -[WebView _canShowMIMEType:] on the WebView instead of calling the class method. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::canShowMIMEType): Ditto. (WebFrameLoaderClient::transitionToCommittedForNewPage): Call -[WebFrameView _viewClassForMIMEType:] on the WebView instead of calling the class method. (WebFrameLoaderClient::objectContentType): Ditto. * WebView/WebDataSource.mm: (+[WebDataSource _representationClassForMIMEType:allowingPlugins:]): Added the allowPlugins parameter, which is passed through to +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]. (-[WebDataSource _makeRepresentation]): Pass an allowPlugins value based on the WebView’s preferences. * WebView/WebFrameView.mm: (-[WebFrameView _makeDocumentViewForDataSource:]): Call -[WebFrameView _viewClassForMIMEType:] instead of calling the class method. (+[WebFrameView _viewClassForMIMEType:allowingPlugins:]): Added the allowPlugins parameter, which is passed through to +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]. (-[WebFrameView _viewClassForMIMEType:]): Added. Passes an allowPlugins value based on the WebView’s preferences. * WebView/WebFrameViewInternal.h: * WebView/WebView.mm: (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]): Added the allowPlugins parameter. If false, skip the instantiation of the shared WebPluginDatabase. (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Pass an allowPlugins value based on the WebView’s preferences. (+[WebView _canShowMIMEType:allowingPlugins:]): Passes allowPlugins to +_viewClass:andRepresentationClass:forMIMEType:allowingPlugins:. (+[WebView canShowMIMEType:]): Changed to pass YES to +_canShowMIMEType:allowingPlugins:. (-[WebView _canShowMIMEType:]): Added. Passes an allowPlugins value based on the WebView’s preferences. (-[WebView _pluginForMIMEType:]): Return nil if plug-ins are disabled. (-[WebView _pluginForExtension:]): Ditto. (-[WebView _isMIMETypeRegisteredAsPlugin:]): Return NO if plug-ins are disabled. * WebView/WebViewInternal.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
419c3693