Skip to content
Browse files

Allow ASIDownloadCache to be used as an NSURLCache

Added replaceURLsWithDataURLs option to ASIWebPageRequest to allow leaving HTML and CSS unchanged (useful with the above change)
  • Loading branch information...
1 parent 0950643 commit b152a3d0e9997974e4b16cff6ad44c35dd8b9731 @pokeb committed Oct 2, 2010
View
21 Classes/ASICacheDelegate.h
@@ -69,14 +69,23 @@ typedef enum _ASICacheStoragePolicy {
// When a non-zero maxAge is passed, it should be used as the expiry time for the cached response
- (void)storeResponseForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval)maxAge;
-// Should return an NSDictionary of cached headers for the passed request, if it is stored in the cache
-- (NSDictionary *)cachedHeadersForRequest:(ASIHTTPRequest *)request;
+// Should return an NSDictionary of cached headers for the passed URL, if it is stored in the cache
+- (NSDictionary *)cachedResponseHeadersForURL:(NSURL *)url;
-// Should return the cached body of a response for the passed request, if it is stored in the cache
-- (NSData *)cachedResponseDataForRequest:(ASIHTTPRequest *)request;
+// Should return the cached body of a response for the passed URL, if it is stored in the cache
+- (NSData *)cachedResponseDataForURL:(NSURL *)url;
-// Same as the above, but returns a path to the cached response body instead
-- (NSString *)pathToCachedResponseDataForRequest:(ASIHTTPRequest *)request;
+// Returns a path to the cached response data, if it exists
+- (NSString *)pathToCachedResponseDataForURL:(NSURL *)url;
+
+// Returns a path to the cached response headers, if they url
+- (NSString *)pathToCachedResponseHeadersForURL:(NSURL *)request;
+
+// Returns the location to use to store cached response headers for a particular request
+- (NSString *)pathToStoreCachedResponseHeadersForRequest:(ASIHTTPRequest *)request;
+
+// Returns the location to use to store a cached response body for a particular request
+- (NSString *)pathToStoreCachedResponseDataForRequest:(ASIHTTPRequest *)request;
// Clear cached data stored for the passed storage policy
- (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)cachePolicy;
View
2 Classes/ASIDownloadCache.h
@@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import "ASICacheDelegate.h"
-@interface ASIDownloadCache : NSObject <ASICacheDelegate> {
+@interface ASIDownloadCache : NSURLCache <ASICacheDelegate> {
// The default cache policy for this cache
// Requests that store data in the cache will use this cache policy if their cache policy is set to ASIDefaultCachePolicy
View
128 Classes/ASIDownloadCache.m
@@ -16,7 +16,7 @@
static NSString *permanentCacheFolder = @"PermanentStore";
@interface ASIDownloadCache ()
-+ (NSString *)keyForRequest:(ASIHTTPRequest *)request;
++ (NSString *)keyForURL:(NSURL *)url;
@end
@implementation ASIDownloadCache
@@ -95,15 +95,8 @@ - (void)storeResponseForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval
return;
}
- NSString *path = nil;
- if ([request cacheStoragePolicy] == ASICacheForSessionDurationCacheStoragePolicy) {
- path = [[self storagePath] stringByAppendingPathComponent:sessionCacheFolder];
- } else {
- path = [[self storagePath] stringByAppendingPathComponent:permanentCacheFolder];
- }
- path = [path stringByAppendingPathComponent:[[self class] keyForRequest:request]];
- NSString *metadataPath = [path stringByAppendingPathExtension:@"cachedheaders"];
- NSString *dataPath = [path stringByAppendingPathExtension:@"cacheddata"];
+ NSString *headerPath = [self pathToStoreCachedResponseHeadersForRequest:request];
+ NSString *dataPath = [self pathToStoreCachedResponseDataForRequest:request];
NSMutableDictionary *responseHeaders = [NSMutableDictionary dictionaryWithDictionary:[request responseHeaders]];
if ([request isResponseCompressed]) {
@@ -115,18 +108,36 @@ - (void)storeResponseForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval
}
// We use this special key to help expire the request when we get a max-age header
[responseHeaders setObject:[[[self class] rfc1123DateFormatter] stringFromDate:[NSDate date]] forKey:@"X-ASIHTTPRequest-Fetch-date"];
- [responseHeaders writeToFile:metadataPath atomically:NO];
+ [responseHeaders writeToFile:headerPath atomically:NO];
if ([request responseData]) {
[[request responseData] writeToFile:dataPath atomically:NO];
- } else if ([request downloadDestinationPath]) {
+ } else if ([request downloadDestinationPath] && ![[request downloadDestinationPath] isEqualToString:dataPath]) {
NSError *error = nil;
[[NSFileManager defaultManager] copyItemAtPath:[request downloadDestinationPath] toPath:dataPath error:&error];
}
[[self accessLock] unlock];
}
-- (NSDictionary *)cachedHeadersForRequest:(ASIHTTPRequest *)request
+- (NSDictionary *)cachedResponseHeadersForURL:(NSURL *)url
+{
+ NSString *path = [self pathToCachedResponseHeadersForURL:url];
+ if (path) {
+ return [NSDictionary dictionaryWithContentsOfFile:path];
+ }
+ return nil;
+}
+
+- (NSData *)cachedResponseDataForURL:(NSURL *)url
+{
+ NSString *path = [self pathToCachedResponseDataForURL:url];
+ if (path) {
+ return [NSData dataWithContentsOfFile:path];
+ }
+ return nil;
+}
+
+- (NSString *)pathToCachedResponseDataForURL:(NSURL *)url
{
[[self accessLock] lock];
if (![self storagePath]) {
@@ -135,32 +146,23 @@ - (NSDictionary *)cachedHeadersForRequest:(ASIHTTPRequest *)request
}
// Look in the session store
NSString *path = [[self storagePath] stringByAppendingPathComponent:sessionCacheFolder];
- NSString *dataPath = [path stringByAppendingPathComponent:[[[self class] keyForRequest:request] stringByAppendingPathExtension:@"cachedheaders"]];
+ NSString *dataPath = [path stringByAppendingPathComponent:[[[self class] keyForURL:url] stringByAppendingPathExtension:@"cacheddata"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:dataPath]) {
[[self accessLock] unlock];
- return [NSDictionary dictionaryWithContentsOfFile:dataPath];
+ return dataPath;
}
// Look in the permanent store
path = [[self storagePath] stringByAppendingPathComponent:permanentCacheFolder];
- dataPath = [path stringByAppendingPathComponent:[[[self class] keyForRequest:request] stringByAppendingPathExtension:@"cachedheaders"]];
+ dataPath = [path stringByAppendingPathComponent:[[[self class] keyForURL:url] stringByAppendingPathExtension:@"cacheddata"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:dataPath]) {
[[self accessLock] unlock];
- return [NSDictionary dictionaryWithContentsOfFile:dataPath];
+ return dataPath;
}
[[self accessLock] unlock];
return nil;
}
-
-- (NSData *)cachedResponseDataForRequest:(ASIHTTPRequest *)request
-{
- NSString *path = [self pathToCachedResponseDataForRequest:request];
- if (path) {
- return [NSData dataWithContentsOfFile:path];
- }
- return nil;
-}
-- (NSString *)pathToCachedResponseDataForRequest:(ASIHTTPRequest *)request
+- (NSString *)pathToCachedResponseHeadersForURL:(NSURL *)url
{
[[self accessLock] lock];
if (![self storagePath]) {
@@ -169,14 +171,14 @@ - (NSString *)pathToCachedResponseDataForRequest:(ASIHTTPRequest *)request
}
// Look in the session store
NSString *path = [[self storagePath] stringByAppendingPathComponent:sessionCacheFolder];
- NSString *dataPath = [path stringByAppendingPathComponent:[[[self class] keyForRequest:request] stringByAppendingPathExtension:@"cacheddata"]];
+ NSString *dataPath = [path stringByAppendingPathComponent:[[[self class] keyForURL:url] stringByAppendingPathExtension:@"cachedheaders"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:dataPath]) {
[[self accessLock] unlock];
return dataPath;
}
// Look in the permanent store
path = [[self storagePath] stringByAppendingPathComponent:permanentCacheFolder];
- dataPath = [path stringByAppendingPathComponent:[[[self class] keyForRequest:request] stringByAppendingPathExtension:@"cacheddata"]];
+ dataPath = [path stringByAppendingPathComponent:[[[self class] keyForURL:url] stringByAppendingPathExtension:@"cachedheaders"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:dataPath]) {
[[self accessLock] unlock];
return dataPath;
@@ -185,19 +187,46 @@ - (NSString *)pathToCachedResponseDataForRequest:(ASIHTTPRequest *)request
return nil;
}
+- (NSString *)pathToStoreCachedResponseDataForRequest:(ASIHTTPRequest *)request
+{
+ [[self accessLock] lock];
+ if (![self storagePath]) {
+ [[self accessLock] unlock];
+ return nil;
+ }
+ NSString *path = [[self storagePath] stringByAppendingPathComponent:([request cacheStoragePolicy] == ASICacheForSessionDurationCacheStoragePolicy ? sessionCacheFolder : permanentCacheFolder)];
+ path = [path stringByAppendingPathComponent:[[[self class] keyForURL:[request url]] stringByAppendingPathExtension:@"cacheddata"]];
+ [[self accessLock] unlock];
+ return path;
+}
+
+- (NSString *)pathToStoreCachedResponseHeadersForRequest:(ASIHTTPRequest *)request
+{
+ [[self accessLock] lock];
+ if (![self storagePath]) {
+ [[self accessLock] unlock];
+ return nil;
+ }
+ NSString *path = [[self storagePath] stringByAppendingPathComponent:([request cacheStoragePolicy] == ASICacheForSessionDurationCacheStoragePolicy ? sessionCacheFolder : permanentCacheFolder)];
+ path = [path stringByAppendingPathComponent:[[[self class] keyForURL:[request url]] stringByAppendingPathExtension:@"cachedheaders"]];
+ [[self accessLock] unlock];
+ return path;
+}
+
+
- (void)removeCachedDataForRequest:(ASIHTTPRequest *)request
{
[[self accessLock] lock];
if (![self storagePath]) {
[[self accessLock] unlock];
return;
}
- NSString *cachedHeadersPath = [[self storagePath] stringByAppendingPathComponent:[[[self class] keyForRequest:request] stringByAppendingPathExtension:@"cachedheaders"]];
+ NSString *cachedHeadersPath = [self pathToCachedResponseHeadersForURL:[request url]];
if (!cachedHeadersPath) {
[[self accessLock] unlock];
return;
}
- NSString *dataPath = [self pathToCachedResponseDataForRequest:request];
+ NSString *dataPath = [self pathToCachedResponseDataForURL:[request url]];
if (!dataPath) {
[[self accessLock] unlock];
return;
@@ -214,12 +243,12 @@ - (BOOL)isCachedDataCurrentForRequest:(ASIHTTPRequest *)request
[[self accessLock] unlock];
return NO;
}
- NSDictionary *cachedHeaders = [self cachedHeadersForRequest:request];
+ NSDictionary *cachedHeaders = [self cachedResponseHeadersForURL:[request url]];
if (!cachedHeaders) {
[[self accessLock] unlock];
return NO;
}
- NSString *dataPath = [self pathToCachedResponseDataForRequest:request];
+ NSString *dataPath = [self pathToCachedResponseDataForURL:[request url]];
if (!dataPath) {
[[self accessLock] unlock];
return NO;
@@ -306,12 +335,8 @@ - (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)storagePolic
[[self accessLock] unlock];
return;
}
- NSString *path;
- if (storagePolicy == ASICachePermanentlyCacheStoragePolicy) {
- path = [[self storagePath] stringByAppendingPathComponent:permanentCacheFolder];
- } else {
- path = [[self storagePath] stringByAppendingPathComponent:sessionCacheFolder];
- }
+ NSString *path = [[self storagePath] stringByAppendingPathComponent:(storagePolicy == ASICacheForSessionDurationCacheStoragePolicy ? sessionCacheFolder : permanentCacheFolder)];
+
BOOL isDirectory = NO;
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory];
if (exists && !isDirectory || !exists) {
@@ -355,9 +380,9 @@ + (BOOL)serverAllowsResponseCachingForRequest:(ASIHTTPRequest *)request
}
// Borrowed from: http://stackoverflow.com/questions/652300/using-md5-hash-on-a-string-in-cocoa
-+ (NSString *)keyForRequest:(ASIHTTPRequest *)request
++ (NSString *)keyForURL:(NSURL *)url
{
- const char *cStr = [[[request url] absoluteString] UTF8String];
+ const char *cStr = [[url absoluteString] UTF8String];
unsigned char result[16];
CC_MD5(cStr, (CC_LONG)strlen(cStr), result);
return [NSString stringWithFormat:@"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7],result[8], result[9], result[10], result[11],result[12], result[13], result[14], result[15]];
@@ -389,11 +414,11 @@ - (BOOL)canUseCachedDataForRequest:(ASIHTTPRequest *)request
return YES;
}
- NSDictionary *headers = [self cachedHeadersForRequest:request];
+ NSDictionary *headers = [self cachedResponseHeadersForURL:[request url]];
if (!headers) {
return NO;
}
- NSString *dataPath = [self pathToCachedResponseDataForRequest:request];
+ NSString *dataPath = [self pathToCachedResponseDataForURL:[request url]];
if (!dataPath) {
return NO;
}
@@ -421,6 +446,23 @@ - (BOOL)canUseCachedDataForRequest:(ASIHTTPRequest *)request
return NO;
}
+/*
+NSURLCache compatibility
+*/
+- (NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request
+{
+ NSData *data = [self cachedResponseDataForURL:[request URL]];
+ NSDictionary *headers = [self cachedResponseHeadersForURL:[request URL]];
+ if (!data || !headers) {
+ return [super cachedResponseForRequest:request];
+ }
+ NSString *mimeType = nil;
+ NSStringEncoding charset;
+ [ASIHTTPRequest parseMimeType:&mimeType andResponseEncoding:&charset fromContentType:[headers objectForKey:@"Content-Type"]];
+ NSURLResponse *urlResponse = [[[NSURLResponse alloc] initWithURL:[request URL] MIMEType:mimeType expectedContentLength:[data length] textEncodingName:nil] autorelease];
+ return [[NSCachedURLResponse alloc] initWithResponse:urlResponse data:data];
+}
+
@synthesize storagePath;
@synthesize defaultCachePolicy;
@synthesize accessLock;
View
3 Classes/ASIHTTPRequest.h
@@ -590,6 +590,8 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Attempts to set the correct encoding by looking at the Content-Type header, if this is one
- (void)parseStringEncodingFromHeaders;
++ (void)parseMimeType:(NSString **)mimeType andResponseEncoding:(NSStringEncoding *)stringEncoding fromContentType:(NSString *)contentType;
+
#pragma mark http authentication stuff
// Apply credentials to this request
@@ -793,6 +795,7 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount;
// Returns a date from a string in RFC1123 format
+ (NSDate *)dateFromRFC1123String:(NSString *)string;
+
// Used for detecting multitasking support at runtime (for backgrounding requests)
#if TARGET_OS_IPHONE
+ (BOOL)isMultitaskingSupported;
View
67 Classes/ASIHTTPRequest.m
@@ -772,7 +772,7 @@ - (void)main
// If cached data is stale, or we have been told to ask the server if it has been modified anyway, we need to add headers for a conditional GET
if ([self cachePolicy] & (ASIAskServerIfModifiedWhenStaleCachePolicy|ASIAskServerIfModifiedCachePolicy)) {
- NSDictionary *cachedHeaders = [[self downloadCache] cachedHeadersForRequest:self];
+ NSDictionary *cachedHeaders = [[self downloadCache] cachedResponseHeadersForURL:[self url]];
if (cachedHeaders) {
NSString *etag = [cachedHeaders objectForKey:@"Etag"];
if (etag) {
@@ -1888,7 +1888,7 @@ - (void)readResponseHeaders
}
}
- // Handle response text encoding
+ // Read response textEncoding
[self parseStringEncodingFromHeaders];
// Handle cookies
@@ -2033,31 +2033,17 @@ - (void)readResponseHeaders
[self performSelectorOnMainThread:@selector(requestReceivedResponseHeaders:) withObject:[[[self responseHeaders] copy] autorelease] waitUntilDone:[NSThread isMainThread]];
}
-// Handle response text encoding
-// If the Content-Type header specified an encoding, we'll use that, otherwise we use defaultStringEncoding (which defaults to NSISOLatin1StringEncoding)
- (void)parseStringEncodingFromHeaders
{
- NSString *contentType = [[self responseHeaders] objectForKey:@"Content-Type"];
- NSStringEncoding encoding = [self defaultResponseEncoding];
- if (contentType) {
-
- NSString *charsetSeparator = @"charset=";
- NSScanner *charsetScanner = [NSScanner scannerWithString: contentType];
- NSString *IANAEncoding = nil;
-
- if ([charsetScanner scanUpToString: charsetSeparator intoString: NULL] && [charsetScanner scanLocation] < [contentType length]) {
- [charsetScanner setScanLocation: [charsetScanner scanLocation] + [charsetSeparator length]];
- [charsetScanner scanUpToString: @";" intoString: &IANAEncoding];
- }
-
- if (IANAEncoding) {
- CFStringEncoding cfEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)IANAEncoding);
- if (cfEncoding != kCFStringEncodingInvalidId) {
- encoding = CFStringConvertEncodingToNSStringEncoding(cfEncoding);
- }
- }
+ // Handle response text encoding
+ NSStringEncoding charset = 0;
+ NSString *mimeType = nil;
+ [[self class] parseMimeType:&mimeType andResponseEncoding:&charset fromContentType:[[self responseHeaders] valueForKey:@"Content-Type"]];
+ if (charset != 0) {
+ [self setResponseEncoding:charset];
+ } else {
+ [self setResponseEncoding:[self defaultResponseEncoding]];
}
- [self setResponseEncoding:encoding];
}
#pragma mark http authentication
@@ -3045,8 +3031,8 @@ - (void)markAsFinished
- (void)useDataFromCache
{
- NSDictionary *headers = [[self downloadCache] cachedHeadersForRequest:self];
- NSString *dataPath = [[self downloadCache] pathToCachedResponseDataForRequest:self];
+ NSDictionary *headers = [[self downloadCache] cachedResponseHeadersForURL:[self url]];
+ NSString *dataPath = [[self downloadCache] pathToCachedResponseDataForURL:[self url]];
ASIHTTPRequest *theRequest = self;
if ([self mainRequest]) {
@@ -4079,6 +4065,35 @@ + (NSDate *)dateFromRFC1123String:(NSString *)string
return [formatter dateFromString:string];
}
+
++ (void)parseMimeType:(NSString **)mimeType andResponseEncoding:(NSStringEncoding *)stringEncoding fromContentType:(NSString *)contentType
+{
+ if (!contentType) {
+ return;
+ }
+ NSScanner *charsetScanner = [NSScanner scannerWithString: contentType];
+ if (![charsetScanner scanUpToString:@";" intoString:mimeType] || [charsetScanner scanLocation] == [contentType length]) {
+ *mimeType = [contentType stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+ return;
+ }
+ *mimeType = [*mimeType stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+ NSString *charsetSeparator = @"charset=";
+ NSString *IANAEncoding = nil;
+
+ if ([charsetScanner scanUpToString: charsetSeparator intoString: NULL] && [charsetScanner scanLocation] < [contentType length]) {
+ [charsetScanner setScanLocation: [charsetScanner scanLocation] + [charsetSeparator length]];
+ [charsetScanner scanUpToString: @";" intoString: &IANAEncoding];
+ }
+
+ if (IANAEncoding) {
+ CFStringEncoding cfEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)IANAEncoding);
+ if (cfEncoding != kCFStringEncodingInvalidId) {
+ *stringEncoding = CFStringConvertEncodingToNSStringEncoding(cfEncoding);
+ }
+ }
+}
+
+
#pragma mark ===
@synthesize username;
View
29 Classes/ASIWebPageRequest.h
@@ -6,6 +6,8 @@
// Copyright 2010 All-Seeing Interactive. All rights reserved.
//
// This is an EXPERIMENTAL class - use at your own risk!
+// It is strongly recommened to set a downloadDestinationPath when using ASIWebPageRequest
+// Also, performance will be better if your ASIWebPageRequest has a downloadCache setup
// Known issue: You cannot use startSychronous with an ASIWebPageRequest
#import "ASIHTTPRequest.h"
@@ -23,17 +25,40 @@ typedef enum _ASIWebContentType {
@interface ASIWebPageRequest : ASIHTTPRequest {
+
+ // Each ASIWebPageRequest for an HTML or CSS file creates its own internal queue to download external resources
ASINetworkQueue *externalResourceQueue;
+
+ // This dictionary stores a list of external resources to download, along with their content-type data or a path to the data
NSMutableDictionary *resourceList;
+
+ // Used internally for parsing HTML (with libxml)
xmlDocPtr doc;
+
+ // If the response is an HTML or CSS file, this will be set so the content can be correctly parsed when it has finished fetching external resources
ASIWebContentType webContentType;
- unsigned long long totalDownloadSize;
- unsigned long long totalDownloadProgress;
+
+ // Stores a reference to the ASIWebPageRequest that created this request
+ // Note that a parentRequest can also have a parent request because ASIWebPageRequests parse their contents to look for external resources recursively
+ // For example, a request for an image can be created by a request for a stylesheet which was created by a request for a web page
ASIWebPageRequest *parentRequest;
+
+ // If set to YES, ASIWebPageRequest will replace the urls of supported external resources with data urls that contain the the content of the external url
+ // This allows you to cache a complete webpage in a single file
+ // If set to NO, ASIWebPageRequest will still download the content of external resource URLS, but will not make changes to CSS or HTML
+ // If you set an ASIDownloadCache for this request and also use it as NSURLCache's sharedCache, webViews and UIWebViews should still be able load many external resources from disk without fetching them again
+ BOOL replaceURLsWithDataURLs;
}
+// Will return a data URI that contains a base64 version of the content at this url
+// This is used when replacing urls in the html and css with actual data
+// If you subclass ASIWebPageRequest, you can override this function to return different conten or a url pointing at another location
- (NSString *)contentForExternalURL:(NSString *)theURL;
+
+// Returns the location that a downloaded external resource's content will be stored in
- (NSString *)cachePathForRequest:(ASIWebPageRequest *)theRequest;
+
@property (assign, nonatomic) ASIWebPageRequest *parentRequest;
+@property (assign, nonatomic) BOOL replaceURLsWithDataURLs;
@end
View
139 Classes/ASIWebPageRequest.m
@@ -9,8 +9,11 @@
#import "ASIWebPageRequest.h"
#import "ASINetworkQueue.h"
+#import <CommonCrypto/CommonHMAC.h>
-static xmlChar *xpathExpr = (xmlChar *)"//link/@href|//script/@src|//img/@src|//frame/@src|//iframe/@src|//*/@style";
+// An xPath query that controls the external resources ASIWebPageRequest will fetch
+// By default, it will fetch stylesheets, javascript files, images, frames, iframes, and html 5 video / audio
+static xmlChar *xpathExpr = (xmlChar *)"//link/@href|//script/@src|//img/@src|//frame/@src|//iframe/@src|//*/@style|//source/@src";
static NSLock *xmlParsingLock = nil;
static NSMutableArray *requestsUsingXMLParser = nil;
@@ -106,19 +109,18 @@ - (void)parseAsCSS
[externalResourceRequest setRequestHeaders:[self requestHeaders]];
[externalResourceRequest setDownloadCache:[self downloadCache]];
[externalResourceRequest setCachePolicy:[self cachePolicy]];
+ [externalResourceRequest setCacheStoragePolicy:[self cacheStoragePolicy]];
[externalResourceRequest setUserInfo:[NSDictionary dictionaryWithObject:theURL forKey:@"Path"]];
[externalResourceRequest setParentRequest:self];
+ [externalResourceRequest setReplaceURLsWithDataURLs:[self replaceURLsWithDataURLs]];
[externalResourceRequest setShouldResetDownloadProgress:NO];
if ([self downloadDestinationPath]) {
[externalResourceRequest setDownloadDestinationPath:[self cachePathForRequest:externalResourceRequest]];
}
[[self externalResourceQueue] addOperation:externalResourceRequest];
[externalResourceRequest setShowAccurateProgress:YES];
}
-
- // Remove external resources
[[self externalResourceQueue] go];
-
}
- (void)parseAsHTML
@@ -172,8 +174,10 @@ - (void)parseAsHTML
[externalResourceRequest setRequestHeaders:[self requestHeaders]];
[externalResourceRequest setDownloadCache:[self downloadCache]];
[externalResourceRequest setCachePolicy:[self cachePolicy]];
+ [externalResourceRequest setCacheStoragePolicy:[self cacheStoragePolicy]];
[externalResourceRequest setUserInfo:[NSDictionary dictionaryWithObject:theURL forKey:@"Path"]];
[externalResourceRequest setParentRequest:self];
+ [externalResourceRequest setReplaceURLsWithDataURLs:[self replaceURLsWithDataURLs]];
[externalResourceRequest setShouldResetDownloadProgress:NO];
if ([self downloadDestinationPath]) {
[externalResourceRequest setDownloadDestinationPath:[self cachePathForRequest:externalResourceRequest]];
@@ -234,76 +238,81 @@ - (void)externalResourceFetchFailed:(ASIHTTPRequest *)externalResourceRequest
- (void)finishedFetchingExternalResources:(ASINetworkQueue *)queue
{
- if (webContentType == ASICSSWebContentType) {
- NSMutableString *parsedResponse;
- NSError *err = nil;
- if ([self downloadDestinationPath]) {
- parsedResponse = [NSMutableString stringWithContentsOfFile:[self downloadDestinationPath] encoding:[self responseEncoding] error:&err];
- } else {
- parsedResponse = [[[self responseString] mutableCopy] autorelease];
- }
- if (err) {
- [self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:101 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Error: unable to read response CSS from disk",NSLocalizedDescriptionKey,nil]]];
- return;
- }
- if (![self error]) {
- for (NSString *resource in [[self resourceList] keyEnumerator]) {
- if ([parsedResponse rangeOfString:resource].location != NSNotFound) {
- NSString *newURL = [self contentForExternalURL:resource];
- if (newURL) {
- [parsedResponse replaceOccurrencesOfString:resource withString:newURL options:0 range:NSMakeRange(0, [parsedResponse length])];
- }
- }
+ if ([self replaceURLsWithDataURLs]) {
+ if (webContentType == ASICSSWebContentType) {
+ NSMutableString *parsedResponse;
+ NSError *err = nil;
+ if ([self downloadDestinationPath]) {
+ parsedResponse = [NSMutableString stringWithContentsOfFile:[self downloadDestinationPath] encoding:[self responseEncoding] error:&err];
+ } else {
+ parsedResponse = [[[self responseString] mutableCopy] autorelease];
}
- }
- if ([self downloadDestinationPath]) {
- [parsedResponse writeToFile:[self downloadDestinationPath] atomically:NO encoding:[self responseEncoding] error:&err];
if (err) {
- [self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:101 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Error: unable to write response CSS to disk",NSLocalizedDescriptionKey,nil]]];
+ [self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:101 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Error: unable to read response CSS from disk",NSLocalizedDescriptionKey,nil]]];
return;
}
+ if (![self error]) {
+ for (NSString *resource in [[self resourceList] keyEnumerator]) {
+ if ([parsedResponse rangeOfString:resource].location != NSNotFound) {
+ NSString *newURL = [self contentForExternalURL:resource];
+ if (newURL) {
+ [parsedResponse replaceOccurrencesOfString:resource withString:newURL options:0 range:NSMakeRange(0, [parsedResponse length])];
+ }
+ }
+ }
+ }
+ if ([self downloadDestinationPath]) {
+ [parsedResponse writeToFile:[self downloadDestinationPath] atomically:NO encoding:[self responseEncoding] error:&err];
+ if (err) {
+ [self failWithError:[NSError errorWithDomain:NetworkRequestErrorDomain code:101 userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Error: unable to write response CSS to disk",NSLocalizedDescriptionKey,nil]]];
+ return;
+ }
+ } else {
+ [self setRawResponseData:(id)[parsedResponse dataUsingEncoding:[self responseEncoding]]];
+ }
} else {
- [self setRawResponseData:(id)[parsedResponse dataUsingEncoding:[self responseEncoding]]];
- }
- } else {
- [xmlParsingLock lock];
-
- [self updateResourceURLs];
- xmlChar *bytes = nil;
- int size = 0;
- FILE *file = NULL;
- if ([self downloadDestinationPath]) {
- file = fdopen([[NSFileHandle fileHandleForWritingAtPath:[self downloadDestinationPath]] fileDescriptor], "w");
- xmlDocDump(file, doc);
- } else {
- xmlDocDumpMemory(doc,&bytes,&size);
- [self setRawResponseData:[[[NSMutableData alloc] initWithBytes:bytes length:size] autorelease]];
- }
+ [xmlParsingLock lock];
+
+ [self updateResourceURLs];
+ xmlChar *bytes = nil;
+ int size = 0;
+ FILE *file = NULL;
+ if ([self downloadDestinationPath]) {
+ file = fdopen([[NSFileHandle fileHandleForWritingAtPath:[self downloadDestinationPath]] fileDescriptor], "w");
+ xmlDocDump(file, doc);
+ } else {
+ xmlDocDumpMemory(doc,&bytes,&size);
+ [self setRawResponseData:[[[NSMutableData alloc] initWithBytes:bytes length:size] autorelease]];
+ }
- xmlFreeDoc(doc);
- doc = nil;
+ xmlFreeDoc(doc);
+ doc = nil;
- if (file) {
- fclose(file);
- }
+ if (file) {
+ fclose(file);
+ }
- [requestsUsingXMLParser removeObject:self];
- if (![requestsUsingXMLParser count]) {
- xmlCleanupParser();
+ [requestsUsingXMLParser removeObject:self];
+ if (![requestsUsingXMLParser count]) {
+ xmlCleanupParser();
+ }
+ [xmlParsingLock unlock];
}
- [xmlParsingLock unlock];
}
-
if (![self parentRequest]) {
- [[self class] updateProgressIndicator:&downloadProgressDelegate withProgress:totalDownloadProgress ofTotal:totalDownloadSize];
+ [[self class] updateProgressIndicator:&downloadProgressDelegate withProgress:contentLength ofTotal:contentLength];
}
NSMutableDictionary *newHeaders = [[[self responseHeaders] mutableCopy] autorelease];
[newHeaders removeObjectForKey:@"Content-Encoding"];
[self setResponseHeaders:newHeaders];
+ // Write the parsed content back to the cache
+ if ([self replaceURLsWithDataURLs]) {
+ [[self downloadCache] storeResponseForRequest:self maxAge:[self secondsToCache]];
+ }
+
[super requestFinished];
- [[self downloadCache] storeResponseForRequest:self maxAge:[self secondsToCache]];
[super markAsFinished];
}
@@ -469,14 +478,26 @@ - (NSString *)contentForExternalURL:(NSString *)theURL
return nil;
}
-static int resourceNum = 0;
- (NSString *)cachePathForRequest:(ASIWebPageRequest *)theRequest
{
- resourceNum++;
- return [NSString stringWithFormat:@"/Users/ben/Desktop/%i",resourceNum];
+ // If we're using a download cache (and its a good idea to do so when using ASIWebPageRequest), ask it for the location to store this file
+ // This ends up being quite efficient, as we download directly to the cache
+ if ([self downloadCache]) {
+ return [[self downloadCache] pathToStoreCachedResponseDataForRequest:theRequest];
+
+ // This is a fallback for when we don't have a download cache - we store the external resource in a file in the temporary directory
+ } else {
+ // Borrowed from: http://stackoverflow.com/questions/652300/using-md5-hash-on-a-string-in-cocoa
+ const char *cStr = [[[theRequest url] absoluteString] UTF8String];
+ unsigned char result[16];
+ CC_MD5(cStr, (CC_LONG)strlen(cStr), result);
+ NSString *md5 = [NSString stringWithFormat:@"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7],result[8], result[9], result[10], result[11],result[12], result[13], result[14], result[15]];
+ return [NSTemporaryDirectory() stringByAppendingPathComponent:md5];
+ }
}
@synthesize externalResourceQueue;
@synthesize resourceList;
@synthesize parentRequest;
+@synthesize replaceURLsWithDataURLs;
@end
View
1 Mac Sample/AppDelegate.h
@@ -51,6 +51,7 @@
IBOutlet WebView *webView;
IBOutlet NSTextView *webPageSource;
IBOutlet NSTextField *urlField;
+ IBOutlet NSButton *dataURICheckbox;
}
- (IBAction)simpleURLFetch:(id)sender;
View
11 Mac Sample/AppDelegate.m
@@ -377,6 +377,7 @@ - (void)rowImageDownloadFinished:(ASIHTTPRequest *)request
- (IBAction)clearCache:(id)sender
{
[[ASIDownloadCache sharedCache] clearCachedResponsesForStoragePolicy:ASICacheForSessionDurationCacheStoragePolicy];
+ [[ASIDownloadCache sharedCache] clearCachedResponsesForStoragePolicy:ASICachePermanentlyCacheStoragePolicy];
}
- (IBAction)fetchWebPage:(id)sender
@@ -399,15 +400,21 @@ - (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary
- (void)fetchURL:(NSURL *)url
{
+ // This allows our ASIDownloadCache to masquerade as as NSURLCache
+ // It allows the webView to load the content we downloaded when replaceURLsWithDataURLs is NO
+ [NSURLCache setSharedURLCache:[ASIDownloadCache sharedCache]];
ASIWebPageRequest *request = [ASIWebPageRequest requestWithURL:url];
[request setDidFailSelector:@selector(webPageFetchFailed:)];
[request setDidFinishSelector:@selector(webPageFetchSucceeded:)];
[request setDelegate:self];
[request setShowAccurateProgress:NO];
[request setDownloadProgressDelegate:progressIndicator];
+ [request setReplaceURLsWithDataURLs:([dataURICheckbox state] == NSOnState)];
+
+ // It is strongly recommended that you set both a downloadCache and a downloadDestinationPath for all ASIWebPageRequests
[request setDownloadCache:[ASIDownloadCache sharedCache]];
- [request setDownloadDestinationPath:@"/Users/ben/Desktop/fink"];
- [[ASIDownloadCache sharedCache] setDefaultCachePolicy:ASIOnlyLoadIfNotCachedCachePolicy];
+ [request setDownloadDestinationPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"fink"]];
+
[[ASIDownloadCache sharedCache] setShouldRespectCacheControlHeaders:NO];
[request startAsynchronous];
}
View
277 Mac Sample/English.lproj/MainMenu.xib
@@ -772,7 +772,7 @@
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{335, 263}, {644, 487}}</string>
+ <string key="NSWindowRect">{{335, 236}, {644, 514}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
@@ -795,7 +795,7 @@
<object class="NSTabView" id="495298985">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{6, 35}, {625, 438}}</string>
+ <string key="NSFrame">{{6, 35}, {625, 465}}</string>
<reference key="NSSuperview" ref="439893737"/>
<object class="NSMutableArray" key="NSTabViewItems">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -809,7 +809,7 @@
<object class="NSButton" id="1005190588">
<reference key="NSNextResponder" ref="374663123"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 285}, {62, 32}}</string>
+ <string key="NSFrame">{{11, 312}, {62, 32}}</string>
<reference key="NSSuperview" ref="374663123"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="55236472">
@@ -833,7 +833,7 @@
<object class="NSTextField" id="782306059">
<reference key="NSNextResponder" ref="374663123"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 321}, {577, 64}}</string>
+ <string key="NSFrame">{{14, 348}, {577, 64}}</string>
<reference key="NSSuperview" ref="374663123"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="63350940">
@@ -984,7 +984,7 @@
<double key="NSPercent">0.94565220000000005</double>
</object>
</object>
- <string key="NSFrame">{{17, 56}, {571, 217}}</string>
+ <string key="NSFrame">{{17, 83}, {571, 217}}</string>
<reference key="NSSuperview" ref="374663123"/>
<reference key="NSNextKeyView" ref="934233033"/>
<int key="NSsFlags">18</int>
@@ -993,7 +993,7 @@
<reference key="NSContentView" ref="934233033"/>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">Synchronous</string>
<reference key="NSColor" ref="482475293"/>
@@ -1009,7 +1009,7 @@
<object class="NSButton" id="965613416">
<reference key="NSNextResponder" ref="439832260"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 247}, {74, 32}}</string>
+ <string key="NSFrame">{{11, 274}, {74, 32}}</string>
<reference key="NSSuperview" ref="439832260"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="621876787">
@@ -1029,7 +1029,7 @@
<object class="NSButton" id="108683710">
<reference key="NSNextResponder" ref="439832260"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{85, 247}, {90, 32}}</string>
+ <string key="NSFrame">{{85, 274}, {90, 32}}</string>
<reference key="NSSuperview" ref="439832260"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="492130991">
@@ -1049,7 +1049,7 @@
<object class="NSTextField" id="908965746">
<reference key="NSNextResponder" ref="439832260"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 293}, {577, 92}}</string>
+ <string key="NSFrame">{{14, 320}, {577, 92}}</string>
<reference key="NSSuperview" ref="439832260"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1014251870">
@@ -1068,7 +1068,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<object class="NSTextField" id="530508561">
<reference key="NSNextResponder" ref="439832260"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 188}, {553, 40}}</string>
+ <string key="NSFrame">{{14, 215}, {553, 40}}</string>
<reference key="NSSuperview" ref="439832260"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="117831065">
@@ -1082,7 +1082,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">File</string>
<reference key="NSColor" ref="482475293"/>
@@ -1110,7 +1110,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{11, 107}, {180, 120}}</string>
+ <string key="NSFrame">{{11, 134}, {180, 120}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="650701610">
@@ -1138,7 +1138,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{194, 107}, {180, 120}}</string>
+ <string key="NSFrame">{{194, 134}, {180, 120}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="737332382">
@@ -1166,7 +1166,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
- <string key="NSFrame">{{377, 107}, {180, 120}}</string>
+ <string key="NSFrame">{{377, 134}, {180, 120}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="543138502">
@@ -1182,7 +1182,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<object class="NSButton" id="919017202">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, 226}, {62, 32}}</string>
+ <string key="NSFrame">{{8, 253}, {62, 32}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="11946473">
@@ -1202,7 +1202,7 @@ bWUgYnV0dG9uIHRvIHBpY2sgdXAgd2hlcmUgd2UgbGVmdCBvZmYuA</string>
<object class="NSTextField" id="1057121416">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 289}, {577, 85}}</string>
+ <string key="NSFrame">{{14, 316}, {577, 85}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="118640000">
@@ -1222,7 +1222,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="986741348">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{378, 238}, {172, 18}}</string>
+ <string key="NSFrame">{{378, 265}, {172, 18}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="588048761">
@@ -1250,7 +1250,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">1292</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{13, 90}, {176, 12}}</string>
+ <string key="NSFrame">{{13, 117}, {176, 12}}</string>
<reference key="NSSuperview" ref="624078948"/>
<int key="NSpiFlags">16648</int>
<double key="NSMaxValue">1</double>
@@ -1259,7 +1259,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">1292</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{196, 90}, {176, 12}}</string>
+ <string key="NSFrame">{{196, 117}, {176, 12}}</string>
<reference key="NSSuperview" ref="624078948"/>
<int key="NSpiFlags">16648</int>
<double key="NSMaxValue">1</double>
@@ -1268,15 +1268,15 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">1292</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{379, 90}, {176, 12}}</string>
+ <string key="NSFrame">{{379, 117}, {176, 12}}</string>
<reference key="NSSuperview" ref="624078948"/>
<int key="NSpiFlags">16648</int>
<double key="NSMaxValue">1</double>
</object>
<object class="NSTextField" id="889442032">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 67}, {180, 17}}</string>
+ <string key="NSFrame">{{11, 94}, {180, 17}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="247767146">
@@ -1292,7 +1292,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="179677784">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{194, 67}, {180, 17}}</string>
+ <string key="NSFrame">{{194, 94}, {180, 17}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="758738035">
@@ -1308,7 +1308,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="955710928">
<reference key="NSNextResponder" ref="624078948"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{377, 67}, {180, 17}}</string>
+ <string key="NSFrame">{{377, 94}, {180, 17}}</string>
<reference key="NSSuperview" ref="624078948"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="140000889">
@@ -1322,7 +1322,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">Queue</string>
<reference key="NSColor" ref="482475293"/>
@@ -1338,7 +1338,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="110942859">
<reference key="NSNextResponder" ref="1012174184"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 338}, {577, 47}}</string>
+ <string key="NSFrame">{{14, 365}, {577, 47}}</string>
<reference key="NSSuperview" ref="1012174184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="115585250">
@@ -1354,7 +1354,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="317500194">
<reference key="NSNextResponder" ref="1012174184"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 181}, {62, 32}}</string>
+ <string key="NSFrame">{{11, 208}, {62, 32}}</string>
<reference key="NSSuperview" ref="1012174184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="21412759">
@@ -1374,7 +1374,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="448108793">
<reference key="NSNextResponder" ref="1012174184"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{15, 314}, {160, 18}}</string>
+ <string key="NSFrame">{{15, 341}, {160, 18}}</string>
<reference key="NSSuperview" ref="1012174184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="522338507">
@@ -1396,7 +1396,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="761301982">
<reference key="NSNextResponder" ref="1012174184"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 226}, {577, 68}}</string>
+ <string key="NSFrame">{{14, 253}, {577, 68}}</string>
<reference key="NSSuperview" ref="1012174184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="737417383">
@@ -1412,7 +1412,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="80086802">
<reference key="NSNextResponder" ref="1012174184"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 154}, {413, 17}}</string>
+ <string key="NSFrame">{{14, 181}, {413, 17}}</string>
<reference key="NSSuperview" ref="1012174184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="470049726">
@@ -1426,7 +1426,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">Authentication</string>
<reference key="NSColor" ref="482475293"/>
@@ -1442,7 +1442,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="246262577">
<reference key="NSNextResponder" ref="408528501"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 354}, {577, 31}}</string>
+ <string key="NSFrame">{{14, 381}, {577, 31}}</string>
<reference key="NSSuperview" ref="408528501"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="938176932">
@@ -1458,7 +1458,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="949500094">
<reference key="NSNextResponder" ref="408528501"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{11, 318}, {62, 32}}</string>
+ <string key="NSFrame">{{11, 345}, {62, 32}}</string>
<reference key="NSSuperview" ref="408528501"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="850742861">
@@ -1478,7 +1478,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="90957184">
<reference key="NSNextResponder" ref="408528501"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 56}, {577, 256}}</string>
+ <string key="NSFrame">{{14, 83}, {577, 256}}</string>
<reference key="NSSuperview" ref="408528501"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="62234470">
@@ -1496,7 +1496,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">Upload</string>
<reference key="NSColor" ref="482475293"/>
@@ -1652,7 +1652,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<double key="NSPercent">0.57142859697341919</double>
</object>
</object>
- <string key="NSFrame">{{17, 85}, {571, 206}}</string>
+ <string key="NSFrame">{{17, 112}, {571, 206}}</string>
<reference key="NSSuperview" ref="466254629"/>
<reference key="NSNextKeyView" ref="1009035736"/>
<int key="NSsFlags">530</int>
@@ -1664,7 +1664,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="359482544">
<reference key="NSNextResponder" ref="466254629"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 113}, {276, 17}}</string>
+ <string key="NSFrame">{{14, 140}, {276, 17}}</string>
<reference key="NSSuperview" ref="466254629"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="779463201">
@@ -1680,7 +1680,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="272531850">
<reference key="NSNextResponder" ref="466254629"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{434, 54}, {89, 25}}</string>
+ <string key="NSFrame">{{434, 81}, {89, 25}}</string>
<reference key="NSSuperview" ref="466254629"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="971131453">
@@ -1700,7 +1700,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="634855581">
<reference key="NSNextResponder" ref="466254629"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{531, 54}, {57, 25}}</string>
+ <string key="NSFrame">{{531, 81}, {57, 25}}</string>
<reference key="NSSuperview" ref="466254629"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="15177589">
@@ -1720,7 +1720,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="277159338">
<reference key="NSNextResponder" ref="466254629"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 299}, {577, 85}}</string>
+ <string key="NSFrame">{{14, 326}, {577, 85}}</string>
<reference key="NSSuperview" ref="466254629"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="21493926">
@@ -1734,7 +1734,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
</object>
<string key="NSLabel">Cache</string>
<reference key="NSColor" ref="482475293"/>
@@ -1771,7 +1771,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>public.url-name</string>
</object>
</object>
- <string key="NSFrame">{{17, 103}, {571, 160}}</string>
+ <string key="NSFrame">{{17, 95}, {571, 162}}</string>
<reference key="NSSuperview" ref="913512215"/>
<reference key="NSNextKeyView"/>
<string key="FrameName"/>
@@ -1800,13 +1800,13 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="974555221">
<reference key="NSNextResponder" ref="913512215"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 330}, {577, 59}}</string>
+ <string key="NSFrame">{{14, 348}, {577, 68}}</string>
<reference key="NSSuperview" ref="913512215"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="403619242">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Demonstrates fetching a webpage with a single ASIWebPageRequest that downloads all external images, stylesheets and scripts and embeds them directly in the HTML source. Once downloaded, a complete page may be cached indefinitely.</string>
+ <string key="NSContents">Demonstrates fetching a webpage with a single ASIWebPageRequest that downloads most external resources (images, stylesheets etc). These can be stored in a cache, or embeded directly in the HTML source. Once downloaded, a complete page may be cached indefinitely.</string>
<reference key="NSSupport" ref="584670792"/>
<reference key="NSControlView" ref="974555221"/>
<reference key="NSBackgroundColor" ref="482475293"/>
@@ -1816,13 +1816,13 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSTextField" id="140610977">
<reference key="NSNextResponder" ref="913512215"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 305}, {480, 25}}</string>
+ <string key="NSFrame">{{14, 315}, {480, 25}}</string>
<reference key="NSSuperview" ref="913512215"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="524417774">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">4194304</int>
- <string key="NSContents">ASIWebPageRequest is an EXPERIMENTAL class, use at your own risk</string>
+ <string key="NSContents">ASIWebPageRequest is an EXPERIMENTAL class, use at your own risk!</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<double key="NSSize">13</double>
@@ -1836,7 +1836,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSButton" id="45647832">
<reference key="NSNextResponder" ref="913512215"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{536, 267}, {58, 32}}</string>
+ <string key="NSFrame">{{536, 289}, {58, 32}}</string>
<reference key="NSSuperview" ref="913512215"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1029441921">
@@ -1889,7 +1889,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>public.url</string>
</object>
</object>
- <string key="NSFrameSize">{554, 37}</string>
+ <string key="NSFrameSize">{554, 21}</string>
<reference key="NSSuperview" ref="201084921"/>
<object class="NSTextContainer" key="NSTextContainer" id="396187289">
<object class="NSLayoutManager" key="NSLayoutManager">
@@ -1907,8 +1907,8 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">12</double>
+ <string key="NSName">Monaco</string>
+ <double key="NSSize">10</double>
<int key="NSfFlags">16</int>
</object>
<object class="NSParagraphStyle">
@@ -1975,7 +1975,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<nil key="NSDelegate"/>
</object>
</object>
- <string key="NSFrame">{{1, 1}, {554, 76}}</string>
+ <string key="NSFrame">{{1, 1}, {554, 68}}</string>
<reference key="NSSuperview" ref="525846965"/>
<reference key="NSNextKeyView" ref="923397034"/>
<reference key="NSDocView" ref="923397034"/>
@@ -1986,7 +1986,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSScroller" id="668880359">
<reference key="NSNextResponder" ref="525846965"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{555, 1}, {15, 76}}</string>
+ <string key="NSFrame">{{555, 1}, {15, 68}}</string>
<reference key="NSSuperview" ref="525846965"/>
<reference key="NSTarget" ref="525846965"/>
<string key="NSAction">_doScroller:</string>
@@ -2005,26 +2005,26 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<double key="NSPercent">0.94565218687057495</double>
</object>
</object>
- <string key="NSFrame">{{17, 17}, {571, 78}}</string>
+ <string key="NSFrame">{{17, 17}, {571, 70}}</string>
<reference key="NSSuperview" ref="913512215"/>
<reference key="NSNextKeyView" ref="201084921"/>
<int key="NSsFlags">18</int>
<reference key="NSVScroller" ref="668880359"/>
<reference key="NSHScroller" ref="374693844"/>
<reference key="NSContentView" ref="201084921"/>
</object>
- <object class="NSTextField" id="349773601">
+ <object class="NSTextField" id="611913208">
<reference key="NSNextResponder" ref="913512215"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 273}, {509, 22}}</string>
+ <string key="NSFrame">{{17, 295}, {517, 22}}</string>
<reference key="NSSuperview" ref="913512215"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="947230277">
+ <object class="NSTextFieldCell" key="NSCell" id="168110194">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">http://allseeing-i.com/ASIHTTPRequest/tests/ASIWebPageRequest/index.html</string>
<reference key="NSSupport" ref="584670792"/>
- <reference key="NSControlView" ref="349773601"/>
+ <reference key="NSControlView" ref="611913208"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="348357913">
<int key="NSColorSpace">6</int>
@@ -2040,8 +2040,50 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
+ <object class="NSButton" id="934590164">
+ <reference key="NSNextResponder" ref="913512215"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{15, 263}, {360, 18}}</string>
+ <reference key="NSSuperview" ref="913512215"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="583660522">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Embed external resources directly into HTML and CSS</string>
+ <reference key="NSSupport" ref="584670792"/>
+ <reference key="NSControlView" ref="934590164"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="385619933"/>
+ <reference key="NSAlternateImage" ref="938042219"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="755476948">
+ <reference key="NSNextResponder" ref="913512215"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{499, 263}, {89, 25}}</string>
+ <reference key="NSSuperview" ref="913512215"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="618764012">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Clear Cache</string>
+ <reference key="NSSupport" ref="584670792"/>
+ <reference key="NSControlView" ref="755476948"/>
+ <int key="NSButtonFlags">-2038152961</int>
+ <int key="NSButtonFlags2">163</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
</object>
- <string key="NSFrame">{{10, 33}, {605, 392}}</string>
+ <string key="NSFrame">{{10, 33}, {605, 419}}</string>
<reference key="NSSuperview" ref="495298985"/>
</object>
<string key="NSLabel">Web Page Fetch</string>
@@ -2098,7 +2140,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
</object>
- <string key="NSFrameSize">{644, 487}</string>
+ <string key="NSFrameSize">{644, 514}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
@@ -2946,7 +2988,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="IBOutletConnection" key="connection">
<string key="label">urlField</string>
<reference key="source" ref="1010338297"/>
- <reference key="destination" ref="349773601"/>
+ <reference key="destination" ref="611913208"/>
</object>
<int key="connectionID">598</int>
</object>
@@ -2962,10 +3004,26 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="IBActionConnection" key="connection">
<string key="label">fetchWebPage:</string>
<reference key="source" ref="1010338297"/>
- <reference key="destination" ref="349773601"/>
+ <reference key="destination" ref="611913208"/>
</object>
<int key="connectionID">601</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataURICheckbox</string>
+ <reference key="source" ref="1010338297"/>
+ <reference key="destination" ref="934590164"/>
+ </object>
+ <int key="connectionID">605</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">clearCache:</string>
+ <reference key="source" ref="1010338297"/>
+ <reference key="destination" ref="755476948"/>
+ </object>
+ <int key="connectionID">609</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -3581,10 +3639,10 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<reference key="object" ref="439893737"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="495298985"/>
<reference ref="1071498008"/>
- <reference ref="3588844"/>
<reference ref="784111818"/>
+ <reference ref="3588844"/>
+ <reference ref="495298985"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
@@ -4392,12 +4450,14 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<reference key="object" ref="913512215"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="140610977"/>
<reference ref="974555221"/>
+ <reference ref="45647832"/>
+ <reference ref="611913208"/>
+ <reference ref="140610977"/>
<reference ref="525846965"/>
<reference ref="844366672"/>
- <reference ref="45647832"/>
- <reference ref="349773601"/>
+ <reference ref="934590164"/>
+ <reference ref="755476948"/>
</object>
<reference key="parent" ref="904920234"/>
</object>
@@ -4518,17 +4578,45 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">596</int>
- <reference key="object" ref="349773601"/>
+ <reference key="object" ref="611913208"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="947230277"/>
+ <reference ref="168110194"/>
</object>
<reference key="parent" ref="913512215"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">597</int>
- <reference key="object" ref="947230277"/>
- <reference key="parent" ref="349773601"/>
+ <reference key="object" ref="168110194"/>
+ <reference key="parent" ref="611913208"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">603</int>
+ <reference key="object" ref="934590164"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="583660522"/>
+ </object>
+ <reference key="parent" ref="913512215"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">604</int>
+ <reference key="object" ref="583660522"/>
+ <reference key="parent" ref="934590164"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">606</int>
+ <reference key="object" ref="755476948"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="618764012"/>
+ </object>
+ <reference key="parent" ref="913512215"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">607</int>
+ <reference key="object" ref="618764012"/>
+ <reference key="parent" ref="755476948"/>
</object>
</object>
</object>
@@ -4706,6 +4794,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>412.IBPluginDependency</string>
<string>413.IBPluginDependency</string>
<string>434.IBPluginDependency</string>
+ <string>434.IBViewBoundsToFrameTransform</string>
<string>435.IBPluginDependency</string>
<string>436.IBPluginDependency</string>
<string>437.IBPluginDependency</string>
@@ -4786,6 +4875,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>562.IBPluginDependency</string>
<string>563.IBPluginDependency</string>
<string>566.IBPluginDependency</string>
+ <string>566.IBViewBoundsToFrameTransform</string>
<string>567.IBPluginDependency</string>
<string>568.IBPluginDependency</string>
<string>569.IBPluginDependency</string>
@@ -4809,6 +4899,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>583.IBPluginDependency</string>
<string>584.IBPluginDependency</string>
<string>585.IBPluginDependency</string>
+ <string>585.IBViewBoundsToFrameTransform</string>
<string>586.IBPluginDependency</string>
<string>587.IBPluginDependency</string>
<string>587.IBViewBoundsToFrameTransform</string>
@@ -4820,6 +4911,12 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>594.IBPluginDependency</string>
<string>596.IBPluginDependency</string>
<string>597.IBPluginDependency</string>
+ <string>603.IBPluginDependency</string>
+ <string>603.IBViewBoundsToFrameTransform</string>
+ <string>604.IBPluginDependency</string>
+ <string>606.IBPluginDependency</string>
+ <string>606.IBViewBoundsToFrameTransform</string>
+ <string>607.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>72.ImportedFromIB2</string>
<string>73.IBPluginDependency</string>
@@ -4983,15 +5080,15 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{461, 55}, {644, 487}}</string>
+ <string>{{468, 239}, {644, 514}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{461, 55}, {644, 487}}</string>
+ <string>{{468, 239}, {644, 514}}</string>
<integer value="1"/>
<string>{{235, -51}, {480, 337}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBMAAAwpQAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABBMAAAwkwAAA</bytes>
</object>
<string>{{329, 629}, {279, 182}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5020,6 +5117,9 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABAwAAAw/kAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5079,12 +5179,12 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDpwAAwpYAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDpwAAwlAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABDKwAAwpQAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDKwAAwkwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5104,6 +5204,9 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABD2QAAwtAAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5124,11 +5227,14 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.WebKitIBPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">AUGIAABDAwAAA</bytes>
+ <bytes key="NSTransformStruct">AUGIAABDAgAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBYAAAw6QAAA</bytes>
+ </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
@@ -5137,14 +5243,24 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABBiAAAwugAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABBiAAAwuAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBcAAAw4uAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABD+YAAw48AAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -5187,7 +5303,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">601</int>
+ <int key="maxID">609</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -5302,6 +5418,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>bandwidthUsed</string>
+ <string>dataURICheckbox</string>
<string>fileLocation</string>
<string>host</string>
<string>htmlSource</string>
@@ -5332,6 +5449,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSTextField</string>
+ <string>NSButton</string>
<string>NSTextField</string>
<string>NSTextField</string>
<string>NSTextView</string>
@@ -5365,6 +5483,7 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>bandwidthUsed</string>
+ <string>dataURICheckbox</string>
<string>fileLocation</string>
<string>host</string>
<string>htmlSource</string>
@@ -5399,6 +5518,10 @@ b3R0b20gb2YgdGhlIHdpbmRvdy4gCg</string>
<string key="candidateClassName">NSTextField</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">dataURICheckbox</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">fileLocation</string>
<string key="candidateClassName">NSTextField</string>
</object>

0 comments on commit b152a3d

Please sign in to comment.
Something went wrong with that request. Please try again.