- changed "document load state" to "document loader"
* Loader/WebDocumentLoadState.h: Removed.
* Loader/WebDocumentLoadState.m: Removed.
* Loader/WebDocumentLoader.h: Added.
* Loader/WebDocumentLoader.m: Added.
(-[WebDocumentLoader setMainDocumentError:]):
(-[WebDocumentLoader mainReceivedError:complete:]):
(-[WebDocumentLoader finishedLoading]):
(-[WebDocumentLoader commitLoadWithData:]):
(-[WebDocumentLoader setupForReplaceByMIMEType:]):
(-[WebDocumentLoader updateLoading]):
(-[WebDocumentLoader setTitle:]):
* Loader/WebFrameLoader.h:
* Loader/WebFrameLoader.m:
(-[WebFrameLoader dealloc]):
(-[WebFrameLoader activeDocumentLoader]):
(-[WebFrameLoader activeDataSource]):
(-[WebFrameLoader addPlugInStreamLoader:]):
(-[WebFrameLoader removePlugInStreamLoader:]):
(-[WebFrameLoader addSubresourceLoader:]):
(-[WebFrameLoader removeSubresourceLoader:]):
(-[WebFrameLoader dataSource]):
(-[WebFrameLoader setDocumentLoader:]):
(-[WebFrameLoader documentLoader]):
(-[WebFrameLoader policyDataSource]):
(-[WebFrameLoader setPolicyDocumentLoader:]):
(-[WebFrameLoader clearDataSource]):
(-[WebFrameLoader provisionalDataSource]):
(-[WebFrameLoader provisionalDocumentLoader]):
(-[WebFrameLoader setProvisionalDocumentLoader:]):
(-[WebFrameLoader _clearProvisionalDataSource]):
(-[WebFrameLoader _setState:]):
(-[WebFrameLoader clearProvisionalLoad]):
(-[WebFrameLoader commitProvisionalLoad]):
(-[WebFrameLoader stopLoading]):
(-[WebFrameLoader startLoading]):
(-[WebFrameLoader startProvisionalLoad:]):
(-[WebFrameLoader setupForReplace]):
(-[WebFrameLoader _didReceiveResponse:forResource:]):
(-[WebFrameLoader _originalRequest]):
(-[WebFrameLoader _receivedMainResourceError:complete:]):
(-[WebFrameLoader _receivedData:]):
(-[WebFrameLoader _setRequest:]):
(-[WebFrameLoader _isStopping]):
(-[WebFrameLoader _setupForReplaceByMIMEType:]):
(-[WebFrameLoader _setResponse:]):
(-[WebFrameLoader _mainReceivedError:complete:]):
(-[WebFrameLoader _finishedLoading]):
(-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
(-[WebFrameLoader _loadRequest:archive:]):
(-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
(-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
(-[WebFrameLoader reload]):
(-[WebFrameLoader finishedLoadingDocument:]):
(-[WebFrameLoader committedLoadWithDocumentLoader:data:]):
(-[WebFrameLoader revertToProvisionalWithDocumentLoader:]):
(-[WebFrameLoader documentLoader:setMainDocumentError:]):
(-[WebFrameLoader documentLoader:mainReceivedCompleteError:]):
(-[WebFrameLoader finalSetupForReplaceWithDocumentLoader:]):
(-[WebFrameLoader willChangeTitleForDocument:]):
(-[WebFrameLoader didChangeTitleForDocument:]):
(-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
(-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
(-[WebFrameLoader loadDataSource:withLoadType:formState:]):
* Plugins/WebPluginController.m:
(-[WebPluginController pluginView:receivedResponse:]):
* WebCoreSupport/WebFrameBridge.m:
(-[WebFrameBridge setTitle:]):
(-[WebFrameBridge receivedData:textEncodingName:]):
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebDataSource.m:
(-[WebDataSourcePrivate dealloc]):
(-[WebDataSource _mainDocumentError]):
(-[WebDataSource _loadFromPageCache:]):
(-[WebDataSource _bridge]):
(-[WebDataSource _webView]):
(-[WebDataSource _URLForHistory]):
(-[WebDataSource _documentLoader]):
(-[WebDataSource _initWithDocumentLoader:]):
(-[WebDataSource initWithRequest:]):
(-[WebDataSource dealloc]):
(-[WebDataSource data]):
(-[WebDataSource webFrame]):
(-[WebDataSource initialRequest]):
(-[WebDataSource request]):
(-[WebDataSource response]):
(-[WebDataSource textEncodingName]):
(-[WebDataSource isLoading]):
(-[WebDataSource unreachableURL]):
(-[WebDataSource webArchive]):
* WebView/WebDataSourceInternal.h:
* WebView/WebDocumentLoadStateMac.h: Removed.
* WebView/WebDocumentLoadStateMac.m: Removed.
* WebView/WebDocumentLoaderMac.h: Added.
* WebView/WebDocumentLoaderMac.m: Added.
* WebView/WebFrame.m:
(-[WebFrame _createItem:]):
(-[WebFrame _receivedMainResourceError:]):
(-[WebFrame _transitionToCommitted:]):
(-[WebFrame _opened]):
(-[WebFrame _checkLoadCompleteForThisFrame]):
(-[WebFrame _loadItem:withLoadType:]):
(-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]):
(-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
(-[WebFrame _addChild:]):
(-[WebFrame _provisionalLoadStarted]):
(-[WebFrame _dataSourceForDocumentLoader:]):
(-[WebFrame _createDocumentLoaderWithRequest:]):
* WebView/WebFrameInternal.h:
* WebView/WebHTMLRepresentation.m:
(-[WebHTMLRepresentation title]):
* WebView/WebView.m:
(-[WebView _mainFrameOverrideEncoding]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16892
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-10-08 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Maciej.
+
+ - changed "document load state" to "document loader"
+
+ * Loader/WebDocumentLoadState.h: Removed.
+ * Loader/WebDocumentLoadState.m: Removed.
+ * Loader/WebDocumentLoader.h: Added.
+ * Loader/WebDocumentLoader.m: Added.
+ (-[WebDocumentLoader setMainDocumentError:]):
+ (-[WebDocumentLoader mainReceivedError:complete:]):
+ (-[WebDocumentLoader finishedLoading]):
+ (-[WebDocumentLoader commitLoadWithData:]):
+ (-[WebDocumentLoader setupForReplaceByMIMEType:]):
+ (-[WebDocumentLoader updateLoading]):
+ (-[WebDocumentLoader setTitle:]):
+ * Loader/WebFrameLoader.h:
+ * Loader/WebFrameLoader.m:
+ (-[WebFrameLoader dealloc]):
+ (-[WebFrameLoader activeDocumentLoader]):
+ (-[WebFrameLoader activeDataSource]):
+ (-[WebFrameLoader addPlugInStreamLoader:]):
+ (-[WebFrameLoader removePlugInStreamLoader:]):
+ (-[WebFrameLoader addSubresourceLoader:]):
+ (-[WebFrameLoader removeSubresourceLoader:]):
+ (-[WebFrameLoader dataSource]):
+ (-[WebFrameLoader setDocumentLoader:]):
+ (-[WebFrameLoader documentLoader]):
+ (-[WebFrameLoader policyDataSource]):
+ (-[WebFrameLoader setPolicyDocumentLoader:]):
+ (-[WebFrameLoader clearDataSource]):
+ (-[WebFrameLoader provisionalDataSource]):
+ (-[WebFrameLoader provisionalDocumentLoader]):
+ (-[WebFrameLoader setProvisionalDocumentLoader:]):
+ (-[WebFrameLoader _clearProvisionalDataSource]):
+ (-[WebFrameLoader _setState:]):
+ (-[WebFrameLoader clearProvisionalLoad]):
+ (-[WebFrameLoader commitProvisionalLoad]):
+ (-[WebFrameLoader stopLoading]):
+ (-[WebFrameLoader startLoading]):
+ (-[WebFrameLoader startProvisionalLoad:]):
+ (-[WebFrameLoader setupForReplace]):
+ (-[WebFrameLoader _didReceiveResponse:forResource:]):
+ (-[WebFrameLoader _originalRequest]):
+ (-[WebFrameLoader _receivedMainResourceError:complete:]):
+ (-[WebFrameLoader _receivedData:]):
+ (-[WebFrameLoader _setRequest:]):
+ (-[WebFrameLoader _isStopping]):
+ (-[WebFrameLoader _setupForReplaceByMIMEType:]):
+ (-[WebFrameLoader _setResponse:]):
+ (-[WebFrameLoader _mainReceivedError:complete:]):
+ (-[WebFrameLoader _finishedLoading]):
+ (-[WebFrameLoader _checkContentPolicyForMIMEType:andCall:withSelector:]):
+ (-[WebFrameLoader _loadRequest:archive:]):
+ (-[WebFrameLoader _loadRequest:triggeringAction:loadType:formState:]):
+ (-[WebFrameLoader _reloadAllowingStaleDataWithOverrideEncoding:]):
+ (-[WebFrameLoader reload]):
+ (-[WebFrameLoader finishedLoadingDocument:]):
+ (-[WebFrameLoader committedLoadWithDocumentLoader:data:]):
+ (-[WebFrameLoader revertToProvisionalWithDocumentLoader:]):
+ (-[WebFrameLoader documentLoader:setMainDocumentError:]):
+ (-[WebFrameLoader documentLoader:mainReceivedCompleteError:]):
+ (-[WebFrameLoader finalSetupForReplaceWithDocumentLoader:]):
+ (-[WebFrameLoader willChangeTitleForDocument:]):
+ (-[WebFrameLoader didChangeTitleForDocument:]):
+ (-[WebFrameLoader checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector:]):
+ (-[WebFrameLoader continueLoadRequestAfterNavigationPolicy:formState:]):
+ (-[WebFrameLoader loadDataSource:withLoadType:formState:]):
+ * Plugins/WebPluginController.m:
+ (-[WebPluginController pluginView:receivedResponse:]):
+ * WebCoreSupport/WebFrameBridge.m:
+ (-[WebFrameBridge setTitle:]):
+ (-[WebFrameBridge receivedData:textEncodingName:]):
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebDataSource.m:
+ (-[WebDataSourcePrivate dealloc]):
+ (-[WebDataSource _mainDocumentError]):
+ (-[WebDataSource _loadFromPageCache:]):
+ (-[WebDataSource _bridge]):
+ (-[WebDataSource _webView]):
+ (-[WebDataSource _URLForHistory]):
+ (-[WebDataSource _documentLoader]):
+ (-[WebDataSource _initWithDocumentLoader:]):
+ (-[WebDataSource initWithRequest:]):
+ (-[WebDataSource dealloc]):
+ (-[WebDataSource data]):
+ (-[WebDataSource webFrame]):
+ (-[WebDataSource initialRequest]):
+ (-[WebDataSource request]):
+ (-[WebDataSource response]):
+ (-[WebDataSource textEncodingName]):
+ (-[WebDataSource isLoading]):
+ (-[WebDataSource unreachableURL]):
+ (-[WebDataSource webArchive]):
+ * WebView/WebDataSourceInternal.h:
+ * WebView/WebDocumentLoadStateMac.h: Removed.
+ * WebView/WebDocumentLoadStateMac.m: Removed.
+ * WebView/WebDocumentLoaderMac.h: Added.
+ * WebView/WebDocumentLoaderMac.m: Added.
+ * WebView/WebFrame.m:
+ (-[WebFrame _createItem:]):
+ (-[WebFrame _receivedMainResourceError:]):
+ (-[WebFrame _transitionToCommitted:]):
+ (-[WebFrame _opened]):
+ (-[WebFrame _checkLoadCompleteForThisFrame]):
+ (-[WebFrame _loadItem:withLoadType:]):
+ (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:formState:]):
+ (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]):
+ (-[WebFrame _addChild:]):
+ (-[WebFrame _provisionalLoadStarted]):
+ (-[WebFrame _dataSourceForDocumentLoader:]):
+ (-[WebFrame _createDocumentLoaderWithRequest:]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLRepresentation.m:
+ (-[WebHTMLRepresentation title]):
+ * WebView/WebView.m:
+ (-[WebView _mainFrameOverrideEncoding]):
+
2006-10-08 Darin Adler <darin@apple.com>
Reviewed by Mitz.
@class WebFrameLoader;
// To be renamed to WebDocumentLoader
-@interface WebDocumentLoadState : NSObject
+@interface WebDocumentLoader : NSObject
{
@public
WebFrameLoader *frameLoader;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebDocumentLoadState.h"
+#import "WebDocumentLoader.h"
#import <JavaScriptCore/Assertions.h>
#import "WebFrameLoader.h"
#import <WebKitSystemInterface.h>
-@implementation WebDocumentLoadState
+@implementation WebDocumentLoader
- (id)initWithRequest:(NSURLRequest *)req
{
[mainDocumentError release];
mainDocumentError = error;
- [frameLoader documentLoadState:self setMainDocumentError:error];
+ [frameLoader documentLoader:self setMainDocumentError:error];
}
- (NSError *)mainDocumentError
[self setMainDocumentError:error];
if (isComplete) {
- [frameLoader documentLoadState:self mainReceivedCompleteError:error];
+ [frameLoader documentLoader:self mainReceivedCompleteError:error];
}
}
{
gotFirstByte = YES;
[self commitIfReady];
- [frameLoader finishedLoadingDocumentLoadState:self];
+ [frameLoader finishedLoadingDocument:self];
[[self bridge] end];
}
[self retain];
[self commitIfReady];
- [frameLoader committedLoadWithDocumentLoadState:self data:data];
+ [frameLoader committedLoadWithDocumentLoader:self data:data];
[self release];
}
NSString *oldMIMEType = [response MIMEType];
if (![self doesProgressiveLoadWithMIMEType:oldMIMEType]) {
- [frameLoader revertToProvisionalWithDocumentLoadState:self];
+ [frameLoader revertToProvisionalWithDocumentLoader:self];
[self setupForReplace];
[self commitLoadWithData:[self mainResourceData]];
}
- [frameLoader finishedLoadingDocumentLoadState:self];
+ [frameLoader finishedLoadingDocument:self];
[[self bridge] end];
[frameLoader setReplacing];
gotFirstByte = NO;
if ([self doesProgressiveLoadWithMIMEType:newMIMEType]) {
- [frameLoader revertToProvisionalWithDocumentLoadState:self];
+ [frameLoader revertToProvisionalWithDocumentLoader:self];
[self setupForReplace];
}
[frameLoader stopLoadingSubresources];
[frameLoader stopLoadingPlugIns];
- [frameLoader finalSetupForReplaceWithDocumentLoadState:self];
+ [frameLoader finalSetupForReplaceWithDocumentLoader:self];
}
- (void)updateLoading
{
- ASSERT(self == [frameLoader activeDocumentLoadState]);
+ ASSERT(self == [frameLoader activeDocumentLoader]);
[self setLoading:[frameLoader isLoading]];
}
CFStringTrimWhitespace((CFMutableStringRef)trimmed);
if ([trimmed length] != 0 && ![pageTitle isEqualToString:trimmed]) {
- [frameLoader willChangeTitleForDocumentLoadState:self];
+ [frameLoader willChangeTitleForDocument:self];
[pageTitle release];
pageTitle = [trimmed copy];
- [frameLoader didChangeTitleForDocumentLoadState:self];
+ [frameLoader didChangeTitleForDocument:self];
}
[trimmed release];
#import <Cocoa/Cocoa.h>
-#import "WebDocumentLoadState.h"
+#import "WebDocumentLoader.h"
#import "WebFrameLoaderClient.h"
#import "WebFramePrivate.h"
NSMutableArray *plugInStreamLoaders;
WebFrame <WebFrameLoaderClient> *client;
- WebDocumentLoadState *documentLoadState;
- WebDocumentLoadState *provisionalDocumentLoadState;
- WebDocumentLoadState *policyDocumentLoadState;
+ WebDocumentLoader *documentLoader;
+ WebDocumentLoader *provisionalDocumentLoader;
+ WebDocumentLoader *policyDocumentLoader;
WebFrameState state;
- (WebDataSource *)provisionalDataSource;
- (WebDataSource *)policyDataSource;
- (WebDataSource *)activeDataSource;
-- (WebDocumentLoadState *)activeDocumentLoadState;
-- (WebDocumentLoadState *)documentLoadState;
-- (WebDocumentLoadState *)provisionalDocumentLoadState;
+- (WebDocumentLoader *)activeDocumentLoader;
+- (WebDocumentLoader *)documentLoader;
+- (WebDocumentLoader *)provisionalDocumentLoader;
- (WebFrameState)state;
- (void)clearDataSource;
- (void)setupForReplace;
- (void)didReceiveServerRedirectForProvisionalLoadForFrame;
- (WebFrameBridge *)bridge;
-- (void)finishedLoadingDocumentLoadState:(WebDocumentLoadState *)loadState;
+- (void)finishedLoadingDocument:(WebDocumentLoader *)loader;
- (void)commitProvisitionalLoad;
-- (void)committedLoadWithDocumentLoadState:(WebDocumentLoadState *)loadState data:(NSData *)data;
+- (void)committedLoadWithDocumentLoader:(WebDocumentLoader *)loader data:(NSData *)data;
- (BOOL)isReplacing;
- (void)setReplacing;
-- (void)revertToProvisionalWithDocumentLoadState:(WebDocumentLoadState *)loadState;
-- (void)documentLoadState:(WebDocumentLoadState *)loadState setMainDocumentError:(NSError *)error;
-- (void)documentLoadState:(WebDocumentLoadState *)loadState mainReceivedCompleteError:(NSError *)error;
-- (void)finalSetupForReplaceWithDocumentLoadState:(WebDocumentLoadState *)loadState;
+- (void)revertToProvisionalWithDocumentLoader:(WebDocumentLoader *)loader;
+- (void)documentLoader:(WebDocumentLoader *)loader setMainDocumentError:(NSError *)error;
+- (void)documentLoader:(WebDocumentLoader *)loader mainReceivedCompleteError:(NSError *)error;
+- (void)finalSetupForReplaceWithDocumentLoader:(WebDocumentLoader *)loader;
- (void)prepareForLoadStart;
- (BOOL)subframeIsLoading;
-- (void)willChangeTitleForDocumentLoadState:(WebDocumentLoadState *)loadState;
-- (void)didChangeTitleForDocumentLoadState:(WebDocumentLoadState *)loadState;
+- (void)willChangeTitleForDocument:(WebDocumentLoader *)loader;
+- (void)didChangeTitleForDocument:(WebDocumentLoader *)loader;
- (WebFrameLoadType)loadType;
- (void)setLoadType:(WebFrameLoadType)type;
#import "WebDataProtocol.h"
#import "WebDataSourceInternal.h"
-#import "WebDocumentLoadStateMac.h"
+#import "WebDocumentLoaderMac.h"
#import "WebDownloadInternal.h"
#import "WebFrameBridge.h"
#import "WebFrameInternal.h"
[mainResourceLoader release];
[subresourceLoaders release];
[plugInStreamLoaders release];
- [documentLoadState release];
- [provisionalDocumentLoadState release];
+ [documentLoader release];
+ [provisionalDocumentLoader release];
- ASSERT(!policyDocumentLoadState);
+ ASSERT(!policyDocumentLoader);
[super dealloc];
}
-- (WebDocumentLoadState *)activeDocumentLoadState
+- (WebDocumentLoader *)activeDocumentLoader
{
if (state == WebFrameStateProvisional)
- return provisionalDocumentLoadState;
+ return provisionalDocumentLoader;
- return documentLoadState;
+ return documentLoader;
}
- (WebDataSource *)activeDataSource
{
- return [client _dataSourceForDocumentLoadState:[self activeDocumentLoadState]];
+ return [client _dataSourceForDocumentLoader:[self activeDocumentLoader]];
}
- (WebResource *)_archivedSubresourceForURL:(NSURL *)URL
if (!plugInStreamLoaders)
plugInStreamLoaders = [[NSMutableArray alloc] init];
[plugInStreamLoaders addObject:loader];
- [[self activeDocumentLoadState] setLoading:YES];
+ [[self activeDocumentLoader] setLoading:YES];
}
- (void)removePlugInStreamLoader:(WebLoader *)loader
{
[plugInStreamLoaders removeObject:loader];
- [[self activeDocumentLoadState] updateLoading];
+ [[self activeDocumentLoader] updateLoading];
}
- (void)defersCallbacksChanged
- (void)addSubresourceLoader:(WebLoader *)loader
{
- ASSERT(!provisionalDocumentLoadState);
+ ASSERT(!provisionalDocumentLoader);
if (subresourceLoaders == nil)
subresourceLoaders = [[NSMutableArray alloc] init];
[subresourceLoaders addObject:loader];
- [[self activeDocumentLoadState] setLoading:YES];
+ [[self activeDocumentLoader] setLoading:YES];
}
- (void)removeSubresourceLoader:(WebLoader *)loader
{
[subresourceLoaders removeObject:loader];
- [[self activeDocumentLoadState] updateLoading];
+ [[self activeDocumentLoader] updateLoading];
}
- (NSData *)mainResourceData
- (WebDataSource *)dataSource
{
- return [client _dataSourceForDocumentLoadState:documentLoadState];
+ return [client _dataSourceForDocumentLoader:documentLoader];
}
-- (void)_setDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)setDocumentLoader:(WebDocumentLoader *)loader
{
- if (loadState == nil && documentLoadState == nil)
+ if (loader == nil && documentLoader == nil)
return;
- ASSERT(loadState != documentLoadState);
+ ASSERT(loader != documentLoader);
[client _prepareForDataSourceReplacement];
- [documentLoadState detachFromFrameLoader];
+ [documentLoader detachFromFrameLoader];
- [loadState retain];
- [documentLoadState release];
- documentLoadState = loadState;
+ [loader retain];
+ [documentLoader release];
+ documentLoader = loader;
}
-- (WebDocumentLoadState *)documentLoadState
+- (WebDocumentLoader *)documentLoader
{
- return documentLoadState;
+ return documentLoader;
}
- (WebDataSource *)policyDataSource
{
- return [client _dataSourceForDocumentLoadState:policyDocumentLoadState];
+ return [client _dataSourceForDocumentLoader:policyDocumentLoader];
}
-- (void)_setPolicyDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)setPolicyDocumentLoader:(WebDocumentLoader *)loader
{
- if (policyDocumentLoadState == loadState)
+ if (policyDocumentLoader == loader)
return;
- if (policyDocumentLoadState != provisionalDocumentLoadState && policyDocumentLoadState != documentLoadState)
- [policyDocumentLoadState detachFromFrameLoader];
+ if (policyDocumentLoader != provisionalDocumentLoader && policyDocumentLoader != documentLoader)
+ [policyDocumentLoader detachFromFrameLoader];
- [policyDocumentLoadState release];
- [loadState retain];
- policyDocumentLoadState = loadState;
+ [policyDocumentLoader release];
+ [loader retain];
+ policyDocumentLoader = loader;
}
- (void)clearDataSource
{
- [self _setDocumentLoadState:nil];
+ [self setDocumentLoader:nil];
}
- (WebDataSource *)provisionalDataSource
{
- return [client _dataSourceForDocumentLoadState:provisionalDocumentLoadState];
+ return [client _dataSourceForDocumentLoader:provisionalDocumentLoader];
}
-- (WebDocumentLoadState *)provisionalDocumentLoadState
+- (WebDocumentLoader *)provisionalDocumentLoader
{
- return provisionalDocumentLoadState;
+ return provisionalDocumentLoader;
}
-- (void)_setProvisionalDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)setProvisionalDocumentLoader:(WebDocumentLoader *)loader
{
- ASSERT(!loadState || !provisionalDocumentLoadState);
+ ASSERT(!loader || !provisionalDocumentLoader);
- if (provisionalDocumentLoadState != documentLoadState)
- [provisionalDocumentLoadState detachFromFrameLoader];
+ if (provisionalDocumentLoader != documentLoader)
+ [provisionalDocumentLoader detachFromFrameLoader];
- [loadState retain];
- [provisionalDocumentLoadState release];
- provisionalDocumentLoadState = loadState;
+ [loader retain];
+ [provisionalDocumentLoader release];
+ provisionalDocumentLoader = loader;
}
- (void)_clearProvisionalDataSource
{
- [self _setProvisionalDocumentLoadState:nil];
+ [self setProvisionalDocumentLoader:nil];
}
- (WebFrameState)state
{
LOG(Loading, "%@: transition from %s to %s", [client name], stateNames[state], stateNames[newState]);
if ([client webView])
- LOG(Timing, "%@: transition from %s to %s, %f seconds since start of document load", [client name], stateNames[state], stateNames[newState], CFAbsoluteTimeGetCurrent() - [[[[[client webView] mainFrame] dataSource] _documentLoadState] loadingStartedTime]);
+ LOG(Timing, "%@: transition from %s to %s, %f seconds since start of document load", [client name], stateNames[state], stateNames[newState], 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] _documentLoadState] loadingStartedTime]);
+ LOG(DocumentLoad, "completed %@ (%f seconds)", [[[self dataSource] request] URL], CFAbsoluteTimeGetCurrent() - [[[self dataSource] _documentLoader] loadingStartedTime]);
state = newState;
else if (state == WebFrameStateComplete) {
[client _frameLoadCompleted];
_timeOfLastCompletedLoad = CFAbsoluteTimeGetCurrent();
- [[self documentLoadState] stopRecordingResponses];
+ [[self documentLoader] stopRecordingResponses];
}
}
- (void)clearProvisionalLoad
{
- [self _setProvisionalDocumentLoadState:nil];
+ [self setProvisionalDocumentLoader:nil];
[[client webView] _progressCompleted:client];
[self _setState:WebFrameStateComplete];
}
[self stopLoadingSubresources];
[self stopLoadingPlugIns];
- [self _setDocumentLoadState:provisionalDocumentLoadState];
- [self _setProvisionalDocumentLoadState:nil];
+ [self setDocumentLoader:provisionalDocumentLoader];
+ [self setProvisionalDocumentLoader:nil];
[self _setState:WebFrameStateCommittedPage];
}
- (void)stopLoading
{
- [[self provisionalDocumentLoadState] stopLoading];
- [[self documentLoadState] stopLoading];
+ [[self provisionalDocumentLoader] stopLoading];
+ [[self documentLoader] stopLoading];
[self _clearProvisionalDataSource];
[self clearArchivedResources];
}
// FIXME: poor method name; also why is this not part of startProvisionalLoad:?
- (void)startLoading
{
- [provisionalDocumentLoadState prepareForLoadStart];
+ [provisionalDocumentLoader prepareForLoadStart];
if ([self isLoadingMainResource])
return;
id identifier;
id resourceLoadDelegate = [[client webView] resourceLoadDelegate];
if ([resourceLoadDelegate respondsToSelector:@selector(webView:identifierForInitialRequest:fromDataSource:)])
- identifier = [resourceLoadDelegate webView:[client webView] identifierForInitialRequest:[provisionalDocumentLoadState originalRequest] fromDataSource:[self provisionalDataSource]];
+ identifier = [resourceLoadDelegate webView:[client webView] identifierForInitialRequest:[provisionalDocumentLoader originalRequest] fromDataSource:[self provisionalDataSource]];
else
- identifier = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:[client webView] identifierForInitialRequest:[provisionalDocumentLoadState originalRequest] fromDataSource:[self provisionalDataSource]];
+ identifier = [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:[client webView] identifierForInitialRequest:[provisionalDocumentLoader originalRequest] fromDataSource:[self provisionalDataSource]];
- if (![[provisionalDocumentLoadState frameLoader] startLoadingMainResourceWithRequest:[provisionalDocumentLoadState actualRequest] identifier:identifier])
- [provisionalDocumentLoadState updateLoading];
+ if (![[provisionalDocumentLoader frameLoader] startLoadingMainResourceWithRequest:[provisionalDocumentLoader actualRequest] identifier:identifier])
+ [provisionalDocumentLoader updateLoading];
}
- (void)startProvisionalLoad:(WebDataSource *)ds
{
- [self _setProvisionalDocumentLoadState:[ds _documentLoadState]];
+ [self setProvisionalDocumentLoader:[ds _documentLoader]];
[self _setState:WebFrameStateProvisional];
}
- (void)setupForReplace
{
[self _setState:WebFrameStateProvisional];
- WebDocumentLoadState *old = provisionalDocumentLoadState;
- provisionalDocumentLoadState = documentLoadState;
- documentLoadState = nil;
+ WebDocumentLoader *old = provisionalDocumentLoader;
+ provisionalDocumentLoader = documentLoader;
+ documentLoader = nil;
[old release];
[client _detachChildren];
{
WebView *webView = [client webView];
- [[self activeDocumentLoadState] addResponse:r];
+ [[self activeDocumentLoader] addResponse:r];
[webView _incrementProgressForIdentifier:identifier response:r];
- (NSURLRequest *)_originalRequest
{
- return [[self activeDocumentLoadState] originalRequestCopy];
+ return [[self activeDocumentLoader] originalRequestCopy];
}
- (WebFrame *)webFrame
- (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
{
- WebDocumentLoadState *loadState = [self activeDocumentLoadState];
- [loadState retain];
+ WebDocumentLoader *loader = [self activeDocumentLoader];
+ [loader retain];
WebFrameBridge *bridge = [client _bridge];
[bridge release];
[cli _receivedMainResourceError:error];
- [loadState mainReceivedError:error complete:isComplete];
+ [loader mainReceivedError:error complete:isComplete];
[cli release];
- [loadState release];
+ [loader release];
}
- (NSURLRequest *)initialRequest
- (void)_receivedData:(NSData *)data
{
- [[self activeDocumentLoadState] receivedData:data];
+ [[self activeDocumentLoader] receivedData:data];
}
- (void)_setRequest:(NSURLRequest *)request
{
- [[self activeDocumentLoadState] setRequest:request];
+ [[self activeDocumentLoader] setRequest:request];
}
- (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(id)proxy
- (BOOL)_isStopping
{
- return [[self activeDocumentLoadState] isStopping];
+ return [[self activeDocumentLoader] isStopping];
}
- (void)_setupForReplaceByMIMEType:(NSString *)newMIMEType
{
- [[self activeDocumentLoadState] setupForReplaceByMIMEType:newMIMEType];
+ [[self activeDocumentLoader] setupForReplaceByMIMEType:newMIMEType];
}
- (void)_setResponse:(NSURLResponse *)response
{
- [[self activeDocumentLoadState] setResponse:response];
+ [[self activeDocumentLoader] setResponse:response];
}
- (void)_mainReceivedError:(NSError *)error complete:(BOOL)isComplete
{
- [[self activeDocumentLoadState] mainReceivedError:error complete:isComplete];
+ [[self activeDocumentLoader] mainReceivedError:error complete:isComplete];
}
- (void)_finishedLoading
WebDataSource *ds = [self activeDataSource];
[self retain];
- [[self activeDocumentLoadState] finishedLoading];
+ [[self activeDocumentLoader] finishedLoading];
if ([ds _mainDocumentError] || ![ds webFrame]) {
[self release];
return;
}
- [[self activeDocumentLoadState] setPrimaryLoadComplete:YES];
+ [[self activeDocumentLoader] setPrimaryLoadComplete:YES];
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:[client webView] didLoadMainResourceForDataSource:[self activeDataSource]];
[client _checkLoadComplete];
[l retain];
[[[client webView] _policyDelegateForwarder] webView:[client webView] decidePolicyForMIMEType:MIMEType
- request:[[self activeDocumentLoadState] request]
+ request:[[self activeDocumentLoader] request]
frame:client
decisionListener:listener];
[l release];
{
WebFrameLoadType type;
- ASSERT(!policyDocumentLoadState);
- policyDocumentLoadState = [client _createDocumentLoadStateWithRequest:request];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoadState:policyDocumentLoadState];
+ ASSERT(!policyDocumentLoader);
+ policyDocumentLoader = [client _createDocumentLoaderWithRequest:request];
+ WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
NSMutableURLRequest *r = [newDataSource request];
[client _addExtraFieldsToRequest:r mainResource:YES alwaysFromRequest:NO];
} else
type = WebFrameLoadTypeStandard;
- [policyDocumentLoadState setOverrideEncoding:[[self documentLoadState] overrideEncoding]];
+ [policyDocumentLoader setOverrideEncoding:[[self documentLoader] overrideEncoding]];
[newDataSource _addToUnarchiveState:archive];
// When we loading alternate content for an unreachable URL that we're
- (void)_loadRequest:(NSURLRequest *)request triggeringAction:(NSDictionary *)action loadType:(WebFrameLoadType)type formState:(WebFormState *)formState
{
- ASSERT(!policyDocumentLoadState);
- policyDocumentLoadState = [client _createDocumentLoadStateWithRequest:request];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoadState:policyDocumentLoadState];
+ ASSERT(!policyDocumentLoader);
+ policyDocumentLoader = [client _createDocumentLoaderWithRequest:request];
+ WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
- [policyDocumentLoadState setTriggeringAction:action];
- [policyDocumentLoadState setOverrideEncoding:[[self documentLoadState] overrideEncoding]];
+ [policyDocumentLoader setTriggeringAction:action];
+ [policyDocumentLoader setOverrideEncoding:[[self documentLoader] overrideEncoding]];
[self loadDataSource:newDataSource withLoadType:type formState:formState];
}
[request setURL:unreachableURL];
[request setCachePolicy:NSURLRequestReturnCacheDataElseLoad];
- ASSERT(!policyDocumentLoadState);
- policyDocumentLoadState = [client _createDocumentLoadStateWithRequest:request];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoadState:policyDocumentLoadState];
+ ASSERT(!policyDocumentLoader);
+ policyDocumentLoader = [client _createDocumentLoaderWithRequest:request];
+ WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
[request release];
- [policyDocumentLoadState setOverrideEncoding:encoding];
+ [policyDocumentLoader setOverrideEncoding:encoding];
[self loadDataSource:newDataSource withLoadType:WebFrameLoadTypeReloadAllowingStaleData formState:nil];
}
if (unreachableURL != nil)
initialRequest = [NSURLRequest requestWithURL:unreachableURL];
- ASSERT(!policyDocumentLoadState);
- policyDocumentLoadState = [client _createDocumentLoadStateWithRequest:initialRequest];
- WebDataSource *newDataSource = [client _dataSourceForDocumentLoadState:policyDocumentLoadState];
+ ASSERT(!policyDocumentLoader);
+ policyDocumentLoader = [client _createDocumentLoaderWithRequest:initialRequest];
+ WebDataSource *newDataSource = [client _dataSourceForDocumentLoader:policyDocumentLoader];
NSMutableURLRequest *request = [newDataSource request];
[request setCachePolicy:NSURLRequestReloadIgnoringCacheData];
// If we're about to rePOST, set up action so the app can warn the user
if ([[request HTTPMethod] _webkit_isCaseInsensitiveEqualToString:@"POST"]) {
NSDictionary *action = [client _actionInformationForNavigationType:WebNavigationTypeFormResubmitted event:nil originalURL:[request URL]];
- [policyDocumentLoadState setTriggeringAction:action];
+ [policyDocumentLoader setTriggeringAction:action];
}
- [policyDocumentLoadState setOverrideEncoding:[[ds _documentLoadState] overrideEncoding]];
+ [policyDocumentLoader setOverrideEncoding:[[ds _documentLoader] overrideEncoding]];
[self loadDataSource:newDataSource withLoadType:WebFrameLoadTypeReload formState:nil];
}
[client _didReceiveServerRedirectForProvisionalLoadForFrame];
}
-- (void)finishedLoadingDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)finishedLoadingDocument:(WebDocumentLoader *)loader
{
- [[client _dataSourceForDocumentLoadState:loadState] _finishedLoading];
+ [[client _dataSourceForDocumentLoader:loader] _finishedLoading];
}
- (void)commitProvisitionalLoad
[client _commitProvisionalLoad:nil];
}
-- (void)committedLoadWithDocumentLoadState:(WebDocumentLoadState *)loadState data:(NSData *)data
+- (void)committedLoadWithDocumentLoader:(WebDocumentLoader *)loader data:(NSData *)data
{
- [[client _dataSourceForDocumentLoadState:loadState] _receivedData:data];
+ [[client _dataSourceForDocumentLoader:loader] _receivedData:data];
}
- (BOOL)isReplacing
loadType = WebFrameLoadTypeReplace;
}
-- (void)revertToProvisionalWithDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)revertToProvisionalWithDocumentLoader:(WebDocumentLoader *)loader
{
- [[client _dataSourceForDocumentLoadState:loadState] _revertToProvisionalState];
+ [[client _dataSourceForDocumentLoader:loader] _revertToProvisionalState];
}
-- (void)documentLoadState:(WebDocumentLoadState *)loadState setMainDocumentError:(NSError *)error
+- (void)documentLoader:(WebDocumentLoader *)loader setMainDocumentError:(NSError *)error
{
- [[client _dataSourceForDocumentLoadState:loadState] _setMainDocumentError:error];
+ [[client _dataSourceForDocumentLoader:loader] _setMainDocumentError:error];
}
-- (void)documentLoadState:(WebDocumentLoadState *)loadState mainReceivedCompleteError:(NSError *)error
+- (void)documentLoader:(WebDocumentLoader *)loader mainReceivedCompleteError:(NSError *)error
{
- [loadState setPrimaryLoadComplete:YES];
+ [loader setPrimaryLoadComplete:YES];
if ([WebScriptDebugServer listenerCount])
[[WebScriptDebugServer sharedScriptDebugServer] webView:[client webView] didLoadMainResourceForDataSource:[self activeDataSource]];
[client _checkLoadComplete];
}
-- (void)finalSetupForReplaceWithDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)finalSetupForReplaceWithDocumentLoader:(WebDocumentLoader *)loader
{
- [[client _dataSourceForDocumentLoadState:loadState] _clearUnarchivingState];
+ [[client _dataSourceForDocumentLoader:loader] _clearUnarchivingState];
}
- (void)prepareForLoadStart
return [client _subframeIsLoading];
}
-- (void)willChangeTitleForDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)willChangeTitleForDocument:(WebDocumentLoader *)loader
{
// FIXME: should do this only in main frame case, right?
[[client webView] _willChangeValueForKey:_WebMainFrameTitleKey];
}
-- (void)didChangeTitleForDocumentLoadState:(WebDocumentLoadState *)loadState
+- (void)didChangeTitleForDocument:(WebDocumentLoader *)loader
{
// FIXME: should do this only in main frame case, right?
[[client webView] _didChangeValueForKey:_WebMainFrameTitleKey];
// The title doesn't get communicated to the WebView until we are committed.
- if ([loadState isCommitted]) {
- NSURL *URLForHistory = [[client _dataSourceForDocumentLoadState:loadState] _URLForHistory];
+ if ([loader isCommitted]) {
+ NSURL *URLForHistory = [[client _dataSourceForDocumentLoader:loader] _URLForHistory];
if (URLForHistory != nil) {
WebHistoryItem *entry = [[WebHistory optionalSharedHistory] itemForURL:URLForHistory];
- [entry setTitle:[loadState title]];
+ [entry setTitle:[loader title]];
// Must update the entries in the back-forward list too. This must go through the WebFrame because
// it has the right notion of the current b/f item.
- [client _setTitle:[loadState title]];
+ [client _setTitle:[loader title]];
[[client webView] setMainFrameDocumentReady:YES]; // update observers with new DOMDocument
[[[client webView] _frameLoadDelegateForwarder] webView:[client webView]
- didReceiveTitle:[loadState title]
+ didReceiveTitle:[loader title]
forFrame:client];
}
}
andCall:(id)target
withSelector:(SEL)selector
{
- NSDictionary *action = [[dataSource _documentLoadState] triggeringAction];
+ NSDictionary *action = [[dataSource _documentLoader] triggeringAction];
if (action == nil) {
action = [client _actionInformationForNavigationType:WebNavigationTypeOther event:nil originalURL:[request URL]];
- [[dataSource _documentLoadState] setTriggeringAction:action];
+ [[dataSource _documentLoader] 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 _documentLoadState] lastCheckedRequest]] || [[request URL] _web_isEmpty]) {
+ if ([request isEqual:[[dataSource _documentLoader] lastCheckedRequest]] || [[request URL] _web_isEmpty]) {
[target performSelector:selector withObject:request withObject:nil];
return;
}
return;
}
- [[dataSource _documentLoadState] setLastCheckedRequest:request];
+ [[dataSource _documentLoader] setLastCheckedRequest:request];
WebPolicyDecisionListener *decisionListener = [[WebPolicyDecisionListener alloc] _initWithTarget:self action:@selector(continueAfterNavigationPolicy:)];
if ([client _quickRedirectComing])
[client _clientRedirectCancelledOrFinished:NO];
- [self _setPolicyDocumentLoadState:nil];
+ [self setPolicyDocumentLoader:nil];
// If the navigation request came from the back/forward menu, and we punt on it, we have the
// problem that we have optimistically moved the b/f cursor already, so move it back. For sanity,
[self startProvisionalLoad:dataSource];
[dataSource release];
- [self _setPolicyDocumentLoadState:nil];
+ [self setPolicyDocumentLoader:nil];
if (client == [[client webView] mainFrame])
LOG(DocumentLoad, "loading %@", [[[self provisionalDataSource] request] URL]);
policyLoadType = type;
- WebDocumentLoadStateMac *loadState = (WebDocumentLoadStateMac *)[newDataSource _documentLoadState];
+ WebDocumentLoaderMac *loader = (WebDocumentLoaderMac *)[newDataSource _documentLoader];
WebFrame *parentFrame = [client parentFrame];
if (parentFrame)
- [loadState setOverrideEncoding:[[[parentFrame dataSource] _documentLoadState] overrideEncoding]];
+ [loader setOverrideEncoding:[[[parentFrame dataSource] _documentLoader] overrideEncoding]];
- [loadState setFrameLoader:self];
- [loadState setDataSource:newDataSource];
+ [loader setFrameLoader:self];
+ [loader setDataSource:newDataSource];
[self invalidatePendingPolicyDecisionCallingDefaultAction:YES];
- [self _setPolicyDocumentLoadState:loadState];
+ [self setPolicyDocumentLoader:loader];
[self checkNavigationPolicyForRequest:[newDataSource request]
dataSource:newDataSource
pluginPageURL:nil
pluginName:nil // FIXME: Get this from somewhere
MIMEType:[response MIMEType]];
- [[[_dataSource _documentLoadState] frameLoader] stopLoadingWithError:error];
+ [[[_dataSource _documentLoader] frameLoader] stopLoadingWithError:error];
[error release];
}
}
- (void)setTitle:(NSString *)title
{
- [[[_frame _frameLoader] documentLoadState] setTitle:[title _webkit_stringByCollapsingNonPrintingCharacters]];
+ [[[_frame _frameLoader] documentLoader] setTitle:[title _webkit_stringByCollapsingNonPrintingCharacters]];
}
- (void)setStatusText:(NSString *)status
- (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName
{
// Set the encoding. This only needs to be done once, but it's harmless to do it again later.
- NSString *encoding = [[[_frame _frameLoader] documentLoadState] overrideEncoding];
+ NSString *encoding = [[[_frame _frameLoader] documentLoader] overrideEncoding];
BOOL userChosen = encoding != nil;
if (encoding == nil) {
encoding = textEncodingName;
6550B7C7099EFAE90090D781 /* WebArchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B7C5099EFAE90090D781 /* WebArchiver.h */; };
6550B7C8099EFAE90090D781 /* WebArchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6550B7C6099EFAE90090D781 /* WebArchiver.m */; };
658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 658A40950A14853B005E6987 /* WebDataSourceInternal.h */; };
- 659044280A9D3B4200E89459 /* WebDocumentLoadState.h in Headers */ = {isa = PBXBuildFile; fileRef = 659044260A9D3B4200E89459 /* WebDocumentLoadState.h */; };
- 659044290A9D3B4200E89459 /* WebDocumentLoadState.m in Sources */ = {isa = PBXBuildFile; fileRef = 659044270A9D3B4200E89459 /* WebDocumentLoadState.m */; };
+ 659044280A9D3B4200E89459 /* WebDocumentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 659044260A9D3B4200E89459 /* WebDocumentLoader.h */; };
+ 659044290A9D3B4200E89459 /* WebDocumentLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 659044270A9D3B4200E89459 /* WebDocumentLoader.m */; };
65A0006908527D1A005620FA /* libWebKitSystemInterface.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 65A0006808527D1A005620FA /* libWebKitSystemInterface.a */; };
65A734610A923948001B57E8 /* WebPlugInStreamLoaderDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A734600A923948001B57E8 /* WebPlugInStreamLoaderDelegate.h */; };
65C7F42C0979DE640022E453 /* WebPageBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C7F42A0979DE640022E453 /* WebPageBridge.h */; };
65EEDE54084FFB920002DB25 /* WebNSCalendarDateExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65EEDE52084FFB920002DB25 /* WebNSCalendarDateExtras.m */; };
65EEDE57084FFC9E0002DB25 /* WebNSFileManagerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65EEDE55084FFC9E0002DB25 /* WebNSFileManagerExtras.h */; };
65EEDE58084FFC9E0002DB25 /* WebNSFileManagerExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65EEDE56084FFC9E0002DB25 /* WebNSFileManagerExtras.m */; };
- 65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoadStateMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoadStateMac.h */; };
- 65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoadStateMac.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoadStateMac.m */; };
+ 65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */; };
+ 65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.m */; };
7E6FEF0108985A3E00C44C3F /* WebDefaultScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEEFF08985A3E00C44C3F /* WebDefaultScriptDebugDelegate.h */; };
7E6FEF0208985A3E00C44C3F /* WebDefaultScriptDebugDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0008985A3E00C44C3F /* WebDefaultScriptDebugDelegate.m */; };
7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
6578F5DF045F817400000128 /* WebDownload.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDownload.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65836F5E07EE425900682F95 /* WebPluginContainerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainerPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
658A40950A14853B005E6987 /* WebDataSourceInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDataSourceInternal.h; sourceTree = "<group>"; };
- 659044260A9D3B4200E89459 /* WebDocumentLoadState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoadState.h; sourceTree = "<group>"; };
- 659044270A9D3B4200E89459 /* WebDocumentLoadState.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebDocumentLoadState.m; sourceTree = "<group>"; };
+ 659044260A9D3B4200E89459 /* WebDocumentLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoader.h; sourceTree = "<group>"; };
+ 659044270A9D3B4200E89459 /* WebDocumentLoader.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebDocumentLoader.m; sourceTree = "<group>"; };
65A0006808527D1A005620FA /* libWebKitSystemInterface.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWebKitSystemInterface.a; sourceTree = BUILT_PRODUCTS_DIR; };
65A734600A923948001B57E8 /* WebPlugInStreamLoaderDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPlugInStreamLoaderDelegate.h; sourceTree = "<group>"; };
65A7D44A0568AB2600E70EF6 /* WebUIDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebUIDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65EEDE52084FFB920002DB25 /* WebNSCalendarDateExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSCalendarDateExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65EEDE55084FFC9E0002DB25 /* WebNSFileManagerExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSFileManagerExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65EEDE56084FFC9E0002DB25 /* WebNSFileManagerExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSFileManagerExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoadStateMac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoadStateMac.h; sourceTree = "<group>"; };
- 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoadStateMac.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebDocumentLoadStateMac.m; sourceTree = "<group>"; };
+ 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoaderMac.h; sourceTree = "<group>"; };
+ 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebDocumentLoaderMac.m; sourceTree = "<group>"; };
700BC50B04144DA100A80182 /* WebDefaultResourceLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultResourceLoadDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
700BC50C04144DA100A80182 /* WebDefaultResourceLoadDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultResourceLoadDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNSStringExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
children = (
651A93850A83F883007FEDF0 /* WebDataProtocol.h */,
651A93860A83F883007FEDF0 /* WebDataProtocol.m */,
- 659044260A9D3B4200E89459 /* WebDocumentLoadState.h */,
- 659044270A9D3B4200E89459 /* WebDocumentLoadState.m */,
+ 659044260A9D3B4200E89459 /* WebDocumentLoader.h */,
+ 659044270A9D3B4200E89459 /* WebDocumentLoader.m */,
6538B1C60A90596D00A07522 /* WebFormDataStream.h */,
6538B1C70A90596D00A07522 /* WebFormDataStream.m */,
654B3C290A82C47200E1AE3D /* WebFrameLoader.h */,
9C7CABBB0190A37C0ECA16EA /* WebView */ = {
isa = PBXGroup;
children = (
- 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoadStateMac.h */,
- 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoadStateMac.m */,
+ 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */,
+ 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.m */,
F52CA6BD02DF9D0F018635CA /* HTML */,
51E94C0706C02CA300A9B09E /* PDF */,
8373435A0624EE0D00F3B289 /* WebArchive.h */,
51E4D3990A886B5E00ECEE2C /* WebIconDatabaseBridge.h in Headers */,
6538B1C80A90596D00A07522 /* WebFormDataStream.h in Headers */,
65A734610A923948001B57E8 /* WebPlugInStreamLoaderDelegate.h in Headers */,
- 659044280A9D3B4200E89459 /* WebDocumentLoadState.h in Headers */,
+ 659044280A9D3B4200E89459 /* WebDocumentLoader.h in Headers */,
1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */,
- 65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoadStateMac.h in Headers */,
+ 65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */,
930653940AD6FEF6008E969A /* WebFrameLoaderClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
651A93880A83F883007FEDF0 /* WebDataProtocol.m in Sources */,
51E4D39A0A886B5E00ECEE2C /* WebIconDatabaseBridge.m in Sources */,
6538B1C90A90596E00A07522 /* WebFormDataStream.m in Sources */,
- 659044290A9D3B4200E89459 /* WebDocumentLoadState.m in Sources */,
+ 659044290A9D3B4200E89459 /* WebDocumentLoader.m in Sources */,
1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */,
- 65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoadStateMac.m in Sources */,
+ 65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
#import <WebKit/DOMHTML.h>
#import <WebKit/DOMPrivate.h>
#import <WebKitSystemInterface.h>
-#import "WebDocumentLoadStateMac.h"
+#import "WebDocumentLoaderMac.h"
@interface WebDataSourcePrivate : NSObject
{
@public
- WebDocumentLoadStateMac *loadState;
+ WebDocumentLoaderMac *loader;
id <WebDocumentRepresentation> representation;
- (void)dealloc
{
- ASSERT(![loadState isLoading]);
+ ASSERT(![loader isLoading]);
- [loadState release];
+ [loader release];
[representation release];
[unarchivingState release];
- (NSError *)_mainDocumentError
{
- return [_private->loadState mainDocumentError];
+ return [_private->loader mainDocumentError];
}
- (void)_addSubframeArchives:(NSArray *)subframeArchives
- (void)_loadFromPageCache:(NSDictionary *)pageCache
{
- [_private->loadState prepareForLoadStart];
+ [_private->loader prepareForLoadStart];
_private->loadingFromPageCache = YES;
- [_private->loadState setCommitted:YES];
+ [_private->loader setCommitted:YES];
[[self webFrame] _commitProvisionalLoad:pageCache];
}
- (WebFrameBridge *)_bridge
{
- ASSERT([_private->loadState isCommitted]);
+ ASSERT([_private->loader isCommitted]);
return [[self webFrame] _bridge];
}
- (WebView *)_webView
{
- return [[[_private->loadState frameLoader] webFrame] webView];
+ return [[[_private->loader frameLoader] webFrame] webView];
}
- (BOOL)_isDocumentHTML
// Return the URL to be used for history and B/F list.
// Returns nil for WebDataProtocol URLs that aren't alternates
// for unreachable URLs, because these can't be stored in history.
- NSURL *URL = [[_private->loadState originalRequestCopy] URL];
+ NSURL *URL = [[_private->loader originalRequestCopy] URL];
if ([WebDataProtocol _webIsDataProtocolURL:URL])
- URL = [[_private->loadState originalRequestCopy] _webDataRequestUnreachableURL];
+ URL = [[_private->loader originalRequestCopy] _webDataRequestUnreachableURL];
return [URL _webkit_canonicalize];
}
[_private->unarchivingState addArchive:archive];
}
-- (WebDocumentLoadState *)_documentLoadState
+- (WebDocumentLoader *)_documentLoader
{
- return _private->loadState;
+ return _private->loader;
}
-- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState
+- (id)_initWithDocumentLoader:(WebDocumentLoaderMac *)loader
{
self = [super init];
if (!self) {
_private = [[WebDataSourcePrivate alloc] init];
- _private->loadState = [loadState retain];
+ _private->loader = [loader retain];
- LOG(Loading, "creating datasource for %@", [[_private->loadState request] URL]);
- WKSupportsMultipartXMixedReplace([_private->loadState request]);
+ LOG(Loading, "creating datasource for %@", [[_private->loader request] URL]);
+ WKSupportsMultipartXMixedReplace([_private->loader request]);
++WebDataSourceCount;
-(id)initWithRequest:(NSURLRequest *)request
{
- return [self _initWithDocumentLoadState:[[WebDocumentLoadState alloc] initWithRequest:request]];
+ return [self _initWithDocumentLoader:[[WebDocumentLoader alloc] initWithRequest:request]];
}
- (void)dealloc
{
- ASSERT([[_private->loadState frameLoader] activeDataSource] != self || ![[_private->loadState frameLoader] isLoading]);
+ ASSERT([[_private->loader frameLoader] activeDataSource] != self || ![[_private->loader frameLoader] isLoading]);
--WebDataSourceCount;
- (NSData *)data
{
- return [_private->loadState mainResourceData];
+ return [_private->loader mainResourceData];
}
- (id <WebDocumentRepresentation>)representation
- (WebFrame *)webFrame
{
- return [[_private->loadState frameLoader] webFrame];
+ return [[_private->loader frameLoader] webFrame];
}
-(NSURLRequest *)initialRequest
{
- NSURLRequest *clientRequest = [[_private->loadState originalRequest] _webDataRequestExternalRequest];
+ NSURLRequest *clientRequest = [[_private->loader originalRequest] _webDataRequestExternalRequest];
if (!clientRequest)
- clientRequest = [_private->loadState originalRequest];
+ clientRequest = [_private->loader originalRequest];
return clientRequest;
}
-(NSMutableURLRequest *)request
{
- return [_private->loadState request];
+ return [_private->loader request];
}
- (NSURLResponse *)response
{
- return [_private->loadState response];
+ return [_private->loader response];
}
- (NSString *)textEncodingName
{
- NSString *textEncodingName = [_private->loadState overrideEncoding];
+ NSString *textEncodingName = [_private->loader overrideEncoding];
if (!textEncodingName)
textEncodingName = [[self response] textEncodingName];
- (BOOL)isLoading
{
- return [_private->loadState isLoadingInAPISense];
+ return [_private->loader isLoadingInAPISense];
}
// Returns nil or the page title.
- (NSURL *)unreachableURL
{
- return [[_private->loadState originalRequest] _webDataRequestUnreachableURL];
+ return [[_private->loader originalRequest] _webDataRequestUnreachableURL];
}
- (WebArchive *)webArchive
{
// it makes no sense to grab a WebArchive from an uncommitted document.
- if (![_private->loadState isCommitted])
+ if (![_private->loader isCommitted])
return nil;
return [WebArchiver archiveFrame:[self webFrame]];
@class WebResource;
@class WebUnarchivingState;
@class WebView;
-@class WebDocumentLoadState;
-@class WebDocumentLoadStateMac;
+@class WebDocumentLoader;
+@class WebDocumentLoaderMac;
@protocol WebDocumentRepresentation;
- (void)_replaceSelectionWithArchive:(WebArchive *)archive selectReplacement:(BOOL)selectReplacement;
- (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
- (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
-- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState;
+- (id)_initWithDocumentLoader:(WebDocumentLoaderMac *)loader;
- (void)_finishedLoading;
- (void)_receivedData:(NSData *)data;
- (void)_revertToProvisionalState;
- (void)_setMainDocumentError:(NSError *)error;
- (void)_clearUnarchivingState;
-- (WebDocumentLoadState *)_documentLoadState;
+- (WebDocumentLoader *)_documentLoader;
@end
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <WebKit/WebDocumentLoadState.h>
+#import <WebKit/WebDocumentLoader.h>
@class WebDataSource;
-@interface WebDocumentLoadStateMac : WebDocumentLoadState
+@interface WebDocumentLoaderMac : WebDocumentLoader
{
@public
WebDataSource *dataSource;
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebDocumentLoadStateMac.h"
+#import "WebDocumentLoaderMac.h"
#import <JavaScriptCore/Assertions.h>
#import <WebKitSystemInterface.h>
-@implementation WebDocumentLoadStateMac
+@implementation WebDocumentLoaderMac
- (id)initWithRequest:(NSURLRequest *)req
#import "WebDefaultResourceLoadDelegate.h"
#import "WebDefaultUIDelegate.h"
#import "WebDocumentInternal.h"
-#import "WebDocumentLoadStateMac.h"
+#import "WebDocumentLoaderMac.h"
#import "WebFormDataStream.h"
#import "WebFrameBridge.h"
#import "WebFrameLoadDelegate.h"
WebHistoryItem *bfItem;
if (useOriginal)
- request = [[dataSrc _documentLoadState] originalRequestCopy];
+ request = [[dataSrc _documentLoader] originalRequestCopy];
else
request = [dataSrc request];
originalURL = unreachableURL;
} else {
URL = [request URL];
- originalURL = [[[dataSrc _documentLoadState] originalRequestCopy] URL];
+ originalURL = [[[dataSrc _documentLoader] originalRequestCopy] URL];
}
LOG (History, "creating item for %@", request);
- (void)_receivedMainResourceError:(NSError *)error
{
if ([_private->frameLoader state] == WebFrameStateProvisional) {
- NSURL *failedURL = [[[_private->frameLoader provisionalDocumentLoadState] originalRequestCopy] URL];
+ NSURL *failedURL = [[[_private->frameLoader provisionalDocumentLoader] originalRequestCopy] URL];
// When we are pre-commit, the currentItem is where the pageCache data resides
NSDictionary *pageCache = [[_private currentItem] pageCache];
[[self _bridge] didNotOpenURL:failedURL pageCache:pageCache];
}
// Update the last visited time. Mostly interesting for URL autocompletion
// statistics.
- NSURL *URL = [[[[ds _documentLoadState] originalRequestCopy] URL] _webkit_canonicalize];
+ NSURL *URL = [[[[ds _documentLoader] originalRequestCopy] URL] _webkit_canonicalize];
WebHistory *sharedHistory = [WebHistory optionalSharedHistory];
WebHistoryItem *oldItem = [sharedHistory itemForURL:URL];
if (oldItem)
break;
case WebFrameLoadTypeStandard:
- if (![[ds _documentLoadState] isClientRedirect]) {
+ if (![[ds _documentLoader] isClientRedirect]) {
// Add item to history and BF list
NSURL *URL = [ds _URLForHistory];
if (URL && ![URL _web_isEmpty]){
case WebFrameLoadTypeInternal:
// Add an item to the item tree for this frame
- ASSERT(![[ds _documentLoadState] isClientRedirect]);
+ ASSERT(![[ds _documentLoader] isClientRedirect]);
WebFrame *parentFrame = [self parentFrame];
if (parentFrame) {
WebHistoryItem *parentItem = [parentFrame->_private currentItem];
// Called after we send an openURL:... down to WebCore.
- (void)_opened
{
- if ([_private->frameLoader loadType] == WebFrameLoadTypeStandard && [[[self dataSource] _documentLoadState] isClientRedirect]) {
+ if ([_private->frameLoader loadType] == WebFrameLoadTypeStandard && [[[self dataSource] _documentLoader] isClientRedirect]) {
// Clear out form data so we don't try to restore it into the incoming page. Must happen after
// khtml has closed the URL and saved away the form state.
WebHistoryItem *item = [_private currentItem];
[view setNeedsLayout: YES];
[view layout];
- NSArray *responses = [[_private->frameLoader documentLoadState] responses];
+ NSArray *responses = [[_private->frameLoader documentLoader] responses];
NSURLResponse *response;
int i, count = [responses count];
for (i = 0; i < count; i++){
// premature release.
[[_private currentItem] setHasPageCache:NO];
- [[_private->frameLoader documentLoadState] setPrimaryLoadComplete:YES];
+ [[_private->frameLoader documentLoader] setPrimaryLoadComplete:YES];
// why only this frame and not parent frames?
[self _checkLoadCompleteForThisFrame];
}
// must be, to be in this branch of the if? And is it ok to just do
// a full-on stopLoading?
[self _stopLoadingSubframes];
- [[pd _documentLoadState] stopLoading];
+ [[pd _documentLoader] stopLoading];
// Finish resetting the load state, but only if another load hasn't been started by the
// delegate callback.
// Fake the URL change by updating the data source's request. This will no longer
// be necessary if we do the better fix described above.
- [[_private->frameLoader documentLoadState] replaceRequestURLForAnchorScrollWithURL:itemURL];
+ [[_private->frameLoader documentLoader] replaceRequestURLForAnchorScrollWithURL:itemURL];
[[[self webView] _frameLoadDelegateForwarder] webView:[self webView]
didChangeLocationWithinPageForFrame:self];
LOG(Redirect, "%@(%p) _private->quickRedirectComing = %d", [self name], self, (int)_private->quickRedirectComing);
_private->quickRedirectComing = NO;
- [[_private->frameLoader documentLoadState] replaceRequestURLForAnchorScrollWithURL:URL];
+ [[_private->frameLoader documentLoader] replaceRequestURLForAnchorScrollWithURL:URL];
if (!isRedirect && ![self _shouldTreatURLAsSameAsCurrent:URL]) {
// NB: must happen after _setURL, since we add based on the current request.
// Must also happen before we openURL and displace the scroll position, since
// FIXME: What about load types other than Standard and Reload?
- [[oldDataSource _documentLoadState] setTriggeringAction:action];
+ [[oldDataSource _documentLoader] setTriggeringAction:action];
[_private->frameLoader invalidatePendingPolicyDecisionCallingDefaultAction:YES];
[_private->frameLoader checkNavigationPolicyForRequest:request
dataSource:oldDataSource formState:formState
if (isRedirect) {
LOG(Redirect, "%@(%p) _private->quickRedirectComing was %d", [self name], self, (int)isRedirect);
_private->quickRedirectComing = NO;
- [[[self provisionalDataSource] _documentLoadState] setIsClientRedirect:YES];
+ [[[self provisionalDataSource] _documentLoader] setIsClientRedirect:YES];
} else if (sameURL) {
// Example of this case are sites that reload the same URL with a different cookie
// driving the generated content, or a master frame with links that drive a target
- (void)_addChild:(WebFrame *)child
{
[[self _bridge] appendChild:[child _bridge]];
- [[[child dataSource] _documentLoadState] setOverrideEncoding:[[[self dataSource] _documentLoadState] overrideEncoding]];
+ [[[child dataSource] _documentLoader] setOverrideEncoding:[[[self dataSource] _documentLoader] overrideEncoding]];
}
// If we bailed out of a b/f navigation, we might need to set the b/f cursor back to the current
&& loadType != WebFrameLoadTypeReloadAllowingStaleData
&& loadType != WebFrameLoadTypeSame
&& ![[self dataSource] isLoading]
- && ![[_private->frameLoader documentLoadState] isStopping]) {
+ && ![[_private->frameLoader documentLoader] isStopping]) {
if ([[[self dataSource] representation] isKindOfClass: [WebHTMLRepresentation class]]) {
if (![item pageCache]){
// Add the items to this page's cache.
[_private->frameLoader frameLoadCompleted];
}
-- (WebDataSource *)_dataSourceForDocumentLoadState:(WebDocumentLoadState *)loadState
+- (WebDataSource *)_dataSourceForDocumentLoader:(WebDocumentLoader *)loader
{
- return [(WebDocumentLoadStateMac *)loadState dataSource];
+ return [(WebDocumentLoaderMac *)loader dataSource];
}
-- (WebDocumentLoadState *)_createDocumentLoadStateWithRequest:(NSURLRequest *)request
+- (WebDocumentLoader *)_createDocumentLoaderWithRequest:(NSURLRequest *)request
{
- WebDocumentLoadStateMac *loadState = [[WebDocumentLoadStateMac alloc] initWithRequest:request];
+ WebDocumentLoaderMac *loader = [[WebDocumentLoaderMac alloc] initWithRequest:request];
- WebDataSource *dataSource = [[WebDataSource alloc] _initWithDocumentLoadState:loadState];
- [loadState setDataSource:dataSource];
+ WebDataSource *dataSource = [[WebDataSource alloc] _initWithDocumentLoader:loader];
+ [loader setDataSource:dataSource];
[dataSource release];
- return loadState;
+ return loader;
}
/*
#import <WebKit/WebFramePrivate.h>
#import "WebPolicyDelegatePrivate.h"
-@class WebDocumentLoadState;
+@class WebDocumentLoader;
@class WebInspector;
@class WebFrameLoader;
@class WebFrameView;
- (void)_provisionalLoadStarted;
- (void)_prepareForDataSourceReplacement;
- (void)_frameLoadCompleted;
-- (WebDataSource *)_dataSourceForDocumentLoadState:(WebDocumentLoadState *)loadState;
-- (WebDocumentLoadState *)_createDocumentLoadStateWithRequest:(NSURLRequest *)request;
+- (WebDataSource *)_dataSourceForDocumentLoader:(WebDocumentLoader *)loader;
+- (WebDocumentLoader *)_createDocumentLoaderWithRequest:(NSURLRequest *)request;
- (void)_didReceiveServerRedirectForProvisionalLoadForFrame;
- (NSURLRequest *)_webDataRequestForData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)URL unreachableURL:(NSURL *)unreachableURL;
- (NSString *)title
{
- return [[_private->dataSource _documentLoadState] title];
+ return [[_private->dataSource _documentLoader] title];
}
- (DOMDocument *)DOMDocument
if (dataSource == nil) {
return nil;
}
- return [[dataSource _documentLoadState] overrideEncoding];
+ return [[dataSource _documentLoader] overrideEncoding];
}
- (NSString *)customTextEncodingName