Commit 065a97f9 authored by mjs's avatar mjs
Browse files

WebKit:

	Pass mime type instead of full response to content policy delegate
	method, in preparation for merging it with the file URL policy.

        * WebView.subproj/WebControllerPolicyDelegate.h:
        * WebView.subproj/WebDefaultPolicyDelegate.m:
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient handle:didReceiveResponse:]):

WebBrowser:

	Pass mime type instead of full response to content policy delegate
	method, in preparation for merging it with the file URL policy.

        * BrowserWebController.m:
        (-[BrowserWebController contentPolicyForMIMEType:andRequest:inFrame:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f44c6e70
2002-11-13 Maciej Stachowiak <mjs@apple.com>
Pass mime type instead of full response to content policy delegate
method, in preparation for merging it with the file URL policy.
* WebView.subproj/WebControllerPolicyDelegate.h:
* WebView.subproj/WebDefaultPolicyDelegate.m:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient handle:didReceiveResponse:]):
2002-11-13 Darin Adler <darin@apple.com>
 
- fixed 3083982 -- Logging into AOL gives null view
......
2002-11-13 Maciej Stachowiak <mjs@apple.com>
Pass mime type instead of full response to content policy delegate
method, in preparation for merging it with the file URL policy.
* WebView.subproj/WebControllerPolicyDelegate.h:
* WebView.subproj/WebDefaultPolicyDelegate.m:
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient handle:didReceiveResponse:]):
2002-11-13 Darin Adler <darin@apple.com>
 
- fixed 3083982 -- Logging into AOL gives null view
......
......@@ -93,8 +93,7 @@ typedef enum {
policies that determine the action of what to do with the URL or the data that
the URL represents. Typically, the policy handler methods are called in this order:
clickPolicyForElement:button:modifierFlags:<BR>
URLPolicyForRequest:inFrame:<BR>
navigationPolicyForAction:andRequest:inFrame:<BR>
fileURLPolicyForMIMEType:andRequest:inFrame:<BR>
contentPolicyForMIMEType:andRequest:inFrame:<BR>
*/
......@@ -127,11 +126,11 @@ typedef enum {
/*!
@method contentPolicyForResponse:andRequest:inFrame:withContentPolicy:
@discussion Returns the policy for content which has been partially loaded. Sent after locationChangeStarted.
@param response The response for the partially loaded content.
@param type MIME type for the file.
@param request A WebResourceRequest for the partially loaded content.
@param frame The frame which is loading the URL.
*/
- (WebContentAction)contentPolicyForResponse:(WebResourceResponse *)response
- (WebContentAction)contentPolicyForMIMEType:(NSString *)type
andRequest:(WebResourceRequest *)request
inFrame:(WebFrame *)frame;
......
......@@ -39,11 +39,11 @@ - (void)unableToImplementPolicy:(WebPolicyAction)policy error:(WebError *)error
}
- (WebPolicyAction)contentPolicyForResponse:(WebResourceResponse *)response
andRequest:(WebResourceRequest *)request
inFrame:(WebFrame *)frame;
- (WebPolicyAction)contentPolicyForMIMEType:(NSString *)type
andRequest:(WebResourceRequest *)request
inFrame:(WebFrame *)frame;
{
if ([WebController canShowMIMEType:[response contentType]]) {
if ([WebController canShowMIMEType:type]) {
return WebContentPolicyShow;
} else {
return WebContentPolicyIgnore;
......
......@@ -143,7 +143,7 @@ -(void)handle:(WebResourceHandle *)h didReceiveResponse:(WebResourceResponse *)r
// Figure out the content policy.
if (![dataSource isDownloading]) {
contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForMIMEType:[r contentType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]];
} else {
......
......@@ -143,7 +143,7 @@ -(void)handle:(WebResourceHandle *)h didReceiveResponse:(WebResourceResponse *)r
// Figure out the content policy.
if (![dataSource isDownloading]) {
contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForResponse:r
contentPolicy = [[[dataSource controller] policyDelegate] contentPolicyForMIMEType:[r contentType]
andRequest:[dataSource request]
inFrame:[dataSource webFrame]];
} else {
......
......@@ -93,8 +93,7 @@ typedef enum {
policies that determine the action of what to do with the URL or the data that
the URL represents. Typically, the policy handler methods are called in this order:
clickPolicyForElement:button:modifierFlags:<BR>
URLPolicyForRequest:inFrame:<BR>
navigationPolicyForAction:andRequest:inFrame:<BR>
fileURLPolicyForMIMEType:andRequest:inFrame:<BR>
contentPolicyForMIMEType:andRequest:inFrame:<BR>
*/
......@@ -127,11 +126,11 @@ typedef enum {
/*!
@method contentPolicyForResponse:andRequest:inFrame:withContentPolicy:
@discussion Returns the policy for content which has been partially loaded. Sent after locationChangeStarted.
@param response The response for the partially loaded content.
@param type MIME type for the file.
@param request A WebResourceRequest for the partially loaded content.
@param frame The frame which is loading the URL.
*/
- (WebContentAction)contentPolicyForResponse:(WebResourceResponse *)response
- (WebContentAction)contentPolicyForMIMEType:(NSString *)type
andRequest:(WebResourceRequest *)request
inFrame:(WebFrame *)frame;
......
Markdown is supported
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