return documentLoader;
}
-- (WebDataSource *)activeDataSource
-{
- return [client _dataSourceForDocumentLoader:[self activeDocumentLoader]];
-}
-
- (void)addPlugInStreamLoader:(WebLoader *)loader
{
if (!plugInStreamLoaders)
[mainResourceLoader cancelWithError:error];
}
-- (WebDataSource *)dataSource
-{
- return [client _dataSourceForDocumentLoader:documentLoader];
-}
-
- (void)setDocumentLoader:(WebDocumentLoader *)loader
{
if (loader == nil && documentLoader == nil)
return documentLoader;
}
-- (WebDataSource *)policyDataSource
-{
- return [client _dataSourceForDocumentLoader:policyDocumentLoader];
-}
-
- (void)setPolicyDocumentLoader:(WebDocumentLoader *)loader
{
if (policyDocumentLoader == loader)
policyDocumentLoader = loader;
}
-- (WebDataSource *)provisionalDataSource
-{
- return [client _dataSourceForDocumentLoader:provisionalDocumentLoader];
-}
-
- (WebDocumentLoader *)provisionalDocumentLoader
{
return provisionalDocumentLoader;
CFAbsoluteTimeGetCurrent() - [[[[[client webView] mainFrame] dataSource] _documentLoader] loadingStartedTime]);
if (newState == WebFrameStateComplete && client == [[client webView] mainFrame])
- LOG(DocumentLoad, "completed %@ (%f seconds)", [[[self dataSource] request] URL], CFAbsoluteTimeGetCurrent() - [[[self dataSource] _documentLoader] loadingStartedTime]);
+ LOG(DocumentLoad, "completed %@ (%f seconds)", [[documentLoader request] URL], CFAbsoluteTimeGetCurrent() - [documentLoader loadingStartedTime]);
state = newState;
if ([self isLoadingMainResource])
return;
-
- [[self provisionalDataSource] _setLoadingFromPageCache:NO];
+
+ [client _clearLoadingFromPageCacheForDocumentLoader:provisionalDocumentLoader];
id identifier = [client _dispatchIdentifierForInitialRequest:[provisionalDocumentLoader originalRequest] fromDocumentLoader:provisionalDocumentLoader];
[provisionalDocumentLoader updateLoading];
}
-- (void)startProvisionalLoad:(WebDataSource *)ds
+- (void)startProvisionalLoad:(WebDocumentLoader *)loader
{
- [self setProvisionalDocumentLoader:[ds _documentLoader]];
+ [self setProvisionalDocumentLoader:loader];
[self setState:WebFrameStateProvisional];
}
- (void)clientRedirectedTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date lockHistory:(BOOL)lockHistory isJavaScriptFormAction:(BOOL)isJavaScriptFormAction
{
- LOG(Redirect, "%@(%p) Client redirect to: %@, [self dataSource] = %p, lockHistory = %d, isJavaScriptFormAction = %d", [client name], self, URL, [self dataSource], (int)lockHistory, (int)isJavaScriptFormAction);
+ LOG(Redirect, "%@(%p) Client redirect to: %@, [self documentLoader] = %p, lockHistory = %d, isJavaScriptFormAction = %d", [client name], self, URL, [self documentLoader], (int)lockHistory, (int)isJavaScriptFormAction);
[client _dispatchWillPerformClientRedirectToURL:URL delay:seconds fireDate:date];
return;
}
- WebDataSource *oldDataSource = [[self dataSource] retain];
+ WebDocumentLoader *oldDocumentLoader = [documentLoader retain];
BOOL sameURL = [client _shouldTreatURLAsSameAsCurrent:URL];
// FIXME: What about load types other than Standard and Reload?
- [[oldDataSource _documentLoader] setTriggeringAction:action];
+ [oldDocumentLoader setTriggeringAction:action];
[self invalidatePendingPolicyDecisionCallingDefaultAction:YES];
[self checkNavigationPolicyForRequest:request
- dataSource:oldDataSource formState:formState
- andCall:self withSelector:@selector(continueFragmentScrollAfterNavigationPolicy:formState:)];
+ documentLoader:oldDocumentLoader formState:formState
+ andCall:self withSelector:@selector(continueFragmentScrollAfterNavigationPolicy:formState:)];
} else {
// must grab this now, since this load may stop the previous load and clear this flag
BOOL isRedirect = quickRedirectComing;
}
[request release];
- [oldDataSource release];
+ [oldDocumentLoader release];
[formState release];
}
// Called after we send an openURL:... down to WebCore.
- (void)opened
{
- if ([self loadType] == FrameLoadTypeStandard && [[[self dataSource] _documentLoader] isClientRedirect])
+ if ([self loadType] == FrameLoadTypeStandard && [documentLoader isClientRedirect])
[client _updateHistoryAfterClientRedirect];
- if ([[self dataSource] _loadingFromPageCache]) {
+ if ([client _isDocumentLoaderLoadingFromPageCache:documentLoader]) {
// Force a layout to update view size and thereby update scrollbars.
[client _forceLayout];
{
bool reload = loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadAllowingStaleData;
- WebDataSource *provisionalDataSource = [[self provisionalDataSource] retain];
- NSURLResponse *response = [provisionalDataSource response];
+ WebDocumentLoader *pdl = [provisionalDocumentLoader retain];
+
+ NSURLResponse *response = [pdl response];
NSDictionary *headers = [response isKindOfClass:[NSHTTPURLResponse class]]
? [(NSHTTPURLResponse *)response allHeaderFields] : nil;
[self closeOldDataSources];
if (!pageCache)
- [provisionalDataSource _makeRepresentation];
+ [client _makeRepresentationForDocumentLoader:pdl];
[self transitionToCommitted:pageCache];
if (sentRedirectNotification)
[self clientRedirectCancelledOrFinished:NO];
- NSURL *baseURL = [[provisionalDataSource request] _webDataRequestBaseURL];
+ NSURL *baseURL = [[provisionalDocumentLoader request] _webDataRequestBaseURL];
NSURL *URL = baseURL ? baseURL : [response URL];
if (!URL || [URL _web_isEmpty])
[self opened];
- [provisionalDataSource release];
+ [pdl release];
}
- (NSURLRequest *)initialRequest
{
- return [[self activeDataSource] initialRequest];
+ return [[self activeDocumentLoader] initialRequest];
}
- (void)_receivedData:(NSData *)data
- (void)_finishedLoading
{
- WebDataSource *ds = [self activeDataSource];
+ WebDocumentLoader *dl = [self activeDocumentLoader];
WebFrameBridge *bridge = [self bridge];
[bridge retain];
- [[self activeDocumentLoader] finishedLoading];
+ [dl finishedLoading];
- if ([ds _mainDocumentError] || ![ds webFrame]) {
+ if ([dl mainDocumentError] || ![dl frameLoader]) {
[bridge release];
return;
}
- [[self activeDocumentLoader] setPrimaryLoadComplete:YES];
- [client _dispatchDidLoadMainResourceForDocumentLoader:[self activeDocumentLoader]];
+ [dl setPrimaryLoadComplete:YES];
+ [client _dispatchDidLoadMainResourceForDocumentLoader:dl];
[self checkLoadComplete];
[bridge release];
[[client webView] _willChangeValueForKey:_WebMainFrameIconKey];
- NSImage *icon = [[WebIconDatabase sharedIconDatabase] iconForURL:[[[self activeDataSource] _URL] _web_originalDataAsString] withSize:WebIconSmallSize];
+ NSImage *icon = [[WebIconDatabase sharedIconDatabase] iconForURL:[[[self activeDocumentLoader] URL] _web_originalDataAsString] withSize:WebIconSmallSize];
[client _dispatchDidReceiveIcon:icon];
- (NSURL *)_URL
{
- return [[self activeDataSource] _URL];
+ return [[self activeDocumentLoader] URL];
}
- (NSError *)cancelledErrorWithRequest:(NSURLRequest *)request
- (BOOL)willUseArchiveForRequest:(NSURLRequest *)r originalURL:(NSURL *)originalURL loader:(WebLoader *)loader
{
if ([[r URL] isEqual:originalURL] && [self _canUseResourceForRequest:r]) {
- WebResource *resource = [[self activeDataSource] _archivedSubresourceForURL:originalURL];
+ WebResource *resource = [client _archivedSubresourceForURL:originalURL fromDocumentLoader:[self activeDocumentLoader]];
if (resource && [self _canUseResourceWithResponse:[resource _response]]) {
CFDictionarySetValue((CFMutableDictionaryRef)[self pendingArchivedResources], loader, resource);
// Deliver the resource after a delay because callers don't expect to receive callbacks while calling this method.
- (void)_checkNavigationPolicyForRequest:(NSURLRequest *)newRequest andCall:(id)obj withSelector:(SEL)sel
{
[self checkNavigationPolicyForRequest:newRequest
- dataSource:[self activeDataSource]
+ documentLoader:[self activeDocumentLoader]
formState:nil
andCall:obj
withSelector:sel];
// case handles well-formed URLs that can't be loaded, and the latter
// case handles malformed URLs and unknown schemes. Loading alternate content
// at other times behaves like a standard load.
- WebDataSource *compareDataSource = nil;
+ WebDocumentLoader *compareDocumentLoader = nil;
if (delegateIsDecidingNavigationPolicy || delegateIsHandlingUnimplementablePolicy)
- compareDataSource = [self policyDataSource];
+ compareDocumentLoader = policyDocumentLoader;
else if (delegateIsHandlingProvisionalLoadError)
- compareDataSource = [self provisionalDataSource];
+ compareDocumentLoader = [self provisionalDocumentLoader];
- return compareDataSource != nil && [unreachableURL isEqual:[[compareDataSource request] URL]];
+ return compareDocumentLoader != nil && [unreachableURL isEqual:[[compareDocumentLoader request] URL]];
}
- (void)_loadRequest:(NSURLRequest *)request archive:(WebArchive *)archive
type = FrameLoadTypeReload;
}
- [self loadDataSource:newDataSource withLoadType:type formState:nil];
+ [self loadDocumentLoader:policyDocumentLoader withLoadType:type formState:nil];
}
- (void)_loadRequest:(NSURLRequest *)request triggeringAction:(NSDictionary *)action loadType:(FrameLoadType)type formState:(WebFormState *)formState
{
ASSERT(!policyDocumentLoader);
policyDocumentLoader = [client _createDocumentLoaderWithRequest:request];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
[policyDocumentLoader setTriggeringAction:action];
[policyDocumentLoader setOverrideEncoding:[[self documentLoader] overrideEncoding]];
- [self loadDataSource:newDataSource withLoadType:type formState:formState];
+ [self loadDocumentLoader:policyDocumentLoader withLoadType:type formState:formState];
}
- (void)_reloadAllowingStaleDataWithOverrideEncoding:(NSString *)encoding
{
- WebDataSource *ds = [self dataSource];
- if (ds == nil)
+ if (documentLoader == nil)
return;
- NSMutableURLRequest *request = [[ds request] mutableCopy];
- NSURL *unreachableURL = [ds unreachableURL];
+ NSMutableURLRequest *request = [[documentLoader request] mutableCopy];
+ NSURL *unreachableURL = [documentLoader unreachableURL];
if (unreachableURL != nil)
[request setURL:unreachableURL];
[request setCachePolicy:NSURLRequestReturnCacheDataElseLoad];
ASSERT(!policyDocumentLoader);
policyDocumentLoader = [client _createDocumentLoaderWithRequest:request];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
[request release];
[policyDocumentLoader setOverrideEncoding:encoding];
- [self loadDataSource:newDataSource withLoadType:FrameLoadTypeReloadAllowingStaleData formState:nil];
+ [self loadDocumentLoader:policyDocumentLoader withLoadType:FrameLoadTypeReloadAllowingStaleData formState:nil];
}
- (void)reload
{
- WebDataSource *ds = [self dataSource];
- if (ds == nil)
+ if (documentLoader == nil)
return;
- NSMutableURLRequest *initialRequest = [ds request];
+ NSMutableURLRequest *initialRequest = [documentLoader request];
// If a window is created by javascript, its main frame can have an empty but non-nil URL.
// Reloading in this case will lose the current contents (see 4151001).
- if ([[[[ds request] URL] absoluteString] length] == 0)
+ if ([[[[documentLoader request] URL] absoluteString] length] == 0)
return;
// Replace error-page URL with the URL we were trying to reach.
ASSERT(!policyDocumentLoader);
policyDocumentLoader = [client _createDocumentLoaderWithRequest:initialRequest];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
- NSMutableURLRequest *request = [newDataSource request];
+ NSMutableURLRequest *request = [policyDocumentLoader request];
[request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
[policyDocumentLoader setTriggeringAction:action];
}
- [policyDocumentLoader setOverrideEncoding:[[ds _documentLoader] overrideEncoding]];
+ [policyDocumentLoader setOverrideEncoding:[documentLoader overrideEncoding]];
- [self loadDataSource:newDataSource withLoadType:FrameLoadTypeReload formState:nil];
+ [self loadDocumentLoader:policyDocumentLoader withLoadType:FrameLoadTypeReload formState:nil];
}
- (void)didReceiveServerRedirectForProvisionalLoadForFrame
}
- (void)checkNavigationPolicyForRequest:(NSURLRequest *)request
- dataSource:(WebDataSource *)dataSource
+ documentLoader:(WebDocumentLoader *)loader
formState:(WebFormState *)formState
andCall:(id)target
withSelector:(SEL)selector
{
- NSDictionary *action = [[dataSource _documentLoader] triggeringAction];
+ NSDictionary *action = [loader triggeringAction];
if (action == nil) {
action = [self actionInformationForNavigationType:WebNavigationTypeOther
event:nil originalURL:[request URL]];
- [[dataSource _documentLoader] setTriggeringAction:action];
+ [loader setTriggeringAction:action];
}
// Don't ask more than once for the same request or if we are loading an empty URL.
// This avoids confusion on the part of the client.
- if ([request isEqual:[[dataSource _documentLoader] lastCheckedRequest]] || [[request URL] _web_isEmpty]) {
+ if ([request isEqual:[loader lastCheckedRequest]] || [[request URL] _web_isEmpty]) {
[target performSelector:selector withObject:request withObject:nil];
return;
}
return;
}
- [[dataSource _documentLoader] setLastCheckedRequest:request];
+ [loader setLastCheckedRequest:request];
WebPolicyDecisionListener *decisionListener = [[WebPolicyDecisionListener alloc] _initWithTarget:self action:@selector(continueAfterNavigationPolicy:)];
// If we loaded an alternate page to replace an unreachableURL, we'll get in here with a
// nil policyDataSource because loading the alternate page will have passed
// through this method already, nested; otherwise, policyDataSource should still be set.
- ASSERT([self policyDataSource] || [[self provisionalDataSource] unreachableURL] != nil);
+ ASSERT(policyDocumentLoader || [provisionalDocumentLoader unreachableURL] != nil);
BOOL isTargetItem = [client _provisionalItemIsTarget];
}
FrameLoadType type = policyLoadType;
- WebDataSource *dataSource = [[self policyDataSource] retain];
+ WebDocumentLoader *dl = [policyDocumentLoader retain];
[self stopLoading];
loadType = type;
- [self startProvisionalLoad:dataSource];
+ [self startProvisionalLoad:dl];
- [dataSource release];
+ [dl release];
[self setPolicyDocumentLoader:nil];
if (client == [[client webView] mainFrame])
- LOG(DocumentLoad, "loading %@", [[[self provisionalDataSource] request] URL]);
+ LOG(DocumentLoad, "loading %@", [[[self provisionalDocumentLoader] request] URL]);
if (isBackForwardLoadType(type)) {
if ([client _loadProvisionalItemFromPageCache])
}
}
-- (void)loadDataSource:(WebDataSource *)newDataSource withLoadType:(FrameLoadType)type formState:(WebFormState *)formState
+- (void)loadDocumentLoader:(WebDocumentLoader *)loader withLoadType:(FrameLoadType)type formState:(WebFormState *)formState
{
ASSERT([client webView] != nil);
policyLoadType = type;
- WebDocumentLoader *loader = [newDataSource _documentLoader];
-
WebFrame *parentFrame = [client parentFrame];
if (parentFrame)
[loader setOverrideEncoding:[[[parentFrame dataSource] _documentLoader] overrideEncoding]];
[self setPolicyDocumentLoader:loader];
- [self checkNavigationPolicyForRequest:[newDataSource request]
- dataSource:newDataSource
+ [self checkNavigationPolicyForRequest:[loader request]
+ documentLoader:loader
formState:formState
andCall:self
withSelector:@selector(continueLoadRequestAfterNavigationPolicy:formState:)];
[client _frameLoadCompleted];
// After a canceled provisional load, firstLayoutDone is NO. Reset it to YES if we're displaying a page.
- if ([self dataSource])
+ if (documentLoader)
firstLayoutDone = YES;
}
// The call to closeURL invokes the unload event handler, which can execute arbitrary
// JavaScript. If the script initiates a new load, we need to abandon the current load,
// or the two will stomp each other.
- WebDataSource *pd = [self provisionalDataSource];
+ WebDocumentLoader *pdl = provisionalDocumentLoader;
[[client _bridge] closeURL];
- if (pd != [self provisionalDataSource])
+ if (pdl != provisionalDocumentLoader)
return;
[self commitProvisionalLoad];
// Handle adding the URL to the back/forward list.
- WebDataSource *ds = [self dataSource];
- NSString *ptitle = [ds pageTitle];
+ WebDocumentLoader *dl = documentLoader;
+ NSString *ptitle = [dl title];
switch (loadType) {
case WebFrameLoadTypeForward:
if (delegateIsHandlingProvisionalLoadError)
return;
- WebDataSource *pd = [[self provisionalDataSource] retain];
+ WebDocumentLoader *pdl = [provisionalDocumentLoader retain];
LOG(Loading, "%@: checking complete in WebFrameStateProvisional", [client name]);
// If we've received any errors we may be stuck in the provisional state and actually complete.
- NSError *error = [pd _mainDocumentError];
+ NSError *error = [pdl mainDocumentError];
if (error != nil) {
// Check all children first.
LOG(Loading, "%@: checking complete, current state WebFrameStateProvisional", [client name]);
LoadErrorResetToken *resetToken = [client _tokenForLoadErrorReset];
BOOL shouldReset = YES;
- if (![pd isLoading]) {
+ if (![pdl isLoadingInAPISense]) {
LOG(Loading, "%@: checking complete in WebFrameStateProvisional, load done", [client name]);
[[client webView] _didFailProvisionalLoadWithError:error forFrame:client];
delegateIsHandlingProvisionalLoadError = YES;
// must be, to be in this branch of the if? And is it ok to just do
// a full-on stopLoading?
[self stopLoadingSubframes];
- [[pd _documentLoader] stopLoading];
+ [pdl stopLoading];
// Finish resetting the load state, but only if another load hasn't been started by the
// delegate callback.
- if (pd == [self provisionalDataSource])
+ if (pdl == provisionalDocumentLoader)
[self clearProvisionalLoad];
else {
- NSURL *unreachableURL = [[self provisionalDataSource] unreachableURL];
- if (unreachableURL != nil && [unreachableURL isEqual:[[pd request] URL]])
+ NSURL *unreachableURL = [provisionalDocumentLoader unreachableURL];
+ if (unreachableURL != nil && [unreachableURL isEqual:[[pdl request] URL]])
shouldReset = NO;
}
}
else
[client _doNotResetAfterLoadError:resetToken];
}
- [pd release];
+ [pdl release];
return;
}
case WebFrameStateCommittedPage: {
- WebDataSource *ds = [self dataSource];
+ WebDocumentLoader *dl = documentLoader;
- if (![ds isLoading]) {
- WebFrameView *thisView = [client frameView];
- NSView <WebDocumentView> *thisDocumentView = [thisView documentView];
- ASSERT(thisDocumentView != nil);
-
+ if (![dl isLoadingInAPISense]) {
[self markLoadComplete];
// FIXME: Is this subsequent work important if we already navigated away?
// Maybe there are bugs because of that, or extra work we can skip because
// the new page is ready.
- // Tell the just loaded document to layout. This may be necessary
- // for non-html content that needs a layout message.
- if (!([[self dataSource] _isDocumentHTML])) {
- [thisDocumentView setNeedsLayout:YES];
- [thisDocumentView layout];
- [thisDocumentView setNeedsDisplay:YES];
- }
+ [client _forceLayoutForNonHTML];
// If the user had a scroll point scroll to it. This will override
// the anchor point. After much discussion it was decided by folks
}
}
- NSError *error = [ds _mainDocumentError];
+ NSError *error = [dl mainDocumentError];
if (error != nil) {
[[client webView] _didFailLoadWithError:error forFrame:client];
[client _dispatchDidFailLoadWithError:error];
{
// Call the bridge because this is where our security checks are made.
[[self bridge] loadURL:URL
- referrer:[[[[self dataSource] request] URL] _web_originalDataAsString]
+ referrer:[[[documentLoader request] URL] _web_originalDataAsString]
reload:NO
userGesture:YES
target:nil
NSTimeInterval delta = [[NSDate date] timeIntervalSinceDate: cacheDate];
if (delta <= [[[self webView] preferences] _backForwardCacheExpirationInterval]) {
newDataSource = [pageCache objectForKey: WebPageCacheDataSourceKey];
- [[self _frameLoader] loadDataSource:newDataSource withLoadType:loadType formState:nil];
+ [[self _frameLoader] loadDocumentLoader:[newDataSource _documentLoader] withLoadType:loadType formState:nil];
inPageCache = YES;
} else {
LOG (PageCache, "Not restoring page from back/forward cache because cache entry has expired, %@ (%3.5f > %3.5f seconds)\n", [_private->provisionalItem URL], delta, [[[self webView] preferences] _backForwardCacheExpirationInterval]);
- (void)_prepareForDataSourceReplacement
{
- if (![[self _frameLoader] dataSource]) {
+ if (![self dataSource]) {
ASSERT(![self _childFrameCount]);
return;
}
- (WebDataSource *)provisionalDataSource
{
- return [[self _frameLoader] provisionalDataSource];
+ return dataSource([[self _frameLoader] provisionalDocumentLoader]);
}
- (WebDataSource *)dataSource
{
- return [[self _frameLoader] dataSource];
+ return dataSource([[self _frameLoader] documentLoader]);
}
- (void)loadRequest:(NSURLRequest *)request
- (void)_makeDocumentView
{
- NSView <WebDocumentView> *documentView = [_private->webFrameView _makeDocumentViewForDataSource:[[self _frameLoader] dataSource]];
+ NSView <WebDocumentView> *documentView = [_private->webFrameView _makeDocumentViewForDataSource:[self dataSource]];
if (!documentView)
return;
// Call setDataSource on the document view after it has been placed in the view hierarchy.
// This what we for the top-level view, so should do this for views in subframes as well.
- [documentView setDataSource:[[self _frameLoader] dataSource]];
+ [documentView setDataSource:[self dataSource]];
}
- (void)_forceLayout
[currItem setHasPageCache:NO];
if ([[self _frameLoader] loadType] == WebFrameLoadTypeReload)
[self _saveScrollPositionAndViewStateToItem:currItem];
- WebDataSource *dataSource = [[self _frameLoader] dataSource];
+ WebDataSource *dataSource = [self dataSource];
NSURLRequest *request = [dataSource request];
// Sometimes loading a page again leads to a different result because of cookies. Bugzilla 4072
if ([request _webDataRequestUnreachableURL] == nil)
- (void)_updateHistoryForStandardLoad
{
- WebDataSource *dataSource = [[self _frameLoader] dataSource];
+ WebDataSource *dataSource = [self dataSource];
if (![[dataSource _documentLoader] isClientRedirect]) {
NSURL *URL = [dataSource _URLForHistory];
if (URL && ![URL _web_isEmpty]) {
- (void)_updateHistoryForInternalLoad
{
// Add an item to the item tree for this frame
- ASSERT(![[[[self _frameLoader] dataSource] _documentLoader] isClientRedirect]);
+ ASSERT(![[[self _frameLoader] documentLoader] isClientRedirect]);
WebFrame *parentFrame = [self parentFrame];
if (parentFrame) {
WebHistoryItem *parentItem = parentFrame->_private->currentItem;
didLoadMainResourceForDataSource:dataSource(loader)];
}
+- (void)_forceLayoutForNonHTML
+{
+ WebFrameView *thisView = [self frameView];
+ NSView <WebDocumentView> *thisDocumentView = [thisView documentView];
+ ASSERT(thisDocumentView != nil);
+
+ // Tell the just loaded document to layout. This may be necessary
+ // for non-html content that needs a layout message.
+ if (!([[self dataSource] _isDocumentHTML])) {
+ [thisDocumentView setNeedsLayout:YES];
+ [thisDocumentView layout];
+ [thisDocumentView setNeedsDisplay:YES];
+ }
+}
+
+- (void)_clearLoadingFromPageCacheForDocumentLoader:(WebDocumentLoader *)loader
+{
+ [dataSource(loader) _setLoadingFromPageCache:NO];
+}
+
+- (BOOL)_isDocumentLoaderLoadingFromPageCache:(WebDocumentLoader *)loader
+{
+ return [dataSource(loader) _loadingFromPageCache];
+}
+
+- (WebResource *)_archivedSubresourceForURL:(NSURL *)URL fromDocumentLoader:(WebDocumentLoader *)loader
+{
+ return [dataSource(loader) _archivedSubresourceForURL:URL];
+}
+
+- (void)_makeRepresentationForDocumentLoader:(WebDocumentLoader *)loader
+{
+ [dataSource(loader) _makeRepresentation];
+}
+
@end