Reviewed by Anders.
- added some SPI indirections to support the following in WebKit/Loader:
- pull more WebDataSource code into WebFrameLoader
- make WebMainResourceLoader not depend on WebKit or on SPI
* WebCore.exp:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
WebKit:
Reviewed by Anders.
- pull more WebDataSource code into WebFrameLoader
- make WebMainResourceLoader not depend on WebKit or on SPI
* Loader/WebFrameLoader.h:
* Loader/WebFrameLoader.m:
(-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
(-[WebFrameLoader _updateIconDatabaseWithURL:]):
(-[WebFrameLoader _notifyIconChanged:]):
(-[WebFrameLoader _iconLoaderReceivedPageIcon:]):
(-[WebFrameLoader _checkNavigationPolicyForRequest:andCall:withSelector:]):
(-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
(-[WebFrameLoader cancelContentPolicy]):
* Loader/WebIconLoader.m:
(-[WebIconLoader didFinishLoading]):
* Loader/WebLoader.m:
(-[NSURLProtocol loadWithRequest:]):
(-[NSURLProtocol setDefersCallbacks:]):
* Loader/WebMainResourceLoader.h:
* Loader/WebMainResourceLoader.m:
(-[WebMainResourceLoader initWithFrameLoader:]):
(-[WebMainResourceLoader dealloc]):
(-[WebMainResourceLoader cancelWithError:]):
(-[WebMainResourceLoader continueAfterNavigationPolicy:formState:]):
(-[WebMainResourceLoader willSendRequest:redirectResponse:]):
(-[WebMainResourceLoader continueAfterContentPolicy:]):
(-[WebMainResourceLoader checkContentPolicy]):
(-[WebMainResourceLoader didReceiveResponse:]):
* Plugins/WebPluginContainerCheck.m:
* WebCoreSupport/WebSystemInterface.m:
(InitWebCoreSystemInterface):
* WebView/WebDataSource.m:
(-[WebDataSource _loadIcon]):
(-[WebDataSource _cancelledError]):
(+[WebDataSource _repTypesAllowImageTypeOmission:]):
(+[WebDataSource _representationClassForMIMEType:]):
(-[WebDataSource _commitLoadWithData:]):
(-[WebDataSource _isDocumentHTML]):
* WebView/WebDataSourceInternal.h:
* WebView/WebFramePrivate.h:
* WebView/WebPolicyDelegate.m:
* WebView/WebPolicyDelegatePrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15976
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-22 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ - added some SPI indirections to support the following in WebKit/Loader:
+ - pull more WebDataSource code into WebFrameLoader
+ - make WebMainResourceLoader not depend on WebKit or on SPI
+
+ * WebCore.exp:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+
2006-08-22 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
_wkClearGlyphVector
_wkConvertCharToGlyphs
_wkCreateCustomCFReadStream
+_wkCreateNSURLConnectionDelegateProxy
_wkDrawBezeledTextArea
_wkDrawBezeledTextFieldCell
_wkDrawFocusRing
_wkReleaseStyleGroup
_wkSetCGFontRenderingMode
_wkSetDragImage
+_wkSetNSURLConnectionDefersCallbacks
_wkSetPatternPhaseInUserSpace
_wkSetUpFontCache
_wkSignalCFReadStreamEnd
FAE04190097596C9000540BE /* SVGImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE0418E097596C9000540BE /* SVGImageLoader.h */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildStyle section */
- BCD318860A92909400BF1D5F /* Development */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- };
- name = Development;
- };
- BCD318870A92909400BF1D5F /* Deployment */ = {
- isa = PBXBuildStyle;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- };
- name = Deployment;
- };
-/* End PBXBuildStyle section */
-
/* Begin PBXContainerItemProxy section */
DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
- buildSettings = {
- };
- buildStyles = (
- BCD318860A92909400BF1D5F /* Development */,
- BCD318870A92909400BF1D5F /* Deployment */,
- );
hasScannedForEncodings = 1;
knownRegions = (
English,
class NSMenu;
class NSString;
class NSView;
+class NSURLConnection;
#endif
#ifdef __cplusplus
void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void *context);
+extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
+extern id (*wkCreateNSURLConnectionDelegateProxy)(void);
#ifdef __cplusplus
}
void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void *context);
+void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
+id (*wkCreateNSURLConnectionDelegateProxy)(void);
+2006-08-22 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ - pull more WebDataSource code into WebFrameLoader
+ - make WebMainResourceLoader not depend on WebKit or on SPI
+
+ * Loader/WebFrameLoader.h:
+ * Loader/WebFrameLoader.m:
+ (-[WebFrameLoader _downloadWithLoadingConnection:request:response:proxy:]):
+ (-[WebFrameLoader _updateIconDatabaseWithURL:]):
+ (-[WebFrameLoader _notifyIconChanged:]):
+ (-[WebFrameLoader _iconLoaderReceivedPageIcon:]):
+ (-[WebFrameLoader _checkNavigationPolicyForRequest:andCall:withSelector:]):
+ (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
+ (-[WebFrameLoader cancelContentPolicy]):
+ * Loader/WebIconLoader.m:
+ (-[WebIconLoader didFinishLoading]):
+ * Loader/WebLoader.m:
+ (-[NSURLProtocol loadWithRequest:]):
+ (-[NSURLProtocol setDefersCallbacks:]):
+ * Loader/WebMainResourceLoader.h:
+ * Loader/WebMainResourceLoader.m:
+ (-[WebMainResourceLoader initWithFrameLoader:]):
+ (-[WebMainResourceLoader dealloc]):
+ (-[WebMainResourceLoader cancelWithError:]):
+ (-[WebMainResourceLoader continueAfterNavigationPolicy:formState:]):
+ (-[WebMainResourceLoader willSendRequest:redirectResponse:]):
+ (-[WebMainResourceLoader continueAfterContentPolicy:]):
+ (-[WebMainResourceLoader checkContentPolicy]):
+ (-[WebMainResourceLoader didReceiveResponse:]):
+ * Plugins/WebPluginContainerCheck.m:
+ * WebCoreSupport/WebSystemInterface.m:
+ (InitWebCoreSystemInterface):
+ * WebView/WebDataSource.m:
+ (-[WebDataSource _loadIcon]):
+ (-[WebDataSource _cancelledError]):
+ (+[WebDataSource _repTypesAllowImageTypeOmission:]):
+ (+[WebDataSource _representationClassForMIMEType:]):
+ (-[WebDataSource _commitLoadWithData:]):
+ (-[WebDataSource _isDocumentHTML]):
+ * WebView/WebDataSourceInternal.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebPolicyDelegate.m:
+ * WebView/WebPolicyDelegatePrivate.h:
+
2006-08-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady.
*/
#import <Cocoa/Cocoa.h>
-#import <WebKit/WebFramePrivate.h>
-#import <WebKitSystemInterface.h>
@class WebDataSource;
@class WebMainResourceLoader;
@class WebIconLoader;
@class WebLoader;
@class WebResource;
+@class WebFrame;
+@class WebPolicyDecisionListener;
+
+typedef enum {
+ WebFrameStateProvisional,
+
+ // This state indicates we are ready to commit to a page,
+ // which means the view will transition to use the new data source.
+ WebFrameStateCommittedPage,
+
+ WebFrameStateComplete
+} WebFrameState;
+
+typedef enum {
+ WebPolicyUse,
+ WebPolicyDownload,
+ WebPolicyIgnore,
+} WebPolicyAction;
@interface WebFrameLoader : NSObject
{
WebDataSource *provisionalDataSource;
WebFrameState state;
+ WebPolicyDecisionListener *listener;
+
NSMutableDictionary *pendingArchivedResources;
}
- (NSURLRequest *)initialRequest;
- (void)_receivedData:(NSData *)data;
- (void)_setRequest:(NSURLRequest *)request;
-- (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(WKNSURLConnectionDelegateProxyPtr)proxy;
+- (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(id)proxy;
- (void)_handleFallbackContent;
- (BOOL)_isStopping;
-- (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener;
- (void)_setupForReplaceByMIMEType:(NSString *)newMIMEType;
- (void)_setResponse:(NSURLResponse *)response;
- (void)_mainReceivedError:(NSError *)error complete:(BOOL)isComplete;
- (void)_finishedLoading;
-- (void)_iconLoaderReceivedPageIcon:(WebIconLoader *)iconLoader;
+- (void)_iconLoaderReceivedPageIcon:(NSURL *)iconURL;
- (NSURL *)_URL;
- (NSError *)cancelledErrorWithRequest:(NSURLRequest *)request;
+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
-
+- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL;
+- (void)_notifyIconChanged:(NSURL *)iconURL;
+- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)newRequest andCall:(id)obj withSelector:(SEL)sel;
+- (void)_checkContentPolicyForMIMEType:(NSString *)MIMEType andCall:(id)obj withSelector:(SEL)sel;
+- (void)cancelContentPolicy;
+
@end
#import <WebKit/DOMHTML.h>
#import <WebKit/WebFrameBridge.h>
#import <WebKit/WebPreferences.h>
+#import <WebKit/WebIconDatabasePrivate.h>
+#import <WebKit/WebNSURLExtras.h>
+#import <WebKit/WebFrameLoadDelegate.h>
+
@implementation WebFrameLoader
[[self activeDataSource] _setRequest:request];
}
-- (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(WKNSURLConnectionDelegateProxyPtr)proxy
+- (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(id)proxy
{
[[self activeDataSource] _downloadWithLoadingConnection:connection request:request response:r proxy:proxy];
}
return [[self activeDataSource] _isStopping];
}
-- (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener
-{
- [[self activeDataSource] _decidePolicyForMIMEType:MIMEType decisionListener:listener];
-}
-
- (void)_setupForReplaceByMIMEType:(NSString *)newMIMEType
{
[[self activeDataSource] _setupForReplaceByMIMEType:newMIMEType];
[self release];
}
-- (void)_iconLoaderReceivedPageIcon:(WebIconLoader *)iLoader
+- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
+{
+ ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
+
+ WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
+
+ // Bind the URL of the original request and the final URL to the icon URL.
+ [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[[self activeDataSource] _URL] _web_originalDataAsString]];
+ [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[[[self activeDataSource] _originalRequest] URL] _web_originalDataAsString]];
+}
+
+- (void)_notifyIconChanged:(NSURL *)iconURL
+{
+ ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
+ ASSERT(webFrame == [[webFrame webView] mainFrame]);
+
+ [[webFrame webView] _willChangeValueForKey:_WebMainFrameIconKey];
+
+ NSImage *icon = [[WebIconDatabase sharedIconDatabase] iconForURL:[[[self activeDataSource] _URL] _web_originalDataAsString] withSize:WebIconSmallSize];
+
+ [[[webFrame webView] _frameLoadDelegateForwarder] webView:[webFrame webView]
+ didReceiveIcon:icon
+ forFrame:webFrame];
+
+ [[webFrame webView] _didChangeValueForKey:_WebMainFrameIconKey];
+}
+
+- (void)_iconLoaderReceivedPageIcon:(NSURL *)iconURL
{
- ASSERT(iLoader == iconLoader);
- [[self activeDataSource] _iconLoaderReceivedPageIcon:iLoader];
+ [self _updateIconDatabaseWithURL:iconURL];
+ [self _notifyIconChanged:iconURL];
}
- (NSURL *)_URL
return [WebView _generatedMIMETypeForURLScheme:URLScheme];
}
+- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)newRequest andCall:(id)obj withSelector:(SEL)sel
+{
+ [webFrame _checkNavigationPolicyForRequest:newRequest
+ dataSource:[self activeDataSource]
+ formState:nil
+ andCall:obj
+ withSelector:sel];
+}
+
+- (void)_checkContentPolicyForMIMEType:(NSString *)MIMEType andCall:(id)obj withSelector:(SEL)sel
+{
+ WebPolicyDecisionListener *l = [[WebPolicyDecisionListener alloc] _initWithTarget:obj action:sel];
+ listener = l;
+
+ [l retain];
+ [[self activeDataSource] _decidePolicyForMIMEType:MIMEType decisionListener:l];
+ [l release];
+}
+
+- (void)cancelContentPolicy
+{
+ [listener _invalidate];
+ [listener release];
+ listener = nil;
+}
+
@end
[[WebIconDatabaseBridge sharedBridgeInstance] _setHaveNoIconForIconURL:[[self URL] _web_originalDataAsString]];
LOG(IconDatabase, "NewDB - No icon for URL %@", [[self URL] _web_originalDataAsString]);
}
- [frameLoader _iconLoaderReceivedPageIcon:self];
+ [frameLoader _iconLoaderReceivedPageIcon:[self URL]];
[super didFinishLoading];
#else
NSImage *icon;
[[WebIconDatabase sharedIconDatabase] _setHaveNoIconForIconURL:[[self URL] _web_originalDataAsString]];
}
- [frameLoader _iconLoaderReceivedPageIcon:self];
+ [frameLoader _iconLoaderReceivedPageIcon:[self URL]];
[icon release];
[super didFinishLoading];
#endif
#import <JavaScriptCore/Assertions.h>
#import <WebKit/WebDataProtocol.h>
#import <WebKit/WebFrameLoader.h>
+#import <WebCore/WebCoreSystemInterface.h>
static unsigned inNSURLConnectionCallback;
static BOOL NSURLConnectionSupportsBufferedData;
#ifndef NDEBUG
isInitializingConnection = NO;
#endif
- if (defersCallbacks) {
- WKSetNSURLConnectionDefersCallbacks(connection, YES);
- }
+ if (defersCallbacks)
+ wkSetNSURLConnectionDefersCallbacks(connection, YES);
return YES;
}
- (void)setDefersCallbacks:(BOOL)defers
{
defersCallbacks = defers;
- WKSetNSURLConnectionDefersCallbacks(connection, defers);
+ wkSetNSURLConnectionDefersCallbacks(connection, defers);
// Deliver the resource after a delay because callers don't expect to receive callbacks while calling this method.
}
#import <Foundation/Foundation.h>
#import <WebKit/WebLoader.h>
-#import <WebKitSystemInterface.h>
-
-@class WebPolicyDecisionListener;
@interface WebMainResourceLoader : WebLoader
{
int _contentLength; // for logging only
int _bytesReceived; // for logging only
- WebPolicyDecisionListener *listener;
- NSURLResponse *policyResponse;
- WKNSURLConnectionDelegateProxyPtr proxy;
+ NSURLResponse *_response;
+ id proxy;
NSURLRequest *_initialRequest;
}
#import <Foundation/NSURLResponse.h>
#import <JavaScriptCore/Assertions.h>
+#import <WebCore/WebCoreSystemInterface.h>
#import <WebKit/WebDataProtocol.h>
#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebFrameLoader.h>
if (self) {
[self setFrameLoader:fl];
- proxy = WKCreateNSURLConnectionDelegateProxy();
+ proxy = wkCreateNSURLConnectionDelegateProxy();
[proxy setDelegate:self];
}
{
[_initialRequest release];
+ [_response release];
[proxy setDelegate:nil];
[proxy release];
[self release];
}
-- (void)cancelContentPolicy
-{
- [listener _invalidate];
- [listener release];
- listener = nil;
- [policyResponse release];
- policyResponse = nil;
-}
-
-(void)cancelWithError:(NSError *)error
{
// Calling _receivedMainResourceError will likely result in a call to release, so we must retain.
[self retain];
- [self cancelContentPolicy];
+ [frameLoader cancelContentPolicy];
[frameLoader retain];
[frameLoader _receivedMainResourceError:error complete:YES];
[frameLoader release];
[self release];
}
--(void)continueAfterNavigationPolicy:(NSURLRequest *)_request formState:(WebFormState *)state
+-(void)continueAfterNavigationPolicy:(NSURLRequest *)_request formState:(id)state
{
- if (!_request) {
+ if (!_request)
[self stopLoadingForPolicyChange];
- }
}
- (BOOL)_isPostOrRedirectAfterPost:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
// when the main load was started.
[frameLoader _setRequest:newRequest];
- [[frameLoader webFrame] _checkNavigationPolicyForRequest:newRequest
- dataSource:[frameLoader activeDataSource]
- formState:nil
- andCall:self
- withSelector:@selector(continueAfterNavigationPolicy:formState:)];
+ [frameLoader _checkNavigationPolicyForRequest:newRequest andCall:self withSelector:@selector(continueAfterNavigationPolicy:formState:)];
[self release];
return newRequest;
-(void)continueAfterContentPolicy:(WebPolicyAction)policy
{
- NSURLResponse *r = [policyResponse retain];
BOOL isStopping = [frameLoader _isStopping];
- [self cancelContentPolicy];
+ [frameLoader cancelContentPolicy];
if (!isStopping)
- [self continueAfterContentPolicy:policy response:r];
-
- [r release];
+ [self continueAfterContentPolicy:policy response:_response];
}
--(void)checkContentPolicyForResponse:(NSURLResponse *)r
+-(void)checkContentPolicy
{
- WebPolicyDecisionListener *l = [[WebPolicyDecisionListener alloc]
- _initWithTarget:self action:@selector(continueAfterContentPolicy:)];
- listener = l;
- policyResponse = [r retain];
-
- [l retain];
- [frameLoader _decidePolicyForMIMEType:[r MIMEType] decisionListener:listener];
- [l release];
+ [frameLoader _checkContentPolicyForMIMEType:[_response MIMEType] andCall:self withSelector:@selector(continueAfterContentPolicy:)];
}
-
- (void)didReceiveResponse:(NSURLResponse *)r
{
ASSERT(shouldLoadAsEmptyDocument([r URL]) || ![self defersCallbacks]);
[frameLoader _setResponse:r];
_contentLength = [r expectedContentLength];
- [self checkContentPolicyForResponse:r];
+ _response = [r retain];
+ [self checkContentPolicy];
[self release];
}
#import <WebKit/WebPolicyDelegatePrivate.h>
#import <WebKit/WebView.h>
#import <WebKit/WebViewInternal.h>
+#import <WebKit/WebFrameLoader.h>
#import <objc/objc-runtime.h>
@implementation WebPluginContainerCheck
INIT(SignalCFReadStreamHasBytes);
INIT(SignalCFReadStreamError);
INIT(CreateCustomCFReadStream);
-
+ INIT(SetNSURLConnectionDefersCallbacks);
+ INIT(CreateNSURLConnectionDelegateProxy);
+
didInit = true;
}
_private->resourceData = data;
}
-- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
-{
- // MOVABLE
- ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
-
- WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
-
- // Bind the URL of the original request and the final URL to the icon URL.
- [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[self _URL] _web_originalDataAsString]];
- [iconDB _setIconURL:[iconURL _web_originalDataAsString] forURL:[[[self _originalRequest] URL] _web_originalDataAsString]];
-}
-
-- (void)_notifyIconChanged:(NSURL *)iconURL
-{
- ASSERT([[WebIconDatabase sharedIconDatabase] _isEnabled]);
-
- if ([self webFrame] == [[self _webView] mainFrame])
- [[self _webView] _willChangeValueForKey:_WebMainFrameIconKey];
-
- NSImage *icon = [[WebIconDatabase sharedIconDatabase] iconForURL:[[self _URL] _web_originalDataAsString] withSize:WebIconSmallSize];
-
- [[[self _webView] _frameLoadDelegateForwarder] webView:[self _webView]
- didReceiveIcon:icon
- forFrame:[self webFrame]];
-
- if ([self webFrame] == [[self _webView] mainFrame])
- [[self _webView] _didChangeValueForKey:_WebMainFrameIconKey];
-}
-
- (void)_loadIcon
{
// Don't load an icon if 1) this is not the main frame 2) we ended in error
// If so, kick off a reload of the icon
// If we don't have the icon already, kick off the initial load
if ([[WebIconDatabase sharedIconDatabase] _hasEntryForIconURL:[_private->iconURL _web_originalDataAsString]]) {
- [self _updateIconDatabaseWithURL:_private->iconURL];
+ [[_private->webFrame _frameLoader] _updateIconDatabaseWithURL:_private->iconURL];
if ([[self webFrame] _loadType] == WebFrameLoadTypeReload || [[WebIconDatabase sharedIconDatabase] isIconExpiredForIconURL:[_private->iconURL _web_originalDataAsString]])
[[WebIconDatabase sharedIconDatabase] loadIconFromURL:[_private->iconURL _web_originalDataAsString]];
else
- [self _notifyIconChanged:_private->iconURL];
+ [[_private->webFrame _frameLoader] _notifyIconChanged:_private->iconURL];
} else {
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:_private->iconURL];
[[self webFrame] _addExtraFieldsToRequest:request mainResource:YES alwaysFromRequest:NO];
- (NSError *)_cancelledError
{
- // MOVABLE
return [NSError _webKitErrorWithDomain:NSURLErrorDomain
code:NSURLErrorCancelled
URL:[self _URL]];
+ (NSMutableDictionary *)_repTypesAllowImageTypeOmission:(BOOL)allowImageTypeOmission
{
- // MOVABLE
static NSMutableDictionary *repTypes = nil;
static BOOL addedImageTypes = NO;
+ (Class)_representationClassForMIMEType:(NSString *)MIMEType
{
- // MOVABLE
Class repClass;
return [WebView _viewClass:nil andRepresentationClass:&repClass forMIMEType:MIMEType] ? repClass : nil;
}
- (void)_commitLoadWithData:(NSData *)data
{
- // MOVABLE
// Both unloading the old page and parsing the new page may execute JavaScript which destroys the datasource
// by starting a new load, so retain temporarily.
[self retain];
[self _mainReceivedError:error complete:isComplete];
}
-- (void)_iconLoaderReceivedPageIcon:(WebIconLoader *)iconLoader
-{
- // MOVABLE
- [self _updateIconDatabaseWithURL:_private->iconURL];
- [self _notifyIconChanged:_private->iconURL];
-}
-
- (void)_setIconURL:(NSURL *)URL
{
// Lower priority than typed icon, so ignore this if we already have an iconURL.
- (BOOL)_isDocumentHTML
{
- // MOVABLE
NSString *MIMEType = [[self response] MIMEType];
return [WebView canShowMIMETypeAsHTML:MIMEType];
}
@class WebLoader;
@class WebFrameBridge;
@class WebHistoryItem;
-@class WebIconLoader;
@class WebMainResourceLoader;
@class WebPolicyDecisionListener;
@class WebResource;
@class WebScriptDebugger;
@class WebView;
-typedef enum {
- WebFrameStateProvisional,
-
- // This state indicates we are ready to commit to a page,
- // which means the view will transition to use the new data source.
- WebFrameStateCommittedPage,
-
- WebFrameStateComplete
-} WebFrameState;
-
typedef enum {
WebFrameLoadTypeStandard,
WebFrameLoadTypeBack,
*/
#import "WebPolicyDelegatePrivate.h"
+#import "WebFrameLoader.h"
#import <objc/objc-runtime.h>
WebNavigationTypePlugInRequest = WebNavigationTypeOther + 1
} WebExtraNavigationType;
-typedef enum {
- WebPolicyUse,
- WebPolicyDownload,
- WebPolicyIgnore,
-} WebPolicyAction;
-
@class WebPolicyDecisionListenerPrivate;
@interface WebPolicyDecisionListener : NSObject <WebPolicyDecisionListener, WebFormSubmissionListener>