- remove dependencies on NSDictionary and NSURL extras
* History.subproj/WebHistoryItem.m:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
* Misc.subproj/WebKitNSStringExtras.h:
* Misc.subproj/WebKitNSStringExtras.m:
(-[NSString _webkit_hasCaseInsensitiveSuffix:]):
(-[NSString _webkit_hasCaseInsensitiveSubstring:]):
(-[NSString _webkit_filenameByFixingIllegalCharacters]):
* Misc.subproj/WebNSDictionaryExtras.h: Added.
* Misc.subproj/WebNSDictionaryExtras.m: Added.
(-[NSDictionary _webkit_numberForKey:]):
(-[NSDictionary _webkit_intForKey:]):
(-[NSDictionary _webkit_stringForKey:]):
(-[NSDictionary _webkit_objectForMIMEType:]):
(-[NSMutableDictionary _webkit_setObject:forUncopiedKey:]):
(-[NSMutableDictionary _webkit_setInt:forKey:]):
(-[NSMutableDictionary _webkit_setBool:forKey:]):
* Misc.subproj/WebNSPasteboardExtras.m:
* Misc.subproj/WebNSURLExtras.h:
* Misc.subproj/WebNSURLExtras.m:
(-[NSURL _webkit_URLByRemovingFragment]):
(-[NSURL _webkit_scriptIfJavaScriptURL]):
(-[NSURL _webkit_isFileURL]):
(-[NSURL _web_hostString]):
(-[NSURL _webkit_suggestedFilenameWithMIMEType:]):
* Misc.subproj/WebNSViewExtras.m:
* Panels.subproj/WebPanelAuthenticationHandler.m:
* Plugins.subproj/WebBaseNetscapePluginStream.m:
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
(-[WebBaseNetscapePluginView loadPluginRequest:]):
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
* WebCoreSupport.subproj/WebBridge.m:
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/WebDataSource.m:
* WebView.subproj/WebFrame.m:
* WebView.subproj/WebFrameView.m:
* WebView.subproj/WebHTMLView.m:
* WebView.subproj/WebPreferences.m:
(-[WebPreferences _setIntegerValue:forKey:]):
(-[WebPreferences _setBoolValue:forKey:]):
* WebView.subproj/WebResource.m:
(-[WebResource _initWithPropertyList:]):
(-[WebResource _fileWrapperRepresentation]):
* WebView.subproj/WebView.m:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9260
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-06-02 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adele.
+
+ - remove dependencies on NSDictionary and NSURL extras
+
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem initFromDictionaryRepresentation:]):
+ * Misc.subproj/WebKitNSStringExtras.h:
+ * Misc.subproj/WebKitNSStringExtras.m:
+ (-[NSString _webkit_hasCaseInsensitiveSuffix:]):
+ (-[NSString _webkit_hasCaseInsensitiveSubstring:]):
+ (-[NSString _webkit_filenameByFixingIllegalCharacters]):
+ * Misc.subproj/WebNSDictionaryExtras.h: Added.
+ * Misc.subproj/WebNSDictionaryExtras.m: Added.
+ (-[NSDictionary _webkit_numberForKey:]):
+ (-[NSDictionary _webkit_intForKey:]):
+ (-[NSDictionary _webkit_stringForKey:]):
+ (-[NSDictionary _webkit_objectForMIMEType:]):
+ (-[NSMutableDictionary _webkit_setObject:forUncopiedKey:]):
+ (-[NSMutableDictionary _webkit_setInt:forKey:]):
+ (-[NSMutableDictionary _webkit_setBool:forKey:]):
+ * Misc.subproj/WebNSPasteboardExtras.m:
+ * Misc.subproj/WebNSURLExtras.h:
+ * Misc.subproj/WebNSURLExtras.m:
+ (-[NSURL _webkit_URLByRemovingFragment]):
+ (-[NSURL _webkit_scriptIfJavaScriptURL]):
+ (-[NSURL _webkit_isFileURL]):
+ (-[NSURL _web_hostString]):
+ (-[NSURL _webkit_suggestedFilenameWithMIMEType:]):
+ * Misc.subproj/WebNSViewExtras.m:
+ * Panels.subproj/WebPanelAuthenticationHandler.m:
+ * Plugins.subproj/WebBaseNetscapePluginStream.m:
+ * Plugins.subproj/WebBaseNetscapePluginView.m:
+ (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
+ * WebCoreSupport.subproj/WebBridge.m:
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/WebDataSource.m:
+ * WebView.subproj/WebFrame.m:
+ * WebView.subproj/WebFrameView.m:
+ * WebView.subproj/WebHTMLView.m:
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _setIntegerValue:forKey:]):
+ (-[WebPreferences _setBoolValue:forKey:]):
+ * WebView.subproj/WebResource.m:
+ (-[WebResource _initWithPropertyList:]):
+ (-[WebResource _fileWrapperRepresentation]):
+ * WebView.subproj/WebView.m:
+
2005-06-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Vicki.
#import <WebKit/WebIconLoader.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebKitNSStringExtras.h>
+#import <WebKit/WebNSDictionaryExtras.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebPluginController.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLRequestPrivate.h>
#import <CoreGraphics/CoreGraphicsPrivate.h>
- (id)initFromDictionaryRepresentation:(NSDictionary *)dict
{
- NSString *URLString = [dict _web_stringForKey:@""];
- NSString *title = [dict _web_stringForKey:WebTitleKey];
+ NSString *URLString = [dict _webkit_stringForKey:@""];
+ NSString *title = [dict _webkit_stringForKey:WebTitleKey];
// Do an existence check to avoid calling doubleValue on a nil string. Leave
// time interval at 0 if there's no value in dict.
- NSString *timeIntervalString = [dict _web_stringForKey:WebLastVisitedTimeIntervalKey];
+ NSString *timeIntervalString = [dict _webkit_stringForKey:WebLastVisitedTimeIntervalKey];
NSTimeInterval lastVisited = timeIntervalString == nil ? 0 : [timeIntervalString doubleValue];
self = [self initWithURLString:URLString title:title lastVisitedTimeInterval:lastVisited];
_private->originalURLString = [_private->URLString retain];
}
- [self setAlternateTitle:[dict _web_stringForKey:WebDisplayTitleKey]];
+ [self setAlternateTitle:[dict _webkit_stringForKey:WebDisplayTitleKey]];
- _private->visitCount = [dict _web_intForKey:WebVisitCountKey];
+ _private->visitCount = [dict _webkit_intForKey:WebVisitCountKey];
NSArray *childDicts = [dict objectForKey:WebChildrenKey];
if (childDicts) {
- (BOOL)_webkit_isCaseInsensitiveEqualToString:(NSString *)string;
- (BOOL)_webkit_hasCaseInsensitivePrefix:(NSString *)suffix;
+- (BOOL)_webkit_hasCaseInsensitiveSuffix:(NSString *)suffix;
+- (BOOL)_webkit_hasCaseInsensitiveSubstring:(NSString *)substring;
+- (NSString *)_webkit_filenameByFixingIllegalCharacters;
- (NSString *)_webkit_stringByTrimmingWhitespace;
- (NSString *)_webkit_stringByCollapsingNonPrintingCharacters;
return [self rangeOfString:prefix options:(NSCaseInsensitiveSearch | NSAnchoredSearch)].location != NSNotFound;
}
+-(BOOL)_webkit_hasCaseInsensitiveSuffix:(NSString *)suffix
+{
+ return [self rangeOfString:suffix options:(NSCaseInsensitiveSearch | NSBackwardsSearch | NSAnchoredSearch)].location != NSNotFound;
+}
+
+-(BOOL)_webkit_hasCaseInsensitiveSubstring:(NSString *)substring
+{
+ return [self rangeOfString:substring options:NSCaseInsensitiveSearch].location != NSNotFound;
+}
+
+-(NSString *)_webkit_filenameByFixingIllegalCharacters
+{
+ NSMutableString *filename = [[self mutableCopy] autorelease];
+
+ // Strip null characters.
+ unichar nullChar = 0;
+ [filename replaceOccurrencesOfString:[NSString stringWithCharacters:&nullChar length:0] withString:@"" options:0 range:NSMakeRange(0, [filename length])];
+
+ // Replace "/" with "-".
+ [filename replaceOccurrencesOfString:@"/" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
+
+ // Replace ":" with "-".
+ [filename replaceOccurrencesOfString:@":" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
+
+ // Strip leading dots.
+ while ([filename hasPrefix:@"."]) {
+ [filename deleteCharactersInRange:NSMakeRange(0,1)];
+ }
+
+ return filename;
+}
+
-(NSString *)_webkit_stringByTrimmingWhitespace
{
NSMutableString *trimmed = [[self mutableCopy] autorelease];
--- /dev/null
+/*
+ WebNSURLExtras.h
+ Private (SPI) header
+ Copyright 2003, Apple, Inc. All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface NSDictionary (WebNSDictionaryExtras)
+- (int)_webkit_intForKey:(id)key;
+- (NSString *)_webkit_stringForKey:(id)key; // Returns nil if the value is not an NSString.
+
+// Searches for the full MIME type, then the prefix (e.g., "text/" for "text/html")
+- (id)_webkit_objectForMIMEType:(NSString *)MIMEType;
+@end
+
+@interface NSMutableDictionary (WebNSDictionaryExtras)
+- (void)_webkit_setObject:(id)object forUncopiedKey:(id)key;
+- (void)_webkit_setInt:(int)value forKey:(id)key;
+- (void)_webkit_setBool:(BOOL)value forKey:(id)key;
+@end
+
--- /dev/null
+/*
+ WebNSDataExtras.m
+ Private (SPI) header
+ Copyright 2003, Apple, Inc. All rights reserved.
+ */
+
+#import <WebKit/WebNSDataExtras.h>
+
+#import <WebKit/WebAssertions.h>
+
+@implementation NSDictionary (WebNSDictionaryExtras)
+-(NSNumber *)_webkit_numberForKey:(id)key
+{
+ id object = [self objectForKey:key];
+ return [object isKindOfClass:[NSNumber class]] ? object : nil;
+}
+
+-(int)_webkit_intForKey:(NSString *)key
+{
+ NSNumber *number = [self _webkit_numberForKey:key];
+ return number == nil ? 0 : [number intValue];
+}
+
+-(NSString *)_webkit_stringForKey:(id)key
+{
+ id object = [self objectForKey:key];
+ return [object isKindOfClass:[NSString class]] ? object : nil;
+}
+
+-(id)_webkit_objectForMIMEType:(NSString *)MIMEType
+{
+ id result;
+ NSRange slashRange;
+
+ result = [self objectForKey:MIMEType];
+ if (result) {
+ return result;
+ }
+
+ slashRange = [MIMEType rangeOfString:@"/"];
+ if (slashRange.location == NSNotFound) {
+ return nil;
+ }
+
+ return [self objectForKey:[MIMEType substringToIndex:slashRange.location + 1]];
+}
+
+@end
+
+@implementation NSMutableDictionary (WebNSDictionaryExtras)
+-(void)_webkit_setObject:(id)object forUncopiedKey:(id)key
+{
+ CFDictionarySetValue((CFMutableDictionaryRef)self, key, object);
+}
+
+-(void)_webkit_setInt:(int)value forKey:(id)key
+{
+ NSNumber *object = [[NSNumber alloc] initWithInt:value];
+ [self setObject:object forKey:key];
+ [object release];
+}
+
+-(void)_webkit_setBool:(BOOL)value forKey:(id)key
+{
+ NSNumber *object = [[NSNumber alloc] initWithBool:value];
+ [self setObject:object forKey:key];
+ [object release];
+}
+
+@end
+
#import <WebKit/WebURLsWithTitles.h>
#import <WebKit/WebViewPrivate.h>
-#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLFileTypeMappings.h>
#import <HIServices/CoreTranslationFlavorTypeNames.h>
- (BOOL)_webkit_shouldLoadAsEmptyDocument;
+- (NSString *)_webkit_suggestedFilenameWithMIMEType:(NSString *)MIMEType;
+
@end
@interface NSString (WebNSURLExtras)
// FIXME: change these names back to _web_ when identically-named
// methods are removed from or renamed in Foundation
- (BOOL)_webkit_isJavaScriptURL;
-- (NSString *)_webkit_scriptIfJavaScriptURL;
- (BOOL)_webkit_isFTPDirectoryURL;
- (BOOL)_webkit_isFileURL;
- (BOOL)_webkit_looksLikeAbsoluteURL;
- (NSString *)_webkit_URLFragment;
+- (NSString *)_webkit_scriptIfJavaScriptURL;
@end
#import <WebKit/WebKitNSStringExtras.h>
#import <WebKit/WebNSDataExtras.h>
#import <WebKit/WebNSObjectExtras.h>
+#import <WebKit/WebLocalizableStrings.h>
#import <Foundation/NSURLProtocolPrivate.h>
#import <Foundation/NSURLRequest.h>
-#import <Foundation/NSURL_NSURLExtras.h>
+#import <Foundation/NSURLFileTypeMappings.h>
#import <unicode/uchar.h>
#import <unicode/uidna.h>
return result;
}
+typedef struct {
+ NSString *scheme;
+ NSString *user;
+ NSString *password;
+ NSString *host;
+ CFIndex port; // kCFNotFound means ignore/omit
+ NSString *path;
+ NSString *query;
+ NSString *fragment;
+} WebKitURLComponents;
+
+
+
- (NSURL *)_webkit_URLByRemovingFragment
{
+ CFRange fragRg = CFURLGetByteRangeForComponent((CFURLRef)self, kCFURLComponentFragment, NULL);
// Check to see if a fragment exists before decomposing the URL.
- CFStringRef frag = CFURLCopyFragment((CFURLRef)self, NULL);
- if (!frag) {
+ if (fragRg.location == kCFNotFound) {
return self;
}
- CFRelease(frag);
-
- WebURLComponents components = [self _web_URLComponents];
- components.fragment = nil;
- NSURL *result = [NSURL _web_URLWithComponents:components];
- return result ? result : self;
+ UInt8 *urlBytes, buffer[2048];
+ CFIndex numBytes = CFURLGetBytes((CFURLRef)self, buffer, 2048);
+ if (numBytes == -1) {
+ numBytes = CFURLGetBytes((CFURLRef)self, NULL, 0);
+ urlBytes = malloc(numBytes);
+ CFURLGetBytes((CFURLRef)self, urlBytes, numBytes);
+ } else {
+ urlBytes = buffer;
+ }
+
+ NSURL *result = (NSURL *)CFMakeCollectable(CFURLCreateWithBytes(NULL, urlBytes, fragRg.location - 1, kCFStringEncodingUTF8, NULL));
+ if (!result) {
+ result = (NSURL *)CFMakeCollectable(CFURLCreateWithBytes(NULL, urlBytes, fragRg.location - 1, kCFStringEncodingISOLatin1, NULL));
+ }
+
+ if (urlBytes != buffer) free(urlBytes);
+ return result ? [result autorelease] : self;
}
- (BOOL)_webkit_isJavaScriptURL
return [[self _web_originalDataAsString] _webkit_isJavaScriptURL];
}
-- (BOOL)_webkit_isFileURL
+- (NSString *)_webkit_scriptIfJavaScriptURL
{
- return [[self _web_originalDataAsString] _webkit_isFileURL];
+ return [[self absoluteString] _webkit_scriptIfJavaScriptURL];
}
-- (NSString *)_webkit_scriptIfJavaScriptURL
+- (BOOL)_webkit_isFileURL
{
- return [[self _web_originalDataAsString] _webkit_scriptIfJavaScriptURL];
+ return [[self _web_originalDataAsString] _webkit_isFileURL];
}
- (BOOL)_webkit_isFTPDirectoryURL
return [[[NSString alloc] initWithData:[self _web_hostData] encoding:NSUTF8StringEncoding] autorelease];
}
+- (NSString *)_webkit_suggestedFilenameWithMIMEType:(NSString *)MIMEType
+{
+ // Get the filename from the URL. Try the lastPathComponent first.
+ NSString *lastPathComponent = [[self path] lastPathComponent];
+ NSString *filename = [lastPathComponent _webkit_filenameByFixingIllegalCharacters];
+ NSString *extension = nil;
+
+ if ([filename length] == 0 || [lastPathComponent isEqualToString:@"/"]) {
+ // lastPathComponent is no good, try the host.
+ filename = [[self _web_hostString] _webkit_filenameByFixingIllegalCharacters];
+ if ([filename length] == 0) {
+ // Can't make a filename using this URL, use "unknown".
+ filename = UI_STRING("unknown", "Unknown filename");
+ }
+ } else {
+ // Save the extension for later correction. Only correct the extension of the lastPathComponent.
+ // For example, if the filename ends up being the host, we wouldn't want to correct ".com" in "www.apple.com".
+ extension = [filename pathExtension];
+ }
+
+ // No mime type reported. Just return the filename we have now.
+ if (!MIMEType) {
+ return filename;
+ }
+
+ // Do not correct filenames that are reported with a mime type of tar, and
+ // have a filename which has .tar in it or ends in .tgz
+ if (([MIMEType isEqualToString:@"application/tar"] || [MIMEType isEqualToString:@"application/x-tar"]) &&
+ ([filename _webkit_hasCaseInsensitiveSubstring:@".tar"] || [filename _webkit_hasCaseInsensitiveSuffix:@".tgz"])) {
+ return filename;
+ }
+
+ // If the type is known, check the extension and correct it if necessary.
+ if (![MIMEType isEqualToString:@"application/octet-stream"] && ![MIMEType isEqualToString:@"text/plain"]) {
+ NSURLFileTypeMappings *mappings = [NSURLFileTypeMappings sharedMappings];
+ NSArray *extensions = [mappings extensionsForMIMEType:MIMEType];
+
+ if (![extension length] || (extensions && ![extensions containsObject:extension])) {
+ // The extension doesn't match the MIME type. Correct this.
+ NSString *correctExtension = [mappings preferredExtensionForMIMEType:MIMEType];
+ if ([correctExtension length] != 0) {
+ // Append the correct extension.
+ filename = [filename stringByAppendingPathExtension:correctExtension];
+ }
+ }
+ }
+
+ return filename;
+}
+
@end
@implementation NSString (WebNSURLExtras)
#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebNSURLExtras.h>
-#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLFileTypeMappings.h>
#define WebDragStartHysteresisX 5.0
#import <WebKit/WebPanelAuthenticationHandler.h>
-#import <WebKit/WebAuthenticationPanel.h>
+
#import <Foundation/NSURLAuthenticationChallenge.h>
+#import <WebKit/WebAuthenticationPanel.h>
#import <WebKit/WebAssertions.h>
+#import <WebKit/WebNSDictionaryExtras.h>
static NSString *WebModalDialogPretendWindow = @"WebModalDialogPretendWindow";
-@interface NSMutableDictionary (WebExtras)
-- (void)_webkit_setObject:(id)object forUncopiedKey:(id)key;
-@end
-
-@implementation NSMutableDictionary (WebExtras)
--(void)_webkit_setObject:(id)object forUncopiedKey:(id)key
-{
- CFDictionarySetValue((CFMutableDictionaryRef)self, key, object);
-}
-@end
-
-
@implementation WebPanelAuthenticationHandler
WebPanelAuthenticationHandler *sharedHandler;
#import <Foundation/NSURLResponse.h>
#import <Foundation/NSURLResponsePrivate.h>
#import <Foundation/NSFileManager_NSURLExtras.h>
-#import <Foundation/NSURL_NSURLExtras.h>
static const char *CarbonPathFromPOSIXPath(const char *posixPath);
#import <WebKit/WebNetscapePluginStream.h>
#import <WebKit/WebNullPluginView.h>
#import <WebKit/WebNSDataExtras.h>
+#import <WebKit/WebNSDictionaryExtras.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebUIDelegate.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
-#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLRequestPrivate.h>
#import <AppKit/NSEvent_Private.h>
}
NSURL *URL = [[JSPluginRequest request] URL];
- NSString *JSString = [URL _web_scriptIfJavaScriptURL];
+ NSString *JSString = [URL _webkit_scriptIfJavaScriptURL];
ASSERT(JSString);
NSString *result = [[[self webFrame] _bridge] stringByEvaluatingJavaScriptFromString:JSString forceUserGesture:[JSPluginRequest isCurrentEventUserGesture]];
WebFrame *frame = nil;
NSURL *URL = [request URL];
- NSString *JSString = [URL _web_scriptIfJavaScriptURL];
+ NSString *JSString = [URL _webkit_scriptIfJavaScriptURL];
ASSERT(frameName || JSString);
ASSERT([view isKindOfClass:[WebBaseNetscapePluginView class]]);
[view webFrame:frame didFinishLoadWithReason:NPRES_USER_BREAK];
}
- [pendingFrameLoads _web_setObject:pluginRequest forUncopiedKey:frame];
+ [pendingFrameLoads _webkit_setObject:pluginRequest forUncopiedKey:frame];
[frame _setInternalLoadDelegate:self];
}
}
return NPERR_INVALID_URL;
}
- NSString *JSString = [URL _web_scriptIfJavaScriptURL];
+ NSString *JSString = [URL _webkit_scriptIfJavaScriptURL];
if (JSString != nil) {
if (![[[self webView] preferences] isJavaScriptEnabled]) {
// Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.
#import <WebKit/WebFrameView.h>
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebKitLogging.h>
+#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebPlugin.h>
#import <WebKit/WebPluginContainer.h>
#import <WebCore/WebCoreBridge.h>
-#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLRequest.h>
@interface NSView (PluginSecrets)
if (!target) {
target = @"_top";
}
- NSString *JSString = [[request URL] _web_scriptIfJavaScriptURL];
+ NSString *JSString = [[request URL] _webkit_scriptIfJavaScriptURL];
if (JSString) {
if ([frame findFrameNamed:target] != frame) {
ERROR("JavaScript requests can only be made on the frame that contains the plug-in");
#import <Foundation/NSURLRequest.h>
#import <Foundation/NSURLRequestPrivate.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLConnection.h>
#import <Foundation/NSURLResponse.h>
#import <Foundation/NSURLResponsePrivate.h>
//254
254DC334016E1D3F0ECA149E = {
children = (
+ 65488D9F084FBCCB00831AD0,
+ 65488DA0084FBCCB00831AD0,
3944607A020F50ED0ECA1767,
3944607B020F50ED0ECA1767,
F528E3E9031E91AD01CA2ACA,
refType = 4;
sourceTree = "<group>";
};
+ 65488D9F084FBCCB00831AD0 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = WebNSDictionaryExtras.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 65488DA0084FBCCB00831AD0 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.objc;
+ path = WebNSDictionaryExtras.m;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 65488DA1084FBCCB00831AD0 = {
+ fileRef = 65488D9F084FBCCB00831AD0;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 65488DA2084FBCCB00831AD0 = {
+ fileRef = 65488DA0084FBCCB00831AD0;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
6578F5DE045F817400000128 = {
fileEncoding = 30;
isa = PBXFileReference;
939810AF0824BF01008DF038,
939810B00824BF01008DF038,
939810B10824BF01008DF038,
+ 65488DA1084FBCCB00831AD0,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
939811240824BF01008DF038,
939811250824BF01008DF038,
939811260824BF01008DF038,
+ 65488DA2084FBCCB00831AD0,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
#import <WebKit/WebTextRepresentation.h>
#import <WebKit/WebViewPrivate.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLConnection.h>
#import <Foundation/NSURLRequest.h>
#import <Foundation/NSURLResponsePrivate.h>
#import <WebKit/WebViewInternal.h>
#import <WebKit/WebUIDelegate.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLRequestPrivate.h>
#import <objc/objc-runtime.h>
#import <WebCore/WebCoreFrameView.h>
#import <WebCore/WebCoreView.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLRequest.h>
@interface NSClipView (AppKitSecretsIKnow)
#import <AppKit/NSResponder_Private.h>
#import <Foundation/NSFileManager_NSURLExtras.h>
-#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLFileTypeMappings.h>
#import <CoreGraphics/CGContextGState.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebKitNSStringExtras.h>
+#import <WebKit/WebNSDictionaryExtras.h>
#import <WebKit/WebNSURLExtras.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
-
#import <WebCore/WebCoreSettings.h>
#import <Carbon/Carbon.h> // For TEC
- (void)_setIntegerValue:(int)value forKey:(NSString *)key
{
NSString *_key = KEY(key);
- [_private->values _web_setInt:value forKey:_key];
+ [_private->values _webkit_setInt:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setInteger:value forKey:_key];
[self _postPreferencesChangesNotification];
- (void)_setBoolValue:(BOOL)value forKey:(NSString *)key
{
NSString *_key = KEY(key);
- [_private->values _web_setBool:value forKey:_key];
+ [_private->values _webkit_setBool:value forKey:_key];
if (_private->autosaves)
[[NSUserDefaults standardUserDefaults] setBool:value forKey:_key];
[self _postPreferencesChangesNotification];
*/
#import <WebKit/WebBridge.h>
#import <WebKit/WebResourcePrivate.h>
+#import <WebKit/WebNSDictionaryExtras.h>
#import <WebKit/WebNSURLExtras.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
-#import <Foundation/NSURL_NSURLExtras.h>
-
NSString *WebResourceDataKey = @"WebResourceData";
NSString *WebResourceFrameNameKey = @"WebResourceFrameName";
NSString *WebResourceMIMETypeKey = @"WebResourceMIMEType";
}
NSData *data = [propertyList objectForKey:WebResourceDataKey];
- NSString *URLString = [propertyList _web_stringForKey:WebResourceURLKey];
+ NSString *URLString = [propertyList _webkit_stringForKey:WebResourceURLKey];
return [self _initWithData:[data isKindOfClass:[NSData class]] ? data : nil
URL:URLString ? [NSURL _web_URLWithDataAsString:URLString] : nil
- MIMEType:[propertyList _web_stringForKey:WebResourceMIMETypeKey]
- textEncodingName:[propertyList _web_stringForKey:WebResourceTextEncodingNameKey]
- frameName:[propertyList _web_stringForKey:WebResourceFrameNameKey]
+ MIMEType:[propertyList _webkit_stringForKey:WebResourceMIMETypeKey]
+ textEncodingName:[propertyList _webkit_stringForKey:WebResourceTextEncodingNameKey]
+ frameName:[propertyList _webkit_stringForKey:WebResourceFrameNameKey]
response:response
copyData:NO];
}
- (NSFileWrapper *)_fileWrapperRepresentation
{
NSFileWrapper *wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:_private->data] autorelease];
- [wrapper setPreferredFilename:[_private->URL _web_suggestedFilenameWithMIMEType:_private->MIMEType]];
+ [wrapper setPreferredFilename:[_private->URL _webkit_suggestedFilenameWithMIMEType:_private->MIMEType]];
return wrapper;
}
#import <WebKit/WebKitNSStringExtras.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebNSDataExtras.h>
+#import <WebKit/WebNSDictionaryExtras.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebNSPrintOperationExtras.h>
#import <WebCore/WebCoreSettings.h>
#import <WebCore/WebCoreView.h>
-#import <Foundation/NSDictionary_NSURLExtras.h>
#import <Foundation/NSURLConnection.h>
#import <Foundation/NSURLDownloadPrivate.h>
#import <Foundation/NSURLFileTypeMappings.h>
// Simple optimization that avoids loading the plug-in DB and image types for the HTML case.
if ([self canShowMIMETypeAsHTML:MIMEType]) {
- viewClass = [[WebFrameView _viewTypesAllowImageTypeOmission:YES] _web_objectForMIMEType:MIMEType];
- repClass = [[WebDataSource _repTypesAllowImageTypeOmission:YES] _web_objectForMIMEType:MIMEType];
+ viewClass = [[WebFrameView _viewTypesAllowImageTypeOmission:YES] _webkit_objectForMIMEType:MIMEType];
+ repClass = [[WebDataSource _repTypesAllowImageTypeOmission:YES] _webkit_objectForMIMEType:MIMEType];
if (viewClass && repClass) {
if (vClass) {
*vClass = viewClass;
[WebPluginDatabase installedPlugins];
// Load the image types and get the view class and rep class. This should be the fullest picture of all handled types.
- viewClass = [[WebFrameView _viewTypesAllowImageTypeOmission:NO] _web_objectForMIMEType:MIMEType];
- repClass = [[WebDataSource _repTypesAllowImageTypeOmission:NO] _web_objectForMIMEType:MIMEType];
+ viewClass = [[WebFrameView _viewTypesAllowImageTypeOmission:NO] _webkit_objectForMIMEType:MIMEType];
+ repClass = [[WebDataSource _repTypesAllowImageTypeOmission:NO] _webkit_objectForMIMEType:MIMEType];
if (viewClass && repClass) {
// Special-case WebTextView for text types that shouldn't be shown.
if (viewClass == [WebTextView class] &&
if (!_private->progressItems)
_private->progressItems = [[NSMutableDictionary alloc] init];
- [_private->progressItems _web_setObject:item forUncopiedKey:connectionDelegate];
+ [_private->progressItems _webkit_setObject:item forUncopiedKey:connectionDelegate];
[item release];
}