summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/WebView/WebDataSource.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac/WebView/WebDataSource.mm')
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm18
1 files changed, 8 insertions, 10 deletions
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index 57347d3..b83139d 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -189,7 +189,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (NSString *)_responseMIMEType
{
- return [[self response] _webcore_MIMEType];
+ return [[self response] MIMEType];
}
- (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier
@@ -198,14 +198,10 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
if (!loader)
return NO;
-
- ApplicationCache* cache = loader->applicationCache();
- if (!cache)
- return YES;
-
+
NSString *cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:destinationBundleIdentifier];
- return ApplicationCacheStorage::storeCopyOfCache(cacheDir, cache);
+ return ApplicationCacheStorage::storeCopyOfCache(cacheDir, loader->applicationCacheHost());
}
@end
@@ -224,7 +220,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
RetainPtr<WebDataSource*> protect(self);
[[self representation] receivedData:data withDataSource:self];
- [[[[self webFrame] frameView] documentView] dataSourceUpdated:self];
+
+ if ([[self _webView] _usesDocumentViews])
+ [[[[self webFrame] frameView] documentView] dataSourceUpdated:self];
}
- (void)_setMainDocumentError:(NSError *)error
@@ -340,7 +338,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
return [WebView canShowMIMETypeAsHTML:MIMEType];
}
--(void)_makeRepresentation
+- (void)_makeRepresentation
{
Class repClass = [[self class] _representationClassForMIMEType:[self _responseMIMEType]];
@@ -350,7 +348,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
[self _setRepresentation:(id <WebDocumentRepresentation>)newRep];
[newRep release];
}
-
+
[_private->representation setDataSource:self];
}